| From c46683358d9052c0bfb2388c2f046aeb20d3716b Mon Sep 17 00:00:00 2001 |
| From: Magnus Damm <damm@opensource.se> |
| Date: Wed, 29 Feb 2012 21:37:27 +0900 |
| Subject: ARM: mach-shmobile: sh73a0 map_io and init_early update |
| |
| Update the sh73a0 SoC and the AG5EVM and Kota2 boards to make use |
| of the functions sh73a0_map_io() and sh73a0_add_early_devices(). |
| |
| Signed-off-by: Magnus Damm <damm@opensource.se> |
| Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> |
| (cherry picked from commit 50e15c34f0072324fee9faaae71b129e8b419913) |
| |
| Conflicts: |
| |
| arch/arm/mach-shmobile/board-ag5evm.c |
| arch/arm/mach-shmobile/board-kota2.c |
| |
| Signed-off-by: Simon Horman <horms@verge.net.au> |
| --- |
| arch/arm/mach-shmobile/board-ag5evm.c | 24 +----------------------- |
| arch/arm/mach-shmobile/include/mach/common.h | 1 + |
| arch/arm/mach-shmobile/setup-sh73a0.c | 22 ++++++++++++++++++++++ |
| 3 files changed, 24 insertions(+), 23 deletions(-) |
| |
| diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c |
| index 430c723..7f50dab 100644 |
| --- a/arch/arm/mach-shmobile/board-ag5evm.c |
| +++ b/arch/arm/mach-shmobile/board-ag5evm.c |
| @@ -46,7 +46,6 @@ |
| #include <mach/common.h> |
| #include <asm/mach-types.h> |
| #include <asm/mach/arch.h> |
| -#include <asm/mach/map.h> |
| #include <asm/mach/time.h> |
| #include <asm/hardware/gic.h> |
| #include <asm/hardware/cache-l2x0.h> |
| @@ -424,27 +423,6 @@ static struct platform_device *ag5evm_devices[] __initdata = { |
| &sdhi1_device, |
| }; |
| |
| -static struct map_desc ag5evm_io_desc[] __initdata = { |
| - /* create a 1:1 entity map for 0xe6xxxxxx |
| - * used by CPGA, INTC and PFC. |
| - */ |
| - { |
| - .virtual = 0xe6000000, |
| - .pfn = __phys_to_pfn(0xe6000000), |
| - .length = 256 << 20, |
| - .type = MT_DEVICE_NONSHARED |
| - }, |
| -}; |
| - |
| -static void __init ag5evm_map_io(void) |
| -{ |
| - iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc)); |
| - |
| - /* setup early devices and console here as well */ |
| - sh73a0_add_early_devices(); |
| - shmobile_setup_console(); |
| -} |
| - |
| #define DSI0PHYCR 0xe615006c |
| |
| static void __init ag5evm_init(void) |
| @@ -570,7 +548,7 @@ struct sys_timer ag5evm_timer = { |
| }; |
| |
| MACHINE_START(AG5EVM, "ag5evm") |
| - .map_io = ag5evm_map_io, |
| + .map_io = sh73a0_map_io, |
| .init_irq = sh73a0_init_irq, |
| .handle_irq = shmobile_handle_irq_gic, |
| .init_machine = ag5evm_init, |
| diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h |
| index 6ccc1a5..c77b3a1 100644 |
| --- a/arch/arm/mach-shmobile/include/mach/common.h |
| +++ b/arch/arm/mach-shmobile/include/mach/common.h |
| @@ -42,6 +42,7 @@ extern struct clk sh7372_extal1_clk; |
| extern struct clk sh7372_extal2_clk; |
| |
| extern void sh73a0_init_irq(void); |
| +extern void sh73a0_map_io(void); |
| extern void sh73a0_add_early_devices(void); |
| extern void sh73a0_add_standard_devices(void); |
| extern void sh73a0_clock_init(void); |
| diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c |
| index 7bf740e..ce9d5c8 100644 |
| --- a/arch/arm/mach-shmobile/setup-sh73a0.c |
| +++ b/arch/arm/mach-shmobile/setup-sh73a0.c |
| @@ -33,9 +33,28 @@ |
| #include <mach/hardware.h> |
| #include <mach/irqs.h> |
| #include <mach/sh73a0.h> |
| +#include <mach/common.h> |
| #include <asm/mach-types.h> |
| +#include <asm/mach/map.h> |
| #include <asm/mach/arch.h> |
| |
| +static struct map_desc sh73a0_io_desc[] __initdata = { |
| + /* create a 1:1 entity map for 0xe6xxxxxx |
| + * used by CPGA, INTC and PFC. |
| + */ |
| + { |
| + .virtual = 0xe6000000, |
| + .pfn = __phys_to_pfn(0xe6000000), |
| + .length = 256 << 20, |
| + .type = MT_DEVICE_NONSHARED |
| + }, |
| +}; |
| + |
| +void __init sh73a0_map_io(void) |
| +{ |
| + iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); |
| +} |
| + |
| static struct plat_sci_port scif0_platform_data = { |
| .mapbase = 0xe6c40000, |
| .flags = UPF_BOOT_AUTOCONF, |
| @@ -672,4 +691,7 @@ void __init sh73a0_add_early_devices(void) |
| { |
| early_platform_add_devices(sh73a0_early_devices, |
| ARRAY_SIZE(sh73a0_early_devices)); |
| + |
| + /* setup early console here as well */ |
| + shmobile_setup_console(); |
| } |
| -- |
| 1.7.10.2.565.gbd578b5 |
| |