diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-09-09 11:09:35 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2014-09-09 11:09:35 -0400 |
commit | 138310e18b70caed1b7acf02a2c97170dcb3c55d (patch) | |
tree | c33e62cd472775401877f2c2ca8c071f0ac31581 /arch/arm/mach-shmobile | |
parent | eb492df9616156416e160bb59f7fd0437d6f5424 (diff) | |
parent | 5923abb205e05773e0bb16c7ca4c0b41dbeec40e (diff) |
Merge tag 'renesas-soc3-for-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc
Pull "Third Round of Renesas ARM Based SoC Soc Updates for v3.18" from Simon Horman:
* Initial r8a7794 SoC support
* Support Cortex-A7 in shmobile_init_delay()
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* tag 'renesas-soc3-for-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
ARM: shmobile: Initial r8a7794 SoC support
ARM: shmobile: support Cortex-A7 in shmobile_init_delay()
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7794.c | 35 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/timer.c | 9 |
4 files changed, 45 insertions, 4 deletions
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 04d9cee4b6b4..b70d945121f9 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -46,6 +46,10 @@ config ARCH_R8A7791 | |||
46 | select RENESAS_IRQC | 46 | select RENESAS_IRQC |
47 | select SYS_SUPPORTS_SH_CMT | 47 | select SYS_SUPPORTS_SH_CMT |
48 | 48 | ||
49 | config ARCH_R8A7794 | ||
50 | bool "R-Car E2 (R8A77940)" | ||
51 | select ARCH_RCAR_GEN2 | ||
52 | |||
49 | comment "Renesas ARM SoCs Board Type" | 53 | comment "Renesas ARM SoCs Board Type" |
50 | 54 | ||
51 | config MACH_KOELSCH | 55 | config MACH_KOELSCH |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index b5164ae436d6..d7337a5f6232 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -15,6 +15,7 @@ obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o | |||
15 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o | 15 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o |
16 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o setup-rcar-gen2.o | 16 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o setup-rcar-gen2.o |
17 | obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o setup-rcar-gen2.o | 17 | obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o setup-rcar-gen2.o |
18 | obj-$(CONFIG_ARCH_R8A7794) += setup-r8a7794.o | ||
18 | obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o | 19 | obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o |
19 | obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o | 20 | obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o |
20 | 21 | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a7794.c b/arch/arm/mach-shmobile/setup-r8a7794.c new file mode 100644 index 000000000000..05e970c96efe --- /dev/null +++ b/arch/arm/mach-shmobile/setup-r8a7794.c | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * r8a7794 processor support | ||
3 | * | ||
4 | * Copyright (C) 2014 Renesas Electronics Corporation | ||
5 | * Copyright (C) 2014 Ulrich Hecht | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #include <linux/of_platform.h> | ||
18 | #include "common.h" | ||
19 | #include "rcar-gen2.h" | ||
20 | #include <asm/mach/arch.h> | ||
21 | |||
22 | #ifdef CONFIG_USE_OF | ||
23 | |||
24 | static const char * const r8a7794_boards_compat_dt[] __initconst = { | ||
25 | "renesas,r8a7794", | ||
26 | NULL, | ||
27 | }; | ||
28 | |||
29 | DT_MACHINE_START(R8A7794_DT, "Generic R8A7794 (Flattened Device Tree)") | ||
30 | .init_early = shmobile_init_delay, | ||
31 | .init_late = shmobile_init_late, | ||
32 | .init_time = rcar_gen2_timer_init, | ||
33 | .dt_compat = r8a7794_boards_compat_dt, | ||
34 | MACHINE_END | ||
35 | #endif /* CONFIG_USE_OF */ | ||
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index adce98b44f8a..87c6be1e79bd 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c | |||
@@ -43,7 +43,7 @@ static void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz, | |||
43 | void __init shmobile_init_delay(void) | 43 | void __init shmobile_init_delay(void) |
44 | { | 44 | { |
45 | struct device_node *np, *cpus; | 45 | struct device_node *np, *cpus; |
46 | bool is_a8_a9 = false; | 46 | bool is_a7_a8_a9 = false; |
47 | bool is_a15 = false; | 47 | bool is_a15 = false; |
48 | u32 max_freq = 0; | 48 | u32 max_freq = 0; |
49 | 49 | ||
@@ -57,9 +57,10 @@ void __init shmobile_init_delay(void) | |||
57 | if (!of_property_read_u32(np, "clock-frequency", &freq)) | 57 | if (!of_property_read_u32(np, "clock-frequency", &freq)) |
58 | max_freq = max(max_freq, freq); | 58 | max_freq = max(max_freq, freq); |
59 | 59 | ||
60 | if (of_device_is_compatible(np, "arm,cortex-a8") || | 60 | if (of_device_is_compatible(np, "arm,cortex-a7") || |
61 | of_device_is_compatible(np, "arm,cortex-a8") || | ||
61 | of_device_is_compatible(np, "arm,cortex-a9")) | 62 | of_device_is_compatible(np, "arm,cortex-a9")) |
62 | is_a8_a9 = true; | 63 | is_a7_a8_a9 = true; |
63 | else if (of_device_is_compatible(np, "arm,cortex-a15")) | 64 | else if (of_device_is_compatible(np, "arm,cortex-a15")) |
64 | is_a15 = true; | 65 | is_a15 = true; |
65 | } | 66 | } |
@@ -69,7 +70,7 @@ void __init shmobile_init_delay(void) | |||
69 | if (!max_freq) | 70 | if (!max_freq) |
70 | return; | 71 | return; |
71 | 72 | ||
72 | if (is_a8_a9) | 73 | if (is_a7_a8_a9) |
73 | shmobile_setup_delay_hz(max_freq, 1, 3); | 74 | shmobile_setup_delay_hz(max_freq, 1, 3); |
74 | else if (is_a15 && !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) | 75 | else if (is_a15 && !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) |
75 | shmobile_setup_delay_hz(max_freq, 2, 4); | 76 | shmobile_setup_delay_hz(max_freq, 2, 4); |