aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2011-09-01 21:38:41 -0700
committerBrian Swetland <swetland@google.com>2011-10-06 18:13:57 -0700
commit8aeda1671adcebbf445a93aa7ce7ee6c4cc9e52a (patch)
treefedaa6a04dca11fc48d77fcb871bfaa0cbc11d92 /drivers/remoteproc
parenta6c42edd60f313278b5f81e4c927ab7460945377 (diff)
downloadkernel_samsung_tuna-8aeda1671adcebbf445a93aa7ce7ee6c4cc9e52a.zip
kernel_samsung_tuna-8aeda1671adcebbf445a93aa7ce7ee6c4cc9e52a.tar.gz
kernel_samsung_tuna-8aeda1671adcebbf445a93aa7ce7ee6c4cc9e52a.tar.bz2
omap: remoteproc: invoke secure services for real
The stubbed secure service authentication in the remoteproc has been replaced with an actual rproc_drm_invoke_service function call. This function integrates the rproc with the smc driver allowing the actual secure services calls to authenticate and firewall the ducati image while enabling secure mode, and uninstall firewalls while disabling secure mode. Change-Id: Ibce90e7b63f9b154bcb5196fce2472e296296de7 Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/omap_remoteproc.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index 72a7d60..50dcd50 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -22,6 +22,7 @@
#include <linux/platform_device.h>
#include <linux/remoteproc.h>
#include <linux/sched.h>
+#include <linux/rproc_drm.h>
#include <plat/iommu.h>
#include <plat/omap_device.h>
@@ -393,9 +394,13 @@ static inline int omap_rproc_start(struct rproc *rproc, u64 bootaddr)
int ret = 0;
if (rproc->secure_mode) {
- pr_err("TODO: Call secure service to authenticate\n");
- if (ret)
+ rproc->secure_reset = true;
+ ret = rproc_drm_invoke_service(rproc->secure_mode);
+ if (ret) {
+ dev_err(rproc->dev, "rproc_drm_invoke_service failed "
+ "for secure_enable ret = 0x%x\n", ret);
return -ENXIO;
+ }
}
#ifdef CONFIG_REMOTE_PROC_AUTOSUSPEND
@@ -450,9 +455,18 @@ static inline int omap_rproc_stop(struct rproc *rproc)
struct omap_rproc_pdata *pdata = dev->platform_data;
struct omap_rproc_timers_info *timers = pdata->timers;
int ret, i;
+
#ifdef CONFIG_REMOTE_PROC_AUTOSUSPEND
_destroy_pm_flags(rproc);
#endif
+ if (rproc->secure_reset) {
+ ret = rproc_drm_invoke_service(false);
+ if (ret)
+ dev_err(rproc->dev, "rproc_drm_invoke_service failed "
+ "for secure disable ret = 0x%x\n", ret);
+ rproc->secure_reset = false;
+ }
+
ret = omap_device_idle(pdev);
if (ret)
goto err;