* [PATCH v4 0/2] Fixes in preparation for enabling Dsp in omap4
@ 2012-05-10 20:09 Juan Gutierrez
2012-05-10 20:09 ` [PATCH v4 1/2] omap: mailbox: enable mailbox irq per instance Juan Gutierrez
2012-05-10 20:09 ` [PATCH v4 2/2] omap4: iommu: fix irq and clock name for dsp-iommu Juan Gutierrez
0 siblings, 2 replies; 4+ messages in thread
From: Juan Gutierrez @ 2012-05-10 20:09 UTC (permalink / raw)
To: linux-arm-kernel
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 <ohad@wizery.com>
Changes from v2:
- Patch 3 is removed from this series.
If http://marc.info/?l=linux-omap&m=133601127627420&w=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(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v4 1/2] omap: mailbox: enable mailbox irq per instance
2012-05-10 20:09 [PATCH v4 0/2] Fixes in preparation for enabling Dsp in omap4 Juan Gutierrez
@ 2012-05-10 20:09 ` Juan Gutierrez
2012-05-10 20:39 ` Ohad Ben-Cohen
2012-05-10 20:09 ` [PATCH v4 2/2] omap4: iommu: fix irq and clock name for dsp-iommu Juan Gutierrez
1 sibling, 1 reply; 4+ messages in thread
From: Juan Gutierrez @ 2012-05-10 20:09 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/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 <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 | 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v4 2/2] omap4: iommu: fix irq and clock name for dsp-iommu
2012-05-10 20:09 [PATCH v4 0/2] Fixes in preparation for enabling Dsp in omap4 Juan Gutierrez
2012-05-10 20:09 ` [PATCH v4 1/2] omap: mailbox: enable mailbox irq per instance Juan Gutierrez
@ 2012-05-10 20:09 ` Juan Gutierrez
1 sibling, 0 replies; 4+ messages in thread
From: Juan Gutierrez @ 2012-05-10 20:09 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:
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 <jgutierrez@ti.com>
Acked-by: Ohad Ben-Cohen <ohad@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 = 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.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v4 1/2] omap: mailbox: enable mailbox irq per instance
2012-05-10 20:09 ` [PATCH v4 1/2] omap: mailbox: enable mailbox irq per instance Juan Gutierrez
@ 2012-05-10 20:39 ` Ohad Ben-Cohen
0 siblings, 0 replies; 4+ messages in thread
From: Ohad Ben-Cohen @ 2012-05-10 20:39 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, May 10, 2012 at 11:09 PM, Juan Gutierrez <jgutierrez@ti.com> wrote:
> 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 <jgutierrez@ti.com>
Acked-by: Ohad Ben-Cohen <ohad@wizery.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-10 20:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10 20:09 [PATCH v4 0/2] Fixes in preparation for enabling Dsp in omap4 Juan Gutierrez
2012-05-10 20:09 ` [PATCH v4 1/2] omap: mailbox: enable mailbox irq per instance Juan Gutierrez
2012-05-10 20:39 ` Ohad Ben-Cohen
2012-05-10 20:09 ` [PATCH v4 2/2] omap4: iommu: fix irq and clock name for dsp-iommu Juan Gutierrez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox