cleanup arc emac
Subsystems (4)
cover cleanup arc emac
The Rockchip emac binding for rk3036/rk3066/rk3188 has been converted to YAML with the ethernet-phy node in a mdio node. This requires some driver fixes by someone that can do hardware testing.
In order to make a future fix easier make the driver 'Rockchip only' by removing the obsolete part of the arc emac driver.
Johan Jonker (3):
ARM: dts: rockchip: rk3xxx: fix emac node
net: ethernet: arc: remove emac_arc driver
dt-bindings: net: remove arc_emac.txt
.../devicetree/bindings/net/arc_emac.txt | 46 ---------- arch/arm/boot/dts/rockchip/rk3066a.dtsi | 4 - arch/arm/boot/dts/rockchip/rk3xxx.dtsi | 7 +- drivers/net/ethernet/arc/Kconfig | 10 --- drivers/net/ethernet/arc/Makefile | 1 - drivers/net/ethernet/arc/emac_arc.c | 88 ------------------- 6 files changed, 2 insertions(+), 154 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/arc_emac.txt delete mode 100644 drivers/net/ethernet/arc/emac_arc.c
--
2.39.2
PATCH 1/3 ARM: dts: rockchip: rk3xxx: fix emac node
In the combined DT of rk3066a/rk3188 the emac node uses as place holder the compatible string "snps,arc-emac". The last real user nSIM_700 of the "snps,arc-emac" compatible string in a driver was removed in 2019. Rockchip emac nodes don't make use of this common fall back string. In order to removed unused driver code replace this string with "rockchip,rk3066-emac".
As we are there remove the blank lines and sort.
---
[PATCH 8/8] ARC: nSIM_700: remove unused network options
https://lore.kernel.org/all/[email protected]/
--- arch/arm/boot/dts/rockchip/rk3066a.dtsi | 4 ---- arch/arm/boot/dts/rockchip/rk3xxx.dtsi | 7 ++----- 2 files changed, 2 insertions(+), 9 deletions(-)
arch/arm/boot/dts/rockchip/rk3066a.dtsi +0 -4
@@ -896,7 +896,3 @@ &vpu { &wdt { compatible = "rockchip,rk3066-wdt", "snps,dw-wdt"; }; - -&emac { - compatible = "rockchip,rk3066-emac"; -};
arch/arm/boot/dts/rockchip/rk3xxx.dtsi +2 -5
@@ -194,17 +194,14 @@ usb_host: usb@101c0000 { }; emac: ethernet@10204000 { - compatible = "snps,arc-emac"; + compatible = "rockchip,rk3066-emac"; reg = <0x10204000 0x3c>; interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; - - rockchip,grf = <&grf>; - clocks = <&cru HCLK_EMAC>, <&cru SCLK_MAC>; clock-names = "hclk", "macref"; max-speed = <100>; phy-mode = "rmii"; - + rockchip,grf = <&grf>; status = "disabled"; };
--
2.39.2
Re: [PATCH v1 1/3] ARM: dts: rockchip: rk3xxx: fix emac node
Am Dienstag, 18. Juni 2024, 18:13:56 CEST schrieb Johan Jonker:
Quoted 9 lines
In the combined DT of rk3066a/rk3188 the emac node uses as place holder the compatible string "snps,arc-emac". The last real user
nSIM_700of the "snps,arc-emac" compatible string in a driver was removed in 2019. Rockchip emac nodes don't make use of this common fall back string. In order to removed unused driver code replace this string with "rockchip,rk3066-emac".
As we are there remove the blank lines and sort.Signed-off-by Johan Jonker <[email protected]>
I think this is fine going through the network tree together with the other two patches.
Quoted 49 lines
---
[PATCH 8/8] ARC:
nSIM_700: remove unused network options
https://lore.kernel.org/all/[email protected]/--- arch/arm/boot/dts/rockchip/rk3066a.dtsi | 4 ---- arch/arm/boot/dts/rockchip/rk3xxx.dtsi | 7 ++----- 2 files changed, 2 insertions(+), 9 deletions(-)arch/arm/boot/dts/rockchip/rk3066a.dtsi +0
-4@@ -896,7 +896,3 @@ &vpu { &wdt { compatible = "rockchip,rk3066-wdt", "snps,dw-wdt"; }; - -&emac { - compatible = "rockchip,rk3066-emac"; -};arch/arm/boot/dts/rockchip/rk3xxx.dtsi +2
-6@@ -194,17 +194,14 @@ usb_host: usb@101c0000 { }; emac: ethernet@10204000 { - compatible = "snps,arc-emac"; + compatible = "rockchip,rk3066-emac"; reg = <0x10204000 0x3c>; interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; - - rockchip,grf = <&grf>; - clocks = <&cru HCLK_EMAC>, <&cru SCLK_MAC>; clock-names = "hclk", "macref"; max-speed = <100>; phy-mode = "rmii"; - + rockchip,grf = <&grf>; status = "disabled"; }; --2.39.2
PATCH 2/3 net: ethernet: arc: remove emac_arc driver
In reply to Johan JonkerThe last real user nSIM_700 of the "snps,arc-emac" compatible string in a driver was removed in 2019. The use of this string in the combined DT of rk3066a/rk3188 as place holder has also been replaced, so remove emac_arc.c to clean up some code.
---
[PATCH 8/8] ARC: nSIM_700: remove unused network options
https://lore.kernel.org/all/[email protected]/
--- drivers/net/ethernet/arc/Kconfig | 10 ---- drivers/net/ethernet/arc/Makefile | 1 - drivers/net/ethernet/arc/emac_arc.c | 88 ----------------------------- 3 files changed, 99 deletions(-) delete mode 100644 drivers/net/ethernet/arc/emac_arc.c
drivers/net/ethernet/arc/Kconfig +0 -10
@@ -23,16 +23,6 @@ config ARC_EMAC_CORE select PHYLIB select CRC32 -config ARC_EMAC - tristate "ARC EMAC support" - select ARC_EMAC_CORE - depends on OF_IRQ - depends on ARC || COMPILE_TEST - help - On some legacy ARC (Synopsys) FPGA boards such as ARCAngel4/ML50x - non-standard on-chip ethernet device ARC EMAC 10/100 is used. - Say Y here if you have such a board. If unsure, say N. - config EMAC_ROCKCHIP tristate "Rockchip EMAC support" select ARC_EMAC_CORE
drivers/net/ethernet/arc/Makefile +0 -1
@@ -5,5 +5,4 @@ arc_emac-objs := emac_main.o emac_mdio.o obj-$(CONFIG_ARC_EMAC_CORE) += arc_emac.o -obj-$(CONFIG_ARC_EMAC) += emac_arc.o obj-$(CONFIG_EMAC_ROCKCHIP) += emac_rockchip.o
drivers/net/ethernet/arc/emac_arc.c deleted +0 -88
88 lines not on this page · raw message
--
2.39.2
Re: [PATCH v1 2/3] net: ethernet: arc: remove emac_arc driver
Quoted 6 lines · Johan Jonker
The last real user
nSIM_700of the "snps,arc-emac" compatible string in a driver was removed in 2019. The use of this string in the combined DT of rk3066a/rk3188 as place holder has also been replaced, so removeemac_arc.cto clean up some code.Signed-off-by Johan Jonker <[email protected]>
Re: [PATCH v1 2/3] net: ethernet: arc: remove emac_arc driver
In reply to Johan JonkerQuoted 8 lines · Johan Jonker
The last real user
nSIM_700of the "snps,arc-emac" compatible string in a driver was removed in 2019. The use of this string in the combined DT of rk3066a/rk3188 as place holder has also been replaced, so removeemac_arc.cto clean up some code.Signed-off-by Johan Jonker <[email protected]>---
Quoted 8 lines
[PATCH 8/8] ARC:
nSIM_700: remove unused network options
https://lore.kernel.org/all/[email protected]/--- drivers/net/ethernet/arc/Kconfig | 10 ---- drivers/net/ethernet/arc/Makefile | 1 - drivers/net/ethernet/arc/emac_arc.c | 88 ----------------------------- 3 files changed, 99 deletions(-) delete mode 100644 drivers/net/ethernet/arc/emac_arc.c
AFAICS this depends on the previous DT patch, which in turn should go via the arm tree.
Perhaps the whole series should go via the arm tree?
In such case:
Jakub Kicinski
maintainerRe: [PATCH v1 2/3] net: ethernet: arc: remove emac_arc driver
Quoted 4 lines · On Thu, 20 Jun 2024 15:19:24 +0200 Paolo Abeni wrote:
AFAICS this depends on the previous DT patch, which in turn should go via the arm tree.
Perhaps the whole series should go via the arm tree?
FWIW Heiko said on patch 1 that the whole thing should go via netdev...
Heiko Stübner
maintainerRe: [PATCH v1 2/3] net: ethernet: arc: remove emac_arc driver
Am Donnerstag, 20. Juni 2024, 15:37:29 CEST schrieb Jakub Kicinski:
Quoted 7 lines · On Thu, 20 Jun 2024 15:19:24 +0200 Paolo Abeni wrote:
Quoted 4 lines
AFAICS this depends on the previous DT patch, which in turn should go via the arm tree.
Perhaps the whole series should go via the arm tree?
FWIW Heiko said on patch 1 that the whole thing should go via netdev...
yep.
Reasoning is that the rk3066 is mostly inactive, so taking that dt-patch through the net-tree won't create conflicts with other dt-changes here.
And of course both binding and driver changes are the bigger parts of this series.
PATCH 3/3 dt-bindings: net: remove arc_emac.txt
In reply to Johan JonkerThe last real user nSIM_700 of the "snps,arc-emac" compatible string in a driver was removed in 2019. The use of this string in the combined DT of rk3066a/rk3188 as place holder has also been replaced, so remove arc_emac.txt
---
[PATCH 8/8] ARC: nSIM_700: remove unused network options
https://lore.kernel.org/all/[email protected]/
--- .../devicetree/bindings/net/arc_emac.txt | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/arc_emac.txt
Documentation/devicetree/bindings/net/arc_emac.txt deleted +0 -46
@@ -1,46 +0,0 @@ -* Synopsys ARC EMAC 10/100 Ethernet driver (EMAC) - -Required properties: -- compatible: Should be "snps,arc-emac" -- reg: Address and length of the register set for the device -- interrupts: Should contain the EMAC interrupts -- max-speed: see ethernet.txt file in the same directory. -- phy: see ethernet.txt file in the same directory. - -Optional properties: -- phy-reset-gpios : Should specify the gpio for phy reset -- phy-reset-duration : Reset duration in milliseconds. Should present - only if property "phy-reset-gpios" is available. Missing the property - will have the duration be 1 millisecond. Numbers greater than 1000 are - invalid and 1 millisecond will be used instead. - -Clock handling: -The clock frequency is needed to calculate and set polling period of EMAC. -It must be provided by one of: -- clock-frequency: CPU frequency. -- clocks: reference to the clock supplying the EMAC. - -Child nodes of the driver are the individual PHY devices connected to the -MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus. - -Examples: - - ethernet@c0fc2000 { - compatible = "snps,arc-emac"; - reg = <0xc0fc2000 0x3c>; - interrupts = <6>; - mac-address = [ 00 11 22 33 44 55 ]; - - clock-frequency = <80000000>; - /* or */ - clocks = <&emac_clock>; - - max-speed = <100>; - phy = <&phy0>; - - #address-cells = <1>; - #size-cells = <0>; - phy0: ethernet-phy@0 { - reg = <1>; - }; - };
--
2.39.2
Re: [PATCH v1 3/3] dt-bindings: net: remove arc_emac.txt
Quoted 4 lines · Johan Jonker
The last real user
nSIM_700of the "snps,arc-emac" compatible string in a driver was removed in 2019. The use of this string in the combined DT of rk3066a/rk3188 as place holder has also been replaced, so remove arc_emac.txt
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 8 lines · On Tue, 18 Jun 2024 18:11:49 +0200 you wrote:
The Rockchip emac binding for rk3036/rk3066/rk3188 has been converted to YAML with the ethernet-phy node in a mdio node. This requires some driver fixes by someone that can do hardware testing.
In order to make a future fix easier make the driver 'Rockchip only' by removing the obsolete part of the arc emac driver.
[...]
Here is the summary with links:
- [v1,1/3] ARM: dts: rockchip: rk3xxx: fix emac node (no matching commit)
- [v1,2/3] net: ethernet: arc: remove emac_arc driver (no matching commit)
- [v1,3/3] dt-bindings: net: remove arc_emac.txt
https://git.kernel.org/netdev/net-next/c/8a3913c8e05b
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Jakub Kicinski
maintainerQuoted 6 lines · On Fri, 21 Jun 2024 09:10:29 +0000 [email protected] wrote:
- [v1,1/3] ARM: dts: rockchip: rk3xxx: fix emac node (no matching commit)
- [v1,2/3] net: ethernet: arc: removeemac_arcdriver (no matching commit)
- [v1,3/3] dt-bindings: net: remove arc_emac.txthttps://git.kernel.org/netdev/net-next/c/8a3913c8e05b
FTR - all of the patches were applied.