[PATCH] omap: remoteproc: set bootaddr support

Subsystems: arm port, remote processor (remoteproc) subsystem, the rest

STALE5094d

3 messages, 2 authors, 2012-09-11 · open the first message on its own page

[PATCH] omap: remoteproc: set bootaddr support

From: Juan Gutierrez <hidden>
Date: 2012-08-15 15:25:48

Some remote processors (like Omap4's DSP) need to explicitly
set a boot address from which they start executing code when
taken out of reset.

Support for this has been added to remoteproc code through
a set_bootaddr function in the platform data which, if needed,
must be set according to the backend rproc.

For omap4's dsp we can use the next control funtion:

  .set_bootaddr  = omap_ctrl_write_dsp_boot_addr

Signed-off-by: Juan Gutierrez <redacted>
Signed-off-by: Suman Anna <redacted>
---
 arch/arm/plat-omap/include/plat/remoteproc.h |    2 ++
 drivers/remoteproc/omap_remoteproc.c         |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-omap/include/plat/remoteproc.h b/arch/arm/plat-omap/include/plat/remoteproc.h
index b10eac8..3c1c644 100644
--- a/arch/arm/plat-omap/include/plat/remoteproc.h
+++ b/arch/arm/plat-omap/include/plat/remoteproc.h
@@ -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)
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index a1f7ac1..a0c168c 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -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 */
-- 
1.7.1

[PATCH] omap: remoteproc: set bootaddr support

From: Ohad Ben-Cohen <hidden>
Date: 2012-09-11 12:30:54

Hi Juan,

On Wed, Aug 15, 2012 at 6:25 PM, Juan Gutierrez [off-list ref] wrote:
Some remote processors (like Omap4's DSP) need to explicitly
set a boot address from which they start executing code when
taken out of reset.

Support for this has been added to remoteproc code through
a set_bootaddr function in the platform data which, if needed,
must be set according to the backend rproc.

For omap4's dsp we can use the next control funtion:

  .set_bootaddr  = omap_ctrl_write_dsp_boot_addr

Signed-off-by: Juan Gutierrez <redacted>
Applied with slight changes to the commit log. Thanks!

Ohad.

[PATCH] omap: remoteproc: set bootaddr support

From: Gutierrez, Juan <hidden>
Date: 2012-09-11 14:47:40

Cool. Thanks Ohad

On Tue, Sep 11, 2012 at 7:30 AM, Ohad Ben-Cohen [off-list ref] wrote:
Hi Juan,

On Wed, Aug 15, 2012 at 6:25 PM, Juan Gutierrez [off-list ref] wrote:
quoted
Some remote processors (like Omap4's DSP) need to explicitly
set a boot address from which they start executing code when
taken out of reset.

Support for this has been added to remoteproc code through
a set_bootaddr function in the platform data which, if needed,
must be set according to the backend rproc.

For omap4's dsp we can use the next control funtion:

  .set_bootaddr  = omap_ctrl_write_dsp_boot_addr

Signed-off-by: Juan Gutierrez <redacted>
Applied with slight changes to the commit log. Thanks!

Ohad.


-- 
Thanks

juan gutierrez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120911/c9be81c6/attachment-0001.html>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help