net: fec_mxc: Fix DM driver issue in recv
PATCH v2 1/5 net: fec_mxc: Fix DM driver issue in recv
From: Ye Li <[email protected]>
When using ethernet DM driver, the recv interface has a change with non-DM interface, that driver needs to set the packet pointer and provide it to upper layer to process.
In fec driver, the fecmxc_recv functions does not handle the packet pointer parameter. This may cause crash in upper layer processing because the packet pointer is not set.
This patch allocates a buffer for the packet pointer and free it through free_pkt interface.
---
V2:
Fix build warning for mx28
drivers/net/fec_mxc.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
drivers/net/fec_mxc.c +23 -0
@@ -806,7 +806,16 @@ static int fec_recv(struct eth_device *dev)uint16_t bd_status;ulong addr, size, end;int i; + +#ifdef CONFIG_DM_ETH + *packetp =memalign (ARCH_DMA_MINALIGN ,FEC_MAX_PKT_SIZE ); +if (*packetp ==0 ) { +printf ("%s: error allocating packetp\n" , __func__); +return -ENOMEM ; + } +#else ALLOC_CACHE_ALIGN_BUFFER (uchar, buff,FEC_MAX_PKT_SIZE ); +#endif /* Check if any critical events have happened */ ievent =readl (&fec->eth->ievent);
@@ -882,8 +891,13 @@ static int fec_recv(struct eth_device *dev)#ifdef CONFIG_FEC_MXC_SWAP_PACKET swap_packet ((uint32_t *)addr, frame_length);#endif + +#ifdef CONFIG_DM_ETH +memcpy (*packetp, (char *)addr, frame_length); +#else memcpy (buff, (char *)addr, frame_length);net_process_received_packet (buff, frame_length); +#endif len = frame_length; }else {if (bd_status &FEC_RBD_ERR )
@@ -1201,10 +1215,19 @@ static int fecmxc_read_rom_hwaddr(struct udevice *dev)return fec_get_hwaddr (priv->dev_id, pdata->enetaddr); } +static int fecmxc_free_pkt (struct udevice *dev,uchar *packet,int length) +{ +if (packet) +free (packet); + +return 0 ; +} +static const struct eth_ops fecmxc_ops = { .start = fecmxc_init, .send = fecmxc_send, .recv = fecmxc_recv, + .free_pkt = fecmxc_free_pkt, .stop = fecmxc_halt, .write_hwaddr = fecmxc_set_hwaddr, .read_rom_hwaddr = fecmxc_read_rom_hwaddr,
Signature · 1 line
2.14.1
PATCH v2 2/5 net: fec_mxc: simplify fec_get_miibus
No need to provide two prototype for this function. Use ulong for the first parameter, then this function could be shared for DM/non DM case.
---
V2:
Drop uneccessary ulong
drivers/net/fec_mxc.c | 15 +++------------ include/netdev.h | 6 +----- 2 files changed, 4 insertions(+), 17 deletions(-)
drivers/net/fec_mxc.c +3 -12
@@ -1011,18 +1011,9 @@ static void fec_free_descs(struct fec_priv *fec)free (fec->tbd_base); } -#ifdef CONFIG_DM_ETH -struct mii_dev *fec_get_miibus(struct udevice *dev, int dev_id) -#else -struct mii_dev *fec_get_miibus(uint32_t base_addr, int dev_id) -#endif +struct mii_dev *fec_get_miibus (ulong base_addr,int dev_id) { -#ifdef CONFIG_DM_ETH -struct fec_priv *priv =dev_get_priv (dev); -struct ethernet_regs *eth = priv->eth; -#else -struct ethernet_regs *eth = (struct ethernet_regs *)(ulong )base_addr; -#endif +struct ethernet_regs *eth = (struct ethernet_regs *)base_addr;struct mii_dev *bus;int ret;
@@ -1282,7 +1273,7 @@ static int fecmxc_probe(struct udevice *dev)fec_reg_setup (priv); priv->dev_id = (dev_id ==-1 ) ?0 : dev_id; - bus =fec_get_miibus (dev, dev_id); + bus =fec_get_miibus ((ulong )priv->eth, dev_id);if (!bus) { ret = -ENOMEM ; goto err_mii;
include/netdev.h +1 -5
@@ -119,11 +119,7 @@ static inline int pci_eth_init(bd_t *bis)return num; } -#ifdef CONFIG_DM_ETH -struct mii_dev *fec_get_miibus (struct udevice *dev,int dev_id); -#else -struct mii_dev *fec_get_miibus (uint32_t base_addr,int dev_id); -#endif +struct mii_dev *fec_get_miibus (ulong base_addr,int dev_id);#ifdef CONFIG_PHYLIB struct phy_device ;
Signature · 1 line
2.14.1
PATCH v2 3/5 net: fec: set dev->seq to priv->dev_id
In reply to Peng FanTo platforms has two enet interface, using dev->seq could avoid conflict.
i.MX6UL/ULL evk board net get the wrong MAC address from fuse, eth1 get MAC0 address, eth0 get MAC1 address from fuse. Set the priv->dev_id to device->seq as the real net interface alias id then .fec_get_hwaddr() read the related MAC address from fuse.
--- drivers/net/fec_mxc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/fec_mxc.c +2 -3
@@ -1250,7 +1250,6 @@ static int fecmxc_probe(struct udevice *dev)struct eth_pdata *pdata =dev_get_platdata (dev);struct fec_priv *priv =dev_get_priv (dev);struct mii_dev *bus =NULL ; -int dev_id =-1 ;uint32_t start;int ret;
@@ -1271,9 +1270,9 @@ static int fecmxc_probe(struct udevice *dev) }fec_reg_setup (priv); - priv->dev_id = (dev_id ==-1 ) ?0 : dev_id; - bus =fec_get_miibus ((ulong )priv->eth, dev_id); + priv->dev_id = dev->seq; + bus =fec_get_miibus ((ulong )priv->eth, dev->seq);if (!bus) { ret = -ENOMEM ; goto err_mii;
Signature · 1 line
2.14.1
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
In reply to Peng FanOn i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration CONFIG_FEC_MXC_MDIO_BASE to indicate the MDIO port for sharing.
To i.MX28, adapt to use the new config
---
V2:
adapt mx28 to use FEC_MXC_MDIO_BASE
drivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)
drivers/net/Kconfig +8 -1
@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGA boards. +config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. It is used when + two FEC controllers share MDIO bus. + config FEC_MXC bool "FEC Ethernet controller" - depends on MX5 || MX6 + depends on MX5 || MX6 || MX7 help This driver supports the 10/100 Fast Ethernet controller for NXP i.MX processors.
drivers/net/fec_mxc.c +6 -2
@@ -1145,12 +1145,12 @@ int fecmxc_initialize_multi(bd_t *bd, int dev_id, int phy_id, uint32_t addr)#endif int ret; -#ifdef CONFIG_MX28 +#ifdef CONFIG_FEC_MXC_MDIO_BASE /* * The i.MX28 has two ethernet interfaces, but they are not equal. * Only the first one can access the MDIO bus. */ - base_mii =MXS_ENET0_BASE ; + base_mii =CONFIG_FEC_MXC_MDIO_BASE ;#else base_mii = addr;#endif
@@ -1272,7 +1272,11 @@ static int fecmxc_probe(struct udevice *dev)fec_reg_setup (priv); priv->dev_id = dev->seq; +#ifdef CONFIG_FEC_MXC_MDIO_BASE + bus =fec_get_miibus ((ulong )CONFIG_FEC_MXC_MDIO_BASE , dev->seq); +#else bus =fec_get_miibus ((ulong )priv->eth, dev->seq); +#endif if (!bus) { ret = -ENOMEM ; goto err_mii;
include/configs/mx28evk.h +1 -0
@@ -65,6 +65,7 @@/* FEC Ethernet on SoC */ #ifdef CONFIG_CMD_NET #define CONFIG_FEC_MXC +#define CONFIG_FEC_MXC_MDIO_BASE MXS_ENET0_BASE#define CONFIG_MX28_FEC_MAC_IN_OCOTP #endif
Signature · 1 line
2.14.1
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
Quoted 25 lines · Peng Fan
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration
CONFIG_FEC_MXC_MDIO_BASEto indicate the MDIO port for sharing.To i.MX28, adapt to use the new config
Signed-off-by Peng Fan <[email protected]>Acked-by Joe Hershberger <[email protected]>Cc Fabio Estevam <[email protected]>---
V2:
adapt mx28 to useFEC_MXC_MDIO_BASEdrivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)drivers/net/Kconfig +0
-0
drivers/net/Kconfig config ETHOC · line 155
Quoted 9 lines
drivers/net/Kconfig +6
-0@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGA boards. +config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. It is used when + two FEC controllers share MDIO bus.
How about retrieving this from dt? we have board that support dt along with dm supporting.
Jagan.
Signature · 4 lines
Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India.
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
Quoted 40 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:19
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersQuoted 28 lines · Peng Fan
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration
CONFIG_FEC_MXC_MDIO_BASEto indicate the MDIO port for sharing.To i.MX28, adapt to use the new config
Signed-off-by Peng Fan <[email protected]>Acked-by Joe Hershberger <[email protected]>Cc Fabio Estevam <[email protected]>---
V2:
adapt mx28 to useFEC_MXC_MDIO_BASEdrivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)drivers/net/Kconfig index renamed from drivers/net/Kconfig +0
-0
de1947ccc1..c5fd6f648a100644drivers/net/Kconfig +0
-0@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGA boards.
Quoted 9 lines
drivers/net/Kconfig config ETHOC · line 155
Quoted 6 lines
drivers/net/Kconfig +6
-0+config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. It is used when + two FEC controllers share MDIO bus.How about retrieving this from dt? we have board that support dt along with dm supporting.
It's ok to retrieve the info from dt, but we are not only support dt, we also need to support non-dt case. Define FEC_MXC_MDIO_BASE is the simplest method to achieve that I think.
Thanks,
Peng.
Quoted 12 lines
Jagan.
--
Jagan Teki
Free Software Engineer |
https://emea01.safelinks.protection.outlook.com/?url=www.openedev.com&da
ta=02%7C01%7Cpeng.fan%40nxp.com%7Ca54a1113dc41442592e108d58f0cce cf%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6365722075248105 65&sdata=tos3ch1hdzrdQcoiAlB3l1dOCQ6%2Ff4ahk3RptQNjLcA%3D&reserved =0
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
Quoted 50 lines · Peng Fan
Quoted 40 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:19
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersQuoted 28 lines · Peng Fan
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration
CONFIG_FEC_MXC_MDIO_BASEto indicate the MDIO port for sharing.To i.MX28, adapt to use the new config
Signed-off-by Peng Fan <[email protected]>Acked-by Joe Hershberger <[email protected]>Cc Fabio Estevam <[email protected]>---
V2:
adapt mx28 to useFEC_MXC_MDIO_BASEdrivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)drivers/net/Kconfig index renamed from drivers/net/Kconfig +0
-0
de1947ccc1..c5fd6f648a100644drivers/net/Kconfig +0
-0@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGA boards.Quoted 9 lines
drivers/net/Kconfig config ETHOC · line 155
Quoted 6 lines
drivers/net/Kconfig +6
-0+config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. It is used when + two FEC controllers share MDIO bus.How about retrieving this from dt? we have board that support dt along with dm supporting.
Quoted 3 lines
It's ok to retrieve the info from dt, but we are not only support dt, we also need to support non-dt case. Define
FEC_MXC_MDIO_BASEis the simplest method to achieve that I think.
But patch adds the same for DM case which usually retrieve the info from dt, point here is to get rid of ifdef and new CONFIG_ ie where DM and dts play smart atleast.
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
Quoted 62 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:31
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersQuoted 50 lines · Peng Fan
Quoted 49 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:19
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersQuoted 25 lines · Peng Fan
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration
CONFIG_FEC_MXC_MDIO_BASEto indicate the MDIO port for sharing.To i.MX28, adapt to use the new config
Signed-off-by Peng Fan <[email protected]>Acked-by Joe Hershberger <[email protected]>Cc Fabio Estevam <[email protected]>---
V2:
adapt mx28 to useFEC_MXC_MDIO_BASEdrivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)drivers/net/Kconfig index renamed from drivers/net/Kconfig +0
-0
de1947ccc1..c5fd6f648a100644drivers/net/Kconfig config ETHOC · line 155
Quoted 9 lines
drivers/net/Kconfig +6
-0@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGA boards. +config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. It is used when + two FEC controllers share MDIO bus.How about retrieving this from dt? we have board that support dt along with dm supporting.
Quoted 7 lines
Quoted 3 lines
It's ok to retrieve the info from dt, but we are not only support dt, we also need to support non-dt case. Define
FEC_MXC_MDIO_BASEis the simplest method to achieve that I think.But patch adds the same for DM case which usually retrieve the info from dt, point here is to get rid of ifdef and new
CONFIG_ie where DM and dts play smart atleast.
The uboot fec_mxc driver or net driver is not that sync with linux code, Using dt here, need to parse phy-handle = <ðphy0>;, then parse ethphy0 parent to get reg, I just think this like hack.
Regards,
Peng.
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
Quoted 66 lines · Peng Fan
Quoted 66 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:31
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersQuoted 53 lines · Peng Fan
Quoted 40 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:19
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersQuoted 28 lines · Peng Fan
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration
CONFIG_FEC_MXC_MDIO_BASEto indicate the MDIO port for sharing.To i.MX28, adapt to use the new config
Signed-off-by Peng Fan <[email protected]>Acked-by Joe Hershberger <[email protected]>Cc Fabio Estevam <[email protected]>---
V2:
adapt mx28 to useFEC_MXC_MDIO_BASEdrivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)drivers/net/Kconfig index renamed from drivers/net/Kconfig +0
-0
de1947ccc1..c5fd6f648a100644drivers/net/Kconfig +0
-0@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGA boards.Quoted 9 lines
drivers/net/Kconfig config ETHOC · line 155
Quoted 6 lines
drivers/net/Kconfig +6
-0+config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. It is used when + two FEC controllers share MDIO bus.How about retrieving this from dt? we have board that support dt along with dm supporting.
It's ok to retrieve the info from dt, but we are not only support dt, we also need to support non-dt case. Define
FEC_MXC_MDIO_BASEis the simplest method to achieve that I think.
Quoted 7 lines
Quoted 3 lines
But patch adds the same for DM case which usually retrieve the info from dt, point here is to get rid of ifdef and new
CONFIG_ie where DM and dts play smart atleast.The uboot
fec_mxcdriver or net driver is not that sync with linux code, Using dt here, need to parse phy-handle = <ðphy0>;, then parse ethphy0 parent to get reg, I just think this like hack.
No, I think we can do this with adding new DM MDIO similar to DM PHY which recently done. May be some sort of efforts but it is permanent.
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
Quoted 62 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:19
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersOn Wed, Mar 21, 2018 at 2:31 PM, Peng Fan <[email protected]>
Quoted 20 lines · wrote:
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration
CONFIG_FEC_MXC_MDIO_BASEto indicate the MDIO port for sharing.To i.MX28, adapt to use the new config
Signed-off-by Peng Fan <[email protected]>Acked-by Joe Hershberger <[email protected]>Cc Fabio Estevam <[email protected]>---
V2:
adapt mx28 to useFEC_MXC_MDIO_BASEdrivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/net/Kconfig config ETHOC · line 148
Quoted 7 lines
drivers/net/Kconfig index renamed from drivers/net/Kconfig +0
-0
de1947ccc1..c5fd6f648a100644drivers/net/Kconfig +0
-0@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGAboards.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/net/Kconfig config ETHOC
Quoted 6 lines
drivers/net/Kconfig +5
-0+config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. It is usedwhen
Quoted 13 lines
Quoted 12 lines
Quoted 8 lines
Quoted 4 lines
drivers/net/Kconfig config ETHOC · line 155
Quoted 1 line
drivers/net/Kconfig +1
-0+ two FEC controllers share MDIO bus.How about retrieving this from dt? we have board that support dt along with dm supporting.
It's ok to retrieve the info from dt, but we are not only support dt, we also need to support non-dt case. Define
FEC_MXC_MDIO_BASEis the simplest method to achieve that I think.But patch adds the same for DM case which usually retrieve the info from dt, point here is to get rid of ifdef and new
CONFIG_ie where DM and dts play smart atleast.
Quoted 6 lines
Quoted 3 lines
The uboot
fec_mxcdriver or net driver is not that sync with linux code, Using dt here, need to parse phy-handle = <ðphy0>;, then parse ethphy0 parent to get reg, I just think this like hack.No, I think we can do this with adding new DM MDIO similar to DM PHY which recently done. May be some sort of efforts but it is permanent.
We do not have that driver now, so could we first have this patch? When DM MDIO ready, this piece code could be removed then?
Thanks,
Peng.
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
Quoted 62 lines · Peng Fan
Quoted 62 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:19
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersOn Wed, Mar 21, 2018 at 2:31 PM, Peng Fan <[email protected]>
Quoted 20 lines · wrote:
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration
CONFIG_FEC_MXC_MDIO_BASEto indicate the MDIO port for sharing.To i.MX28, adapt to use the new config
Signed-off-by Peng Fan <[email protected]>Acked-by Joe Hershberger <[email protected]>Cc Fabio Estevam <[email protected]>---
V2:
adapt mx28 to useFEC_MXC_MDIO_BASEdrivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/net/Kconfig config ETHOC · line 148
Quoted 7 lines
drivers/net/Kconfig index renamed from drivers/net/Kconfig +0
-0
de1947ccc1..c5fd6f648a100644drivers/net/Kconfig +0
-0@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGAboards.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/net/Kconfig config ETHOC · line 153
Quoted 6 lines
drivers/net/Kconfig +5
-0+config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. It is usedwhen
Quoted 13 lines
Quoted 12 lines
Quoted 8 lines
Quoted 4 lines
drivers/net/Kconfig config ETHOC · line 154
Quoted 1 line
drivers/net/Kconfig +1
-0+ two FEC controllers share MDIO bus.How about retrieving this from dt? we have board that support dt along with dm supporting.
It's ok to retrieve the info from dt, but we are not only support dt, we also need to support non-dt case. Define
FEC_MXC_MDIO_BASEis the simplest method to achieve that I think.But patch adds the same for DM case which usually retrieve the info from dt, point here is to get rid of ifdef and new
CONFIG_ie where DM and dts play smart atleast.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
The uboot
fec_mxcdriver or net driver is not that sync with linux code, Using dt here, need to parse phy-handle = <ðphy0>;, then parse ethphy0 parent to get reg, I just think this like hack.No, I think we can do this with adding new DM MDIO similar to DM PHY which recently done. May be some sort of efforts but it is permanent.
We do not have that driver now, so could we first have this patch? When DM MDIO ready, this piece code could be removed then?
ie. up to Joe. Honestly this macro become removed in future, my point here is why we need to maintain dead macro instead of adding proper maintainable stuff. I'm pretty sure adding DM_MDIO is straight forward and as of now just add what we need and rest will implement future. You may become victim to others to move DM_ETH as soon as possible :)
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
Quoted 69 lines · Jagan Teki
Quoted 68 lines · Peng Fan
Quoted 68 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:19
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersOn Wed, Mar 21, 2018 at 2:31 PM, Peng Fan <[email protected]>
Quoted 20 lines · wrote:
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration
CONFIG_FEC_MXC_MDIO_BASEto indicate the MDIO port for sharing.To i.MX28, adapt to use the new config
Signed-off-by Peng Fan <[email protected]>Acked-by Joe Hershberger <[email protected]>Cc Fabio Estevam <[email protected]>---
V2:
adapt mx28 to useFEC_MXC_MDIO_BASEdrivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/net/Kconfig config ETHOC · line 148
Quoted 7 lines
drivers/net/Kconfig index renamed from drivers/net/Kconfig +0
-0
de1947ccc1..c5fd6f648a100644drivers/net/Kconfig +0
-0@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGAboards.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/net/Kconfig config ETHOC · line 153
Quoted 6 lines
drivers/net/Kconfig +5
-0+config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. It is usedwhen
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
drivers/net/Kconfig config ETHOC · line 154
Quoted 1 line
drivers/net/Kconfig +1
-0+ two FEC controllers share MDIO bus.How about retrieving this from dt? we have board that support dt along with dm supporting.
It's ok to retrieve the info from dt, but we are not only support dt, we also need to support non-dt case. Define
FEC_MXC_MDIO_BASEis the simplest method to achieve that I think.Quoted 7 lines
Quoted 3 lines
But patch adds the same for DM case which usually retrieve the info from dt, point here is to get rid of ifdef and new
CONFIG_ie where DM and dts play smart atleast.The uboot
fec_mxcdriver or net driver is not that sync with linux code, Using dt here, need to parse phy-handle = <ðphy0>;, then parse ethphy0 parent to get reg, I just think this like hack.No, I think we can do this with adding new DM MDIO similar to DM PHY which recently done. May be some sort of efforts but it is permanent.
Quoted 8 lines
Quoted 2 lines
We do not have that driver now, so could we first have this patch? When DM MDIO ready, this piece code could be removed then?
ie. up to Joe. Honestly this macro become removed in future, my point here is why we need to maintain dead macro instead of adding proper maintainable stuff. I'm pretty sure adding
DM_MDIOis straight forward and as of now just add what we need and rest will implement future. You may become victim to others to moveDM_ETHas soon as possible :)
It would be ideal if you wanted to implement DM MDIO, but I can also appreciate that this is not already there for you to use. As I commented when I acked this, the I'm OK with this approach at this time due to the state of the DM support in eth.
As a side note, maybe moving other boards that use this NIC to DM_ETH and removing non-DM support would be a better cleanup to start with.
Cheers,
-Joe
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
Quoted 79 lines · Joe Hershberger
Quoted 69 lines · Jagan Teki
Quoted 68 lines · Peng Fan
Quoted 68 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:19
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersOn Wed, Mar 21, 2018 at 2:31 PM, Peng Fan <[email protected]>
Quoted 20 lines · wrote:
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration
CONFIG_FEC_MXC_MDIO_BASEto indicate the MDIO port for sharing.To i.MX28, adapt to use the new config
Signed-off-by Peng Fan <[email protected]>Acked-by Joe Hershberger <[email protected]>Cc Fabio Estevam <[email protected]>---
V2:
adapt mx28 to useFEC_MXC_MDIO_BASEdrivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/net/Kconfig config ETHOC · line 148
Quoted 7 lines
drivers/net/Kconfig index renamed from drivers/net/Kconfig +0
-0
de1947ccc1..c5fd6f648a100644drivers/net/Kconfig +0
-0@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGAboards.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/net/Kconfig config ETHOC · line 153
Quoted 6 lines
drivers/net/Kconfig +5
-0+config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. It is usedwhen
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
drivers/net/Kconfig config ETHOC · line 154
Quoted 1 line
drivers/net/Kconfig +1
-0+ two FEC controllers share MDIO bus.How about retrieving this from dt? we have board that support dt along with dm supporting.
It's ok to retrieve the info from dt, but we are not only support dt, we also need to support non-dt case. Define
FEC_MXC_MDIO_BASEis the simplest method to achieve that I think.Quoted 7 lines
Quoted 3 lines
But patch adds the same for DM case which usually retrieve the info from dt, point here is to get rid of ifdef and new
CONFIG_ie where DM and dts play smart atleast.The uboot
fec_mxcdriver or net driver is not that sync with linux code, Using dt here, need to parse phy-handle = <ðphy0>;, then parse ethphy0 parent to get reg, I just think this like hack.No, I think we can do this with adding new DM MDIO similar to DM PHY which recently done. May be some sort of efforts but it is permanent.
Quoted 8 lines
Quoted 2 lines
We do not have that driver now, so could we first have this patch? When DM MDIO ready, this piece code could be removed then?
ie. up to Joe. Honestly this macro become removed in future, my point here is why we need to maintain dead macro instead of adding proper maintainable stuff. I'm pretty sure adding
DM_MDIOis straight forward and as of now just add what we need and rest will implement future. You may become victim to others to moveDM_ETHas soon as possible :)
Quoted 4 lines
It would be ideal if you wanted to implement DM MDIO, but I can also appreciate that this is not already there for you to use. As I commented when I acked this, the I'm OK with this approach at this time due to the state of the DM support in eth.
As I said before, its your decision.
Quoted 3 lines
As a side note, maybe moving other boards that use this NIC to
DM_ETHand removing non-DM support would be a better cleanup to start with.
To be honest this can't be predictable (until you make a note on MIGRATION deadline), I still see new boards from i.MX still can't use dt.
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
Quoted 89 lines · Jagan Teki
Quoted 79 lines · Joe Hershberger
Quoted 69 lines · Jagan Teki
Quoted 68 lines · Peng Fan
Quoted 68 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:19
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersOn Wed, Mar 21, 2018 at 2:31 PM, Peng Fan <[email protected]>
Quoted 20 lines · wrote:
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration
CONFIG_FEC_MXC_MDIO_BASEto indicate the MDIO port for sharing.To i.MX28, adapt to use the new config
Signed-off-by Peng Fan <[email protected]>Acked-by Joe Hershberger <[email protected]>Cc Fabio Estevam <[email protected]>---
V2:
adapt mx28 to useFEC_MXC_MDIO_BASEdrivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/net/Kconfig config ETHOC · line 148
Quoted 7 lines
drivers/net/Kconfig index renamed from drivers/net/Kconfig +0
-0
de1947ccc1..c5fd6f648a100644drivers/net/Kconfig +0
-0@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGAboards.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/net/Kconfig config ETHOC · line 153
Quoted 6 lines
drivers/net/Kconfig +5
-0+config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. It is usedwhen
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
drivers/net/Kconfig config ETHOC · line 154
Quoted 1 line
drivers/net/Kconfig +1
-0+ two FEC controllers share MDIO bus.How about retrieving this from dt? we have board that support dt along with dm supporting.
It's ok to retrieve the info from dt, but we are not only support dt, we also need to support non-dt case. Define
FEC_MXC_MDIO_BASEis the simplest method to achieve that I think.Quoted 7 lines
Quoted 3 lines
But patch adds the same for DM case which usually retrieve the info from dt, point here is to get rid of ifdef and new
CONFIG_ie where DM and dts play smart atleast.The uboot
fec_mxcdriver or net driver is not that sync with linux code, Using dt here, need to parse phy-handle = <ðphy0>;, then parse ethphy0 parent to get reg, I just think this like hack.No, I think we can do this with adding new DM MDIO similar to DM PHY which recently done. May be some sort of efforts but it is permanent.
Quoted 8 lines
Quoted 2 lines
We do not have that driver now, so could we first have this patch? When DM MDIO ready, this piece code could be removed then?
ie. up to Joe. Honestly this macro become removed in future, my point here is why we need to maintain dead macro instead of adding proper maintainable stuff. I'm pretty sure adding
DM_MDIOis straight forward and as of now just add what we need and rest will implement future. You may become victim to others to moveDM_ETHas soon as possible :)Quoted 4 lines
It would be ideal if you wanted to implement DM MDIO, but I can also appreciate that this is not already there for you to use. As I commented when I acked this, the I'm OK with this approach at this time due to the state of the DM support in eth.
As I said before, its your decision.
Quoted 1 line
Quoted 6 lines
Quoted 2 lines
As a side note, maybe moving other boards that use this NIC to
DM_ETHand removing non-DM support would be a better cleanup to start with.To be honest this can't be predictable (until you make a note on MIGRATION deadline), I still see new boards from i.MX still can't use dt.
That's not good. Simon and I (and I thought everyone else) have been operating under the declaration that no new driver or board can be added using legacy. I hope whoever is acking this board support will stop.
-Joe
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
In reply to Jagan TekiQuoted 101 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月22日 3:00
To: Joe Hershberger <[email protected]>
Cc: Peng Fan <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersQuoted 1 line · Joe Hershberger
On Wed, Mar 21, 2018 at 1:29 PM, Jagan Teki <[email protected]>
Quoted 13 lines · wrote:
Quoted 13 lines · Peng Fan
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: 2018年3月21日 17:19
To: Peng Fan <[email protected]>
Cc: Joe Hershberger <[email protected]>; Fabio Estevam <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 4/5] net: fec: sharing MDIO for two enet controllersQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
On Wed, Mar 21, 2018 at 2:31 PM, Peng Fan <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the
two enets.
Quoted 43 lines
Quoted 43 lines
Quoted 43 lines
Quoted 43 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
So introduce a configuration
CONFIG_FEC_MXC_MDIO_BASEto indicate the MDIO port for sharing.To i.MX28, adapt to use the new config
Signed-off-by Peng Fan <[email protected]>Acked-by Joe Hershberger <[email protected]>Cc Fabio Estevam <[email protected]>---
V2:
adapt mx28 to useFEC_MXC_MDIO_BASEdrivers/net/Kconfig | 9 ++++++++- drivers/net/fec_mxc.c | 8 ++++++-- include/configs/mx28evk.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/net/Kconfig config ETHOC · line 148
Quoted 7 lines
drivers/net/Kconfig +0
-0@@ -147,9 +147,16 @@ config ETHOC help This MAC is present in OpenRISC and Xtensa XTFPGAboards.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/net/Kconfig config ETHOC · line 154
Quoted 7 lines
drivers/net/Kconfig +6
-0+config FEC_MXC_MDIO_BASE + hex "MDIO base address for the FEC controller" + depends on FEC_MXC + help + This specifies the MDIO registers base address. +It is usedwhen
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
drivers/net/Kconfig config ETHOC · line 155
Quoted 1 line
drivers/net/Kconfig +1
-0+ two FEC controllers share MDIO bus.How about retrieving this from dt? we have board that support dt along with dm supporting.
It's ok to retrieve the info from dt, but we are not only support dt, we also need to support non-dt case. Define
FEC_MXC_MDIO_BASEis the simplest method to achieve that I think.Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
But patch adds the same for DM case which usually retrieve the info from dt, point here is to get rid of ifdef and new
CONFIG_ie where DM and dts play smart atleast.The uboot
fec_mxcdriver or net driver is not that sync with linux code, Using dt here, need to parse phy-handle = <ðphy0>;, then parse ethphy0 parent to get reg, I just think this likehack.
Quoted 12 lines
Quoted 11 lines
Quoted 5 lines
Quoted 3 lines
No, I think we can do this with adding new DM MDIO similar to DM PHY which recently done. May be some sort of efforts but it is permanent.
We do not have that driver now, so could we first have this patch? When DM MDIO ready, this piece code could be removed then?
ie. up to Joe. Honestly this macro become removed in future, my point here is why we need to maintain dead macro instead of adding proper maintainable stuff. I'm pretty sure adding
DM_MDIOis straight forward and as of now just add what we need and rest will implement future. You may become victim to others to moveDM_ETHas soon as possible :)Quoted 4 lines
It would be ideal if you wanted to implement DM MDIO, but I can also appreciate that this is not already there for you to use. As I commented when I acked this, the I'm OK with this approach at this time due to the state of the DM support in eth.
Quoted 8 lines
As I said before, its your decision.
Quoted 3 lines
As a side note, maybe moving other boards that use this NIC to
DM_ETHand removing non-DM support would be a better cleanup to start with.To be honest this can't be predictable (until you make a note on MIGRATION deadline), I still see new boards from i.MX still can't use dt.
For NXP vendor boards, Most boards already migrated to use dt, except the 6sabresd Or 6sabreauto which use SPL + non-DM U-boot. This will be moved to use SPL + u-boot FIT DM, but sometimes I bother with nand/spinor/norflash spl + fit uboot.
Thanks,
Peng.
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
In reply to Joe HershbergerHi Joe,
Quoted 13 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
No, I think we can do this with adding new DM MDIO similar to DM PHY
which
Quoted 9 lines
Quoted 3 lines
Quoted 1 line
recently done. May be some sort of efforts but it is permanent.
We do not have that driver now, so could we first have this patch? When DM MDIO ready, this piece code could be removed then?
ie. up to Joe. Honestly this macro become removed in future, my point here is why we need to maintain dead macro instead of adding proper maintainable stuff. I'm pretty sure adding
DM_MDIOis straight forward and as of now just add what we need and rest will implement future. You may become victim to others to moveDM_ETHas soon as possible :)
Quoted 7 lines
It would be ideal if you wanted to implement DM MDIO, but I can also appreciate that this is not already there for you to use. As I commented when I acked this, the I'm OK with this approach at this time due to the state of the DM support in eth.
As a side note, maybe moving other boards that use this NIC to
DM_ETHand removing non-DM support would be a better cleanup to start with.
Is someone already working on DM MDIO?
Are there any patches already submitted for this? I couldn't find any.
Thanks
Calvin
PATCH v2 4/5 net: fec: sharing MDIO for two enet controllers
Quoted 20 lines · Calvin Johnson
Hi Joe,
Quoted 18 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
No, I think we can do this with adding new DM MDIO similar to DM PHY
which
Quoted 9 lines
Quoted 3 lines
Quoted 1 line
recently done. May be some sort of efforts but it is permanent.
We do not have that driver now, so could we first have this patch? When DM MDIO ready, this piece code could be removed then?
ie. up to Joe. Honestly this macro become removed in future, my point here is why we need to maintain dead macro instead of adding proper maintainable stuff. I'm pretty sure adding
DM_MDIOis straight forward and as of now just add what we need and rest will implement future. You may become victim to others to moveDM_ETHas soon as possible :)It would be ideal if you wanted to implement DM MDIO, but I can also appreciate that this is not already there for you to use. As I commented when I acked this, the I'm OK with this approach at this time due to the state of the DM support in eth.
Quoted 5 lines
Quoted 2 lines
As a side note, maybe moving other boards that use this NIC to
DM_ETHand removing non-DM support would be a better cleanup to start with.Is someone already working on DM MDIO?
Are there any patches already submitted for this? I couldn't find any.
I have a rough start on it, but I'm not happy with it so far.
-Joe
PATCH v2 5/5 net: fex_mxc: add i.MX6UL/SX/SL compatible
In reply to Peng FanAdd i.MX6UL/SX/SL compatible.
--- drivers/net/fec_mxc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/fec_mxc.c +3 -0
@@ -1342,6 +1342,9 @@ static int fecmxc_ofdata_to_platdata(struct udevice *dev)static const struct udevice_id fecmxc_ids[] = { { .compatible ="fsl,imx6q-fec" }, + { .compatible ="fsl,imx6sl-fec" }, + { .compatible ="fsl,imx6sx-fec" }, + { .compatible ="fsl,imx6ul-fec" }, { } };
Signature · 1 line
2.14.1
PATCH v2 5/5 net: fex_mxc: add i.MX6UL/SX/SL compatible
Joe,
Quoted 1 line · Peng Fan
Add i.MX6UL/SX/SL compatible.
Please wait few days about pushing this series, I need to test it on my imx6ul board.
Jagan.
PATCH v2 5/5 net: fex_mxc: add i.MX6UL/SX/SL compatible
Quoted 7 lines · Jagan Teki
Joe,
Quoted 1 line · Peng Fan
Add i.MX6UL/SX/SL compatible.
Please wait few days about pushing this series, I need to test it on my imx6ul board.
Will do.
-Joe
PATCH v2 5/5 net: fex_mxc: add i.MX6UL/SX/SL compatible
In reply to Peng FanHi Peng,
Quoted 1 line · Peng Fan
Add i.MX6UL/SX/SL compatible.
In case you didn't notice and it is still an issue in v2 (I just kicked off a build of it) there are a number of failures as a result of this series...
https://travis-ci.org/jhershbe/u-boot/builds/356027749
Cheers,
-Joe
PATCH v2 5/5 net: fex_mxc: add i.MX6UL/SX/SL compatible
Quoted 15 lines
-----Original Message-----
From: Joe Hershberger [mailto:joe.hershberger at ni.com]
Sent: 2018年3月22日 3:54
To: Peng Fan <[email protected]>; Jagan Teki <[email protected]>
Cc: Joe Hershberger <[email protected]>; u-boot <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 5/5] net:fex_mxc: add i.MX6UL/SX/SL compatibleHi Peng,
Quoted 1 line · Peng Fan
Add i.MX6UL/SX/SL compatible.
Quoted 7 lines
In case you didn't notice and it is still an issue in v2 (I just kicked off a build of it) there are a number of failures as a result of this series...
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftravis-c
i.org%2Fjhershbe%2Fu-boot%2Fbuilds%2F356027749&data=02%7C01%7Cpeng. fan%40nxp.com%7C6cf39da22b8d40e068fe08d58f65838d%7C686ea1d3bc2b4c 6fa92cd99c5c301635%7C0%7C0%7C636572588531154502&sdata=BMZiLVVhe 1By6MXjTkW19RgTK171D8%2BYaEWRjuCmvx8%3D&reserved=0
Sorry for this. I should run buildman before send patchset out. I'll fix them.
Thanks,
Peng.
Quoted 3 lines
Cheers,
-Joe
PATCH v2 5/5 net: fex_mxc: add i.MX6UL/SX/SL compatible
Quoted 23 lines · Peng Fan
Quoted 15 lines
-----Original Message-----
From: Joe Hershberger [mailto:joe.hershberger at ni.com]
Sent: 2018年3月22日 3:54
To: Peng Fan <[email protected]>; Jagan Teki <[email protected]>
Cc: Joe Hershberger <[email protected]>; u-boot <[email protected]>
Subject: Re: [U-Boot] [PATCH V2 5/5] net:fex_mxc: add i.MX6UL/SX/SL compatibleHi Peng,
Quoted 1 line · Peng Fan
Add i.MX6UL/SX/SL compatible.
Quoted 7 lines
In case you didn't notice and it is still an issue in v2 (I just kicked off a build of it) there are a number of failures as a result of this series...
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftravis-c
i.org%2Fjhershbe%2Fu-boot%2Fbuilds%2F356027749&data=02%7C01%7Cpeng. fan%40nxp.com%7C6cf39da22b8d40e068fe08d58f65838d%7C686ea1d3bc2b4c 6fa92cd99c5c301635%7C0%7C0%7C636572588531154502&sdata=BMZiLVVhe 1By6MXjTkW19RgTK171D8%2BYaEWRjuCmvx8%3D&reserved=0
Quoted 1 line
Sorry for this. I should run buildman before send patchset out. I'll fix them.
FYI, v2 still has an issue:
https://travis-ci.org/jhershbe/u-boot/builds/356535940