]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
remoteproc/omap: set bootaddr support
authorJuan Gutierrez <jgutierrez@ti.com>
Wed, 15 Aug 2012 15:25:48 +0000 (10:25 -0500)
committerOhad Ben-Cohen <ohad@wizery.com>
Tue, 11 Sep 2012 12:24:14 +0000 (15:24 +0300)
Some remote processors (like OMAP4's DSP) require we explicitly
set a boot address from which they'd start executing code when
taken out of reset.

Support for this is now being added to the omap-specific remoteproc
driver through a set_bootaddr function in the platform data which,
if needed, must be set according to the backend remote processor.

For OMAP4's dsp we can use the following control function:

  .set_bootaddr  = omap_ctrl_write_dsp_boot_addr

Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
[ohad: slight changes to the commit log]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
arch/arm/plat-omap/include/plat/remoteproc.h
drivers/remoteproc/omap_remoteproc.c

index b10eac89e2e9c419f8dc82fe5cae5e444f5b6b0e..3c1c6444ec4b7f87c39ce8645441ba20bcc2cd77 100644 (file)
@@ -30,6 +30,7 @@ struct platform_device;
  * @ops: start/stop rproc handlers
  * @device_enable: omap-specific handler for enabling a device
  * @device_shutdown: omap-specific handler for shutting down a device
+ * @set_bootaddr: omap-specific handler for setting the rproc boot address
  */
 struct omap_rproc_pdata {
        const char *name;
@@ -40,6 +41,7 @@ struct omap_rproc_pdata {
        const struct rproc_ops *ops;
        int (*device_enable) (struct platform_device *pdev);
        int (*device_shutdown) (struct platform_device *pdev);
+       void(*set_bootaddr)(u32);
 };
 
 #if defined(CONFIG_OMAP_REMOTEPROC) || defined(CONFIG_OMAP_REMOTEPROC_MODULE)
index a1f7ac1f8cf6d765ab809a4979f6b51ca4ca30ff..a0c168cde90da998817802ddb192f2608076fdb8 100644 (file)
@@ -116,6 +116,9 @@ static int omap_rproc_start(struct rproc *rproc)
        struct omap_rproc_pdata *pdata = pdev->dev.platform_data;
        int ret;
 
+       if (pdata->set_bootaddr)
+               pdata->set_bootaddr(rproc->bootaddr);
+
        oproc->nb.notifier_call = omap_rproc_mbox_callback;
 
        /* every omap rproc is assigned a mailbox instance for messaging */