diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2020-02-15 18:16:46 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2020-03-23 18:53:03 +0100 |
commit | c44062b15e7a0ff1d7bfd945d706331b5826b2fd (patch) | |
tree | 7334a7648da62dfdd5d1514238383d2922191857 | |
parent | a5026c55796a466ebdd0cc18fa3518e85093f9c5 (diff) | |
download | openfirmware-c44062b15e7a0ff1d7bfd945d706331b5826b2fd.tar.gz |
mmp3/gic: create the TWD nodes
Arm TWD is used for local timer interrupt delivery on SMP systems. Enable it
and create the appropriate nodes in the GIC fixup path, because it relies on
GIC.
Apparently the non-GIC interrupt controller can be used for CPU local
timer interrupt delivery, but not with mainline Linux at this point.
-rw-r--r-- | cpu/arm/mmp3/gic.fth | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cpu/arm/mmp3/gic.fth b/cpu/arm/mmp3/gic.fth index afc1fd97..024f660d 100644 --- a/cpu/arm/mmp3/gic.fth +++ b/cpu/arm/mmp3/gic.fth @@ -14,6 +14,28 @@ purpose: Generic Interrupt Controller node for Marvell MMP3 : decode-unit ( adr len -- phys ) push-hex $number if 0 then pop-base ; end-package +0 0 " e0000600" " /" begin-package + " local-timer" device-name + " arm,arm11mp-twd-timer" +compatible + my-address my-space h# 20 reg + + 1 encode-int \ Per-processor interrupt + d# 13 encode-int encode+ + h# 301 encode-int encode+ \ GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING + " interrupts" property +end-package + +0 0 " e0000620" " /" begin-package + " watchdog" device-name + " arm,arm11mp-twd-wdt" +compatible + my-address my-space h# 20 reg + + 1 encode-int \ Per-processor interrupt + d# 14 encode-int encode+ + h# 301 encode-int encode+ \ GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING + " interrupts" property +end-package + : gicparent ( -- ) " interrupt-parent" delete-property " /interrupt-controller@e0001000" encode-phandle " interrupt-parent" property @@ -77,4 +99,8 @@ dev /interrupt-controller@1c8 d# 30 irqdef dend dev /interrupt-controller@1cc d# 42 irqdef dend dev /interrupt-controller@1d0 d# 58 irqdef dend +\ Enable the TWD timer +\ PMUA_CC3_PJ |= PJ4_MP_TIMER_RST | PJ4_MP_TIMER_CLK_EN +standalone? if h# 18 h# 188 pmua-set then + : mmp3-gic ; \ 92ms |