diff options
author | Olof Johansson <olof@lixom.net> | 2015-02-01 11:51:12 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2015-02-01 11:51:12 -0500 |
commit | 28111dda37e653781efc73c06229f006739b3982 (patch) | |
tree | 1e2b85ea469ac60c1454be3ff063f31fa43b575e /arch/arm/mach-shmobile | |
parent | eab8d6530cc00744087bb5566e350cf37fcdfc7e (diff) | |
parent | 77cf5166f21c3b73b04571311dc89a327424f594 (diff) |
Merge tag 'renesas-soc-fixes3-for-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes
Merge "Third Round of Renesas ARM Based SoC Fixes for v3.19" from Simon Horman:
* Instantiate GIC from C board code in legacy builds on r8a7790 and r8a73a4
* tag 'renesas-soc-fixes3-for-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
ARM: shmobile: r8a7790: Instantiate GIC from C board code in legacy builds
ARM: shmobile: r8a73a4: Instantiate GIC from C board code in legacy builds
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/board-ape6evm.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-lager.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/timer.c | 12 |
4 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index 66f67816a844..444f22d370f0 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/gpio_keys.h> | 18 | #include <linux/gpio_keys.h> |
19 | #include <linux/input.h> | 19 | #include <linux/input.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/irqchip.h> | ||
22 | #include <linux/irqchip/arm-gic.h> | ||
21 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
22 | #include <linux/mfd/tmio.h> | 24 | #include <linux/mfd/tmio.h> |
23 | #include <linux/mmc/host.h> | 25 | #include <linux/mmc/host.h> |
@@ -273,6 +275,22 @@ static void __init ape6evm_add_standard_devices(void) | |||
273 | sizeof(ape6evm_leds_pdata)); | 275 | sizeof(ape6evm_leds_pdata)); |
274 | } | 276 | } |
275 | 277 | ||
278 | static void __init ape6evm_legacy_init_time(void) | ||
279 | { | ||
280 | /* Do not invoke DT-based timers via clocksource_of_init() */ | ||
281 | } | ||
282 | |||
283 | static void __init ape6evm_legacy_init_irq(void) | ||
284 | { | ||
285 | void __iomem *gic_dist_base = ioremap_nocache(0xf1001000, 0x1000); | ||
286 | void __iomem *gic_cpu_base = ioremap_nocache(0xf1002000, 0x1000); | ||
287 | |||
288 | gic_init(0, 29, gic_dist_base, gic_cpu_base); | ||
289 | |||
290 | /* Do not invoke DT-based interrupt code via irqchip_init() */ | ||
291 | } | ||
292 | |||
293 | |||
276 | static const char *ape6evm_boards_compat_dt[] __initdata = { | 294 | static const char *ape6evm_boards_compat_dt[] __initdata = { |
277 | "renesas,ape6evm", | 295 | "renesas,ape6evm", |
278 | NULL, | 296 | NULL, |
@@ -280,7 +298,9 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { | |||
280 | 298 | ||
281 | DT_MACHINE_START(APE6EVM_DT, "ape6evm") | 299 | DT_MACHINE_START(APE6EVM_DT, "ape6evm") |
282 | .init_early = shmobile_init_delay, | 300 | .init_early = shmobile_init_delay, |
301 | .init_irq = ape6evm_legacy_init_irq, | ||
283 | .init_machine = ape6evm_add_standard_devices, | 302 | .init_machine = ape6evm_add_standard_devices, |
284 | .init_late = shmobile_init_late, | 303 | .init_late = shmobile_init_late, |
285 | .dt_compat = ape6evm_boards_compat_dt, | 304 | .dt_compat = ape6evm_boards_compat_dt, |
305 | .init_time = ape6evm_legacy_init_time, | ||
286 | MACHINE_END | 306 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index f8197eb6e566..65b128dd4072 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/input.h> | 21 | #include <linux/input.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/irqchip.h> | ||
25 | #include <linux/irqchip/arm-gic.h> | ||
24 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
25 | #include <linux/leds.h> | 27 | #include <linux/leds.h> |
26 | #include <linux/mfd/tmio.h> | 28 | #include <linux/mfd/tmio.h> |
@@ -811,6 +813,16 @@ static void __init lager_init(void) | |||
811 | lager_ksz8041_fixup); | 813 | lager_ksz8041_fixup); |
812 | } | 814 | } |
813 | 815 | ||
816 | static void __init lager_legacy_init_irq(void) | ||
817 | { | ||
818 | void __iomem *gic_dist_base = ioremap_nocache(0xf1001000, 0x1000); | ||
819 | void __iomem *gic_cpu_base = ioremap_nocache(0xf1002000, 0x1000); | ||
820 | |||
821 | gic_init(0, 29, gic_dist_base, gic_cpu_base); | ||
822 | |||
823 | /* Do not invoke DT-based interrupt code via irqchip_init() */ | ||
824 | } | ||
825 | |||
814 | static const char * const lager_boards_compat_dt[] __initconst = { | 826 | static const char * const lager_boards_compat_dt[] __initconst = { |
815 | "renesas,lager", | 827 | "renesas,lager", |
816 | NULL, | 828 | NULL, |
@@ -819,6 +831,7 @@ static const char * const lager_boards_compat_dt[] __initconst = { | |||
819 | DT_MACHINE_START(LAGER_DT, "lager") | 831 | DT_MACHINE_START(LAGER_DT, "lager") |
820 | .smp = smp_ops(r8a7790_smp_ops), | 832 | .smp = smp_ops(r8a7790_smp_ops), |
821 | .init_early = shmobile_init_delay, | 833 | .init_early = shmobile_init_delay, |
834 | .init_irq = lager_legacy_init_irq, | ||
822 | .init_time = rcar_gen2_timer_init, | 835 | .init_time = rcar_gen2_timer_init, |
823 | .init_machine = lager_init, | 836 | .init_machine = lager_init, |
824 | .init_late = shmobile_init_late, | 837 | .init_late = shmobile_init_late, |
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c index 3dd6edd9bd1d..cc9470dfb1ce 100644 --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c | |||
@@ -133,7 +133,9 @@ void __init rcar_gen2_timer_init(void) | |||
133 | #ifdef CONFIG_COMMON_CLK | 133 | #ifdef CONFIG_COMMON_CLK |
134 | rcar_gen2_clocks_init(mode); | 134 | rcar_gen2_clocks_init(mode); |
135 | #endif | 135 | #endif |
136 | #ifdef CONFIG_ARCH_SHMOBILE_MULTI | ||
136 | clocksource_of_init(); | 137 | clocksource_of_init(); |
138 | #endif | ||
137 | } | 139 | } |
138 | 140 | ||
139 | struct memory_reserve_config { | 141 | struct memory_reserve_config { |
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index f1d027aa7a81..0edf2a6d2bbe 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c | |||
@@ -70,6 +70,18 @@ void __init shmobile_init_delay(void) | |||
70 | if (!max_freq) | 70 | if (!max_freq) |
71 | return; | 71 | return; |
72 | 72 | ||
73 | #ifdef CONFIG_ARCH_SHMOBILE_LEGACY | ||
74 | /* Non-multiplatform r8a73a4 SoC cannot use arch timer due | ||
75 | * to GIC being initialized from C and arch timer via DT */ | ||
76 | if (of_machine_is_compatible("renesas,r8a73a4")) | ||
77 | has_arch_timer = false; | ||
78 | |||
79 | /* Non-multiplatform r8a7790 SoC cannot use arch timer due | ||
80 | * to GIC being initialized from C and arch timer via DT */ | ||
81 | if (of_machine_is_compatible("renesas,r8a7790")) | ||
82 | has_arch_timer = false; | ||
83 | #endif | ||
84 | |||
73 | if (!has_arch_timer || !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) { | 85 | if (!has_arch_timer || !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) { |
74 | if (is_a7_a8_a9) | 86 | if (is_a7_a8_a9) |
75 | shmobile_setup_delay_hz(max_freq, 1, 3); | 87 | shmobile_setup_delay_hz(max_freq, 1, 3); |