[PATCH v3 1/5] net-next: stmmac: Convert new_state to bool

2017-05-24 Thread Corentin Labbe
This patch convert new_state from int to bool since it store only 1 or 0 Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/s

[PATCH v3 5/5] net-next: stmmac: rework the speed selection

2017-05-24 Thread Corentin Labbe
are to be combined for writing speed. So this patch replace speed/port by simpler speed10/speed100/speed1000/speed_mask variables. In dwmac4_core_init and dwmac1000_core_init, port/speed value was used directly without using the struct link. This patch convert also their usage to speedxxx. Signed-off-by: Corentin

[PATCH v6 05/21] net-next: stmmac: Add dwmac-sun8i

2017-05-31 Thread Corentin Labbe
The dwmac-sun8i is a heavy hacked version of stmmac hardware by allwinner. In fact the only common part is the descriptor management and the first register function. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/Kconfig| 11 + d

[PATCH v6 06/21] arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module

2017-05-31 Thread Corentin Labbe
This patch add the dt node for the syscon register present on the Allwinner H3/H5 Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock.. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sunxi-h3-h5.dt

[PATCH v6 07/21] arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver

2017-05-31 Thread Corentin Labbe
The dwmac-sun8i is an ethernet MAC hardware that support 10/100/1000 speed. This patch enable the dwmac-sun8i on Allwinner H3/H5 SoC Device-tree. SoC H3/H5 have an internal PHY, so optionals syscon and ephy are set. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/bo

[PATCH v6 09/21] arm: sun8i: orangepi-zero: Enable dwmac-sun8i

2017-05-31 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI Zero. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 8 1 file changed, 8 insertions(+) diff

[PATCH v6 18/21] arm64: allwinner: bananapi-m64: Enable dwmac-sun8i

2017-05-31 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the BananaPi M64. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 15 +++ 1 file changed, 15 insertions(+) diff --git

[PATCH v6 13/21] arm: sun8i: nanopi-neo: Enable dwmac-sun8i

2017-05-31 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the NanoPi Neo. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 7 +++ 1 file changed, 7 insertions(+) diff --git a/ar

[PATCH v6 10/21] arm: sun8i: orangepi-one: Enable dwmac-sun8i

2017-05-31 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI One. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v6 21/21] arm64: defconfig: Enable dwmac-sun8i driver on defconfig

2017-05-31 Thread Corentin Labbe
Enable the dwmac-sun8i ethernet driver as a module in the ARM64 defconfig. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 000de6

[PATCH v6 20/21] arm: multi_v7: Enable dwmac-sun8i driver on multi_v7_defconfig

2017-05-31 Thread Corentin Labbe
Enable the dwmac-sun8i driver in the multi_v7 default configuration Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_def

[PATCH v6 17/21] arm64: allwinner: pine64-plus: Enable dwmac-sun8i

2017-05-31 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the pine64 plus. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- .../arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts | 17 - 1 file changed, 16 insertions(+), 1 deletion(-)

[PATCH v6 19/21] arm: sunxi: Enable dwmac-sun8i driver on sunxi_defconfig

2017-05-31 Thread Corentin Labbe
Enable the dwmac-sun8i driver in the sunxi default configuration Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/configs/sunxi_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig

[PATCH v6 00/21] net-next: stmmac: add dwmac-sun8i ethernet driver

2017-05-31 Thread Corentin Labbe
. The remaining are DT patch enabling it. Regards Corentin Labbe Changes since v5: - Added DT patch for NanoPi neo - Use the new adjust_link variables (speedxxx/speedmask) - Made the timeout of readl_poll_timeout from 10 to 100ms - Fix sun8i_unpower_phy that could be called twice - Replace phy by phy-handle

[PATCH v6 03/21] dt-bindings: net-next: Add DT bindings documentation for Allwinner dwmac-sun8i

2017-05-31 Thread Corentin Labbe
This patch adds documentation for Device-Tree bindings for the Allwinner dwmac-sun8i driver. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> Acked-by: Rob Herring <r...@kernel.org> --- .../devicetree/bindings/net/dwmac-sun8i.txt| 78 ++ 1 file

[PATCH v6 01/21] net-next: stmmac: export stmmac_set_mac_addr/stmmac_get_mac_addr

2017-05-31 Thread Corentin Labbe
Thoses symbol will be needed for the dwmac-sun8i ethernet driver. For letting it to be build as module, they need to be exported. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 de

[PATCH v6 02/21] net-next: stmmac: add optional setup function

2017-05-31 Thread Corentin Labbe
Instead of adding more ifthen logic for adding a new mac_device_info setup function, it is easier to add a function pointer to the function needed. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++- include/linux/st

[PATCH v6 08/21] arm: sun8i: orangepi-pc: Enable dwmac-sun8i

2017-05-31 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI PC. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v6 04/21] dt-bindings: syscon: Add DT bindings documentation for Allwinner syscon

2017-05-31 Thread Corentin Labbe
This patch adds documentation for Device-Tree bindings for the syscon present in allwinner devices. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> Acked-by: Rob Herring <r...@kernel.org> --- .../devicetree/bindings/misc/allwinner,syscon.txt | 19 +++ 1

[PATCH v6 11/21] arm: sun8i: orangepi-2: Enable dwmac-sun8i

2017-05-31 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI 2. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 8 1 file changed, 8 insertions(+) diff --git a/ar

[PATCH v6 16/21] arm64: allwinner: pine64: Enable dwmac-sun8i

2017-05-31 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the pine64 It uses an external PHY via RMII. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm64/bo

[PATCH v6 15/21] arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver

2017-05-31 Thread Corentin Labbe
at this level. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 35 +++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi

[PATCH v6 14/21] arm64: allwinner: sun50i-a64: Add dt node for the syscon control module

2017-05-31 Thread Corentin Labbe
This patch add the dt node for the syscon register present on the Allwinner A64. Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm64/boot/dts/allwinner/sun50i-a6

[PATCH v6 12/21] arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high

2017-05-31 Thread Corentin Labbe
On the Orange Pi PC Plus, the polarity of the LEDs on the RJ45 Ethernet port were changed from active low to active high. Signed-off-by: Chen-Yu Tsai <w...@csie.org> Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 5 +

[PATCH] netxen: remove writeq/readq function definitions

2017-06-02 Thread Corentin Labbe
Instead of rewriting write/readq, use linux/io-64-nonatomic-lo-hi.h which already have them. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff

Re: [linux-sunxi] [PATCH] net-next: stmmac: dwmac-sun8i: ensure the EPHY is properly reseted

2017-06-05 Thread Corentin Labbe
able to successfully probe the > EMAC without cable plugged and then use the connection after a cable is > hot-plugged in. > > Fixes: 9f93ac8d408 ("net-next: stmmac: Add dwmac-sun8i") > Signed-off-by: Icenowy Zheng <icen...@aosc.io> Thanks for the fix. Tested-by

Re: [PATCH v5 00/20] net-next: stmmac: add dwmac-sun8i ethernet driver

2017-05-01 Thread Corentin Labbe
On Mon, May 01, 2017 at 04:45:41PM +0200, Andrew Lunn wrote: > On Mon, May 01, 2017 at 10:28:46PM +0800, Chen-Yu Tsai wrote: > > On Mon, May 1, 2017 at 10:01 PM, Andrew Lunn <and...@lunn.ch> wrote: > > > On Mon, May 01, 2017 at 02:45:00PM +0200, Corentin L

[PATCH v5 12/20] arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high

2017-05-01 Thread Corentin Labbe
On the Orange Pi PC Plus, the polarity of the LEDs on the RJ45 Ethernet port were changed from active low to active high. Signed-off-by: Chen-Yu Tsai <w...@csie.org> Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 5 +

[PATCH v5 15/20] arm64: allwinner: pine64: Enable dwmac-sun8i

2017-05-01 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the pine64 It uses an external PHY via RMII. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm64/bo

[PATCH v5 13/20] arm64: allwinner: sun50i-a64: Add dt node for the syscon control module

2017-05-01 Thread Corentin Labbe
This patch add the dt node for the syscon register present on the Allwinner A64. Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm64/boot/dts/allwinner/sun50i-a6

[PATCH v5 14/20] arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver

2017-05-01 Thread Corentin Labbe
at this level. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 35 +++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi

[PATCH v5 20/20] arm64: defconfig: Enable dwmac-sun8i driver on defconfig

2017-05-01 Thread Corentin Labbe
Enable the dwmac-sun8i ethernet driver as a module in the ARM64 defconfig. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index c

[PATCH v5 18/20] arm: sunxi: Enable dwmac-sun8i driver on sunxi_defconfig

2017-05-01 Thread Corentin Labbe
Enable the dwmac-sun8i driver in the sunxi default configuration Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/configs/sunxi_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig index 5c

[PATCH v5 16/20] arm64: allwinner: pine64-plus: Enable dwmac-sun8i

2017-05-01 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the pine64 plus. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- .../arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts | 17 - 1 file changed, 16 insertions(+), 1 deletion(-)

[PATCH v5 19/20] arm: multi_v7: Enable dwmac-sun8i driver on multi_v7_defconfig

2017-05-01 Thread Corentin Labbe
Enable the dwmac-sun8i driver in the multi_v7 default configuration Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_def

[PATCH v5 17/20] arm64: allwinner: bananapi-m64: Enable dwmac-sun8i

2017-05-01 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the BananaPi M64. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 15 +++ 1 file changed, 15 insertions(+) diff --git

[PATCH v5 05/20] net: stmmac: Add dwmac-sun8i

2017-05-01 Thread Corentin Labbe
The dwmac-sun8i is a heavy hacked version of stmmac hardware by allwinner. In fact the only common part is the descriptor management and the first register function. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/Kconfig| 11 + d

[PATCH v5 08/20] arm: sun8i: orangepi-pc: Enable dwmac-sun8i

2017-05-01 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI PC. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v5 07/20] arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver

2017-05-01 Thread Corentin Labbe
The dwmac-sun8i is an ethernet MAC hardware that support 10/100/1000 speed. This patch enable the dwmac-sun8i on Allwinner H3/H5 SoC Device-tree. SoC H3/H5 have an internal PHY, so optionals syscon and ephy are set. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/bo

[PATCH v5 10/20] arm: sun8i: orangepi-one: Enable dwmac-sun8i

2017-05-01 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI One. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v5 02/20] net: stmmac: add optional setup function

2017-05-01 Thread Corentin Labbe
Instead of adding more ifthen logic for adding a new mac_device_info setup function, it is easier to add a function pointer to the function needed. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++- include/linux/st

[PATCH v5 00/20] net-next: stmmac: add dwmac-sun8i ethernet driver

2017-05-01 Thread Corentin Labbe
. The remaining are DT patch enabling it. Regards Corentin Labbe Changes since v4: - Re-ordered by alphabetical order some DT nodes - Fixed arm64 patch prefix - Simplified power/unpower_phy functions by testing the use of internal_phy - Added a patch for adding dwmac-sun8i to arm64 defconfig - Fix a typo

[PATCH v5 01/20] net: stmmac: export stmmac_set_mac_addr/stmmac_get_mac_addr

2017-05-01 Thread Corentin Labbe
Thoses symbol will be needed for the dwmac-sun8i ethernet driver. For letting it to be build as module, they need to be exported. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 de

[PATCH v5 04/20] dt-bindings: syscon: Add DT bindings documentation for Allwinner syscon

2017-05-01 Thread Corentin Labbe
This patch adds documentation for Device-Tree bindings for the syscon present in allwinner devices. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- .../devicetree/bindings/misc/allwinner,syscon.txt | 19 +++ 1 file changed, 19 insertions(+) create mode

[PATCH v5 03/20] dt-bindings: net: Add DT bindings documentation for Allwinner dwmac-sun8i

2017-05-01 Thread Corentin Labbe
This patch adds documentation for Device-Tree bindings for the Allwinner dwmac-sun8i driver. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> Acked-by: Rob Herring <r...@kernel.org> --- .../devicetree/bindings/net/dwmac-sun8i.txt| 77 ++ 1 file

[PATCH v5 06/20] arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module

2017-05-01 Thread Corentin Labbe
This patch add the dt node for the syscon register present on the Allwinner H3/H5 Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock.. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sunxi-h3-h5.dt

[PATCH v5 09/20] arm: sun8i: orangepi-zero: Enable dwmac-sun8i

2017-05-01 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI Zero. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 8 1 file changed, 8 insertions(+) diff

[PATCH v5 11/20] arm: sun8i: orangepi-2: Enable dwmac-sun8i

2017-05-01 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI 2. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 8 1 file changed, 8 insertions(+) diff --git a/ar

Re: [PATCH v5 00/20] net-next: stmmac: add dwmac-sun8i ethernet driver

2017-05-05 Thread Corentin Labbe
On Mon, May 01, 2017 at 02:45:00PM +0200, Corentin Labbe wrote: > Hello > > This patch series add the driver for dwmac-sun8i which handle the Ethernet MAC > present on Allwinner H3/H5/A83T/A64 SoCs. > > This driver is the continuation of the sun8i-emac driver. > D

[PATCH 2/4] net-next: stmmac: Remove unnecessary parenthesis

2017-05-19 Thread Corentin Labbe
Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

[PATCH 0/4] net-next: stmmac: rework the speed selection

2017-05-19 Thread Corentin Labbe
Fainelli in my previous serie. The last patch is the real work. This serie is tested on cubieboard2 (dwmac1000) and opipc (dwmac-sun8i). Regards Corentin Labbe (4): net-next: stmmac: Convert new_state to bool net-next: stmmac: Remove unnecessary parenthesis net-next: stmmac: use SPEED_xxx

[PATCH 4/4] net-next: stmmac: rework the speed selection

2017-05-19 Thread Corentin Labbe
are to be combined for writing speed. So this patch replace speed/port by simpler speed10/speed100/speed1000/speed_mask variables. In dwmac4_core_init and dwmac1000_core_init, port/speed value was used directly without using the struct link. This patch convert also their usage to speedxxx. Signed-off-by: Corentin

[PATCH 3/4] net-next: stmmac: use SPEED_xxx instead of raw value

2017-05-19 Thread Corentin Labbe
Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Re: [PATCH v6 05/21] net-next: stmmac: Add dwmac-sun8i

2017-06-27 Thread Corentin Labbe
On 27/06/17 10:41, Maxime Ripard wrote: > >>> On Tue, Jun 27, 2017 at 10:02:45AM +0100, Andre Przywara wrote: > >>>> Hi, > >>>> > >>>> (CC:ing some people from that Rockchip dmwac series) > >>>> > >>>> On 27/06

[PATCH] vhost: remove unneeded linux/miscdevice.h include

2017-09-18 Thread Corentin Labbe
drivers/vhost/vhost.c does not use any miscdevice, so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/vhost/vhost.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c

[PATCH v2] net: stmmac: dwmac-sun8i: Use reset exclusive

2017-09-18 Thread Corentin Labbe
is not in the device node. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- Changes since v1: - added a note about devm_reset_control_get in commit message drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/d

[PATCH] vsock: vmci: Remove unneeded linux/miscdevice.h include

2017-09-18 Thread Corentin Labbe
net/vmw_vsock/vmci_transport.c does not use any miscdevice so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- net/vmw_vsock/vmci_transport.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/vmw_vsock/vmci_transport.c

Re: [PATCH v5 05/10] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-18 Thread Corentin Labbe
> > Andrew Hello Rob, could you anwser/confirm please. I wait on this for sending the next version. Thanks Regards Corentin Labbe

Re: [PATCH v5 05/10] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-20 Thread Corentin Labbe
On Tue, Sep 19, 2017 at 09:49:52PM -0500, Rob Herring wrote: > On Thu, Sep 14, 2017 at 2:19 PM, Andrew Lunn wrote: > >> > Is the MDIO controller "allwinner,sun8i-h3-emac" or "snps,dwmac-mdio"? > >> > If the latter, then I think the node is fine, but then the mux should be > >> > a

Re: [PATCH v5 02/10] dt-bindings: net: Restore sun8i dwmac binding

2017-09-14 Thread Corentin Labbe
On Wed, Sep 13, 2017 at 01:07:34PM -0500, Rob Herring wrote: > On Fri, Sep 08, 2017 at 09:11:48AM +0200, Corentin Labbe wrote: > > This patch restore dt-bindings documentation about dwmac-sun8i > > This reverts commit 8aa33ec2f481 ("dt-bindings: net: Revert sun8i dwmac &g

Re: [PATCH v5 05/10] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-14 Thread Corentin Labbe
On Wed, Sep 13, 2017 at 01:20:04PM -0500, Rob Herring wrote: > On Fri, Sep 08, 2017 at 09:43:25AM +0200, Corentin Labbe wrote: > > On Fri, Sep 08, 2017 at 09:25:38AM +0200, Maxime Ripard wrote: > > > On Fri, Sep 08, 2017 at 09:11:51AM +0200, Corentin Labbe wrote: >

Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-10-08 Thread Corentin Labbe
On Thu, Sep 28, 2017 at 09:37:08AM +0200, Corentin Labbe wrote: > On Wed, Sep 27, 2017 at 04:02:10PM +0200, Andrew Lunn wrote: > > Hi Corentin > > > > > +Required properties for the mdio-mux node: > > > + - compatible = "mdio-mux" > > &g

Re: [PATCH v5 10/10] net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs

2017-09-08 Thread Corentin Labbe
On Fri, Sep 08, 2017 at 03:05:20PM +0200, Andrew Lunn wrote: > > +#define DWMAC_sUN8I_MDIO_MUX_INTERNAL_ID 0 > > +#define DWMAC_sUN8I_MDIO_MUX_EXTERNAL_ID 1 > > > > /* H3/A64 specific bits */ > > #define SYSCON_RMII_EN BIT(13) /* 1: enable RMII (overrides > > EPIT) */ > > @@

Re: [PATCH v5 05/10] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-08 Thread Corentin Labbe
On Fri, Sep 08, 2017 at 09:25:38AM +0200, Maxime Ripard wrote: > On Fri, Sep 08, 2017 at 09:11:51AM +0200, Corentin Labbe wrote: > > This patch add documentation about the MDIO switch used on sun8i-h3-emac > > for integrated PHY. > > > > Signed-off-by: Corentin Labbe

[PATCH v5 01/10] arm64: dts: allwinner: Restore EMAC changes

2017-09-08 Thread Corentin Labbe
This patch restore arm64 DT about dwmac-sun8i This reverts commit 87e1f5e8bb4b ("arm64: dts: allwinner: Revert EMAC changes") Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 16 .../boot/dts/

[PATCH v5 00/10] net: stmmac: dwmac-sun8i: Handle integrated PHY

2017-09-08 Thread Corentin Labbe
si to final board DT. Corentin Labbe (10): arm64: dts: allwinner: Restore EMAC changes dt-bindings: net: Restore sun8i dwmac binding arm: dts: sunxi: Restore EMAC changes net: stmmac: sun8i: Restore the compatibles dt-bindings: net: dwmac-sun8i: update documentation about integrated P

Re: [PATCH v5 01/10] arm64: dts: allwinner: Restore EMAC changes

2017-09-08 Thread Corentin Labbe
On Fri, Sep 08, 2017 at 09:19:54AM +0200, Maxime Ripard wrote: > On Fri, Sep 08, 2017 at 09:11:47AM +0200, Corentin Labbe wrote: > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts > > b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts > &g

[PATCH v5 02/10] dt-bindings: net: Restore sun8i dwmac binding

2017-09-08 Thread Corentin Labbe
This patch restore dt-bindings documentation about dwmac-sun8i This reverts commit 8aa33ec2f481 ("dt-bindings: net: Revert sun8i dwmac binding") Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- .../devicetree/bindings/net/dwmac-sun8i.txt| 84 ++

[PATCH v5 03/10] arm: dts: sunxi: Restore EMAC changes

2017-09-08 Thread Corentin Labbe
This patch restore arm DT about dwmac-sun8i This reverts commit fe45174b72ae ("arm: dts: sunxi: Revert EMAC changes") Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 9 arch/arm/boot/dts/sun8i-h3-bana

[PATCH v5 04/10] net: stmmac: sun8i: Restore the compatibles

2017-09-08 Thread Corentin Labbe
This patch restore compatibles about dwmac-sun8i This reverts commit ad4540cc5aa3 ("net: stmmac: sun8i: Remove the compatibles") Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 8 1 file changed, 8 ins

[PATCH v5 05/10] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-08 Thread Corentin Labbe
This patch add documentation about the MDIO switch used on sun8i-h3-emac for integrated PHY. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- .../devicetree/bindings/net/dwmac-sun8i.txt| 127 +++-- 1 file changed, 120 insertions(+), 7 deletions(-) diff

[PATCH v5 10/10] net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs

2017-09-08 Thread Corentin Labbe
The Allwinner H3 SoC have two distinct MDIO bus, only one could be active at the same time. The selection of the active MDIO bus are done via some bits in the EMAC register of the system controller. This patch implement this MDIO switch via a custom MDIO-mux. Signed-off-by: Corentin Labbe

[PATCH v5 08/10] net: stmmac: dwmac-sun8i: choose internal PHY via phy-is-integrated

2017-09-08 Thread Corentin Labbe
property. Since the internal_phy variable does not need anymore to contain the xMII mode used by the internal PHY, it is still used for knowing the presence of an internal PHY, so it is modified to a boolean soc_has_internal_phy. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com>

[PATCH v5 07/10] arm64: dts: allwinner: add snps,dwmac-mdio compatible to emac/mdio

2017-09-08 Thread Corentin Labbe
stmmac bindings docs said that its mdio node must have compatible = "snps,dwmac-mdio"; Since dwmac-sun8i does not have any good reasons to not doing it, all their MDIO node must have it. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm64/boot/dts/allwinner

[PATCH v5 06/10] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac

2017-09-08 Thread Corentin Labbe
Since dwmac-sun8i could use either an integrated PHY or an external PHY (which could be at same MDIO address), we need to represent this selection by a MDIO switch. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sunxi-h3-h5.dts

[PATCH v5 09/10] net: stmmac: snps,dwmac-mdio MDIOs are automatically registered

2017-09-08 Thread Corentin Labbe
s not need to be in need_mdio_ids. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_

Re: [PATCH v5 10/10] net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs

2017-09-08 Thread Corentin Labbe
On Fri, Sep 08, 2017 at 04:00:20PM +0200, Andrew Lunn wrote: > > > > +static int mdio_mux_syscon_switch_fn(int current_child, int > > > > desired_child, > > > > +void *data) > > > > +{ > > > > + struct stmmac_priv *priv = data; > > > > + struct

Re: [PATCH v5 10/10] net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs

2017-09-08 Thread Corentin Labbe
aps, but the reality is that with nothing connected to it, the reset of the MAC timeout. Certainly, the MAC does not support finding no PHY. So, to prevent an error message, and a "freeze" of the net process, the need_reset trick is necessary. Regards Corentin Labbe

[PATCH 5/5] net: mdio-mux: fix unbalanced put_device

2017-08-30 Thread Corentin Labbe
her branch of "if (mux_bus)". Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/phy/mdio-mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index 9a889a529b9c..0b7d3d30ae97 100644 --- a/

[PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory' message

2017-08-30 Thread Corentin Labbe
This patch fix checkpatch warning about unnecessary 'out of memory' message. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/phy/mdio-mux.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c

[PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers

2017-08-30 Thread Corentin Labbe
This patch fix an old information that mdio-mux-mmioreg can only handle 8bit registers. This is not true anymore. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/Kco

Re: [PATCH] net: stmmac: dwmac-sun8i: Use reset exclusive

2017-08-30 Thread Corentin Labbe
On Fri, Aug 25, 2017 at 07:12:33PM +0200, Maxime Ripard wrote: > On Fri, Aug 25, 2017 at 05:17:33PM +0200, Corentin Labbe wrote: > > On Fri, Aug 25, 2017 at 04:48:32PM +0200, Maxime Ripard wrote: > > > On Fri, Aug 25, 2017 at 04:38:05PM +0200, Corentin Labbe wrote: > > >

[PATCH 1/5] net: mdio-mux: Fix NULL Comparison style

2017-08-30 Thread Corentin Labbe
This patch fix checkpatch warning about NULL Comparison style. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/phy/mdio-mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c

[PATCH 0/5] net: mdio-mux: Misc fix

2017-08-30 Thread Corentin Labbe
Hello This patch series fix minor problems found when working on the dwmac-sun8i syscon mdio-mux. Regards Corentin Labbe (5): net: mdio-mux: Fix NULL Comparison style net: mdio-mux: Remove unnecessary 'out of memory' message net: mdio-mux: printing driver version is useless net: mdio

[PATCH 3/5] net: mdio-mux: printing driver version is useless

2017-08-30 Thread Corentin Labbe
Remove the driver version information because this information is not useful in an upstream kernel driver. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/phy/mdio-mux.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/ph

Re: [PATCH v5 10/10] net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs

2017-09-11 Thread Corentin Labbe
On Mon, Sep 11, 2017 at 06:11:24PM +0200, Andrew Lunn wrote: > On Fri, Sep 08, 2017 at 04:28:25PM +0200, Corentin Labbe wrote: > > On Fri, Sep 08, 2017 at 04:17:36PM +0200, Andrew Lunn wrote: > > > > > Do you know why the reset times out/fails? > > > > > >

Re: [PATCH v5 10/10] net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs

2017-09-12 Thread Corentin Labbe
On Mon, Sep 11, 2017 at 10:19:20PM +0200, Andrew Lunn wrote: > > Even with CLK_BUS_EPHY/RST_BUS_EPHY enabled, the MAC reset timeout. > > So no the CLK/RST are really for the PHY. > > Thanks for trying that. > > You said it was probably during scanning of the bus it times out. What > address is

Re: [PATCH v5 01/10] arm64: dts: allwinner: Restore EMAC changes

2017-09-10 Thread Corentin Labbe
On Fri, Sep 08, 2017 at 03:39:04PM +0800, Chen-Yu Tsai wrote: > On Fri, Sep 8, 2017 at 3:36 PM, Corentin Labbe > <clabbe.montj...@gmail.com> wrote: > > On Fri, Sep 08, 2017 at 09:19:54AM +0200, Maxime Ripard wrote: > >> On Fri, Sep 08, 2017 at 09:11:47AM +0200, Corent

Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-28 Thread Corentin Labbe
On Wed, Sep 27, 2017 at 09:53:15PM -0700, Florian Fainelli wrote: > > > On 09/27/2017 12:34 AM, Corentin Labbe wrote: > > This patch add documentation about the MDIO switch used on sun8i-h3-emac > > for integrated PHY. > > > > Signed-off-by: Corentin

Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-28 Thread Corentin Labbe
On Wed, Sep 27, 2017 at 04:02:10PM +0200, Andrew Lunn wrote: > Hi Corentin > > > +Required properties for the mdio-mux node: > > + - compatible = "mdio-mux" > > This is too generic. Please add a more specific compatible for this > particular mux. You can keep "mdio-mux", since that is what the

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-24 Thread Corentin Labbe
On Thu, Aug 24, 2017 at 10:21:24AM +0200, Corentin Labbe wrote: > On Wed, Aug 23, 2017 at 09:31:53AM -0700, Florian Fainelli wrote: > > On 08/23/2017 12:49 AM, Maxime Ripard wrote: > > > Hi Florian, > > > > > > On Tue, Aug 22, 2017 at 11:35:01AM -0700, Florian

[WARNING] stmmac: refcount_t: saturated; leaking memory

2017-08-21 Thread Corentin Labbe
Hello I got on all my stmmac boards the following warning: [12605.062840] [ cut here ] [12605.062956] WARNING: CPU: 0 PID: 15637 at /linux-next/lib/refcount.c:77 refcount_add_not_zero+0xa8/0xb8 [12605.062972] refcount_t: saturated; leaking memory. [12605.062987] Modules

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-22 Thread Corentin Labbe
On Mon, Aug 21, 2017 at 04:23:21PM +0200, Andrew Lunn wrote: > > All muxes are mostly always represented the same way afaik, or do you > > want to simply introduce a new compatible / property? > > + mdio-mux { > + compatible = "allwinner,sun8i-h3-mdio-switch"; > +

[PATCH v4 1/5] net: stmmac: Handle possible fixed-link with need_mdio_ids

2017-08-26 Thread Corentin Labbe
In case of fixed link, there are no mdio node. This patch add a test for fixed-link for bypassing MDIO node register that match need_mdio_ids. Note that this do not change behaviour for MDIO snps,dwmac-mdio nodes. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drive

Re: [PATCH] net: stmmac: Handle possible fixed-link with need_mdio_ids

2017-08-26 Thread Corentin Labbe
On Fri, Aug 25, 2017 at 09:45:23AM -0700, Florian Fainelli wrote: > On 08/25/2017 09:28 AM, Andrew Lunn wrote: > > On Fri, Aug 25, 2017 at 04:42:08PM +0200, Corentin Labbe wrote: > >> In case of fixed link, there are no mdio node. > >> This patch add a test for fixed-l

[PATCH v4 0/5] net: stmmac: Detect PHY location with phy-is-integrated

2017-08-26 Thread Corentin Labbe
patch since another same patch was already merged - Moved phy-is-integrated from SoC dtsi to final board DT. Corentin Labbe (5): net: stmmac: Handle possible fixed-link with need_mdio_ids ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac dt-bindings: net: dwmac-sun

[PATCH v4 4/5] net: stmmac: dwmac-sun8i: choose internal PHY via phy-is-integrated

2017-08-26 Thread Corentin Labbe
property. Since the internal_phy variable does not need anymore to contain the xMII mode used by the internal PHY, it is still used for knowing the presence of an internal PHY, so it is modified to a boolean soc_has_internal_phy. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com>

[PATCH v4 2/5] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac

2017-08-26 Thread Corentin Labbe
Since dwmac-sun8i could use either an integrated PHY or an external PHY (which could be at same MDIO address), we need to represent this selection by a MDIO switch. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 22 +++

[PATCH v4 3/5] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-08-26 Thread Corentin Labbe
This patch add documentation about the MDIO switch used on sun8i-h3-emac for integrated PHY. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- .../devicetree/bindings/net/dwmac-sun8i.txt| 117 - 1 file changed, 112 insertions(+), 5 deletions(-) diff

[PATCH v4 5/5] net: stmmac: Register parent MDIO in case of fake mdio-mux

2017-08-26 Thread Corentin Labbe
In case of a fake MDIO switch/mux (like Allwinner H3), the registered MDIO node should be the parent of the PHY. Otherwise of_phy_connect will fail. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 13 +++--

<    1   2   3   4   5   >