diff options
| -rw-r--r-- | arch/arm/mach-shmobile/timer.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 87c6be1e79bd..32ee335d2632 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c | |||
| @@ -45,6 +45,7 @@ void __init shmobile_init_delay(void) | |||
| 45 | struct device_node *np, *cpus; | 45 | struct device_node *np, *cpus; |
| 46 | bool is_a7_a8_a9 = false; | 46 | bool is_a7_a8_a9 = false; |
| 47 | bool is_a15 = false; | 47 | bool is_a15 = false; |
| 48 | bool has_arch_timer = false; | ||
| 48 | u32 max_freq = 0; | 49 | u32 max_freq = 0; |
| 49 | 50 | ||
| 50 | cpus = of_find_node_by_path("/cpus"); | 51 | cpus = of_find_node_by_path("/cpus"); |
| @@ -57,12 +58,16 @@ void __init shmobile_init_delay(void) | |||
| 57 | if (!of_property_read_u32(np, "clock-frequency", &freq)) | 58 | if (!of_property_read_u32(np, "clock-frequency", &freq)) |
| 58 | max_freq = max(max_freq, freq); | 59 | max_freq = max(max_freq, freq); |
| 59 | 60 | ||
| 60 | if (of_device_is_compatible(np, "arm,cortex-a7") || | 61 | if (of_device_is_compatible(np, "arm,cortex-a8") || |
| 61 | of_device_is_compatible(np, "arm,cortex-a8") || | 62 | of_device_is_compatible(np, "arm,cortex-a9")) { |
| 62 | of_device_is_compatible(np, "arm,cortex-a9")) | ||
| 63 | is_a7_a8_a9 = true; | 63 | is_a7_a8_a9 = true; |
| 64 | else if (of_device_is_compatible(np, "arm,cortex-a15")) | 64 | } else if (of_device_is_compatible(np, "arm,cortex-a7")) { |
| 65 | is_a7_a8_a9 = true; | ||
| 66 | has_arch_timer = true; | ||
| 67 | } else if (of_device_is_compatible(np, "arm,cortex-a15")) { | ||
| 65 | is_a15 = true; | 68 | is_a15 = true; |
| 69 | has_arch_timer = true; | ||
| 70 | } | ||
| 66 | } | 71 | } |
| 67 | 72 | ||
| 68 | of_node_put(cpus); | 73 | of_node_put(cpus); |
| @@ -70,10 +75,12 @@ void __init shmobile_init_delay(void) | |||
| 70 | if (!max_freq) | 75 | if (!max_freq) |
| 71 | return; | 76 | return; |
| 72 | 77 | ||
| 73 | if (is_a7_a8_a9) | 78 | if (!has_arch_timer || !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) { |
| 74 | shmobile_setup_delay_hz(max_freq, 1, 3); | 79 | if (is_a7_a8_a9) |
| 75 | else if (is_a15 && !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) | 80 | shmobile_setup_delay_hz(max_freq, 1, 3); |
| 76 | shmobile_setup_delay_hz(max_freq, 2, 4); | 81 | else if (is_a15) |
| 82 | shmobile_setup_delay_hz(max_freq, 2, 4); | ||
| 83 | } | ||
| 77 | } | 84 | } |
| 78 | 85 | ||
| 79 | static void __init shmobile_late_time_init(void) | 86 | static void __init shmobile_late_time_init(void) |
