* [PATCH 0/3] Fixes in preparation for enabling Dsp in omap4 [not found] <1334352255-48584-1-git-send-email-jgutierrez@ti.com> @ 2012-04-13 21:53 ` Gutierrez, Juan [not found] ` <1334352255-48584-2-git-send-email-jgutierrez@ti.com> ` (2 subsequent siblings) 3 siblings, 0 replies; 12+ messages in thread From: Gutierrez, Juan @ 2012-04-13 21:53 UTC (permalink / raw) To: ohad, linux-omap, linux-arm-kernel; +Cc: jgutierrez, s-anna 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. 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(-) -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/3] Fixes in preparation for enabling Dsp in omap4 @ 2012-04-13 21:53 ` Gutierrez, Juan 0 siblings, 0 replies; 12+ messages in thread From: Gutierrez, Juan @ 2012-04-13 21:53 UTC (permalink / raw) To: linux-arm-kernel 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. 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(-) -- 1.7.5.4 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Fixes in preparation for enabling Dsp in omap4 2012-04-13 21:53 ` Gutierrez, Juan @ 2012-04-13 23:02 ` Kevin Hilman -1 siblings, 0 replies; 12+ messages in thread From: Kevin Hilman @ 2012-04-13 23:02 UTC (permalink / raw) To: Gutierrez, Juan; +Cc: ohad, linux-omap, linux-arm-kernel, s-anna "Gutierrez, Juan" <jgutierrez@ti.com> writes: > This set of patches provides the foundation for enabling > OMAP4 Dsp (Tesla) as remote processor. Looks like this series suffers from space/tab and various whitespace problems. Please run them through scripts/checkpatch.pl, or possibly your mailer is mangling them. Kevin ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/3] Fixes in preparation for enabling Dsp in omap4 @ 2012-04-13 23:02 ` Kevin Hilman 0 siblings, 0 replies; 12+ messages in thread From: Kevin Hilman @ 2012-04-13 23:02 UTC (permalink / raw) To: linux-arm-kernel "Gutierrez, Juan" <jgutierrez@ti.com> writes: > This set of patches provides the foundation for enabling > OMAP4 Dsp (Tesla) as remote processor. Looks like this series suffers from space/tab and various whitespace problems. Please run them through scripts/checkpatch.pl, or possibly your mailer is mangling them. Kevin ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Fixes in preparation for enabling Dsp in omap4 2012-04-13 23:02 ` Kevin Hilman @ 2012-04-13 23:06 ` Gutierrez, Juan -1 siblings, 0 replies; 12+ messages in thread From: Gutierrez, Juan @ 2012-04-13 23:06 UTC (permalink / raw) To: Kevin Hilman; +Cc: ohad, linux-omap, linux-arm-kernel, s-anna Hi Kevin Yes, I ran the checkpatch, but I indeed had some problems sending the patches to the list :( so I edited the patch directly in the mailer. I will try one more time with git send-email On Fri, Apr 13, 2012 at 6:02 PM, Kevin Hilman <khilman@ti.com> wrote: > "Gutierrez, Juan" <jgutierrez@ti.com> writes: > >> This set of patches provides the foundation for enabling >> OMAP4 Dsp (Tesla) as remote processor. > > Looks like this series suffers from space/tab and various whitespace > problems. > > Please run them through scripts/checkpatch.pl, or possibly your mailer > is mangling them. > > Kevin -- Thanks juan gutierrez ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/3] Fixes in preparation for enabling Dsp in omap4 @ 2012-04-13 23:06 ` Gutierrez, Juan 0 siblings, 0 replies; 12+ messages in thread From: Gutierrez, Juan @ 2012-04-13 23:06 UTC (permalink / raw) To: linux-arm-kernel Hi Kevin Yes, I ran the checkpatch, but I indeed had some problems sending the patches to the list :( so I edited the patch directly in the mailer. I will try one more time with git send-email On Fri, Apr 13, 2012 at 6:02 PM, Kevin Hilman <khilman@ti.com> wrote: > "Gutierrez, Juan" <jgutierrez@ti.com> writes: > >> This set of patches provides the foundation for enabling >> OMAP4 Dsp (Tesla) as remote processor. > > Looks like this series suffers from space/tab and various whitespace > problems. > > Please run them through scripts/checkpatch.pl, or possibly your mailer > is mangling them. > > Kevin -- Thanks juan gutierrez ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <1334352255-48584-2-git-send-email-jgutierrez@ti.com>]
* [PATCH 1/3] omap: mailbox: enable mailbox irq per instance [not found] ` <1334352255-48584-2-git-send-email-jgutierrez@ti.com> @ 2012-04-13 21:53 ` Gutierrez, Juan 0 siblings, 0 replies; 12+ messages in thread From: Gutierrez, Juan @ 2012-04-13 21:53 UTC (permalink / raw) To: ohad, linux-omap, linux-arm-kernel; +Cc: jgutierrez, s-anna 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 <jgutierrez@ti.com> Signed-off-by: Suman Anna <s-anna@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.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/3] omap: mailbox: enable mailbox irq per instance @ 2012-04-13 21:53 ` Gutierrez, Juan 0 siblings, 0 replies; 12+ messages in thread From: Gutierrez, Juan @ 2012-04-13 21:53 UTC (permalink / raw) To: linux-arm-kernel 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 <jgutierrez@ti.com> Signed-off-by: Suman Anna <s-anna@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.5.4 ^ permalink raw reply related [flat|nested] 12+ messages in thread
[parent not found: <1334352255-48584-3-git-send-email-jgutierrez@ti.com>]
* [PATCH 2/3] OMAP4: iommu: fix irq and clock name for dsp-iommu [not found] ` <1334352255-48584-3-git-send-email-jgutierrez@ti.com> @ 2012-04-13 21:53 ` Gutierrez, Juan 0 siblings, 0 replies; 12+ messages in thread From: Gutierrez, Juan @ 2012-04-13 21:53 UTC (permalink / raw) To: ohad, linux-omap, linux-arm-kernel; +Cc: jgutierrez, s-anna 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 <jgutierrez@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 = 0xFFFFF000, }, }, -#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 = 0xFFFFF000, }, }, -#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 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/3] OMAP4: iommu: fix irq and clock name for dsp-iommu @ 2012-04-13 21:53 ` Gutierrez, Juan 0 siblings, 0 replies; 12+ messages in thread From: Gutierrez, Juan @ 2012-04-13 21:53 UTC (permalink / raw) To: linux-arm-kernel 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 <jgutierrez@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 = 0xFFFFF000, ? ? ? ? ? ? ? ?}, ? ? ? ?}, -#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 = 0xFFFFF000, ? ? ? ? ? ? ? ?}, ? ? ? ?}, -#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 ^ permalink raw reply related [flat|nested] 12+ messages in thread
[parent not found: <1334352255-48584-4-git-send-email-jgutierrez@ti.com>]
* [PATCH 3/3] omap: remoteproc: add support for a boot register [not found] ` <1334352255-48584-4-git-send-email-jgutierrez@ti.com> @ 2012-04-13 21:53 ` Gutierrez, Juan 0 siblings, 0 replies; 12+ messages in thread From: Gutierrez, Juan @ 2012-04-13 21:53 UTC (permalink / raw) To: ohad, linux-omap, linux-arm-kernel; +Cc: jgutierrez, s-anna 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 <jgutierrez@ti.com> Signed-off-by: Suman Anna <s-anna@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.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/3] omap: remoteproc: add support for a boot register @ 2012-04-13 21:53 ` Gutierrez, Juan 0 siblings, 0 replies; 12+ messages in thread From: Gutierrez, Juan @ 2012-04-13 21:53 UTC (permalink / raw) To: linux-arm-kernel 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 <jgutierrez@ti.com> Signed-off-by: Suman Anna <s-anna@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.5.4 ^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-04-13 23:06 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1334352255-48584-1-git-send-email-jgutierrez@ti.com> 2012-04-13 21:53 ` [PATCH 0/3] Fixes in preparation for enabling Dsp in omap4 Gutierrez, Juan 2012-04-13 21:53 ` Gutierrez, Juan 2012-04-13 23:02 ` Kevin Hilman 2012-04-13 23:02 ` Kevin Hilman 2012-04-13 23:06 ` Gutierrez, Juan 2012-04-13 23:06 ` Gutierrez, Juan [not found] ` <1334352255-48584-2-git-send-email-jgutierrez@ti.com> 2012-04-13 21:53 ` [PATCH 1/3] omap: mailbox: enable mailbox irq per instance Gutierrez, Juan 2012-04-13 21:53 ` Gutierrez, Juan [not found] ` <1334352255-48584-3-git-send-email-jgutierrez@ti.com> 2012-04-13 21:53 ` [PATCH 2/3] OMAP4: iommu: fix irq and clock name for dsp-iommu Gutierrez, Juan 2012-04-13 21:53 ` Gutierrez, Juan [not found] ` <1334352255-48584-4-git-send-email-jgutierrez@ti.com> 2012-04-13 21:53 ` [PATCH 3/3] omap: remoteproc: add support for a boot register Gutierrez, Juan 2012-04-13 21:53 ` Gutierrez, Juan
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.