[PATCH] omap: remoteproc: set bootaddr support

2012-08-15 Thread Juan Gutierrez
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 jgutier...@ti.com
Signed-off-by: Suman Anna s-a...@ti.com
---
 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

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 0/2] Fixes in preparation for enabling Dsp in omap4

2012-05-10 Thread Juan Gutierrez
This set of patches provides the foundation for enabling
OMAP4 Dsp as remote processor.

The first patch is a generic fix for mailbox in mach-omap2.
Without this patch, the irq for a mailbox instance other than
the first one is not properly enabled.

The second patch fixes the clock and irq names for the Tesla
iommu in omap4 and enable it by default.

History:
===
Changes from v3:
 - Changes in patch 1:
  Unrolling blocking_notifier_chain_register if
  omap_mbox_startup fails
 - Changes in patch 2:
  Adding Acked-by: Ohad Ben-Cohen o...@wizery.com 

Changes from v2:
 - Patch 3 is removed from this series.
  If http://marc.info/?l=linux-omapm=133601127627420w=2
  is merged, it might be revisited.

 - Changes in patch 1:
  - Use omap_mbox_enable/disable_irq APIs instead of the
internal ops.
  - Move notifier_block before enabling the mbox's irq to
avoid possible race.
 - Changes in patch 2:
  - Commit message revisited to clarify the need of the change.

Changes from v1:
 - Whitespaces and tabs were added when sending the patches
   by the mailer, due to wrong configuration.
 - No code changes.

Juan Gutierrez (2):
  omap: mailbox: enable mailbox irq per instance
  omap4: iommu: fix irq and clock name for dsp-iommu

 arch/arm/mach-omap2/mailbox.c|2 --
 arch/arm/mach-omap2/omap-iommu.c |6 ++
 arch/arm/plat-omap/mailbox.c |   13 +
 3 files changed, 11 insertions(+), 10 deletions(-)

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 1/2] omap: mailbox: enable mailbox irq per instance

2012-05-10 Thread Juan Gutierrez
The machine-specific omap2_mbox_startup is called only once
to initialize the whole mbox module. Enabling mbox irq at
startup is only enabling the irq of the very first mailbox
instance created.

The enable_irq function should be called every time a
new mbox instance is created/opened, in the generic
platform mailbox layer.

Also, the notifier_block registration is called before
enabling the mbox's irq to avoid possible race of receiving
an interrupt without invoking the user's notifier callback.

Signed-off-by: Juan Gutierrez jgutier...@ti.com
Signed-off-by: Suman Anna s-a...@ti.com
---
 arch/arm/mach-omap2/mailbox.c |2 --
 arch/arm/plat-omap/mailbox.c  |   13 +
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 415a6f1..f727034 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -83,8 +83,6 @@ static int omap2_mbox_startup(struct omap_mbox *mbox)
l = mbox_read_reg(MAILBOX_REVISION);
pr_debug(omap mailbox rev %d.%d\n, (l  0xf0)  4, (l  0x0f));
 
-   omap2_mbox_enable_irq(mbox, IRQ_RX);
-
return 0;
 }
 
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index ad32621..5e13c38 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -282,6 +282,8 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
}
mbox-rxq = mq;
mq-mbox = mbox;
+
+   omap_mbox_enable_irq(mbox, IRQ_RX);
}
mutex_unlock(mbox_configured_lock);
return 0;
@@ -305,6 +307,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
mutex_lock(mbox_configured_lock);
 
if (!--mbox-use_count) {
+   omap_mbox_disable_irq(mbox, IRQ_RX);
free_irq(mbox-irq, mbox);
tasklet_kill(mbox-txq-tasklet);
flush_work_sync(mbox-rxq-work);
@@ -338,13 +341,15 @@ struct omap_mbox *omap_mbox_get(const char *name, struct 
notifier_block *nb)
if (!mbox)
return ERR_PTR(-ENOENT);
 
-   ret = omap_mbox_startup(mbox);
-   if (ret)
-   return ERR_PTR(-ENODEV);
-
if (nb)
blocking_notifier_chain_register(mbox-notifier, nb);
 
+   ret = omap_mbox_startup(mbox);
+   if (ret) {
+   blocking_notifier_chain_unregister(mbox-notifier, nb);
+   return ERR_PTR(-ENODEV);
+   }
+
return mbox;
 }
 EXPORT_SYMBOL(omap_mbox_get);
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 2/2] omap4: iommu: fix irq and clock name for dsp-iommu

2012-05-10 Thread Juan Gutierrez
Irq and clock names were wrong for dsp iommu configuration
for omap4.

- Renamed tesla_ick to dsp_fck:
   This is required because the new naming convention introduced
   by: commit 0e43327 OMAP4 clock: Fix clock names and align
   with hwmod names

- Renamed INT_44XX_DSP_MMU to OMAP44XX_IRQ_TESLA_MMU.
   Naming convention adopted since: commit e927f8d omap4: Add
   auto-generated irq and dma headers

- dsp-iommu is enabled by default.

Signed-off-by: Juan Gutierrez jgutier...@ti.com
Acked-by: Ohad Ben-Cohen o...@wizery.com
---
 arch/arm/mach-omap2/omap-iommu.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index ac49384..1be8bcb 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -73,19 +73,17 @@ static struct iommu_device omap4_devices[] = {
.da_end = 0xF000,
},
},
-#if defined(CONFIG_MPU_TESLA_IOMMU)
{
.base = OMAP4_MMU2_BASE,
-   .irq = INT_44XX_DSP_MMU,
+   .irq = OMAP44XX_IRQ_TESLA_MMU,
.pdata = {
.name = tesla,
.nr_tlb_entries = 32,
-   .clk_name = tesla_ick,
+   .clk_name = dsp_fck,
.da_start = 0x0,
.da_end = 0xF000,
},
},
-#endif
 };
 #define NR_OMAP4_IOMMU_DEVICES ARRAY_SIZE(omap4_devices)
 static struct platform_device *omap4_iommu_pdev[NR_OMAP4_IOMMU_DEVICES];
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 0/2] Fixes in preparation for enabling Dsp in omap4

2012-05-09 Thread Juan Gutierrez
This set of patches provides the foundation for enabling
OMAP4 Dsp as remote processor.

The first patch is a generic fix for mailbox in mach-omap2.
Without this patch, the irq for a mailbox instance other than
the first one is not properly enabled.

The second patch fixes the clock and irq names for the Tesla
iommu in omap4 and enable it by default.

History:
===
Changes from v2:
 - Patch 3 is removed from this series. 
   If http://marc.info/?l=linux-omapm=133601127627420w=2
   is merged, it might be revisited.

 - Changes in patch 1:
   - Use omap_mbox_enable/disable_irq APIs instead of the
 internal ops.
   - Move notifier_block before enabling the mbox's irq to
 avoid possible race.
 - Changes in patch 2:
   - Commit message revisited to clarify the need of the change.

Changes from v1:
  - Whitespaces and tabs were added when sending the patches
by the mailer, due to wrong configuration. 
  - No code changes.


Juan Gutierrez (2):
  omap: mailbox: enable mailbox irq per instance
  omap4: iommu: fix irq and clock name for dsp-iommu

 arch/arm/mach-omap2/mailbox.c|2 --
 arch/arm/mach-omap2/omap-iommu.c |6 ++
 arch/arm/plat-omap/mailbox.c |9 ++---
 3 files changed, 8 insertions(+), 9 deletions(-)

-- 
1.7.5.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 1/2] omap: mailbox: enable mailbox irq per instance

2012-05-09 Thread Juan Gutierrez
The machine-specific omap2_mbox_startup is called only once
to initialize the whole mbox module. Enabling mbox irq at
startup is only enabling the irq of the very first mailbox
instance created.

The enable_irq function should be called every time a
new mbox instance is created/opened, in the generic
platform mailbox layer.

Also, the notifier_block registration is called before
enabling the mbox's irq to avoid possible race of receiving
an interrupt without invoking the user's notifier callback.

Signed-off-by: Juan Gutierrez jgutier...@ti.com
Signed-off-by: Suman Anna s-a...@ti.com
---
 arch/arm/mach-omap2/mailbox.c |2 --
 arch/arm/plat-omap/mailbox.c  |9 ++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 415a6f1..f727034 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -83,8 +83,6 @@ static int omap2_mbox_startup(struct omap_mbox *mbox)
l = mbox_read_reg(MAILBOX_REVISION);
pr_debug(omap mailbox rev %d.%d\n, (l  0xf0)  4, (l  0x0f));
 
-   omap2_mbox_enable_irq(mbox, IRQ_RX);
-
return 0;
 }
 
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index ad32621..233f85d 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -282,6 +282,8 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
}
mbox-rxq = mq;
mq-mbox = mbox;
+
+   omap_mbox_enable_irq(mbox, IRQ_RX);
}
mutex_unlock(mbox_configured_lock);
return 0;
@@ -305,6 +307,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
mutex_lock(mbox_configured_lock);
 
if (!--mbox-use_count) {
+   omap_mbox_disable_irq(mbox, IRQ_RX);
free_irq(mbox-irq, mbox);
tasklet_kill(mbox-txq-tasklet);
flush_work_sync(mbox-rxq-work);
@@ -338,13 +341,13 @@ struct omap_mbox *omap_mbox_get(const char *name, struct 
notifier_block *nb)
if (!mbox)
return ERR_PTR(-ENOENT);
 
+   if (nb)
+   blocking_notifier_chain_register(mbox-notifier, nb);
+
ret = omap_mbox_startup(mbox);
if (ret)
return ERR_PTR(-ENODEV);
 
-   if (nb)
-   blocking_notifier_chain_register(mbox-notifier, nb);
-
return mbox;
 }
 EXPORT_SYMBOL(omap_mbox_get);
-- 
1.7.5.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 2/2] omap4: iommu: fix irq and clock name for dsp-iommu

2012-05-09 Thread Juan Gutierrez
Irq and clock names were wrong for dsp iommu configuration
for omap4.

- Renamed tesla_ick to dsp_fck:
   This is required because the new naming convention introduced
   by: commit 0e43327 OMAP4 clock: Fix clock names and align
   with hwmod names

- Renamed INT_44XX_DSP_MMU to OMAP44XX_IRQ_TESLA_MMU.
   Naming convention adopted since: commit e927f8d omap4: Add
   auto-generated irq and dma headers

- dsp-iommu is enabled by default.

Signed-off-by: Juan Gutierrez jgutier...@ti.com
---
 arch/arm/mach-omap2/omap-iommu.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index ac49384..1be8bcb 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -73,19 +73,17 @@ static struct iommu_device omap4_devices[] = {
.da_end = 0xF000,
},
},
-#if defined(CONFIG_MPU_TESLA_IOMMU)
{
.base = OMAP4_MMU2_BASE,
-   .irq = INT_44XX_DSP_MMU,
+   .irq = OMAP44XX_IRQ_TESLA_MMU,
.pdata = {
.name = tesla,
.nr_tlb_entries = 32,
-   .clk_name = tesla_ick,
+   .clk_name = dsp_fck,
.da_start = 0x0,
.da_end = 0xF000,
},
},
-#endif
 };
 #define NR_OMAP4_IOMMU_DEVICES ARRAY_SIZE(omap4_devices)
 static struct platform_device *omap4_iommu_pdev[NR_OMAP4_IOMMU_DEVICES];
-- 
1.7.5.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 0/3] Fixes in preparation for enabling Dsp in omap4

2012-04-13 Thread Juan Gutierrez
This set of patches provides the foundation for enabling
OMAP4 Dsp (Tesla) as remote processor.

The first patch is a generic fix for mailbox in mach-omap2.
Without this patch, the irq for a mailbox instance other than
the first one is not properly enabled.

The second patch fixes the clock and irq names for the Tesla
iommu in omap4 and enable it by default.

The third patch adds a generic mechanism in remoteproc for
loading the boot address in a special bootloader register, if
needed by the remoteproc like is the case for Tesla in omap4.

History:
===
Changes from v1:
  - Whitespaces and tabs were added when sending the patches
by the mailer, due to wrong configuration. 
  - No code changes.

Juan Gutierrez (3):
  omap: mailbox: enable mailbox irq per instance
  OMAP4: iommu: fix irq and clock name for dsp-iommu
  omap: remoteproc: add support for a boot register

 arch/arm/mach-omap2/mailbox.c|2 --
 arch/arm/mach-omap2/omap-iommu.c |6 ++
 arch/arm/plat-omap/include/plat/remoteproc.h |2 ++
 arch/arm/plat-omap/mailbox.c |3 +++
 drivers/remoteproc/omap_remoteproc.c |   19 +++
 5 files changed, 26 insertions(+), 6 deletions(-)

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/3] omap: mailbox: enable mailbox irq per instance

2012-04-13 Thread Juan Gutierrez
The machine-specific omap2_mbox_startup is called only once
to initialize the whole mbox module. Enabling mbox irq at
startup is only enabling the irq of the very first mailbox
instance created.

The enable_irq function should be called every time a
new mbox instance is created, in the generic platform
mailbox layer.

Signed-off-by: Juan Gutierrez jgutier...@ti.com
Signed-off-by: Suman Anna s-a...@ti.com
---
 arch/arm/mach-omap2/mailbox.c |2 --
 arch/arm/plat-omap/mailbox.c  |3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 415a6f1..f727034 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -83,8 +83,6 @@ static int omap2_mbox_startup(struct omap_mbox *mbox)
l = mbox_read_reg(MAILBOX_REVISION);
pr_debug(omap mailbox rev %d.%d\n, (l  0xf0)  4, (l  0x0f));
 
-   omap2_mbox_enable_irq(mbox, IRQ_RX);
-
return 0;
 }
 
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index ad32621..ebc1ba5 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -282,6 +282,8 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
}
mbox-rxq = mq;
mq-mbox = mbox;
+
+   mbox-ops-enable_irq(mbox, IRQ_RX);
}
mutex_unlock(mbox_configured_lock);
return 0;
@@ -305,6 +307,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
mutex_lock(mbox_configured_lock);
 
if (!--mbox-use_count) {
+   mbox-ops-disable_irq(mbox, IRQ_RX);
free_irq(mbox-irq, mbox);
tasklet_kill(mbox-txq-tasklet);
flush_work_sync(mbox-rxq-work);
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/3] OMAP4: iommu: fix irq and clock name for dsp-iommu

2012-04-13 Thread Juan Gutierrez
Irq and clock names were wrong for dsp iommu configuration
for omap4.

Renamed tesla_ick to dsp_fck.
Renamed INT_44XX_DSP_MMU to OMAP44XX_IRQ_TESLA_MMU.

dsp-iommu is enabled by default.

Signed-off-by: Juan Gutierrez jgutier...@ti.com
---
 arch/arm/mach-omap2/omap-iommu.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index ac49384..1be8bcb 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -73,19 +73,17 @@ static struct iommu_device omap4_devices[] = {
.da_end = 0xF000,
},
},
-#if defined(CONFIG_MPU_TESLA_IOMMU)
{
.base = OMAP4_MMU2_BASE,
-   .irq = INT_44XX_DSP_MMU,
+   .irq = OMAP44XX_IRQ_TESLA_MMU,
.pdata = {
.name = tesla,
.nr_tlb_entries = 32,
-   .clk_name = tesla_ick,
+   .clk_name = dsp_fck,
.da_start = 0x0,
.da_end = 0xF000,
},
},
-#endif
 };
 #define NR_OMAP4_IOMMU_DEVICES ARRAY_SIZE(omap4_devices)
 static struct platform_device *omap4_iommu_pdev[NR_OMAP4_IOMMU_DEVICES];
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 3/3] omap: remoteproc: add support for a boot register

2012-04-13 Thread Juan Gutierrez
Some remote processors (like Omap4's DSP) need to explicitly
configure a boot address in a special register or memory
location, and this is the address from which they start
executing code when taken out of reset.

Support for this infrastructure has been added to remoteproc
code. The memory or register address where the boot address
is to be stored is supplied through the boot_reg field of the
platform data in the remoteproc. The omap_rproc_start function
will fetch the boot address from the image, and write this
address into the boot register, if provided, before taking the
processor out of reset.

Signed-off-by: Juan Gutierrez jgutier...@ti.com
Signed-off-by: Suman Anna s-a...@ti.com
---
 arch/arm/plat-omap/include/plat/remoteproc.h |2 ++
 drivers/remoteproc/omap_remoteproc.c |   19 +++
 2 files changed, 21 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..2066a14 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
+ * @boot_reg: physical address of the control register for storing 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);
+   u32 boot_reg;
 };
 
 #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 69425c4..e9b2f85 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -39,11 +39,13 @@
  * @mbox: omap mailbox handle
  * @nb: notifier block that will be invoked on inbound mailbox messages
  * @rproc: rproc handle
+ * @boot_reg: virtual address of the register where the bootaddr is stored
  */
 struct omap_rproc {
struct omap_mbox *mbox;
struct notifier_block nb;
struct rproc *rproc;
+   void __iomem *boot_reg;
 };
 
 /**
@@ -114,6 +116,10 @@ static int omap_rproc_start(struct rproc *rproc)
struct omap_rproc_pdata *pdata = pdev-dev.platform_data;
int ret;
 
+   /* load remote processor boot address if needed. */
+   if (oproc-boot_reg)
+   writel(rproc-bootaddr, oproc-boot_reg);
+
oproc-nb.notifier_call = omap_rproc_mbox_callback;
 
/* every omap rproc is assigned a mailbox instance for messaging */
@@ -194,6 +200,12 @@ static int __devinit omap_rproc_probe(struct 
platform_device *pdev)
oproc = rproc-priv;
oproc-rproc = rproc;
 
+   if (pdata-boot_reg) {
+   oproc-boot_reg = ioremap(pdata-boot_reg, sizeof(u32));
+   if (!oproc-boot_reg)
+   goto err_ioremap;
+   }
+
platform_set_drvdata(pdev, rproc);
 
ret = rproc_register(rproc);
@@ -203,6 +215,9 @@ static int __devinit omap_rproc_probe(struct 
platform_device *pdev)
return 0;
 
 free_rproc:
+   if (oproc-boot_reg)
+   iounmap(oproc-boot_reg);
+err_ioremap:
rproc_free(rproc);
return ret;
 }
@@ -210,6 +225,10 @@ free_rproc:
 static int __devexit omap_rproc_remove(struct platform_device *pdev)
 {
struct rproc *rproc = platform_get_drvdata(pdev);
+   struct omap_rproc *oproc = rproc-priv;
+
+   if (oproc-boot_reg)
+   iounmap(oproc-boot_reg);
 
return rproc_unregister(rproc);
 }
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html