dt-bindings: clock: Use "CLK_ETHERNET" for the Ethernet clock
Subsystems (3)
PATCH 1/1 dt-bindings: clock: Use "CLK_ETHERNET" for the Ethernet clock
Right now, dt clock binding for ethernet uses different names CLK_ETH_MAC for S900 and CLK_ETHERNET for S700, while dt clock binding for most of the other devices uses same name(for instance, the UART clock binding that uses CLK_UARTx).
Let's use same name CLK_ETHERNET for both S700 and S900.
---
Noticed it while working on U-BOOT Ethernet support for S700 where we have common clock driver used by S700 and S900. Patch[1] was initially sent to U-BOOT list.
[1]: https://patchwork.ozlabs.org/patch/1229219/
--- drivers/clk/actions/owl-s900.c | 2 +- include/dt-bindings/clock/actions,s900-cmu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/clk/actions/owl-s900.c +1 -1
@@ -648,7 +648,7 @@ static struct clk_hw_onecell_data s900_hw_clks = { [CLK_DE0] = &de_clk.common.hw, [CLK_DMM] = &dmm_clk.common.hw, [CLK_EDP] = &edp_clk.common.hw, - [CLK_ETH_MAC] = ð_mac_clk.common.hw, + [CLK_ETHERNET] = ð_mac_clk.common.hw, [CLK_GPU_CORE] = &gpu_core_clk.common.hw, [CLK_GPU_MEM] = &gpu_mem_clk.common.hw, [CLK_GPU_SYS] = &gpu_sys_clk.common.hw,
include/dt-bindings/clock/actions,s900-cmu.h +1 -1
@@ -121,7 +121,7 @@#define CLK_DDR1 97#define CLK_DMM 98 -#define CLK_ETH_MAC 99 +#define CLK_ETHERNET 99#define CLK_RMII_REF 100#define CLK_NR_CLKS (CLK_RMII_REF + 1)
Signature · 7 lines
2.7.4 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Andreas Färber
maintainerHi Amit,
Am 22.03.20 um 13:11 schrieb Amit Singh Tomar:
Quoted 11 lines
Right now, dt clock binding for ethernet uses different names
CLK_ETH_MACfor S900 andCLK_ETHERNETfor S700, while dt clock binding for most of the other devices uses samename(for instance, the UART clock binding that uses CLK_UARTx).Let's use same name
CLK_ETHERNETfor both S700 and S900.Signed-off-by Amit Singh Tomar <[email protected]>---
Noticed it while working on U-BOOT Ethernet support for S700 where we have common clock driver used by S700 and S900. Patch[1] was initially sent to U-BOOT list.
Quoted 5 lines
[1]: https://patchwork.ozlabs.org/patch/1229219/
--- drivers/clk/actions/owl-s900.c | 2 +- include/dt-bindings/clock/actions,s900-cmu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Never mix changes to bindings and drivers. Separating them exposes the difficulty in the change your proposing:
Quoted 18 lines
drivers/clk/actions/owl-s900.c +1
-1@@ -648,7 +648,7 @@ static struct clk_hw_onecell_data s900_hw_clks = { [CLK_DE0] = &de_clk.common.hw, [CLK_DMM] = &dmm_clk.common.hw, [CLK_EDP] = &edp_clk.common.hw, - [CLK_ETH_MAC] = ð_mac_clk.common.hw, + [CLK_ETHERNET] = ð_mac_clk.common.hw, [CLK_GPU_CORE] = &gpu_core_clk.common.hw, [CLK_GPU_MEM] = &gpu_mem_clk.common.hw, [CLK_GPU_SYS] = &gpu_sys_clk.common.hw,include/dt-bindings/clock/actions,s900-cmu.h +0
-0
include/dt-bindings/clock/actions,s900-cmu.h line 124
Quoted 5 lines
include/dt-bindings/clock/actions,s900-cmu.h +1
-1@@ -121,7 +121,7 @@#define CLK_DDR1 97#define CLK_DMM 98 -#define CLK_ETH_MAC 99 +#define CLK_ETHERNET 99
The bindings are not supposed to change in breaking ways. What you could consider instead is to define CLK_ETHERNET as alias, keeping CLK_ETH_MAC for backwards compatibility.
Regards,
Andreas
Quoted 3 lines
include/dt-bindings/clock/actions,s900-cmu.h +0
-0#define CLK_RMII_REF 100#define CLK_NR_CLKS (CLK_RMII_REF + 1)
Signature · 9 lines
SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer HRB 36809 (AG Nürnberg) _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Andreas,
Quoted 2 lines
Never mix changes to bindings and drivers. Separating them exposes the difficulty in the change your proposing:
Thanks for letting me know, wasn't aware about this rule.
Quoted 21 lines
Quoted 21 lines
drivers/clk/actions/owl-s900.c +1
-1@@ -648,7 +648,7 @@ static struct clk_hw_onecell_data s900_hw_clks = { [CLK_DE0] = &de_clk.common.hw, [CLK_DMM] = &dmm_clk.common.hw, [CLK_EDP] = &edp_clk.common.hw, - [CLK_ETH_MAC] = ð_mac_clk.common.hw, + [CLK_ETHERNET] = ð_mac_clk.common.hw, [CLK_GPU_CORE] = &gpu_core_clk.common.hw, [CLK_GPU_MEM] = &gpu_mem_clk.common.hw, [CLK_GPU_SYS] = &gpu_sys_clk.common.hw,include/dt-bindings/clock/actions,s900-cmu.h +0
-0@@ -121,7 +121,7 @@#define CLK_DDR1 97#define CLK_DMM 98
Quoted 6 lines
include/dt-bindings/clock/actions,s900-cmu.h line 124
Quoted 2 lines
include/dt-bindings/clock/actions,s900-cmu.h +1
-1-#define CLK_ETH_MAC 99 +#define CLK_ETHERNET 99The bindings are not supposed to change in breaking ways. What you could consider instead is to define
CLK_ETHERNETas alias, keepingCLK_ETH_MACfor backwards compatibility.
Sure, I would try using CLK_ETHERNET as alias in U-BOOT and see how it goes.
Thanks,
-Amit
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel