From c9dff05030b97d6c8f2b53a43f0d8f6d15481b92 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Mon, 8 Apr 2013 11:08:44 +0900 Subject: ARM: shmobile: Add second I/O range for r8a7790 PFC Add the GPIO I/O memory range to the r8a7790 PFC device. This extra I/O memory range is needed when using the PFC tables to drive both pin functions (using PINCTRL or function GPIO for old code) and actual GPIO. The goal is however to use a separate GPIO driver in the long run and when that happens this extra I/O memory range can be removed. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 481201a..cfccf6c 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c @@ -31,6 +31,7 @@ static const struct resource pfc_resources[] = { DEFINE_RES_MEM(0xe6060000, 0x250), + DEFINE_RES_MEM(0xe6050000, 0x5050), }; void __init r8a7790_pinmux_init(void) -- cgit v0.10.2 From ab5fdfd5ea621b629da9bfda987af301da973525 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Mon, 8 Apr 2013 10:23:28 +0900 Subject: ARM: shmobile: force enable of r8a7790 arch timer Implement a SoC-specific timer init function for r8a7790 that makes sure the architected timer is started regardless of boot loader setting. Signed-off-by: Magnus Damm Tested-by: Kuninori Morimoto diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h index 9bd6f5c..2e919e6 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7790.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h @@ -4,5 +4,6 @@ void r8a7790_add_standard_devices(void); void r8a7790_clock_init(void); void r8a7790_pinmux_init(void); +void r8a7790_timer_init(void); #endif /* __ASM_R8A7790_H__ */ diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index cfccf6c..49de2d5 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c @@ -118,6 +118,18 @@ void __init r8a7790_add_standard_devices(void) r8a7790_register_irqc(0); } +void __init r8a7790_timer_init(void) +{ + void __iomem *cntcr; + + /* make sure arch timer is started by setting bit 0 of CNTCT */ + cntcr = ioremap(0xe6080000, PAGE_SIZE); + iowrite32(1, cntcr); + iounmap(cntcr); + + shmobile_timer_init(); +} + #ifdef CONFIG_USE_OF void __init r8a7790_add_standard_devices_dt(void) { @@ -132,7 +144,7 @@ static const char *r8a7790_boards_compat_dt[] __initdata = { DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") .init_irq = irqchip_init, .init_machine = r8a7790_add_standard_devices_dt, - .init_time = shmobile_timer_init, + .init_time = r8a7790_timer_init, .dt_compat = r8a7790_boards_compat_dt, MACHINE_END #endif /* CONFIG_USE_OF */ -- cgit v0.10.2