Skip to contentSkip to conversation

OMAP2xxx EAC build fix and sparse cleanup

PATCH Superseded Paul Walmsley 3 participants 5 messages Sep 5, 2008

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover OMAP2xxx EAC build fix and sparse cleanup

This series fixes a build bug in the EAC driver after the recent IO address changes, and resolves some sparse warnings. Updated to use ioremap().

Compile-tested only.

---

 arch/arm/mach-omap2/devices.c |    4 ++--
 sound/arm/omap/eac.c          |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
#1 lore raw

PATCH v2 1/2 OMAP2xxx EAC: update per recent IO address changes

Commit f228a725b975832ac5771ab2fc86d06bd694cdb3 breaks the build for this driver; fix by using ioremap().

---
 arch/arm/mach-omap2/devices.c |    4 ++--
 sound/arm/omap/eac.c          |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/devices.c +2 -2
index bd49a0f..c7de03e 100644
@@ -270,12 +270,12 @@ static inline void omap_init_mcspi(void) {}
 
 #ifdef CONFIG_SND_OMAP24XX_EAC
 
-#define OMAP2_EAC_BASE			0x48090000
+#define OMAP2_EAC_BASE			(L4_24XX_BASE + 0x90000)
 
 static struct resource omap2_eac_resources[] = {
 	{
 		.start		= OMAP2_EAC_BASE,
-		.end		= OMAP2_EAC_BASE + 0x109,
+		.end		= OMAP2_EAC_BASE + 0xfff,
 		.flags		= IORESOURCE_MEM,
 	},
 };
sound/arm/omap/eac.c +1 -1
index 9fe8d74..9752ece 100644
@@ -707,7 +707,7 @@ static int __devinit eac_probe(struct platform_device *pdev)
 		err = -ENODEV;
 		goto err1;
 	}
-	eac->base = (void __iomem *)io_p2v(res->start);
+	eac->base = ioremap(res->start, (res->end - res->start) + 1);
 	eac->pdata = pdata;
 
 	/* pre-initialize EAC hw */
#2 lore raw

Re: [PATCH v2 1/2] OMAP2xxx EAC: update per recent IO address changes

sound/arm/omap/eac.c static int __devinit eac_probe(struct platform_device *pdev) · line 710

Quoted 6 lines · Paul Walmsley
sound/arm/omap/eac.c +1 -1
@@ -707,7 +707,7 @@ static int __devinit eac_probe(struct platform_device *pdev)
 		err = -ENODEV;
 		goto err1;
 	}
-	eac->base = (void __iomem *)io_p2v(res->start);
+	eac->base = ioremap(res->start, (res->end - res->start) + 1);

The parens around the subtraction are just noise; please remove.

#3 lore raw

PATCH v2 2/2 OMAP2xxx EAC: fix sparse warnings

In reply to Paul Walmsley

This patch resolves the following two sparse warnings:

sound/arm/omap/eac.c:788:12: warning: symbol 'eac_init' was not declared. Should it be static? sound/arm/omap/eac.c:793:13: warning: symbol 'eac_exit' was not declared. Should it be static?

---
 sound/arm/omap/eac.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/arm/omap/eac.c +2 -2
index 9752ece..35ec8d6 100644
@@ -785,12 +785,12 @@ static struct platform_driver eac_driver = {
 	.remove		= eac_remove,
 };
 
-int __init eac_init(void)
+static int __init eac_init(void)
 {
 	return platform_driver_register(&eac_driver);
 }
 
-void __exit eac_exit(void)
+static void __exit eac_exit(void)
 {
 	platform_driver_unregister(&eac_driver);
 }
Acked-by on the v2 series
#4 lore raw
In reply to Paul Walmsley
Quoted 8 lines · On Thu, 04 Sep 2008 23:50:48 -0600 "ext Paul Walmsley" <[email protected]> wrote:

This series fixes a build bug in the EAC driver after the recent IO address changes, and resolves some sparse warnings. Updated to use ioremap().

Compile-tested only.

Thanks Paul. I tested these and plays fine (OS2007).