diff options
-rw-r--r-- | Documentation/devicetree/bindings/arm/arch_timer.txt | 8 | ||||
-rw-r--r-- | drivers/clocksource/arm_arch_timer.c | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/arm/arch_timer.txt b/Documentation/devicetree/bindings/arm/arch_timer.txt index 37b2cafa4e52..256b4d8bab7b 100644 --- a/Documentation/devicetree/bindings/arm/arch_timer.txt +++ b/Documentation/devicetree/bindings/arm/arch_timer.txt | |||
@@ -22,6 +22,14 @@ to deliver its interrupts via SPIs. | |||
22 | - always-on : a boolean property. If present, the timer is powered through an | 22 | - always-on : a boolean property. If present, the timer is powered through an |
23 | always-on power domain, therefore it never loses context. | 23 | always-on power domain, therefore it never loses context. |
24 | 24 | ||
25 | ** Optional properties: | ||
26 | |||
27 | - arm,cpu-registers-not-fw-configured : Firmware does not initialize | ||
28 | any of the generic timer CPU registers, which contain their | ||
29 | architecturally-defined reset values. Only supported for 32-bit | ||
30 | systems which follow the ARMv7 architected reset values. | ||
31 | |||
32 | |||
25 | Example: | 33 | Example: |
26 | 34 | ||
27 | timer { | 35 | timer { |
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 55256e4fb641..6967cb026b9e 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c | |||
@@ -705,6 +705,14 @@ static void __init arch_timer_init(struct device_node *np) | |||
705 | arch_timer_detect_rate(NULL, np); | 705 | arch_timer_detect_rate(NULL, np); |
706 | 706 | ||
707 | /* | 707 | /* |
708 | * If we cannot rely on firmware initializing the timer registers then | ||
709 | * we should use the physical timers instead. | ||
710 | */ | ||
711 | if (IS_ENABLED(CONFIG_ARM) && | ||
712 | of_property_read_bool(np, "arm,cpu-registers-not-fw-configured")) | ||
713 | arch_timer_use_virtual = false; | ||
714 | |||
715 | /* | ||
708 | * If HYP mode is available, we know that the physical timer | 716 | * If HYP mode is available, we know that the physical timer |
709 | * has been configured to be accessible from PL1. Use it, so | 717 | * has been configured to be accessible from PL1. Use it, so |
710 | * that a guest can use the virtual timer instead. | 718 | * that a guest can use the virtual timer instead. |