* [PATCH v1 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4
@ 2009-08-04 22:30 Kanigeri, Hari
2009-08-04 22:45 ` Russell King - ARM Linux
0 siblings, 1 reply; 5+ messages in thread
From: Kanigeri, Hari @ 2009-08-04 22:30 UTC (permalink / raw)
To: linux-omap@vger.kernel.org, tony@atomide.com
Cc: Hiroshi DOYU, linux@arm.linux.org.uk, Shilimkar, Santosh
[-- Attachment #1: Type: text/plain, Size: 1947 bytes --]
This patch has the changes to iommu module to make
iommu functional on OMAP4 simulator. The changes
included using stubbed clock interface and commenting
out reading the MMU soft reset register.
Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
---
arch/arm/mach-omap2/iommu2.c | 8 +++++---
arch/arm/plat-omap/iommu.c | 12 +++++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index 015f22a..30b7158 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -80,12 +80,14 @@ static int omap2_iommu_enable(struct iommu *obj)
if (l & MMU_SYS_RESETDONE)
break;
} while (time_after(jiffies, timeout));
-
- if (!(l & MMU_SYS_RESETDONE)) {
+ /* FIXME: Hack till the reading the MMU status register
+ * is resolved in Simulator. Simulator doesn't update
+ * the STATUS register.
+ */
+ if (!cpu_is_omap44xx() && !(l & MMU_SYS_RESETDONE)) {
dev_err(obj->dev, "can't take mmu out of reset\n");
return -ENODEV;
}
-
l = iommu_read_reg(obj, MMU_REVISION);
dev_info(obj->dev, "%s: version %d.%d\n", obj->name,
(l >> 4) & 0xf, l & 0xf);
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index 4cf449f..b62a087 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -861,9 +861,15 @@ static int __devinit omap_iommu_probe(struct platform_device *pdev)
if (!obj)
return -ENOMEM;
- obj->clk = clk_get(&pdev->dev, pdata->clk_name);
- if (IS_ERR(obj->clk))
- goto err_clk;
+ /*
+ * FIX-ME: Replace with correct clk node when clk
+ * framework is available
+ */
+ if (!cpu_is_omap44xx()) {
+ obj->clk = clk_get(&pdev->dev, pdata->clk_name);
+ if (IS_ERR(obj->clk))
+ goto err_clk;
+ }
obj->nr_tlb_entries = pdata->nr_tlb_entries;
obj->name = pdata->name;
--
1.5.4.3
Thank you,
Best regards,
Hari
[-- Attachment #2: 0001-ARM-OMAP4-iommu-changes-in-iommu-for-OMAP4.patch --]
[-- Type: application/octet-stream, Size: 2063 bytes --]
From b0e9dd49ed4d5729ffc62b9843cc4338d413531e Mon Sep 17 00:00:00 2001
From: Hari Kanigeri <h-kanigeri2@ti.com>
Date: Tue, 4 Aug 2009 17:17:00 -0500
Subject: [PATCH] ARM:OMAP4 iommu:changes in iommu for OMAP4
This patch has the changes to iommu module to make
iommu functional on OMAP4 simulator. The changes
included using stubbed clock interface and commenting
out reading the MMU soft reset register.
Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
---
arch/arm/mach-omap2/iommu2.c | 8 +++++---
arch/arm/plat-omap/iommu.c | 12 +++++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index 015f22a..30b7158 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -80,12 +80,14 @@ static int omap2_iommu_enable(struct iommu *obj)
if (l & MMU_SYS_RESETDONE)
break;
} while (time_after(jiffies, timeout));
-
- if (!(l & MMU_SYS_RESETDONE)) {
+ /* FIXME: Hack till the reading the MMU status register
+ * is resolved in Simulator. Simulator doesn't update
+ * the STATUS register.
+ */
+ if (!cpu_is_omap44xx() && !(l & MMU_SYS_RESETDONE)) {
dev_err(obj->dev, "can't take mmu out of reset\n");
return -ENODEV;
}
-
l = iommu_read_reg(obj, MMU_REVISION);
dev_info(obj->dev, "%s: version %d.%d\n", obj->name,
(l >> 4) & 0xf, l & 0xf);
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index 4cf449f..b62a087 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -861,9 +861,15 @@ static int __devinit omap_iommu_probe(struct platform_device *pdev)
if (!obj)
return -ENOMEM;
- obj->clk = clk_get(&pdev->dev, pdata->clk_name);
- if (IS_ERR(obj->clk))
- goto err_clk;
+ /*
+ * FIX-ME: Replace with correct clk node when clk
+ * framework is available
+ */
+ if (!cpu_is_omap44xx()) {
+ obj->clk = clk_get(&pdev->dev, pdata->clk_name);
+ if (IS_ERR(obj->clk))
+ goto err_clk;
+ }
obj->nr_tlb_entries = pdata->nr_tlb_entries;
obj->name = pdata->name;
--
1.5.4.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v1 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4
2009-08-04 22:30 [PATCH v1 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4 Kanigeri, Hari
@ 2009-08-04 22:45 ` Russell King - ARM Linux
2009-08-05 7:20 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2009-08-04 22:45 UTC (permalink / raw)
To: Kanigeri, Hari
Cc: linux-omap@vger.kernel.org, tony@atomide.com, Hiroshi DOYU,
Shilimkar, Santosh
On Tue, Aug 04, 2009 at 05:30:23PM -0500, Kanigeri, Hari wrote:
> - obj->clk = clk_get(&pdev->dev, pdata->clk_name);
> - if (IS_ERR(obj->clk))
> - goto err_clk;
> + /*
> + * FIX-ME: Replace with correct clk node when clk
> + * framework is available
> + */
> + if (!cpu_is_omap44xx()) {
> + obj->clk = clk_get(&pdev->dev, pdata->clk_name);
> + if (IS_ERR(obj->clk))
> + goto err_clk;
> + }
I've no visibility on when these are going to get resolved, and it's
starting to concern me that there appears to be no progress on it,
especially as we have more and more code being merged with these
workarounds. It's getting towards the point where enough is enough
and we need OMAP4 clk support in place, even if it is just a simple
stop-gap implementation rather than all these horrible hacks spread
through the code which one day will need to be found and removed.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v1 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4
2009-08-04 22:45 ` Russell King - ARM Linux
@ 2009-08-05 7:20 ` Tony Lindgren
2009-08-05 16:06 ` Shilimkar, Santosh
0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2009-08-05 7:20 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Kanigeri, Hari, linux-omap@vger.kernel.org, Hiroshi DOYU,
Shilimkar, Santosh
* Russell King - ARM Linux <linux@arm.linux.org.uk> [090805 01:45]:
> On Tue, Aug 04, 2009 at 05:30:23PM -0500, Kanigeri, Hari wrote:
> > - obj->clk = clk_get(&pdev->dev, pdata->clk_name);
> > - if (IS_ERR(obj->clk))
> > - goto err_clk;
> > + /*
> > + * FIX-ME: Replace with correct clk node when clk
> > + * framework is available
> > + */
> > + if (!cpu_is_omap44xx()) {
> > + obj->clk = clk_get(&pdev->dev, pdata->clk_name);
> > + if (IS_ERR(obj->clk))
> > + goto err_clk;
> > + }
>
> I've no visibility on when these are going to get resolved, and it's
> starting to concern me that there appears to be no progress on it,
> especially as we have more and more code being merged with these
> workarounds. It's getting towards the point where enough is enough
> and we need OMAP4 clk support in place, even if it is just a simple
> stop-gap implementation rather than all these horrible hacks spread
> through the code which one day will need to be found and removed.
Yeah I agree.
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: [PATCH v1 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4
2009-08-05 7:20 ` Tony Lindgren
@ 2009-08-05 16:06 ` Shilimkar, Santosh
2009-08-05 16:33 ` Kanigeri, Hari
0 siblings, 1 reply; 5+ messages in thread
From: Shilimkar, Santosh @ 2009-08-05 16:06 UTC (permalink / raw)
To: Tony Lindgren, Russell King - ARM Linux
Cc: Kanigeri, Hari, linux-omap@vger.kernel.org, Hiroshi DOYU
Russell / Tony,
> -----Original Message-----
> From: Tony Lindgren [mailto:tony@atomide.com]
> Sent: Wednesday, August 05, 2009 12:50 PM
> To: Russell King - ARM Linux
> Cc: Kanigeri, Hari; linux-omap@vger.kernel.org; Hiroshi DOYU;
> Shilimkar, Santosh
> Subject: Re: [PATCH v1 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4
>
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [090805 01:45]:
> > On Tue, Aug 04, 2009 at 05:30:23PM -0500, Kanigeri, Hari wrote:
> > > - obj->clk = clk_get(&pdev->dev, pdata->clk_name);
> > > - if (IS_ERR(obj->clk))
> > > - goto err_clk;
> > > + /*
> > > + * FIX-ME: Replace with correct clk node when clk
> > > + * framework is available
> > > + */
> > > + if (!cpu_is_omap44xx()) {
> > > + obj->clk = clk_get(&pdev->dev, pdata->clk_name);
> > > + if (IS_ERR(obj->clk))
> > > + goto err_clk;
> > > + }
> >
> > I've no visibility on when these are going to get resolved, and it's
> > starting to concern me that there appears to be no progress on it,
> > especially as we have more and more code being merged with these
> > workarounds. It's getting towards the point where enough is enough
> > and we need OMAP4 clk support in place, even if it is just a simple
> > stop-gap implementation rather than all these horrible hacks spread
> > through the code which one day will need to be found and removed.
>
> Yeah I agree.
The initial set of clock patches are more or less ready now and we
will posting them in next few days.
Regards,
Santosh
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: [PATCH v1 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4
2009-08-05 16:06 ` Shilimkar, Santosh
@ 2009-08-05 16:33 ` Kanigeri, Hari
0 siblings, 0 replies; 5+ messages in thread
From: Kanigeri, Hari @ 2009-08-05 16:33 UTC (permalink / raw)
To: Shilimkar, Santosh, Tony Lindgren, Russell King - ARM Linux
Cc: linux-omap@vger.kernel.org, Hiroshi DOYU
Russell, Tony, Santosh,
> Russell / Tony,
> > -----Original Message-----
> > From: Tony Lindgren [mailto:tony@atomide.com]
> > Sent: Wednesday, August 05, 2009 12:50 PM
> > To: Russell King - ARM Linux
> > Cc: Kanigeri, Hari; linux-omap@vger.kernel.org; Hiroshi DOYU;
> > Shilimkar, Santosh
> > Subject: Re: [PATCH v1 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4
> >
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> [090805 01:45]:
> > > On Tue, Aug 04, 2009 at 05:30:23PM -0500, Kanigeri, Hari wrote:
> > > > - obj->clk = clk_get(&pdev->dev, pdata->clk_name);
> > > > - if (IS_ERR(obj->clk))
> > > > - goto err_clk;
> > > > + /*
> > > > + * FIX-ME: Replace with correct clk node when clk
> > > > + * framework is available
> > > > + */
> > > > + if (!cpu_is_omap44xx()) {
> > > > + obj->clk = clk_get(&pdev->dev, pdata->clk_name);
> > > > + if (IS_ERR(obj->clk))
> > > > + goto err_clk;
> > > > + }
> > >
> > > I've no visibility on when these are going to get resolved, and it's
> > > starting to concern me that there appears to be no progress on it,
> > > especially as we have more and more code being merged with these
> > > workarounds. It's getting towards the point where enough is enough
> > > and we need OMAP4 clk support in place, even if it is just a simple
> > > stop-gap implementation rather than all these horrible hacks spread
> > > through the code which one day will need to be found and removed.
> >
> > Yeah I agree.
> The initial set of clock patches are more or less ready now and we
> will posting them in next few days.
>
-- Ok, then. I will wait for the clock patches to resend the iommu patches.
Thank you,
Best regards,
Hari
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-05 16:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04 22:30 [PATCH v1 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4 Kanigeri, Hari
2009-08-04 22:45 ` Russell King - ARM Linux
2009-08-05 7:20 ` Tony Lindgren
2009-08-05 16:06 ` Shilimkar, Santosh
2009-08-05 16:33 ` Kanigeri, Hari
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox