diff mbox series

[2/4] ARM: dts: NSP: disable sp804 ccbtimers by default

Message ID 20210613094639.3242151-2-mnhagan88@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/4] ARM: dts: NSP: disable qspi node by default | expand

Commit Message

Matthew Hagan June 13, 2021, 9:46 a.m. UTC
The sp804 ccbtimers are enabled by default, however they may or may not
be present on the board. This patch disables them by default, requiring
them to be enabled only where applicable.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
---
 arch/arm/boot/dts/bcm-nsp.dtsi     | 2 ++
 arch/arm/boot/dts/bcm958522er.dts  | 8 ++++++++
 arch/arm/boot/dts/bcm958525er.dts  | 8 ++++++++
 arch/arm/boot/dts/bcm958525xmc.dts | 8 ++++++++
 arch/arm/boot/dts/bcm958622hr.dts  | 8 ++++++++
 arch/arm/boot/dts/bcm958623hr.dts  | 8 ++++++++
 arch/arm/boot/dts/bcm958625hr.dts  | 8 ++++++++
 arch/arm/boot/dts/bcm958625k.dts   | 8 ++++++++
 arch/arm/boot/dts/bcm988312hr.dts  | 8 ++++++++
 9 files changed, 66 insertions(+)

Comments

Florian Fainelli June 13, 2021, 4:22 p.m. UTC | #1
On 6/13/2021 2:46 AM, Matthew Hagan wrote:
> The sp804 ccbtimers are enabled by default, however they may or may not
> be present on the board. This patch disables them by default, requiring
> them to be enabled only where applicable.

The timers are always part of the SoC, so they should always be enabled,
and if there was some board specific wiring, in that maybe one of the
times was fed a different clock source than iprocslow, we could deal
with that on a per-board basis.

If someone does not want a specific timer to be used, it could be
unbound once the kernel has booted for instance.
Matthew Hagan June 13, 2021, 7:46 p.m. UTC | #2
On 13/06/2021 17:22, Florian Fainelli wrote:

>
> On 6/13/2021 2:46 AM, Matthew Hagan wrote:
>> The sp804 ccbtimers are enabled by default, however they may or may not
>> be present on the board. This patch disables them by default, requiring
>> them to be enabled only where applicable.
> The timers are always part of the SoC, so they should always be enabled,
> and if there was some board specific wiring, in that maybe one of the
> times was fed a different clock source than iprocslow, we could deal
> with that on a per-board basis.
>
> If someone does not want a specific timer to be used, it could be
> unbound once the kernel has booted for instance.

I should have spent more time to look at the issue rather rather than
proposing to disable parts of the SoC.

In my case with ccbtimer0, ccbtimer1 both enabled:

[    0.000181] clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 15290083572 ns
[    0.000209] Failed to initialize '/axi@18000000/timer@35000': -22

but with ccbtimer0 disabled, ccbtimer1 now initialises correctly:

[    0.000186] clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 15290083572 ns

Will investigate this further, but yes this patch should be dropped.

Thanks,
Matthew
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
index c0427d985438..043d3bfaf1cc 100644
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
@@ -375,6 +375,7 @@  ccbtimer0: timer@34000 {
 				     <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&iprocslow>;
 			clock-names = "apb_pclk";
+			status = "disabled";
 		};
 
 		ccbtimer1: timer@35000 {
@@ -384,6 +385,7 @@  ccbtimer1: timer@35000 {
 				     <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&iprocslow>;
 			clock-names = "apb_pclk";
+			status = "disabled";
 		};
 
 		srab: ethernet-switch@36000 {
diff --git a/arch/arm/boot/dts/bcm958522er.dts b/arch/arm/boot/dts/bcm958522er.dts
index e5ed67b3c35f..bc7a28cd1017 100644
--- a/arch/arm/boot/dts/bcm958522er.dts
+++ b/arch/arm/boot/dts/bcm958522er.dts
@@ -70,6 +70,14 @@  &amac1 {
 	status = "okay";
 };
 
+&ccbtimer0 {
+	status = "okay";
+};
+
+&ccbtimer1 {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/bcm958525er.dts b/arch/arm/boot/dts/bcm958525er.dts
index 017fc46cdf0b..cd9b24bf2ee6 100644
--- a/arch/arm/boot/dts/bcm958525er.dts
+++ b/arch/arm/boot/dts/bcm958525er.dts
@@ -70,6 +70,14 @@  &amac1 {
 	status = "okay";
 };
 
+&ccbtimer0 {
+	status = "okay";
+};
+
+&ccbtimer1 {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/bcm958525xmc.dts b/arch/arm/boot/dts/bcm958525xmc.dts
index 5364f98ae1b8..b7c76a7d4a40 100644
--- a/arch/arm/boot/dts/bcm958525xmc.dts
+++ b/arch/arm/boot/dts/bcm958525xmc.dts
@@ -66,6 +66,14 @@  &amac0 {
 	status = "okay";
 };
 
+&ccbtimer0 {
+	status = "okay";
+};
+
+&ccbtimer1 {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/bcm958622hr.dts b/arch/arm/boot/dts/bcm958622hr.dts
index 4763eb5d68a6..fe5ac3495223 100644
--- a/arch/arm/boot/dts/bcm958622hr.dts
+++ b/arch/arm/boot/dts/bcm958622hr.dts
@@ -74,6 +74,14 @@  &amac2 {
 	status = "okay";
 };
 
+&ccbtimer0 {
+	status = "okay";
+};
+
+&ccbtimer1 {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/bcm958623hr.dts b/arch/arm/boot/dts/bcm958623hr.dts
index f2468bed2808..4c8563fdd635 100644
--- a/arch/arm/boot/dts/bcm958623hr.dts
+++ b/arch/arm/boot/dts/bcm958623hr.dts
@@ -74,6 +74,14 @@  &amac2 {
 	status = "okay";
 };
 
+&ccbtimer0 {
+	status = "okay";
+};
+
+&ccbtimer1 {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts
index c26849304bc7..dc0fccf57dfe 100644
--- a/arch/arm/boot/dts/bcm958625hr.dts
+++ b/arch/arm/boot/dts/bcm958625hr.dts
@@ -85,6 +85,14 @@  &amac2 {
 	status = "okay";
 };
 
+&ccbtimer0 {
+	status = "okay";
+};
+
+&ccbtimer1 {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/bcm958625k.dts b/arch/arm/boot/dts/bcm958625k.dts
index b7b136c862a8..f23e97df2fc1 100644
--- a/arch/arm/boot/dts/bcm958625k.dts
+++ b/arch/arm/boot/dts/bcm958625k.dts
@@ -64,6 +64,14 @@  &amac2 {
 	status = "okay";
 };
 
+&ccbtimer0 {
+	status = "okay";
+};
+
+&ccbtimer1 {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/bcm988312hr.dts b/arch/arm/boot/dts/bcm988312hr.dts
index 6b57530a3964..a2c8a22e8381 100644
--- a/arch/arm/boot/dts/bcm988312hr.dts
+++ b/arch/arm/boot/dts/bcm988312hr.dts
@@ -74,6 +74,14 @@  &amac2 {
 	status = "okay";
 };
 
+&ccbtimer0 {
+	status = "okay";
+};
+
+&ccbtimer1 {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };