mx51: convert iomux and wdog to ioremap
Subsystems (2)
RFC PATCH 3/10 mx51: convert iomux and wdog to ioremap
Signed-off-by Rob Herring <[email protected]>
--- arch/arm/mach-mx5/mm.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
arch/arm/mach-mx5/mm.c +8 -2
@@ -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
RFC PATCH 3/10 mx51: convert iomux and wdog to ioremap
Hello.
Quoted 19 lines · Rob Herring
Signed-off-by Rob Herring <[email protected]>--- arch/arm/mach-mx5/mm.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)arch/arm/mach-mx5/mm.c +1
-0@@ -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
-2void __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