Skip to contentSkip to conversation

rockchip: timer: rockchip_timer: fix compatible and driver name

PATCH In review Johan Jonker 2 participants 4 messages Mar 7, 2023 – Mar 8, 2023

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

PATCH 1/2 rockchip: timer: rockchip_timer: fix compatible and driver name

In the binding for the Rockchip timer the compatible string consists of a SoC orientated string and a fall back string "rockchip,rk3288-timer", so remove all unneeded ones and fix driver name.

---
 drivers/timer/rockchip_timer.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/timer/rockchip_timer.c +3 -5
index 62eacb98..e66c49aa 100644
@@ -20,7 +20,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
 struct rockchip_timer_plat {
-	struct dtd_rockchip_rk3368_timer dtd;
+	struct dtd_rockchip_rk3288_timer dtd;
 };
 #endif
 
@@ -152,14 +152,12 @@ static const struct timer_ops rockchip_timer_ops = {
 };
 
 static const struct udevice_id rockchip_timer_ids[] = {
-	{ .compatible = "rockchip,rk3188-timer" },
 	{ .compatible = "rockchip,rk3288-timer" },
-	{ .compatible = "rockchip,rk3368-timer" },
 	{}
 };
 
-U_BOOT_DRIVER(rockchip_rk3368_timer) = {
-	.name	= "rockchip_rk3368_timer",
+U_BOOT_DRIVER(rockchip_rk3288_timer) = {
+	.name	= "rockchip_rk3288_timer",
 	.id	= UCLASS_TIMER,
 	.of_match = rockchip_timer_ids,
 	.probe = rockchip_timer_probe,

--
2.20.1

#1 lore raw

PATCH 2/2 arm: dts: rockchip: rk3188-radxarock-u-boot: remove timer compatible replacement

The Rockchip timer driver has been renamed after the fall back compatible. There's no need to replace the timer compatible in rk3188-radxarock-u-boot.dtsi anymore, so remove.

---
 arch/arm/dts/rk3188-radxarock-u-boot.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/dts/rk3188-radxarock-u-boot.dtsi +0 -1
index 9c9016de..de299598 100644
@@ -52,7 +52,6 @@
 };
 
 &timer3 {
-	compatible = "rockchip,rk3368-timer", "rockchip,rk3288-timer";
 	clock-frequency = <24000000>;
 	u-boot,dm-spl;
 };

--
2.20.1

Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH v1 2/2] arm: dts: rockchip: rk3188-radxarock-u-boot: remove timer compatible replacement

Quoted 5 lines · Johan Jonker

The Rockchip timer driver has been renamed after the fall back compatible. There's no need to replace the timer compatible in rk3188-radxarock-u-boot.dtsi anymore, so remove.

Thanks,
- Kever

Quoted 19 lines
---
  arch/arm/dts/rk3188-radxarock-u-boot.dtsi | 1 -
  1 file changed, 1 deletion(-)
arch/arm/dts/rk3188-radxarock-u-boot.dtsi +0 -2
index 9c9016de..de299598 100644
@@ -52,7 +52,6 @@
  };
 
  &timer3 {
-	compatible = "rockchip,rk3368-timer", "rockchip,rk3288-timer";
  	clock-frequency = <24000000>;
  	u-boot,dm-spl;
  };
--

2.20.1

Reviewed-by on v1 1/2
#3 lore raw
In reply to Johan Jonker
Quoted 6 lines · Johan Jonker

In the binding for the Rockchip timer the compatible string consists of a SoC orientated string and a fall back string "rockchip,rk3288-timer", so remove all unneeded ones and fix driver name.

Thanks,
- Kever

Quoted 37 lines
---
  drivers/timer/rockchip_timer.c | 8 +++-----
  1 file changed, 3 insertions(+), 5 deletions(-)
drivers/timer/rockchip_timer.c +3 -6
index 62eacb98..e66c49aa 100644
@@ -20,7 +20,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
  #if CONFIG_IS_ENABLED(OF_PLATDATA)
  struct rockchip_timer_plat {
-	struct dtd_rockchip_rk3368_timer dtd;
+	struct dtd_rockchip_rk3288_timer dtd;
  };
  #endif
 
@@ -152,14 +152,12 @@ static const struct timer_ops rockchip_timer_ops = {
  };
 
  static const struct udevice_id rockchip_timer_ids[] = {
-	{ .compatible = "rockchip,rk3188-timer" },
  	{ .compatible = "rockchip,rk3288-timer" },
-	{ .compatible = "rockchip,rk3368-timer" },
  	{}
  };
 
-U_BOOT_DRIVER(rockchip_rk3368_timer) = {
-	.name	= "rockchip_rk3368_timer",
+U_BOOT_DRIVER(rockchip_rk3288_timer) = {
+	.name	= "rockchip_rk3288_timer",
  	.id	= UCLASS_TIMER,
  	.of_match = rockchip_timer_ids,
  	.probe = rockchip_timer_probe,
--

2.20.1