From d3ab7221489fa188b0e1e9bfe2cc4ecd1d7da933 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Wed, 29 Feb 2012 21:37:35 +0900 Subject: ARM: mach-shmobile: r8a7740 map_io and init_early update Update the r8a7740 SoC and the Bonito board to make use of the functions r8a7740_map_io() and r8a7740_add_early_devices(). Signed-off-by: Magnus Damm Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/setup-r8a7740.c | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'arch/arm/mach-shmobile/setup-r8a7740.c') diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 986dca6b3fa..dbc30670a27 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c @@ -25,9 +25,41 @@ #include #include #include +#include #include +#include #include +static struct map_desc r8a7740_io_desc[] __initdata = { + /* + * for CPGA/INTC/PFC + * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff + */ + { + .virtual = 0xe6000000, + .pfn = __phys_to_pfn(0xe6000000), + .length = 160 << 20, + .type = MT_DEVICE_NONSHARED + }, +#ifdef CONFIG_CACHE_L2X0 + /* + * for l2x0_init() + * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000 + */ + { + .virtual = 0xf0002000, + .pfn = __phys_to_pfn(0xf0100000), + .length = PAGE_SIZE, + .type = MT_DEVICE_NONSHARED + }, +#endif +}; + +void __init r8a7740_map_io(void) +{ + iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc)); +} + /* SCIFA0 */ static struct plat_sci_port scif0_platform_data = { .mapbase = 0xe6c40000, @@ -349,4 +381,7 @@ void __init r8a7740_add_early_devices(void) { early_platform_add_devices(r8a7740_early_devices, ARRAY_SIZE(r8a7740_early_devices)); + + /* setup early console here as well */ + shmobile_setup_console(); } -- cgit v1.2.3 From 23e5bc03e3b07185d61c212bf39aaf126cc958e3 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Tue, 6 Mar 2012 17:36:53 +0900 Subject: ARM: mach-shmobile: r8a7740 and Bonito timer rework Copy the SoC specific timer code from Bonito board code to r8a7740 setup code. This makes is possible to share the SoC specific timer code across boards. The Bonito specific timer setup code tied to the FPGA is kept as-is. Signed-off-by: Magnus Damm Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/setup-r8a7740.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/mach-shmobile/setup-r8a7740.c') diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index dbc30670a27..74e52341dd1 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c @@ -29,6 +29,7 @@ #include #include #include +#include static struct map_desc r8a7740_io_desc[] __initdata = { /* @@ -377,6 +378,12 @@ void __init r8a7740_add_standard_devices(void) ARRAY_SIZE(r8a7740_late_devices)); } +static void __init r8a7740_earlytimer_init(void) +{ + r8a7740_clock_init(0); + shmobile_earlytimer_init(); +} + void __init r8a7740_add_early_devices(void) { early_platform_add_devices(r8a7740_early_devices, @@ -384,4 +391,7 @@ void __init r8a7740_add_early_devices(void) /* setup early console here as well */ shmobile_setup_console(); + + /* override timer setup with soc-specific code */ + shmobile_timer.init = r8a7740_earlytimer_init; } -- cgit v1.2.3