net: npcm-emc: modify check mac_address function
Subsystems (2)
PATCH 1/4 net: npcm-emc: modify check mac_address function
Signed-off-by Tomer Maimon <[email protected]>
--- drivers/net/ethernet/nuvoton/npcm7xx_emc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/nuvoton/npcm7xx_emc.c +1 -1
@@ -1752,7 +1752,7 @@ static void get_mac_address(struct net_device *dev) mac_address =of_get_mac_address (np); -if (mac_address !=0 ) +if (!IS_ERR (mac_address))ether_addr_copy (dev->dev_addr, mac_address);if (is_valid_ether_addr (dev->dev_addr)) {
Signature · 1 line
2.22.0
PATCH 2/4 dts: npcm7xx: modify FIU's clock names
Signed-off-by Tomer Maimon <[email protected]>
--- arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi +6 -6
@@ -232,8 +232,8 @@ #size-cells = <0>; reg = <0xfb000000 0x1000>, <0x80000000 0x10000000>; reg-names = "control", "memory"; - clocks = <&clk NPCM7XX_CLK_AHB>; - clock-names = "clk_ahb"; + clocks = <&clk NPCM7XX_CLK_SPI0>; + clock-names = "clk_spi0"; status = "disabled"; };
@@ -243,8 +243,8 @@ #size-cells = <0>; reg = <0xc0000000 0x1000>, <0xA0000000 0x20000000>; reg-names = "control", "memory"; - clocks = <&clk NPCM7XX_CLK_AHB>; - clock-names = "clk_ahb"; + clocks = <&clk NPCM7XX_CLK_SPI3>; + clock-names = "clk_spi3"; pinctrl-names = "default"; pinctrl-0 = <&spi3_pins>; status = "disabled";
@@ -256,8 +256,8 @@ #size-cells = <0>; reg = <0xfb001000 0x1000>, <0xf8000000 0x2000000>; reg-names = "control", "memory"; - clocks = <&clk NPCM7XX_CLK_AHB>; - clock-names = "clk_ahb"; + clocks = <&clk NPCM7XX_CLK_SPIX>; + clock-names = "clk_spix"; status = "disabled"; };
Signature · 1 line
2.22.0
PATCH 3/4 dts: npcm7xx: remove direct read mapping in FIU
In reply to Tomer MaimonRemove direct read mapping in FIU for disable direct read because SPI-NOR core dosen't support it.
Signed-off-by Tomer Maimon <[email protected]>
--- arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi +3 -3
@@ -230,7 +230,7 @@ compatible = "nuvoton,npcm750-fiu"; #address-cells = <1>; #size-cells = <0>; - reg = <0xfb000000 0x1000>, <0x80000000 0x10000000>; + reg = <0xfb000000 0x1000>; reg-names = "control", "memory"; clocks = <&clk NPCM7XX_CLK_SPI0>; clock-names = "clk_spi0";
@@ -241,7 +241,7 @@ compatible = "nuvoton,npcm750-fiu"; #address-cells = <1>; #size-cells = <0>; - reg = <0xc0000000 0x1000>, <0xA0000000 0x20000000>; + reg = <0xc0000000 0x1000>; reg-names = "control", "memory"; clocks = <&clk NPCM7XX_CLK_SPI3>; clock-names = "clk_spi3";
@@ -254,7 +254,7 @@ compatible = "nuvoton,npcm750-fiu"; #address-cells = <1>; #size-cells = <0>; - reg = <0xfb001000 0x1000>, <0xf8000000 0x2000000>; + reg = <0xfb001000 0x1000>; reg-names = "control", "memory"; clocks = <&clk NPCM7XX_CLK_SPIX>; clock-names = "clk_spix";
Signature · 1 line
2.22.0
PATCH 4/4 dts: npcm7xx: add reset support
In reply to Tomer MaimonAdd reset support to PSPI ADC and EMC node.
Signed-off-by Tomer Maimon <[email protected]>
--- arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 11 +++++++++++ arch/arm/boot/dts/nuvoton-npcm750.dtsi | 1 + 2 files changed, 12 insertions(+)
arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi +11 -0
@@ -4,6 +4,7 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h> +#include <dt-bindings/reset/nuvoton,npcm7xx-reset.h> #include <dt-bindings/gpio/gpio.h> / {
@@ -113,6 +114,12 @@ interrupt-parent = <&gic>; ranges; + rstc: rstc@f0801000 { + compatible = "nuvoton,npcm750-reset"; + reg = <0xf0801000 0x70>; + #reset-cells = <2>; + }; + clk: clock-controller@f0801000 { compatible = "nuvoton,npcm750-clk", "syscon"; #clock-cells = <1>;
@@ -152,6 +159,7 @@ <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk NPCM7XX_CLK_AHB>; clock-names = "clk_emc"; + resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_EMC1>; pinctrl-names = "default"; pinctrl-0 = <&r1_pins &r1err_pins
@@ -380,6 +388,7 @@ interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk NPCM7XX_CLK_APB5>; clock-names = "clk_apb5"; + resets = <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_PSPI1>; status = "disabled"; };
@@ -393,6 +402,7 @@ interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk NPCM7XX_CLK_APB5>; clock-names = "clk_apb5"; + resets = <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_PSPI2>; status = "disabled"; };
@@ -476,6 +486,7 @@ reg = <0xc000 0x8>; interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk NPCM7XX_CLK_ADC>; + resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_ADC>; status = "disabled"; };
arch/arm/boot/dts/nuvoton-npcm750.dtsi +1 -0
@@ -68,6 +68,7 @@ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk NPCM7XX_CLK_AHB>; clock-names = "clk_emc"; + resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_EMC2>; pinctrl-names = "default"; pinctrl-0 = <&r2_pins &r2err_pins
Signature · 1 line
2.22.0
Hi Tomer,
Quoted 1 line · Tomer Maimon
I'm able to apply these patches, but we've moved from 5.7 to 5.8. I have applied to dev-5.8 instead.
It would be good to see an upstream submission of the emc driver :)
Cheers,
Joel
Quoted 21 lines
Signed-off-by Tomer Maimon <[email protected]>--- drivers/net/ethernet/nuvoton/npcm7xx_emc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/nuvoton/npcm7xx_emc.c +1
-2@@ -1752,7 +1752,7 @@ static void get_mac_address(struct net_device *dev) mac_address =of_get_mac_address (np); -if (mac_address !=0 ) +if (!IS_ERR (mac_address))ether_addr_copy (dev->dev_addr, mac_address);if (is_valid_ether_addr (dev->dev_addr)) { --2.22.0