From 5d7220ec000fe357b8e91b4be66a2b0b061c867f Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Wed, 29 Feb 2012 21:37:19 +0900 Subject: ARM: mach-shmobile: sh7372 map_io and init_early update Update the sh7372 SoC and the AP4EVB and Mackerel boards to make use of the functions sh7372_map_io() and sh7372_add_early_devices(). Signed-off-by: Magnus Damm Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/setup-sh7372.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'arch/arm/mach-shmobile/setup-sh7372.c') diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index a83cf51fc099..12b437801f00 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c @@ -33,9 +33,28 @@ #include #include #include +#include +#include #include #include +static struct map_desc sh7372_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 sh7372_map_io(void) +{ + iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc)); +} + /* SCIFA0 */ static struct plat_sci_port scif0_platform_data = { .mapbase = 0xe6c40000, @@ -1049,4 +1068,7 @@ void __init sh7372_add_early_devices(void) { early_platform_add_devices(sh7372_early_devices, ARRAY_SIZE(sh7372_early_devices)); + + /* setup early console here as well */ + shmobile_setup_console(); } -- cgit v1.2.3 From 17254bffd6e4fda97d825acec153614f09bb33e7 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Tue, 6 Mar 2012 17:36:37 +0900 Subject: ARM: mach-shmobile: sh7372, AP4EVB and Mackerel timer rework Move the SoC specific timer code from AP4EVB and Mackerel to sh7372 setup code. This makes is possible to share the SoC specific timer code across boards and it also removes the need for a board specific timer structure. Signed-off-by: Magnus Damm Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/setup-sh7372.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/mach-shmobile/setup-sh7372.c') diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 12b437801f00..c14fb35de47c 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c @@ -37,6 +37,7 @@ #include #include #include +#include static struct map_desc sh7372_io_desc[] __initdata = { /* create a 1:1 entity map for 0xe6xxxxxx @@ -1064,6 +1065,12 @@ void __init sh7372_add_standard_devices(void) sh7372_add_device_to_domain(&sh7372_a4r, &jpu_device); } +static void __init sh7372_earlytimer_init(void) +{ + sh7372_clock_init(); + shmobile_earlytimer_init(); +} + void __init sh7372_add_early_devices(void) { early_platform_add_devices(sh7372_early_devices, @@ -1071,4 +1078,7 @@ void __init sh7372_add_early_devices(void) /* setup early console here as well */ shmobile_setup_console(); + + /* override timer setup with soc-specific code */ + shmobile_timer.init = sh7372_earlytimer_init; } -- cgit v1.2.3