Skip to contentSkip to conversation

mx51: convert iomux and wdog to ioremap

RFC PATCH New Rob Herring 2 participants 2 messages Apr 16, 2010 – Apr 17, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 3/10 mx51: convert iomux and wdog to ioremap

---
 arch/arm/mach-mx5/mm.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
arch/arm/mach-mx5/mm.c +8 -2
index b7677ef..9c9ae3b 100644
@@ -13,6 +13,7 @@
 
 #include <linux/mm.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/mach/map.h>
 
@@ -59,9 +60,14 @@ static struct map_desc mxc_io_desc[] __initdata = {
  */
 void __init mx51_map_io(void)
 {
+	void __iomem *base;
+
 	mxc_set_cpu_type(MXC_CPU_MX51);
-	mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
-	mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG_BASE_ADDR));
+
+	base = ioremap(MX51_IOMUXC_BASE_ADDR, SZ_4K);
+	mxc_iomux_v3_init(base);
+	base = ioremap(MX51_WDOG_BASE_ADDR, SZ_4K);
+	mxc_arch_reset_init(base);
 	iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
 }
 
Signature · 1 line
1.6.0.4
#1 lore raw

RFC PATCH 3/10 mx51: convert iomux and wdog to ioremap

Hello.

Quoted 19 lines · Rob Herring
---
 arch/arm/mach-mx5/mm.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
arch/arm/mach-mx5/mm.c +1 -0
index b7677ef..9c9ae3b 100644
@@ -13,6 +13,7 @@
 
 #include <linux/mm.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/mach/map.h>
 
@@ -59,9 +60,14 @@ static struct map_desc mxc_io_desc[] __initdata = {
  */

arch/arm/mach-mx5/mm.c static struct map_desc mxc_io_desc[] __initdata = { · line 68

Quoted 10 lines
arch/arm/mach-mx5/mm.c +4 -2
 void __init mx51_map_io(void)
 {
+	void __iomem *base;
+
 	mxc_set_cpu_type(MXC_CPU_MX51);
-	mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
-	mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG_BASE_ADDR));
+
+	base = ioremap(MX51_IOMUXC_BASE_ADDR, SZ_4K);
 

ioremap() can fail, can't it?

arch/arm/mach-mx5/mm.c static struct map_desc mxc_io_desc[] __initdata = { · line 72

Quoted 6 lines
arch/arm/mach-mx5/mm.c +3 -0
+	mxc_iomux_v3_init(base);
+	base = ioremap(MX51_WDOG_BASE_ADDR, SZ_4K);
+	mxc_arch_reset_init(base);
 	iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
 }

WBR, Sergei