]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blobdiff - security/tlk_driver/ote_device.c
HACK: modify smc calls mapping for foster_e
[sojka/nv-tegra/linux-3.10.git] / security / tlk_driver / ote_device.c
index ded08cb09a82c458217ce50c99079d34e7272b41..3cdb40a9d6478ef6c4bed02cef5852be11377bb0 100644 (file)
@@ -57,7 +57,11 @@ static int te_create_free_cmd_list(struct tlk_device *dev)
         * phys addresses are passed in do_smc).
         */
        dev->req_param_buf = NULL;
-       use_reqbuf = !send_smc(TE_SMC_REGISTER_REQ_BUF, 0, 0);
+
+       if (of_machine_is_compatible("nvidia,foster-e"))
+               use_reqbuf = !send_smc(TE_SMC_REGISTER_REQ_BUF_LEGACY, 0, 0);
+       else
+               use_reqbuf = !send_smc(TE_SMC_REGISTER_REQ_BUF, 0, 0);
 
        if (use_reqbuf) {
                dev->req_param_buf = kmalloc((2 * PAGE_SIZE), GFP_KERNEL);
@@ -67,6 +71,10 @@ static int te_create_free_cmd_list(struct tlk_device *dev)
                dev->param_addr = (struct te_oper_param *)
                                        (dev->req_param_buf + PAGE_SIZE);
 
+       if (of_machine_is_compatible("nvidia,foster-e"))
+               send_smc(TE_SMC_REGISTER_REQ_BUF_LEGACY,
+                               (uintptr_t)dev->req_addr, (2 * PAGE_SIZE));
+       else
                send_smc(TE_SMC_REGISTER_REQ_BUF,
                                (uintptr_t)dev->req_addr, (2 * PAGE_SIZE));
        } else {