Skip to contentSkip to conversation

ARM: aspeed: ast2600: Select timer

PATCH In review Eddie James 3 participants 3 messages Mar 25, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: aspeed: ast2600: Select timer

The AST2600 also uses the FTTMR010.

---
Changes since v1:
- Add back HAVE_ARM_ARCH_TIMER which is apparently necessary to boot...

 arch/arm/mach-aspeed/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-aspeed/Kconfig +1 -0
index 693cbdd..129bc19 100644
@@ -39,6 +39,7 @@ config MACH_ASPEED_G6
 	select CPU_V7
 	select PINCTRL_ASPEED_G6
 	select ARM_GIC
+	select FTTMR010_TIMER
 	select HAVE_ARM_ARCH_TIMER
 	select HAVE_SMP
 	help
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw
Quoted 7 lines · Eddie James

The AST2600 also uses the FTTMR010.

---
Changes since v1:
- Add back HAVE_ARM_ARCH_TIMER which is apparently necessary to boot...

We want to use the arch timer. Aspeed recommends not having the fttmr010 driver loaded at all, and just using the arch timer. The problem with that is the kernel decides that it can't enable hrtimers with just the arch timer, so in the past I was working around that by enabling the fttmr010.

Another possibility is to use the always-on property in the device tree:

Documentation/devicetree/bindings/timer/arm,arch_timer.yaml

always-on:
type: boolean
description: If present, the timer is powered through an always-on power
domain, therefore it never loses context.

Can you test adding this, but having fttmr010 disabled?

Cheers,

Joel

Quoted 19 lines
 arch/arm/mach-aspeed/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-aspeed/Kconfig +1 -1
index 693cbdd..129bc19 100644
@@ -39,6 +39,7 @@ config MACH_ASPEED_G6
        select CPU_V7
        select PINCTRL_ASPEED_G6
        select ARM_GIC
+       select FTTMR010_TIMER
        select HAVE_ARM_ARCH_TIMER
        select HAVE_SMP
        help
--

1.8.3.1

#2 lore raw
Quoted 15 lines · Joel Stanley
Quoted 6 lines · Eddie James

The AST2600 also uses the FTTMR010.

---
Changes since v1:
- Add back HAVE_ARM_ARCH_TIMER which is apparently necessary to boot...

We want to use the arch timer. Aspeed recommends not having the fttmr010 driver loaded at all, and just using the arch timer. The problem with that is the kernel decides that it can't enable hrtimers with just the arch timer, so in the past I was working around that by enabling the fttmr010.

Another possibility is to use the always-on property in the device tree:

Quoted 8 lines

Documentation/devicetree/bindings/timer/arm,arch_timer.yaml

always-on:
type: boolean
description: If present, the timer is powered through an always-on power
domain, therefore it never loses context.

Can you test adding this, but having fttmr010 disabled?

Ah, I see. Yes I will test that.

Thanks for explaining!

Eddie

Quoted 23 lines

Cheers,

Joel

Quoted 18 lines
  arch/arm/mach-aspeed/Kconfig | 1 +
  1 file changed, 1 insertion(+)
arch/arm/mach-aspeed/Kconfig +1 -1
index 693cbdd..129bc19 100644
@@ -39,6 +39,7 @@ config MACH_ASPEED_G6
         select CPU_V7
         select PINCTRL_ASPEED_G6
         select ARM_GIC
+       select FTTMR010_TIMER
         select HAVE_ARM_ARCH_TIMER
         select HAVE_SMP
         help
--

1.8.3.1