Skip to contentSkip to conversation

net, qe: add DM support for QE UEC ethernet

RFC PATCH New Heiko Schocher 3 participants 7 messages Feb 18, 2020 – Apr 15, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 net, qe: add DM support for QE UEC ethernet

add DM/DTS suppor for the UEC ethernet on QUICC Engine Block.

---
Travis build:

https://travis-ci.org/hsdenx/u-boot-test/builds/651400509

- I let the old none DM based implementation in code so boards should work with old implementation. This Code should be removed if all boards are converted to DM/DTS.

- add the DM based qe uec driver under drivers/net/qe

- Therefore copied the files uccf.c uccf.h uec.h from drivers/qe. So there are a lot of Codingstyle problems currently. I fix them in next version if this RFC patch is OK or it needs some changes.

- The dm based driver code is now under drivers/net/qe/dm_qe_uec.c Used a lot of functions from drivers/qe/uec.c

- seperated the PHY specific code into seperate file drivers/net/qe/dm_qe_uec_phy.c

 drivers/net/Kconfig            |    2 +
 drivers/net/Makefile           |    1 +
 drivers/net/qe/Kconfig         |    9 +
 drivers/net/qe/Makefile        |    5 +
 drivers/net/qe/dm_qe_uec.c     | 1161 ++++++++++++++++++++++++++++++++
 drivers/net/qe/dm_qe_uec.h     |   22 +
 drivers/net/qe/dm_qe_uec_phy.c |  161 +++++
 drivers/net/qe/uccf.c          |  388 +++++++++++
 drivers/net/qe/uccf.h          |  117 ++++
 drivers/net/qe/uec.h           |  742 ++++++++++++++++++++
 drivers/qe/uccf.c              |    2 +
 drivers/qe/uec.c               |    2 +
 drivers/qe/uec_phy.c           |    3 +
 13 files changed, 2615 insertions(+)
 create mode 100644 drivers/net/qe/Kconfig
 create mode 100644 drivers/net/qe/Makefile
 create mode 100644 drivers/net/qe/dm_qe_uec.c
 create mode 100644 drivers/net/qe/dm_qe_uec.h
 create mode 100644 drivers/net/qe/dm_qe_uec_phy.c
 create mode 100644 drivers/net/qe/uccf.c
 create mode 100644 drivers/net/qe/uccf.h
 create mode 100644 drivers/net/qe/uec.h
drivers/net/Kconfig +2 -0
index 4d1013c984..6bb84e3d2b 100644
@@ -371,6 +371,8 @@ config MII
 	help
 	  Enable support of the Media-Independent Interface (MII)
 
+source "drivers/net/qe/Kconfig"
+
 config RTL8139
 	bool "Realtek 8139 series Ethernet controller driver"
 	help
drivers/net/Makefile +1 -0
index 6e0a68834d..cc892d718f 100644
@@ -76,6 +76,7 @@ obj-$(CONFIG_VSC9953) += vsc9953.o
 obj-$(CONFIG_PIC32_ETH) += pic32_mdio.o pic32_eth.o
 obj-$(CONFIG_DWC_ETH_QOS) += dwc_eth_qos.o
 obj-$(CONFIG_FSL_PFE) += pfe_eth/
+obj-y += qe/
 obj-$(CONFIG_SNI_AVE) += sni_ave.o
 obj-y += ti/
 obj-$(CONFIG_MEDIATEK_ETH) += mtk_eth.o
drivers/net/qe/Kconfig new file +9 -0
new file mode 100644
index 0000000000..dec88dea2a
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2020 Heiko Schocher <[email protected]>
+
+config QE_UEC
+	bool "NXP QE UEC Ethernet controller"
+	depends on DM_ETH
+	help
+	  This driver supports the NXP QE UEC ethernet controller
drivers/net/qe/Makefile new file +5 -0
new file mode 100644
index 0000000000..7d84757c17
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2020 Heiko Schocher <[email protected]>
+
+obj-$(CONFIG_QE_UEC) += dm_qe_uec.o dm_qe_uec_phy.o uccf.o
drivers/net/qe/dm_qe_uec.c new file +1161 -0

1,161 lines not on this page · raw message

drivers/net/qe/dm_qe_uec.h new file +22 -0
new file mode 100644
index 0000000000..12bb9b3d49
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * QE UEC ethernet controller driver
+ *
+ * based on drivers/qe/uec.c from NXP
+ *
+ * Copyright (C) 2020 Heiko Schocher <[email protected]>
+ */
+
+#ifndef _DM_QE_UEC_H
+#define _DM_QE_UEC_H
+
+#define qe_uec_dbg(dev, fmt, args...)	debug("%s:" fmt, dev->name, ##args)
+
+#include "uec.h"
+
+/* QE UEC private structure */
+struct qe_uec_priv {
+	struct uec_private *uec;
+	struct phy_device *phydev;
+};
+#endif
drivers/net/qe/dm_qe_uec_phy.c new file +161 -0

161 lines not on this page · raw message

drivers/net/qe/uccf.c new file +388 -0

388 lines not on this page · raw message

drivers/net/qe/uccf.h new file +117 -0

117 lines not on this page · raw message

drivers/net/qe/uec.h new file +742 -0

742 lines not on this page · raw message

drivers/qe/uccf.c +2 -0
index 9beb5d90ac..41cf54b488 100644
@@ -14,6 +14,7 @@
 #include "uccf.h"
 #include <fsl_qe.h>
 
+#if !defined(CONFIG_DM_ETH)
 void ucc_fast_transmit_on_demand(ucc_fast_private_t *uccf)
 {
 	out_be16(&uccf->uf_regs->utodr, UCC_FAST_TOD);
@@ -386,3 +387,4 @@ int ucc_fast_init(ucc_fast_info_t *uf_info, ucc_fast_private_t  **uccf_ret)
 	*uccf_ret = uccf;
 	return 0;
 }
+#endif
drivers/qe/uec.c +2 -0
index 69cdf9444a..ccae3d9ce4 100644
@@ -18,6 +18,7 @@
 #include <fsl_qe.h>
 #include <phy.h>
 
+#if !defined(CONFIG_DM_ETH)
 /* Default UTBIPAR SMI address */
 #ifndef CONFIG_UTBIPAR_INIT_TBIPA
 #define CONFIG_UTBIPAR_INIT_TBIPA 0x1F
@@ -1428,3 +1429,4 @@ int uec_standard_init(bd_t *bis)
 {
 	return uec_eth_init(bis, uec_info, ARRAY_SIZE(uec_info));
 }
+#endif
drivers/qe/uec_phy.c +3 -0
index 9425379794..02198fb6db 100644
@@ -22,6 +22,8 @@
 #include <fsl_qe.h>
 #include <phy.h>
 
+#if !defined(CONFIG_DM_ETH)
+
 #define ugphy_printk(format, arg...)  \
 	printf(format "\n", ## arg)
 
@@ -909,3 +911,4 @@ void change_phy_interface_mode (struct eth_device *dev,
 	marvell_phy_interface_mode (dev, type, speed);
 #endif
 }
+#endif
Signature · 1 line
2.24.1
#1 lore raw

RFC PATCH 1/1 net, qe: add DM support for QE UEC ethernet

Hello Priyanka,

Am 18.02.2020 um 10:05 schrieb Heiko Schocher:

Quoted 42 lines

add DM/DTS suppor for the UEC ethernet on QUICC Engine Block.

---
Travis build:

https://travis-ci.org/hsdenx/u-boot-test/builds/651400509

- I let the old none DM based implementation in code so boards should work with old implementation. This Code should be removed if all boards are converted to DM/DTS.

- add the DM based qe uec driver under drivers/net/qe

- Therefore copied the files uccf.c uccf.h uec.h from drivers/qe. So there are a lot of Codingstyle problems currently. I fix them in next version if this RFC patch is OK or it needs some changes.

- The dm based driver code is now under drivers/net/qe/dm_qe_uec.c Used a lot of functions from drivers/qe/uec.c

- seperated the PHY specific code into seperate file drivers/net/qe/dm_qe_uec_phy.c

  drivers/net/Kconfig            |    2 +
  drivers/net/Makefile           |    1 +
  drivers/net/qe/Kconfig         |    9 +
  drivers/net/qe/Makefile        |    5 +
  drivers/net/qe/dm_qe_uec.c     | 1161 ++++++++++++++++++++++++++++++++
  drivers/net/qe/dm_qe_uec.h     |   22 +
  drivers/net/qe/dm_qe_uec_phy.c |  161 +++++
  drivers/net/qe/uccf.c          |  388 +++++++++++
  drivers/net/qe/uccf.h          |  117 ++++
  drivers/net/qe/uec.h           |  742 ++++++++++++++++++++
  drivers/qe/uccf.c              |    2 +
  drivers/qe/uec.c               |    2 +
  drivers/qe/uec_phy.c           |    3 +
  13 files changed, 2615 insertions(+)
Quoted 8 lines

create mode 100644 drivers/net/qe/Kconfig create mode 100644 drivers/net/qe/Makefile create mode 100644 drivers/net/qe/dm_qe_uec.c create mode 100644 drivers/net/qe/dm_qe_uec.h create mode 100644 drivers/net/qe/dm_qe_uec_phy.c create mode 100644 drivers/net/qe/uccf.c create mode 100644 drivers/net/qe/uccf.h create mode 100644 drivers/net/qe/uec.h

Any comments?

Thanks!

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#2 lore raw

RFC PATCH 1/1 net, qe: add DM support for QE UEC ethernet

Quoted 20 lines · Heiko Schocher

-----Original Message-----
From: Heiko Schocher <[email protected]>
Sent: 2020?4?9? 13:19
To: Priyanka Jain <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Holger Brunck <[email protected]>; Joe Hershberger <[email protected]>; Mario Six <[email protected]>; Qiang Zhao <[email protected]>
Subject: Re: [RFC PATCH] net, qe: add DM support for QE UEC ethernet

Hello Priyanka,

Am 18.02.2020 um 10:05 schrieb Heiko Schocher:

Quoted 8 lines

add DM/DTS suppor for the UEC ethernet on QUICC Engine Block.

---
Travis build:

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrav

Quoted 26 lines

is-ci.org%2Fhsdenx%2Fu-boot-test%2Fbuilds%2F651400509&amp;data=02%7C 01

Quoted 1 line

%7Cqiang.zhao%40nxp.com%7C51477945d03e4b72383708d7dc458e7e%7C

686ea1d3b

Quoted 1 line

c2b4c6fa92cd99c5c301635%7C0%7C0%7C637220063612830833&amp;sdata =MALxWjN

Quoted 19 lines

kO0lgq1b0gmk646eEI8HWZUXRqTHt6zaOQPk%3D&amp;reserved=0

- I let the old none DM based implementation in code so boards should work with old implementation. This Code should be removed if all boards are converted to DM/DTS.

- add the DM based qe uec driver under drivers/net/qe

- Therefore copied the files uccf.c uccf.h uec.h from drivers/qe. So there are a lot of Codingstyle problems currently. I fix them in next version if this RFC patch is OK or it needs some changes.

- The dm based driver code is now under drivers/net/qe/dm_qe_uec.c Used a lot of functions from drivers/qe/uec.c

- seperated the PHY specific code into seperate file drivers/net/qe/dm_qe_uec_phy.c

There are so much duplicated codes.
And what the dts node looks like?
Could you please give an example?

Quoted 28 lines
Quoted 7 lines

  drivers/net/Kconfig            |    2 +
  drivers/net/Makefile           |    1 +
  drivers/net/qe/Kconfig         |    9 +
  drivers/net/qe/Makefile        |    5 +
  drivers/net/qe/dm_qe_uec.c     | 1161

++++++++++++++++++++++++++++++++

Quoted 9 lines
  drivers/net/qe/dm_qe_uec.h     |   22 +
  drivers/net/qe/dm_qe_uec_phy.c |  161 +++++
  drivers/net/qe/uccf.c          |  388 +++++++++++
  drivers/net/qe/uccf.h          |  117 ++++
  drivers/net/qe/uec.h           |  742 ++++++++++++++++++++
  drivers/qe/uccf.c              |    2 +
  drivers/qe/uec.c               |    2 +
  drivers/qe/uec_phy.c           |    3 +
  13 files changed, 2615 insertions(+)
Quoted 8 lines

create mode 100644 drivers/net/qe/Kconfig create mode 100644 drivers/net/qe/Makefile create mode 100644 drivers/net/qe/dm_qe_uec.c create mode 100644 drivers/net/qe/dm_qe_uec.h create mode 100644 drivers/net/qe/dm_qe_uec_phy.c create mode 100644 drivers/net/qe/uccf.c create mode 100644 drivers/net/qe/uccf.h create mode 100644 drivers/net/qe/uec.h

Any comments?

Quoted 8 lines

Thanks!

bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de

Best Regards
Qiang Zhao

#3 lore raw

RFC PATCH 1/1 net, qe: add DM support for QE UEC ethernet

Hello Qiang Zhao,

Am 09.04.2020 um 10:00 schrieb Qiang Zhao:

Quoted 44 lines · Heiko Schocher
Quoted 43 lines

-----Original Message-----
From: Heiko Schocher <[email protected]>
Sent: 2020?4?9? 13:19
To: Priyanka Jain <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Holger Brunck <[email protected]>; Joe Hershberger <[email protected]>; Mario Six <[email protected]>; Qiang Zhao <[email protected]>
Subject: Re: [RFC PATCH] net, qe: add DM support for QE UEC ethernet

Hello Priyanka,

Am 18.02.2020 um 10:05 schrieb Heiko Schocher:

Quoted 8 lines

add DM/DTS suppor for the UEC ethernet on QUICC Engine Block.

---
Travis build:

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrav

is-ci.org%2Fhsdenx%2Fu-boot-test%2Fbuilds%2F651400509&amp;data=02%7C 01

Quoted 1 line

%7Cqiang.zhao%40nxp.com%7C51477945d03e4b72383708d7dc458e7e%7C

686ea1d3b

Quoted 1 line

c2b4c6fa92cd99c5c301635%7C0%7C0%7C637220063612830833&amp;sdata =MALxWjN

Quoted 14 lines

kO0lgq1b0gmk646eEI8HWZUXRqTHt6zaOQPk%3D&amp;reserved=0

- I let the old none DM based implementation in code so boards should work with old implementation. This Code should be removed if all boards are converted to DM/DTS.

- add the DM based qe uec driver under drivers/net/qe

- Therefore copied the files uccf.c uccf.h uec.h from drivers/qe. So there are a lot of Codingstyle problems currently. I fix them in next version if this RFC patch is OK or it needs some changes.

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

- The dm based driver code is now under drivers/net/qe/dm_qe_uec.c Used a lot of functions from drivers/qe/uec.c

- seperated the PHY specific code into seperate file drivers/net/qe/dm_qe_uec_phy.c

There are so much duplicated codes.

Yes, as I do not want to break other boards, as I said in comment.

If all boards are moved to this new driver, we can remove the old code.

Quoted 2 lines

And what the dts node looks like?
Could you please give an example?

Uh, indeed, I did not add an entry in "doc/device-tree-bindings/"

I add this in next version.

Same as in linux:

MDIO:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/boot/dts/kmeter1.dts#n426

			mdio at 3320 {
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x3320 0x18>;
				compatible = "fsl,ucc-mdio";

				/* Piggy2 (UCC4, MDIO 0x00, RMII) */
				phy_piggy2: ethernet-phy at 0 {
					reg = <0x0>;
				};
			[...]

Ethernet:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/boot/dts/kmeter1.dts#n395

			/* Eth-3 (UCC7, MDIO 0x0a, RMII) */
			enet_eth3: ucc at 2600 {
				device_type = "network";
				compatible = "ucc_geth";
				cell-index = <7>;
				reg = <0x2600 0x200>;
				interrupts = <42>;
				interrupt-parent = <&qeic>;
				local-mac-address = [ 00 00 00 00 00 00 ];
				rx-clock-name = "none";
				tx-clock-name = "clk16";
				phy-handle = <&phy_eth3>;
				phy-connection-type = "rmii";
				pio-handle = <&pio_ucc7>;
			};

(And yes, compatible entry is ancient...)

Quoted 31 lines
Quoted 31 lines
Quoted 8 lines


   drivers/net/Kconfig            |    2 +
   drivers/net/Makefile           |    1 +
   drivers/net/qe/Kconfig         |    9 +
   drivers/net/qe/Makefile        |    5 +
   drivers/net/qe/dm_qe_uec.c     | 1161

++++++++++++++++++++++++++++++++

Quoted 9 lines
   drivers/net/qe/dm_qe_uec.h     |   22 +
   drivers/net/qe/dm_qe_uec_phy.c |  161 +++++
   drivers/net/qe/uccf.c          |  388 +++++++++++
   drivers/net/qe/uccf.h          |  117 ++++
   drivers/net/qe/uec.h           |  742 ++++++++++++++++++++
   drivers/qe/uccf.c              |    2 +
   drivers/qe/uec.c               |    2 +
   drivers/qe/uec_phy.c           |    3 +
   13 files changed, 2615 insertions(+)
Quoted 8 lines

create mode 100644 drivers/net/qe/Kconfig create mode 100644 drivers/net/qe/Makefile create mode 100644 drivers/net/qe/dm_qe_uec.c create mode 100644 drivers/net/qe/dm_qe_uec.h create mode 100644 drivers/net/qe/dm_qe_uec_phy.c create mode 100644 drivers/net/qe/uccf.c create mode 100644 drivers/net/qe/uccf.h create mode 100644 drivers/net/qe/uec.h

Any comments?

Thanks!

Quoted 9 lines
Quoted 6 lines

bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de

Best Regards
Qiang Zhao

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#4 lore raw

RFC PATCH 1/1 net, qe: add DM support for QE UEC ethernet

Hello Qiang Zhao,

Am 15.04.2020 um 06:57 schrieb Heiko Schocher:

Quoted 79 lines

Hello Qiang Zhao,

Am 09.04.2020 um 10:00 schrieb Qiang Zhao:

Quoted 44 lines · Heiko Schocher
Quoted 43 lines

-----Original Message-----
From: Heiko Schocher <[email protected]>
Sent: 2020?4?9? 13:19
To: Priyanka Jain <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Holger Brunck <[email protected]>; Joe Hershberger <[email protected]>; Mario Six <[email protected]>; Qiang Zhao <[email protected]>
Subject: Re: [RFC PATCH] net, qe: add DM support for QE UEC ethernet

Hello Priyanka,

Am 18.02.2020 um 10:05 schrieb Heiko Schocher:

Quoted 8 lines

add DM/DTS suppor for the UEC ethernet on QUICC Engine Block.

---
Travis build:

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrav

is-ci.org%2Fhsdenx%2Fu-boot-test%2Fbuilds%2F651400509&amp;data=02%7C 01

Quoted 1 line

%7Cqiang.zhao%40nxp.com%7C51477945d03e4b72383708d7dc458e7e%7C

686ea1d3b

Quoted 1 line

c2b4c6fa92cd99c5c301635%7C0%7C0%7C637220063612830833&amp;sdata =MALxWjN

Quoted 14 lines

kO0lgq1b0gmk646eEI8HWZUXRqTHt6zaOQPk%3D&amp;reserved=0

- I let the old none DM based implementation in code ??? so boards should work with old implementation. ??? This Code should be removed if all boards are converted ??? to DM/DTS.

- add the DM based qe uec driver under drivers/net/qe

- Therefore copied the files uccf.c uccf.h uec.h from ??? drivers/qe. So there are a lot of Codingstyle problems ??? currently. I fix them in next version if this RFC ??? patch is OK or it needs some changes.

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

- The dm based driver code is now under drivers/net/qe/dm_qe_uec.c ??? Used a lot of functions from drivers/qe/uec.c

- seperated the PHY specific code into seperate file ??? drivers/net/qe/dm_qe_uec_phy.c

There are so much duplicated codes.

Yes, as I do not want to break other boards, as I said in comment.

If all boards are moved to this new driver, we can remove the old code.

Quoted 2 lines

And what the dts node looks like?
Could you please give an example?

Uh, indeed, I did not add an entry in "doc/device-tree-bindings/"

I add this in next version.

Same as in linux:

MDIO:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/boot/dts/kmeter1.dts#n426

??????????? mdio at 3320 {
??????????????? #address-cells = <1>;
??????????????? #size-cells = <0>;
??????????????? reg = <0x3320 0x18>;
??????????????? compatible = "fsl,ucc-mdio";

Quoted 5 lines

??????????????? /* Piggy2 (UCC4, MDIO 0x00, RMII) */ ??????????????? phy_piggy2: ethernet-phy at 0 { ??????????????????? reg = <0x0>; ??????????????? };
??????????? [...]

Thanks for this question!

There is already a phy driver drivers/net/fsl_mdio.c which I can use also for UEC. I reworked this patch and dropped ./drivers/net/qe/dm_qe_uec_phy.c

Just have to test it, when I get access to the hardware.

bye,
Heiko

Quoted 65 lines

Ethernet:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/boot/dts/kmeter1.dts#n395

??????????? /* Eth-3 (UCC7, MDIO 0x0a, RMII) */ ??????????? enet_eth3: ucc at 2600 { ??????????????? device_type = "network"; ??????????????? compatible = "ucc_geth"; ??????????????? cell-index = <7>;
??????????????? reg = <0x2600 0x200>; ??????????????? interrupts = <42>; ??????????????? interrupt-parent = <&qeic>; ??????????????? local-mac-address = [ 00 00 00 00 00 00 ]; ??????????????? rx-clock-name = "none"; ??????????????? tx-clock-name = "clk16"; ??????????????? phy-handle = <&phy_eth3>; ??????????????? phy-connection-type = "rmii"; ??????????????? pio-handle = <&pio_ucc7>; ??????????? };

(And yes, compatible entry is ancient...)

Quoted 31 lines
Quoted 31 lines
Quoted 8 lines


?? drivers/net/Kconfig??????????? |??? 2 +
?? drivers/net/Makefile?????????? |??? 1 +
?? drivers/net/qe/Kconfig???????? |??? 9 +
?? drivers/net/qe/Makefile??????? |??? 5 +
?? drivers/net/qe/dm_qe_uec.c???? | 1161

++++++++++++++++++++++++++++++++

Quoted 8 lines
?? drivers/net/qe/dm_qe_uec.h???? |?? 22 +
?? drivers/net/qe/dm_qe_uec_phy.c |? 161 +++++
?? drivers/net/qe/uccf.c????????? |? 388 +++++++++++
?? drivers/net/qe/uccf.h????????? |? 117 ++++
?? drivers/net/qe/uec.h?????????? |? 742 ++++++++++++++++++++
?? drivers/qe/uccf.c????????????? |??? 2 +
?? drivers/qe/uec.c?????????????? |??? 2 +
?? drivers/qe/uec_phy.c?????????? |??? 3 +
Quoted 9 lines

?? 13 files changed, 2615 insertions(+)
?? create mode 100644 drivers/net/qe/Kconfig ?? create mode 100644 drivers/net/qe/Makefile ?? create mode 100644 drivers/net/qe/dm_qe_uec.c ?? create mode 100644 drivers/net/qe/dm_qe_uec.h ?? create mode 100644 drivers/net/qe/dm_qe_uec_phy.c ?? create mode 100644 drivers/net/qe/uccf.c ?? create mode 100644 drivers/net/qe/uccf.h ?? create mode 100644 drivers/net/qe/uec.h

Any comments?

Thanks!

Quoted 9 lines
Quoted 6 lines

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,????? Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52?? Fax: +49-8142-66989-80?? Email: hs at denx.de

Best Regards
Qiang Zhao

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#5 lore raw

RFC PATCH 1/1 net, qe: add DM support for QE UEC ethernet

Am 15.04.2020 um 06:57 schrieb Heiko Schocher:

Quoted 41 lines

-----Original Message-----
From: Heiko Schocher <[email protected]>
Sent: 2020?4?15? 14:25
To: Qiang Zhao <[email protected]>
Cc: Priyanka Jain <[email protected]>; U-Boot Mailing List <[email protected]>; Holger Brunck <[email protected]>; Joe Hershberger <[email protected]>; Mario Six <[email protected]>
Subject: Re: [RFC PATCH] net, qe: add DM support for QE UEC ethernet

Hello Qiang Zhao,

Am 15.04.2020 um 06:57 schrieb Heiko Schocher:

Quoted 29 lines

Hello Qiang Zhao,

Am 09.04.2020 um 10:00 schrieb Qiang Zhao:

Quoted 26 lines · Heiko Schocher
Quoted 25 lines

-----Original Message-----
From: Heiko Schocher <[email protected]>
Sent: 2020?4?9? 13:19
To: Priyanka Jain <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Holger Brunck <[email protected]>; Joe Hershberger <[email protected]>; Mario Six <[email protected]>; Qiang Zhao <[email protected]>
Subject: Re: [RFC PATCH] net, qe: add DM support for QE UEC ethernet

Hello Priyanka,

Am 18.02.2020 um 10:05 schrieb Heiko Schocher:

Quoted 9 lines

add DM/DTS suppor for the UEC ethernet on QUICC Engine Block.

---
Travis build:

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ft
rav

Quoted 25 lines

is-ci.org%2Fhsdenx%2Fu-boot-test%2Fbuilds%2F651400509&amp;data=02%7C

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

01

Quoted 1 line

%7Cqiang.zhao%40nxp.com%7C51477945d03e4b72383708d7dc458e7e

%7C

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

686ea1d3b

Quoted 1 line

c2b4c6fa92cd99c5c301635%7C0%7C0%7C637220063612830833&amp;sdata

Quoted 17 lines
Quoted 17 lines
Quoted 17 lines

=MALxWjN

Quoted 16 lines

kO0lgq1b0gmk646eEI8HWZUXRqTHt6zaOQPk%3D&amp;reserved=0

- I let the old none DM based implementation in code ??? so boards should work with old implementation. ??? This Code should be removed if all boards are converted ??? to DM/DTS.

- add the DM based qe uec driver under drivers/net/qe

- Therefore copied the files uccf.c uccf.h uec.h from ??? drivers/qe. So there are a lot of Codingstyle problems ??? currently. I fix them in next version if this RFC ??? patch is OK or it needs some changes.

- The dm based driver code is now under drivers/net/qe/dm_qe_uec.c ??? Used a lot of functions from drivers/qe/uec.c

We need to make sure the old qe uec driver and new dm driver could not be enabled at the same time.

Quoted 9 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines

- seperated the PHY specific code into seperate file ??? drivers/net/qe/dm_qe_uec_phy.c

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de

Best Regards
Qiang Zhao

#6 lore raw

RFC PATCH 1/1 net, qe: add DM support for QE UEC ethernet

In reply to Heiko Schocher
Quoted 72 lines

-----Original Message-----
From: Heiko Schocher <[email protected]>
Sent: Thursday, April 9, 2020 10:49 AM
To: Priyanka Jain <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Holger Brunck <[email protected]>; Joe Hershberger <[email protected]>; Mario Six <[email protected]>; Qiang Zhao <[email protected]>
Subject: Re: [RFC PATCH] net, qe: add DM support for QE UEC ethernet

Hello Priyanka,

Am 18.02.2020 um 10:05 schrieb Heiko Schocher:

Quoted 8 lines

add DM/DTS suppor for the UEC ethernet on QUICC Engine Block.

---
Travis build:

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrav
is-ci.org%2Fhsdenx%2Fu-boot-

test%2Fbuilds%2F651400509&amp;data=02%7C01

Quoted 1 line

%7Cpriyanka.jain%40nxp.com%7C51477945d03e4b72383708d7dc458e7e%7C 686ea1

Quoted 1 line

d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637220063612750872&amp;sdat a=oV%2

Quoted 21 lines

BTyCsoQF17s4aQ1OGEIcMXWjB%2BhpiPunefUNtD6Fs%3D&amp;reserved=0

- I let the old none DM based implementation in code so boards should work with old implementation. This Code should be removed if all boards are converted to DM/DTS.

- add the DM based qe uec driver under drivers/net/qe

- Therefore copied the files uccf.c uccf.h uec.h from drivers/qe. So there are a lot of Codingstyle problems currently. I fix them in next version if this RFC patch is OK or it needs some changes.

- The dm based driver code is now under drivers/net/qe/dm_qe_uec.c Used a lot of functions from drivers/qe/uec.c

- seperated the PHY specific code into seperate file drivers/net/qe/dm_qe_uec_phy.c

Quoted 5 lines
  drivers/net/Kconfig            |    2 +
  drivers/net/Makefile           |    1 +
  drivers/net/qe/Kconfig         |    9 +
  drivers/net/qe/Makefile        |    5 +
  drivers/net/qe/dm_qe_uec.c     | 1161

++++++++++++++++++++++++++++++++

Quoted 9 lines
  drivers/net/qe/dm_qe_uec.h     |   22 +
  drivers/net/qe/dm_qe_uec_phy.c |  161 +++++
  drivers/net/qe/uccf.c          |  388 +++++++++++
  drivers/net/qe/uccf.h          |  117 ++++
  drivers/net/qe/uec.h           |  742 ++++++++++++++++++++
  drivers/qe/uccf.c              |    2 +
  drivers/qe/uec.c               |    2 +
  drivers/qe/uec_phy.c           |    3 +
  13 files changed, 2615 insertions(+)
Quoted 8 lines

create mode 100644 drivers/net/qe/Kconfig create mode 100644 drivers/net/qe/Makefile create mode 100644 drivers/net/qe/dm_qe_uec.c create mode 100644 drivers/net/qe/dm_qe_uec.h create mode 100644 drivers/net/qe/dm_qe_uec_phy.c create mode 100644 drivers/net/qe/uccf.c create mode 100644 drivers/net/qe/uccf.h create mode 100644 drivers/net/qe/uec.h

Quoted 6 lines

Any comments?

Thanks!

bye,
Heiko

Qiang Zhao is NXP Software IP expert for QE. I am taking his help in review.

Thanks
Priyanka

Quoted 4 lines

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de