Skip to contentSkip to conversation

ARM: tegra: Add clocks property to TWD node

PATCH In review Thierry Reding 2 participants 2 messages Feb 12, 2013 1 message not in the archive

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

PATCH 1/1 ARM: tegra: Add clocks property to TWD node

The generic ARM TWD code has recently gained support for looking up the clock from DT. Adding the appropriate clocks property allows the driver to successfully register the clock event device.

---
Note that the binding documentation says that the twd clock is 132 on Tegra20, but according to drivers/clk/tegra/clk-tegra20.c it is in fact
130. The patch doesn't update the binding documentation because some other offsets are probably also wrong and I didn't have the time to go through all of them.

---
 arch/arm/boot/dts/tegra20.dtsi | 1 +
 arch/arm/boot/dts/tegra30.dtsi | 1 +
 2 files changed, 2 insertions(+)
arch/arm/boot/dts/tegra20.dtsi +1 -0
index cdb8da0..d6642b2 100644
@@ -118,6 +118,7 @@
 		compatible = "arm,cortex-a9-twd-timer";
 		reg = <0x50040600 0x20>;
 		interrupts = <1 13 0x304>;
+		clocks = <&tegra_car 130>;
 	};
 
 	intc: interrupt-controller {
arch/arm/boot/dts/tegra30.dtsi +1 -0
index 572a45b..922c8cf 100644
@@ -119,6 +119,7 @@
 		compatible = "arm,cortex-a9-twd-timer";
 		reg = <0x50040600 0x20>;
 		interrupts = <1 13 0xf04>;
+		clocks = <&tegra_car 214>;
 	};
 
 	intc: interrupt-controller {
Signature · 1 line
1.8.1.2

A message that is not in the archive (sent off-list or not yet received): 1360684611-11152-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org

#2 lore raw
Quoted 11 lines · Thierry Reding

The generic ARM TWD code has recently gained support for looking up the clock from DT. Adding the appropriate clocks property allows the driver to successfully register the clock event device.

---
Note that the binding documentation says that the twd clock is 132 on Tegra20, but according to drivers/clk/tegra/clk-tegra20.c it is in fact
130. The patch doesn't update the binding documentation because some other offsets are probably also wrong and I didn't have the time to go through all of them.

The driver is buggy in that it doesn't match the DT bindings. I'll send a patch to fix that up very soon. Then this patch can be rebased.