Skip to contentSkip to conversation

m68k: add fec base node to devicetrees

PATCH New Angelo Dureghello 2 participants 18 messages Nov 15, 2019 – Jan 10, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/9 m68k: add fec base node to devicetrees

From: Angelo Durgehello <[email protected]>

Add basic ethernet controller devicetree nodes for all ColdFire families.

---
 arch/m68k/dts/mcf5208.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf523x.dtsi  | 12 ++++++++++++
 arch/m68k/dts/mcf5271.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf5272.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf5275.dtsi  | 22 +++++++++++++++++++++-
 arch/m68k/dts/mcf5282.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf5301x.dtsi | 21 +++++++++++++++++++++
 arch/m68k/dts/mcf5329.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf537x.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf5441x.dtsi | 20 ++++++++++++++++++++
 arch/m68k/dts/mcf5445x.dtsi | 20 ++++++++++++++++++++
 arch/m68k/dts/mcf54xx.dtsi  | 32 ++++++++++++++++++++++++++++++++
 12 files changed, 186 insertions(+), 1 deletion(-)
arch/m68k/dts/mcf5208.dtsi +10 -0
index 558d8bf41a..4802dd3074 100644
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -32,5 +33,14 @@
 			reg = <0xfc068000 0x40>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc030000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc030000 0x400>;
+			mii-base = <0>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
arch/m68k/dts/mcf523x.dtsi +12 -0
index 9e79d472ec..550e824cb1 100644
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -39,6 +40,17 @@
 				reg = <0x280 0x40>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 1000 {
+				compatible = "fsl,mcf-fec";
+				#address-cells=<2>;
+				#size-cells=<1>;
+				reg = <0x1000 0x400>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
 		};
 	};
 };
arch/m68k/dts/mcf5271.dtsi +10 -0
index 29355528d0..b3484c2c84 100644
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -39,6 +40,15 @@
 				reg = <0x280 0x40>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 1000 {
+				compatible = "fsl,mcf-fec";
+				reg = <0x1000 0x400>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
 		};
 	};
 };
arch/m68k/dts/mcf5272.dtsi +10 -0
index a56117728b..173baaba3f 100644
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -33,6 +34,15 @@
 				reg = <0x140 0x40>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 840 {
+				compatible = "fsl,mcf-fec";
+				reg = <0x840 0x400>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
 		};
 	};
 };
arch/m68k/dts/mcf5275.dtsi +21 -1
index b375609d4a..99dd7d3924 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright (C) 2018 Angelo Dureghello <[email protected]>
+ * Copyright (C) 2019 Angelo Dureghello <[email protected]>
  */
 
 / {
@@ -8,6 +8,8 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
+		fec1 = &fec1;
 	};
 
 	soc {
@@ -39,6 +41,24 @@
 				reg = <0x280 0x40>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 1000 {
+				compatible = "fsl,mcf-fec";
+				reg = <0x1000 0x800>;
+				max-speed = <100>;
+				phy-addr = <(-1)>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
+
+			fec1: ethernet at 1800 {
+				compatible = "fsl,mcf-fec";
+				reg = <0x1800 0x800>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
 		};
 	};
 };
arch/m68k/dts/mcf5282.dtsi +10 -0
index 3ad1be7bb5..d9916b1cd9 100644
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -39,6 +40,15 @@
 				reg = <0x280 0x40>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 1000 {
+				compatible = "fsl,mcf-fec";
+				reg = <0x1000 0x800>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
 		};
 	};
 };
arch/m68k/dts/mcf5301x.dtsi +21 -0
index 0891e4dfd5..f60898aa4a 100644
@@ -9,6 +9,8 @@
 	aliases {
 		serial0 = &uart0;
 		spi0 = &dspi0;
+		fec0 = &fec0;
+		fec1 = &fec1;
 	};
 
 	soc {
@@ -44,5 +46,24 @@
 			spi-mode = <0>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc030000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc030000 0x200>;
+			mii-base = <0>;
+			max-speed = <100>;
+			phy-addr = <(-1)>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
+
+		fec1: ethernet at fc034000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc034000 0x800>;
+			mii-base = <1>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
arch/m68k/dts/mcf5329.dtsi +10 -0
index aeaa6430af..de348968b5 100644
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -32,5 +33,14 @@
 			reg = <0xfc068000 0x40>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc030000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc030000 0x800>;
+			mii-base = <0>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
arch/m68k/dts/mcf537x.dtsi +10 -0
index aeaa6430af..2a2a32a59b 100644
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -32,5 +33,14 @@
 			reg = <0xfc068000 0x40>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc030000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc030000 0x400>;
+			mii-base = <0>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
arch/m68k/dts/mcf5441x.dtsi +20 -0
index 71b392adc3..6769bdc270 100644
@@ -9,6 +9,8 @@
 	aliases {
 		serial0 = &uart0;
 		spi0 = &dspi0;
+		fec0 = &fec0;
+		fec1 = &fec1;
 	};
 
 	soc {
@@ -83,5 +85,23 @@
 			spi-mode = <0>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc0d4000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc0d4000 0x4000>;
+			mii-base = <0>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
+
+		fec1: ethernet at fc0d8000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc0d8000 0x4000>;
+			mii-base = <1>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
arch/m68k/dts/mcf5445x.dtsi +20 -0
index ccbee29a6c..b7ecc99c09 100644
@@ -9,6 +9,8 @@
 	aliases {
 		serial0 = &uart0;
 		spi0 = &dspi0;
+		fec0 = &fec0;
+		fec1 = &fec1;
 	};
 
 	soc {
@@ -44,5 +46,23 @@
 			spi-mode = <0>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc030000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc030000 0x4000>;
+			mii-base = <0>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
+
+		fec1: ethernet at fc034000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc034000 0x4000>;
+			mii-base = <1>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
arch/m68k/dts/mcf54xx.dtsi +32 -0
index 537bb424f3..e9cebb9f74 100644
@@ -11,6 +11,8 @@
 		 * no UARTS.
 		 */
 		spi0 = &dspi0;
+		fec0 = &fec0;
+		fec1 = &fec1;
 	};
 
 	soc {
@@ -35,6 +37,36 @@
 				spi-mode = <0>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 9000 {
+				compatible = "fsl,mcf-dma-fec";
+				reg = <0x9000 0x800>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				rx-task = <0>;
+				tx-task = <1>;
+				rx-piority = <6>;
+				tx-piority = <7>;
+				rx-init = <16>;
+				tx-init = <17>;
+				status = "disabled";
+			};
+
+			fec1: ethernet at 9800 {
+				compatible = "fsl,mcf-dma-fec";
+				reg = <0x9800 0x800>;
+				mii-base = <1>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				rx-task = <2>;
+				tx-task = <3>;
+				rx-piority = <6>;
+				tx-piority = <7>;
+				rx-init = <30>;
+				tx-init = <31>;
+				status = "disabled";
+			};
 		};
 	};
 };
Signature · 1 line
2.24.0
#1 lore raw

PATCH 2/9 m68k: add fec fdt overrides to all boards

From: Angelo Durgehello <[email protected]>

Add ethernet controller overrides for all involved boards.

---
 arch/m68k/dts/M5208EVBE.dts                   | 3 +++
 arch/m68k/dts/M5235EVB.dts                    | 3 +++
 arch/m68k/dts/M5235EVB_Flash32.dts            | 3 +++
 arch/m68k/dts/M5272C3.dts                     | 3 +++
 arch/m68k/dts/M5275EVB.dts                    | 7 +++++++
 arch/m68k/dts/M5282EVB.dts                    | 3 +++
 arch/m68k/dts/M53017EVB.dts                   | 7 +++++++
 arch/m68k/dts/M5329AFEE.dts                   | 3 +++
 arch/m68k/dts/M5329BFEE.dts                   | 3 +++
 arch/m68k/dts/M5373EVB.dts                    | 3 +++
 arch/m68k/dts/M54418TWR.dts                   | 9 +++++++++
 arch/m68k/dts/M54418TWR_nand_mii.dts          | 9 +++++++++
 arch/m68k/dts/M54418TWR_nand_rmii.dts         | 9 +++++++++
 arch/m68k/dts/M54418TWR_nand_rmii_lowfreq.dts | 9 +++++++++
 arch/m68k/dts/M54418TWR_serial_mii.dts        | 9 +++++++++
 arch/m68k/dts/M54418TWR_serial_rmii.dts       | 9 +++++++++
 arch/m68k/dts/M54451EVB.dts                   | 8 ++++++++
 arch/m68k/dts/M54451EVB_stmicro.dts           | 8 ++++++++
 arch/m68k/dts/M54455EVB.dts                   | 9 +++++++++
 arch/m68k/dts/M54455EVB_a66.dts               | 9 +++++++++
 arch/m68k/dts/M54455EVB_i66.dts               | 9 +++++++++
 arch/m68k/dts/M54455EVB_intel.dts             | 8 ++++++++
 arch/m68k/dts/M54455EVB_stm33.dts             | 9 +++++++++
 arch/m68k/dts/M5475AFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5475BFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5475CFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5475DFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5475EFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5475FFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5475GFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5485AFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5485BFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5485CFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5485DFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5485EFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5485FFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5485GFE.dts                    | 8 ++++++++
 arch/m68k/dts/M5485HFE.dts                    | 8 ++++++++
 arch/m68k/dts/cobra5272.dts                   | 3 +++
 arch/m68k/dts/eb_cpu5282.dts                  | 3 +++
 arch/m68k/dts/eb_cpu5282_internal.dts         | 3 +++
 arch/m68k/dts/stmark2.dts                     | 9 +++++++++
 42 files changed, 290 insertions(+)
arch/m68k/dts/M5208EVBE.dts +3 -0
index e78513f3b8..3e5a698861 100644
@@ -20,3 +20,6 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
arch/m68k/dts/M5235EVB.dts +3 -0
index 1a32539323..b170b7bd03 100644
@@ -20,3 +20,6 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
arch/m68k/dts/M5235EVB_Flash32.dts +3 -0
index fcbffb23f5..497d824541 100644
@@ -20,3 +20,6 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
arch/m68k/dts/M5272C3.dts +3 -0
index 6efb8a4cc5..0ecf1e7429 100644
@@ -20,3 +20,6 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
arch/m68k/dts/M5275EVB.dts +7 -0
index cd9eb7d145..f0f573c08c 100644
@@ -20,3 +20,10 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+};
arch/m68k/dts/M5282EVB.dts +3 -0
index 9527caafc2..9b506635b9 100644
@@ -20,3 +20,6 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
arch/m68k/dts/M53017EVB.dts +7 -0
index b267488e0f..401318ddf9 100644
@@ -20,3 +20,10 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+};
arch/m68k/dts/M5329AFEE.dts +3 -0
index 7d121d68e7..ab009c5605 100644
@@ -20,3 +20,6 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
arch/m68k/dts/M5329BFEE.dts +3 -0
index cd087b6ea6..7e73ab9c66 100644
@@ -20,3 +20,6 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
arch/m68k/dts/M5373EVB.dts +3 -0
index 930f911d4a..4e1b7aeb77 100644
@@ -20,3 +20,6 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
arch/m68k/dts/M54418TWR.dts +9 -0
index 7765c7abbb..058707fdf0 100644
@@ -23,3 +23,12 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M54418TWR_nand_mii.dts +9 -0
index 9b1cb85325..8afcb0fb99 100644
@@ -23,3 +23,12 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M54418TWR_nand_rmii.dts +9 -0
index 824a66af48..fc2eb5b3bc 100644
@@ -23,3 +23,12 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M54418TWR_nand_rmii_lowfreq.dts +9 -0
index 74fa197ea9..a39d1023b2 100644
@@ -23,3 +23,12 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M54418TWR_serial_mii.dts +9 -0
index 22f27b5612..edf98db003 100644
@@ -23,3 +23,12 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M54418TWR_serial_rmii.dts +9 -0
index 0ddefd9da2..e4639fe431 100644
@@ -23,3 +23,12 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M54451EVB.dts +8 -0
index b57bfea2cb..b81d37a938 100644
@@ -23,3 +23,11 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+};
arch/m68k/dts/M54451EVB_stmicro.dts +8 -0
index 9a088e16d0..6645b58065 100644
@@ -23,3 +23,11 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+};
arch/m68k/dts/M54455EVB.dts +9 -0
index dd11181033..b0ffb5144d 100644
@@ -23,3 +23,12 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M54455EVB_a66.dts +9 -0
index 70d544b72d..c2557bd2e6 100644
@@ -23,3 +23,12 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M54455EVB_i66.dts +9 -0
index b37a87213f..3c9161bfae 100644
@@ -23,3 +23,12 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M54455EVB_intel.dts +8 -0
index c92228fc8b..54209d25a7 100644
@@ -24,3 +24,11 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M54455EVB_stm33.dts +9 -0
index 9e467f94a1..701b9a719b 100644
@@ -23,3 +23,12 @@
 &dspi0 {
 	status = "okay";
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5475AFE.dts +8 -0
index 0c0a79befa..7895b520cf 100644
@@ -11,3 +11,11 @@
 	compatible = "fsl,M5475AFE";
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5475BFE.dts +8 -0
index c4d14097cd..ffbc2d6a06 100644
@@ -11,3 +11,11 @@
 	compatible = "fsl,M5475BFE";
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5475CFE.dts +8 -0
index 4c92c332ba..f1033f7efb 100644
@@ -11,3 +11,11 @@
 	compatible = "fsl,M5475CFE";
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5475DFE.dts +8 -0
index c41c1b3c12..69a8faba83 100644
@@ -11,3 +11,11 @@
 	compatible = "fsl,M5475DFE";
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5475EFE.dts +8 -0
index 5a920b241a..3c898958c8 100644
@@ -11,3 +11,11 @@
 	compatible = "fsl,M5475EFE";
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5475FFE.dts +8 -0
index d312a6ae8d..bb3c21588f 100644
@@ -11,3 +11,11 @@
 	compatible = "fsl,M5475FFE";
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5475GFE.dts +8 -0
index 9e794dafa6..75080fa737 100644
@@ -11,3 +11,11 @@
 	compatible = "fsl,M5475GFE";
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5485AFE.dts +8 -0
index 3466751174..b1f5bf0f56 100644
@@ -15,3 +15,11 @@
 	};
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5485BFE.dts +8 -0
index 6d48795a4d..10b8f5b201 100644
@@ -15,3 +15,11 @@
 	};
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5485CFE.dts +8 -0
index d1a7d9d383..a1ae64f65c 100644
@@ -15,3 +15,11 @@
 	};
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5485DFE.dts +8 -0
index 7c362e26e5..9b38d451fc 100644
@@ -15,3 +15,11 @@
 	};
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5485EFE.dts +8 -0
index 4c688dce2b..a1ac3f5a48 100644
@@ -15,3 +15,11 @@
 	};
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5485FFE.dts +8 -0
index 87ec2c543d..7f22de49f4 100644
@@ -15,3 +15,11 @@
 	};
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5485GFE.dts +8 -0
index 9f67e5516b..3430aa7279 100644
@@ -15,3 +15,11 @@
 	};
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/M5485HFE.dts +8 -0
index 2eb2213d78..57c98f1ef7 100644
@@ -15,3 +15,11 @@
 	};
 };
 
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
arch/m68k/dts/cobra5272.dts +3 -0
index f3b74975de..6085eee5b3 100644
@@ -20,3 +20,6 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
arch/m68k/dts/eb_cpu5282.dts +3 -0
index 4641e9cb56..655c4ecf5a 100644
@@ -20,3 +20,6 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
arch/m68k/dts/eb_cpu5282_internal.dts +3 -0
index 0acb7935f4..f5a044d7cc 100644
@@ -20,3 +20,6 @@
 	status = "okay";
 };
 
+&fec0 {
+	status = "okay";
+};
arch/m68k/dts/stmark2.dts +9 -0
index fd8ce4fa35..306b56d679 100644
@@ -32,3 +32,12 @@
 		reg = <1>;
 	};
 };
+
+&fec0 {
+	status = "okay";
+};
+
+&fec1 {
+	status = "okay";
+	mii-base = <0>;
+};
Signature · 1 line
2.24.0
#2 lore raw

PATCH 2/9 m68k: add fec fdt overrides to all boards

Quoted 5 lines · Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Add ethernet controller overrides for all involved boards.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/3bac4ac2/attachment.sig>
#3 lore raw

PATCH 3/9 configs: add eth dm support for all ColdFire boards

In reply to Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Add dm eth config options for all involved ColdFire-based boards.

---
 configs/M5208EVBE_defconfig                   |  2 ++
 configs/M5235EVB_Flash32_defconfig            |  2 ++
 configs/M5235EVB_defconfig                    |  2 ++
 configs/M5272C3_defconfig                     |  2 ++
 configs/M5275EVB_defconfig                    |  2 ++
 configs/M5282EVB_defconfig                    |  2 ++
 configs/M53017EVB_defconfig                   |  2 ++
 configs/M5329AFEE_defconfig                   |  2 ++
 configs/M5329BFEE_defconfig                   |  2 ++
 configs/M5373EVB_defconfig                    |  2 ++
 configs/M54418TWR_defconfig                   |  2 ++
 configs/M54418TWR_nand_mii_defconfig          |  2 ++
 configs/M54418TWR_nand_rmii_defconfig         |  2 ++
 configs/M54418TWR_nand_rmii_lowfreq_defconfig |  2 ++
 configs/M54418TWR_serial_mii_defconfig        |  2 ++
 configs/M54418TWR_serial_rmii_defconfig       |  2 ++
 configs/M54451EVB_defconfig                   |  2 ++
 configs/M54451EVB_stmicro_defconfig           |  2 ++
 configs/M54455EVB_a66_defconfig               |  2 ++
 configs/M54455EVB_defconfig                   |  2 ++
 configs/M54455EVB_i66_defconfig               |  2 ++
 configs/M54455EVB_intel_defconfig             |  2 ++
 configs/M54455EVB_stm33_defconfig             |  2 ++
 configs/M5475AFE_defconfig                    |  3 +++
 configs/M5475BFE_defconfig                    |  3 +++
 configs/M5475CFE_defconfig                    |  3 +++
 configs/M5475DFE_defconfig                    |  3 +++
 configs/M5475EFE_defconfig                    |  3 +++
 configs/M5475FFE_defconfig                    |  3 +++
 configs/M5475GFE_defconfig                    |  3 +++
 configs/M5485AFE_defconfig                    |  3 +++
 configs/M5485BFE_defconfig                    |  3 +++
 configs/M5485CFE_defconfig                    |  3 +++
 configs/M5485DFE_defconfig                    |  3 +++
 configs/M5485EFE_defconfig                    |  3 +++
 configs/M5485FFE_defconfig                    |  3 +++
 configs/M5485GFE_defconfig                    |  3 +++
 configs/M5485HFE_defconfig                    |  3 +++
 configs/cobra5272_defconfig                   |  2 ++
 configs/eb_cpu5282_defconfig                  |  2 ++
 configs/eb_cpu5282_internal_defconfig         |  2 ++
 configs/stmark2_defconfig                     | 14 ++++++++------
 42 files changed, 105 insertions(+), 6 deletions(-)
configs/M5208EVBE_defconfig +2 -0
index 9b5d35cd55..30091f3653 100644
@@ -17,4 +17,6 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
configs/M5235EVB_Flash32_defconfig +2 -0
index 2e40b21d76..8aa7c9d456 100644
@@ -22,4 +22,6 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
configs/M5235EVB_defconfig +2 -0
index fd5dd984be..bc8f13ad07 100644
@@ -22,4 +22,6 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
configs/M5272C3_defconfig +2 -0
index c39876d89c..b87676588b 100644
@@ -18,4 +18,6 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
configs/M5275EVB_defconfig +2 -0
index ecb3e32070..7f0f00928b 100644
@@ -19,4 +19,6 @@ CONFIG_DEFAULT_DEVICE_TREE="M5275EVB"
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
configs/M5282EVB_defconfig +2 -0
index 731fb1ec68..2dff7d957f 100644
@@ -18,4 +18,6 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
configs/M53017EVB_defconfig +2 -0
index 92dfd0256d..69253a097f 100644
@@ -21,4 +21,6 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
configs/M5329AFEE_defconfig +2 -0
index 20acb64b1a..88930d38b8 100644
@@ -20,4 +20,6 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
configs/M5329BFEE_defconfig +2 -0
index 96c57ec9db..7be13ae8b6 100644
@@ -20,4 +20,6 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
configs/M5373EVB_defconfig +2 -0
index ef66d7ca00..97d7889cba 100644
@@ -20,4 +20,6 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
configs/M54418TWR_defconfig +2 -0
index 08af6f2e45..d099aaf084 100644
@@ -25,6 +25,8 @@ CONFIG_USE_ENV_SPI_CS=y
 CONFIG_ENV_SPI_CS=1
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54418TWR_nand_mii_defconfig +2 -0
index 6fa822d790..b4b95a57ad 100644
@@ -22,6 +22,8 @@ CONFIG_CMD_CACHE=y
 CONFIG_DEFAULT_DEVICE_TREE="M54418TWR_nand_mii"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54418TWR_nand_rmii_defconfig +2 -0
index 1fa7b38828..0097285d06 100644
@@ -22,6 +22,8 @@ CONFIG_CMD_CACHE=y
 CONFIG_DEFAULT_DEVICE_TREE="M54418TWR_nand_rmii"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54418TWR_nand_rmii_lowfreq_defconfig +2 -0
index 5208e598f4..cde5878d57 100644
@@ -22,6 +22,8 @@ CONFIG_CMD_CACHE=y
 CONFIG_DEFAULT_DEVICE_TREE="M54418TWR_nand_rmii_lowfreq"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54418TWR_serial_mii_defconfig +2 -0
index 131fd3a856..131a5b95cc 100644
@@ -25,6 +25,8 @@ CONFIG_USE_ENV_SPI_CS=y
 CONFIG_ENV_SPI_CS=1
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54418TWR_serial_rmii_defconfig +2 -0
index fd561f3d25..94b110db40 100644
@@ -25,6 +25,8 @@ CONFIG_USE_ENV_SPI_CS=y
 CONFIG_ENV_SPI_CS=1
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54451EVB_defconfig +2 -0
index f0bd93f2d9..0da365015c 100644
@@ -29,6 +29,8 @@ CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54451EVB_stmicro_defconfig +2 -0
index 144d29b902..7130b92ad2 100644
@@ -30,6 +30,8 @@ CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54455EVB_a66_defconfig +2 -0
index ca403083f7..0301d5210e 100644
@@ -33,6 +33,8 @@ CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54455EVB_defconfig +2 -0
index 3ca2d73797..06f1726a51 100644
@@ -34,6 +34,8 @@ CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54455EVB_i66_defconfig +2 -0
index 20abcd80ab..7ffba03e6a 100644
@@ -33,6 +33,8 @@ CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54455EVB_intel_defconfig +2 -0
index a17e4fab25..a2dee1fb8e 100644
@@ -33,6 +33,8 @@ CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M54455EVB_stm33_defconfig +2 -0
index c3f04645bf..f314c322b9 100644
@@ -35,6 +35,8 @@ CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/M5475AFE_defconfig +3 -0
index 368f73e9dd..6d7ee70b1e 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5475BFE_defconfig +3 -0
index d44b0b267f..7cfb342441 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5475CFE_defconfig +3 -0
index 108ef978a6..cd59fe06e8 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5475DFE_defconfig +3 -0
index 9325db5ba6..858b12d2df 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5475EFE_defconfig +3 -0
index 6873f1500c..e7842e14c0 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5475FFE_defconfig +3 -0
index a98e804c41..b558de9aa8 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5475GFE_defconfig +3 -0
index ed75743801..b0dab827c8 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5485AFE_defconfig +3 -0
index 8f94ac99a1..e49a2fd752 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5485BFE_defconfig +3 -0
index 96bd5200da..5e1756900b 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5485CFE_defconfig +3 -0
index 148be33d5a..27d6f59fce 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5485DFE_defconfig +3 -0
index 5facb0733d..832c118613 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5485EFE_defconfig +3 -0
index ece3e115ea..83e587fde8 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5485FFE_defconfig +3 -0
index c2a2d926d6..ee31e51d39 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5485GFE_defconfig +3 -0
index 9cf620242a..809ece391e 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/M5485HFE_defconfig +3 -0
index e6c9225ea9..e3e9824f1c 100644
@@ -20,7 +20,10 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_FSLDMAFEC=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/cobra5272_defconfig +2 -0
index 8865618999..6bec2ca7b5 100644
@@ -13,5 +13,7 @@ CONFIG_CMD_IMLS=y
 CONFIG_CMD_PING=y
 CONFIG_DEFAULT_DEVICE_TREE="cobra5272"
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_BAUDRATE=19200
configs/eb_cpu5282_defconfig +2 -0
index daaf83a94e..c399c31d00 100644
@@ -26,6 +26,8 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_VIDEO=y
 # CONFIG_CFB_CONSOLE is not set
configs/eb_cpu5282_internal_defconfig +2 -0
index 7bd0d30fb6..e1e9482f92 100644
@@ -25,6 +25,8 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_VIDEO=y
 # CONFIG_CFB_CONSOLE is not set
configs/stmark2_defconfig +8 -6
index 96c6242538..4f9fb78991 100644
@@ -2,6 +2,8 @@ CONFIG_M68K=y
 CONFIG_SYS_TEXT_BASE=0x47E00000
 CONFIG_TARGET_STMARK2=y
 CONFIG_SYS_EXTRA_OPTIONS="CF_SBF,SYS_SERIAL_BOOT,SYS_INPUT_CLKSRC=30000000"
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 rw rootfstype=ramfs rdinit=/sbin/init devtmpfs.mount=1"
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_HUSH_PARSER=y
 # CONFIG_CMDLINE_EDITING is not set
@@ -21,24 +23,24 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_MTDPARTS=y
-CONFIG_DOS_PARTITION=y
 CONFIG_MTDIDS_DEFAULT="nor0=spi-flash.0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-flash.0:1m(u-boot),7m(kernel),-(rootfs)"
+CONFIG_DOS_PARTITION=y
 CONFIG_DEFAULT_DEVICE_TREE="stmark2"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_CS=y
 CONFIG_ENV_SPI_CS=1
-# CONFIG_NET is not set
-CONFIG_MTD_DEVICE=y
 CONFIG_MMC=y
+CONFIG_DM_MMC=y
 CONFIG_FSL_ESDHC=y
+CONFIG_MTD_DEVICE=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=50000000
 CONFIG_SPI_FLASH_ISSI=y
 CONFIG_SPI_FLASH_MTD=y
+CONFIG_DM_ETH=y
+CONFIG_MCFFEC=y
+CONFIG_MII=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_CF_SPI=y
-CONFIG_REGEX=y
-CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 rw rootfstype=ramfs rdinit=/sbin/init devtmpfs.mount=1"
Signature · 1 line
2.24.0
#4 lore raw

PATCH 3/9 configs: add eth dm support for all ColdFire boards

Quoted 5 lines · Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Add dm eth config options for all involved ColdFire-based boards.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/b87e72bc/attachment.sig>
#5 lore raw

PATCH 4/9 configs: purge unneeded fec defines

In reply to Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Remove unneeded fec-related defines after fec moved as dm.

---
 include/configs/M5208EVBE.h  |  5 -----
 include/configs/M5235EVB.h   |  5 -----
 include/configs/M5272C3.h    |  6 ------
 include/configs/M5275EVB.h   |  6 ------
 include/configs/M5282EVB.h   |  6 ------
 include/configs/M53017EVB.h  |  7 -------
 include/configs/M5329EVB.h   |  5 -----
 include/configs/M5373EVB.h   |  5 -----
 include/configs/M54418TWR.h  |  9 ---------
 include/configs/M54451EVB.h  |  6 ------
 include/configs/M54455EVB.h  |  8 --------
 include/configs/M5475EVB.h   | 10 ----------
 include/configs/M5485EVB.h   | 10 ----------
 include/configs/cobra5272.h  | 10 ----------
 include/configs/eb_cpu5282.h |  8 ++------
 include/configs/stmark2.h    | 15 +++++++++++++++
 16 files changed, 17 insertions(+), 104 deletions(-)
include/configs/M5208EVBE.h +0 -5
index 0a356f483e..7515a5c55f 100644
@@ -19,17 +19,12 @@
 #undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT		5000
 
-#define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
 #	define CONFIG_MII_INIT		1
 #	define CONFIG_SYS_DISCOVER_PHY
 #	define CONFIG_SYS_RX_ETH_BUFFER	8
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
 #	define CONFIG_HAS_ETH1
-
-#	define CONFIG_SYS_FEC0_PINMUX	0
-#	define CONFIG_SYS_FEC0_MIIBASE	CONFIG_SYS_FEC0_IOBASE
-#	define MCFFEC_TOUT_LOOP		50000
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #	ifndef CONFIG_SYS_DISCOVER_PHY
 #		define FECDUPLEX	FULL
include/configs/M5235EVB.h +0 -5
index a197c3a853..6d20b0572a 100644
@@ -29,16 +29,11 @@
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
 #	define CONFIG_MII_INIT		1
 #	define CONFIG_SYS_DISCOVER_PHY
 #	define CONFIG_SYS_RX_ETH_BUFFER	8
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-
-#	define CONFIG_SYS_FEC0_PINMUX		0
-#	define CONFIG_SYS_FEC0_MIIBASE		CONFIG_SYS_FEC0_IOBASE
-#	define MCFFEC_TOUT_LOOP		50000
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #	ifndef CONFIG_SYS_DISCOVER_PHY
 #		define FECDUPLEX	FULL
include/configs/M5272C3.h +0 -6
index 9d3bf42974..4ddc9d426c 100644
@@ -49,17 +49,11 @@
 /*
  * Command line configuration.
  */
-
-#define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
 #	define CONFIG_MII_INIT		1
 #	define CONFIG_SYS_DISCOVER_PHY
 #	define CONFIG_SYS_RX_ETH_BUFFER	8
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-
-#	define CONFIG_SYS_FEC0_PINMUX		0
-#	define CONFIG_SYS_FEC0_MIIBASE		CONFIG_SYS_FEC0_IOBASE
-#	define MCFFEC_TOUT_LOOP		50000
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #	ifndef CONFIG_SYS_DISCOVER_PHY
 #		define FECDUPLEX	FULL
include/configs/M5275EVB.h +0 -6
index 682e2e3979..7717c774b9 100644
@@ -48,17 +48,11 @@
 
 /* Available command configuration */
 
-#define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
 #define CONFIG_MII_INIT		1
 #define CONFIG_SYS_DISCOVER_PHY
 #define CONFIG_SYS_RX_ETH_BUFFER	8
 #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-#define CONFIG_SYS_FEC0_PINMUX		0
-#define CONFIG_SYS_FEC0_MIIBASE	CONFIG_SYS_FEC0_IOBASE
-#define CONFIG_SYS_FEC1_PINMUX		0
-#define CONFIG_SYS_FEC1_MIIBASE	CONFIG_SYS_FEC1_IOBASE
-#define MCFFEC_TOUT_LOOP	50000
 #define CONFIG_HAS_ETH1
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #ifndef CONFIG_SYS_DISCOVER_PHY
include/configs/M5282EVB.h +0 -6
index a068726681..667e81f8e0 100644
@@ -41,17 +41,11 @@
 /*
  * Command line configuration.
  */
-
-#define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
 #	define CONFIG_MII_INIT		1
 #	define CONFIG_SYS_DISCOVER_PHY
 #	define CONFIG_SYS_RX_ETH_BUFFER	8
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-
-#	define CONFIG_SYS_FEC0_PINMUX		0
-#	define CONFIG_SYS_FEC0_MIIBASE		CONFIG_SYS_FEC0_IOBASE
-#	define MCFFEC_TOUT_LOOP		50000
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #	ifndef CONFIG_SYS_DISCOVER_PHY
 #		define FECDUPLEX	FULL
include/configs/M53017EVB.h +0 -7
index 39e2748373..b31866b3fe 100644
@@ -26,7 +26,6 @@
 
 #define CONFIG_SYS_UNIFY_CACHE
 
-#define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
 #	define CONFIG_MII_INIT		1
 #	define CONFIG_SYS_DISCOVER_PHY
@@ -36,12 +35,6 @@
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
 #	define CONFIG_HAS_ETH1
 
-#	define CONFIG_SYS_FEC0_PINMUX	0
-#	define CONFIG_SYS_FEC0_MIIBASE	CONFIG_SYS_FEC0_IOBASE
-#	define CONFIG_SYS_FEC1_PINMUX	0
-#	define CONFIG_SYS_FEC1_MIIBASE	CONFIG_SYS_FEC1_IOBASE
-#	define MCFFEC_TOUT_LOOP		50000
-
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #	ifndef CONFIG_SYS_DISCOVER_PHY
 #		define FECDUPLEX	FULL
include/configs/M5329EVB.h +0 -5
index 7a96dd1b71..916d12fc90 100644
@@ -26,16 +26,11 @@
 
 #define CONFIG_SYS_UNIFY_CACHE
 
-#define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
 #	define CONFIG_MII_INIT		1
 #	define CONFIG_SYS_DISCOVER_PHY
 #	define CONFIG_SYS_RX_ETH_BUFFER	8
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-
-#	define CONFIG_SYS_FEC0_PINMUX		0
-#	define CONFIG_SYS_FEC0_MIIBASE		CONFIG_SYS_FEC0_IOBASE
-#	define MCFFEC_TOUT_LOOP		50000
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #	ifndef CONFIG_SYS_DISCOVER_PHY
 #		define FECDUPLEX	FULL
include/configs/M5373EVB.h +0 -5
index f62fb5ac63..83468a55d2 100644
@@ -26,16 +26,11 @@
 
 #define CONFIG_SYS_UNIFY_CACHE
 
-#define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
 #	define CONFIG_MII_INIT		1
 #	define CONFIG_SYS_DISCOVER_PHY
 #	define CONFIG_SYS_RX_ETH_BUFFER	8
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-
-#	define CONFIG_SYS_FEC0_PINMUX		0
-#	define CONFIG_SYS_FEC0_MIIBASE		CONFIG_SYS_FEC0_IOBASE
-#	define MCFFEC_TOUT_LOOP		50000
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #	ifndef CONFIG_SYS_DISCOVER_PHY
 #		define FECDUPLEX	FULL
include/configs/M54418TWR.h +0 -9
index e07684d820..3071f58760 100644
@@ -46,7 +46,6 @@
 #endif
 
 /* Network configuration */
-#define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
 #define CONFIG_MII_INIT		1
 #define CONFIG_SYS_DISCOVER_PHY
@@ -55,14 +54,6 @@
 #define CONFIG_SYS_TX_ETH_BUFFER	2
 #define CONFIG_HAS_ETH1
 
-#define CONFIG_SYS_FEC0_PINMUX		0
-#define CONFIG_SYS_FEC0_MIIBASE	CONFIG_SYS_FEC0_IOBASE
-#define CONFIG_SYS_FEC1_PINMUX		0
-#define CONFIG_SYS_FEC1_MIIBASE	CONFIG_SYS_FEC0_MIIBASE
-#define MCFFEC_TOUT_LOOP		50000
-#define CONFIG_SYS_FEC0_PHYADDR	0
-#define CONFIG_SYS_FEC1_PHYADDR	1
-
 #define CONFIG_ETHPRIME	"FEC0"
 #define CONFIG_IPADDR		192.168.1.2
 #define CONFIG_NETMASK		255.255.255.0
include/configs/M54451EVB.h +0 -6
index 2bd0e62231..baa21933e7 100644
@@ -34,17 +34,11 @@
 #define CONFIG_BOOTP_BOOTFILESIZE
 
 /* Network configuration */
-#define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
 #	define CONFIG_MII_INIT		1
 #	define CONFIG_SYS_DISCOVER_PHY
 #	define CONFIG_SYS_RX_ETH_BUFFER	8
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-
-#	define CONFIG_SYS_FEC0_PINMUX	0
-#	define CONFIG_SYS_FEC0_MIIBASE	CONFIG_SYS_FEC0_IOBASE
-#	define MCFFEC_TOUT_LOOP 50000
-
 #	define CONFIG_ETHPRIME		"FEC0"
 #	define CONFIG_IPADDR		192.162.1.2
 #	define CONFIG_NETMASK		255.255.255.0
include/configs/M54455EVB.h +0 -8
index d73101f96c..92c481e982 100644
@@ -34,20 +34,12 @@
 #define CONFIG_BOOTP_BOOTFILESIZE
 
 /* Network configuration */
-#define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
 #	define CONFIG_MII_INIT		1
 #	define CONFIG_SYS_DISCOVER_PHY
 #	define CONFIG_SYS_RX_ETH_BUFFER	8
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-
-#	define CONFIG_SYS_FEC0_PINMUX	0
-#	define CONFIG_SYS_FEC1_PINMUX	0
-#	define CONFIG_SYS_FEC0_MIIBASE	CONFIG_SYS_FEC0_IOBASE
-#	define CONFIG_SYS_FEC1_MIIBASE	CONFIG_SYS_FEC0_IOBASE
-#	define MCFFEC_TOUT_LOOP 50000
 #	define CONFIG_HAS_ETH1
-
 #	define CONFIG_ETHPRIME		"FEC0"
 #	define CONFIG_IPADDR		192.162.1.2
 #	define CONFIG_NETMASK		255.255.255.0
include/configs/M5475EVB.h +0 -10
index 7cc09ab7cc..69045ebd1b 100644
@@ -26,23 +26,14 @@
 
 #define CONFIG_SLTTMR
 
-#define CONFIG_FSLDMAFEC
 #ifdef CONFIG_FSLDMAFEC
 #	define CONFIG_MII_INIT		1
 #	define CONFIG_HAS_ETH1
-
 #	define CONFIG_SYS_DMA_USE_INTSRAM	1
 #	define CONFIG_SYS_DISCOVER_PHY
 #	define CONFIG_SYS_RX_ETH_BUFFER	32
 #	define CONFIG_SYS_TX_ETH_BUFFER	48
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-
-#	define CONFIG_SYS_FEC0_PINMUX		0
-#	define CONFIG_SYS_FEC0_MIIBASE		CONFIG_SYS_FEC0_IOBASE
-#	define CONFIG_SYS_FEC1_PINMUX		0
-#	define CONFIG_SYS_FEC1_MIIBASE		CONFIG_SYS_FEC0_IOBASE
-
-#	define MCFFEC_TOUT_LOOP		50000
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #	ifndef CONFIG_SYS_DISCOVER_PHY
 #		define FECDUPLEX	FULL
@@ -57,7 +48,6 @@
 #	define CONFIG_NETMASK	255.255.255.0
 #	define CONFIG_SERVERIP	192.162.1.1
 #	define CONFIG_GATEWAYIP	192.162.1.1
-
 #endif
 
 #ifdef CONFIG_CMD_USB
include/configs/M5485EVB.h +0 -10
index 3f5ced28ec..2c2befcfea 100644
@@ -26,23 +26,14 @@
 
 #define CONFIG_SLTTMR
 
-#define CONFIG_FSLDMAFEC
 #ifdef CONFIG_FSLDMAFEC
 #	define CONFIG_MII_INIT		1
 #	define CONFIG_HAS_ETH1
-
 #	define CONFIG_SYS_DMA_USE_INTSRAM	1
 #	define CONFIG_SYS_DISCOVER_PHY
 #	define CONFIG_SYS_RX_ETH_BUFFER	32
 #	define CONFIG_SYS_TX_ETH_BUFFER	48
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-
-#	define CONFIG_SYS_FEC0_PINMUX		0
-#	define CONFIG_SYS_FEC0_MIIBASE		CONFIG_SYS_FEC0_IOBASE
-#	define CONFIG_SYS_FEC1_PINMUX		0
-#	define CONFIG_SYS_FEC1_MIIBASE		CONFIG_SYS_FEC0_IOBASE
-
-#	define MCFFEC_TOUT_LOOP		50000
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #	ifndef CONFIG_SYS_DISCOVER_PHY
 #		define FECDUPLEX	FULL
@@ -57,7 +48,6 @@
 #	define CONFIG_NETMASK	255.255.255.0
 #	define CONFIG_SERVERIP	192.162.1.1
 #	define CONFIG_GATEWAYIP	192.162.1.1
-
 #endif
 
 #ifdef CONFIG_CMD_USB
include/configs/cobra5272.h +0 -10
index 337c875655..f344baa2c0 100644
@@ -32,12 +32,6 @@
 #define CONFIG_SYS_CLK			66000000
 #define CONFIG_SYS_SDRAM_SIZE		16		/* SDRAM size in MB */
 
-/* ---
- * Enable use of Ethernet
- * ---
- */
-#define CONFIG_MCFFEC
-
 /* Enable Dma Timer */
 #define CONFIG_MCFTMR
 
@@ -118,10 +112,6 @@
 #	define CONFIG_SYS_DISCOVER_PHY
 #	define CONFIG_SYS_RX_ETH_BUFFER	8
 #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-
-#	define CONFIG_SYS_FEC0_PINMUX		0
-#	define CONFIG_SYS_FEC0_MIIBASE		CONFIG_SYS_FEC0_IOBASE
-#	define MCFFEC_TOUT_LOOP		50000
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #	ifndef CONFIG_SYS_DISCOVER_PHY
 #		define FECDUPLEX	FULL
include/configs/eb_cpu5282.h +2 -6
index e266e1f542..e32ed41909 100644
@@ -76,17 +76,13 @@
  * Network								*
  *----------------------------------------------------------------------*/
 
-#define CONFIG_MCFFEC
+#ifdef CONFIG_MCFFEC
 #define CONFIG_MII_INIT			1
 #define CONFIG_SYS_DISCOVER_PHY
 #define CONFIG_SYS_RX_ETH_BUFFER	8
 #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-
-#define CONFIG_SYS_FEC0_PINMUX		0
-#define CONFIG_SYS_FEC0_MIIBASE		CONFIG_SYS_FEC0_IOBASE
-#define MCFFEC_TOUT_LOOP		50000
-
 #define CONFIG_OVERWRITE_ETHADDR_ONCE
+#endif
 
 /*-------------------------------------------------------------------------
  * Low Level Configuration Settings
include/configs/stmark2.h +15 -0
index f02c10c59c..df48fd5f68 100644
@@ -169,4 +169,19 @@
 #define CACR_STATUS			(CONFIG_SYS_INIT_RAM_ADDR + \
 					CONFIG_SYS_INIT_RAM_SIZE - 12)
 
+#ifdef CONFIG_MCFFEC
+#define CONFIG_MII_INIT			1
+#define CONFIG_SYS_DISCOVER_PHY
+#define CONFIG_SYS_RX_ETH_BUFFER	8
+#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
+/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
+#ifndef CONFIG_SYS_DISCOVER_PHY
+#define FECDUPLEX			FULL
+#define FECSPEED			_100BASET
+#else
+#ifndef CONFIG_SYS_FAULT_ECHO_LINK_DOWN
+#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
+#endif
+#endif /* CONFIG_SYS_DISCOVER_PHY */
+#endif
 #endif /* __STMARK2_CONFIG_H */
Signature · 1 line
2.24.0
#6 lore raw

PATCH 4/9 configs: purge unneeded fec defines

Quoted 5 lines · Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Remove unneeded fec-related defines after fec moved as dm.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/9f47264b/attachment.sig>
#7 lore raw

PATCH 5/9 m68k: add dm fec support

In reply to Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Add architecture-related code for dm fec support.

---
 arch/m68k/cpu/mcf523x/cpu_init.c     |  2 +-
 arch/m68k/cpu/mcf52x2/cpu_init.c     | 19 ++++---
 arch/m68k/cpu/mcf532x/cpu.c          |  1 -
 arch/m68k/cpu/mcf532x/cpu_init.c     | 21 +++++---
 arch/m68k/cpu/mcf5445x/cpu_init.c    | 16 +++---
 arch/m68k/cpu/mcf547x_8x/cpu_init.c  | 12 +++--
 arch/m68k/include/asm/fec.h          | 21 ++++++--
 arch/m68k/include/asm/fsl_mcdmafec.h | 23 ++++----
 arch/m68k/lib/Makefile               |  1 +
 arch/m68k/lib/fec.c                  | 79 ++++++++++++++++++++++++++++
 10 files changed, 151 insertions(+), 44 deletions(-)
 create mode 100644 arch/m68k/lib/fec.c
arch/m68k/cpu/mcf523x/cpu_init.c +1 -1
index 339fbeb429..a6eff09bf8 100644
@@ -156,7 +156,7 @@ void uart_port_conf(int port)
 }
 
 #if defined(CONFIG_CMD_NET)
-int fecpin_setclear(struct eth_device *dev, int setclear)
+int fecpin_setclear(fec_info_t *info, int setclear)
 {
 	gpio_t *gpio = (gpio_t *) MMAP_GPIO;
 
arch/m68k/cpu/mcf52x2/cpu_init.c +11 -8
index f4a3872667..2aac29d162 100644
@@ -157,7 +157,7 @@ void uart_port_conf(int port)
 }
 
 #if defined(CONFIG_CMD_NET)
-int fecpin_setclear(struct eth_device *dev, int setclear)
+int fecpin_setclear(fec_info_t *info, int setclear)
 {
 	gpio_t *gpio = (gpio_t *) MMAP_GPIO;
 
@@ -304,7 +304,7 @@ void uart_port_conf(int port)
 }
 
 #if defined(CONFIG_CMD_NET)
-int fecpin_setclear(struct eth_device *dev, int setclear)
+int fecpin_setclear(fec_info_t *info, int setclear)
 {
 	if (setclear) {
 		/* Enable Ethernet pins */
@@ -425,7 +425,7 @@ void uart_port_conf(int port)
 }
 
 #if defined(CONFIG_CMD_NET)
-int fecpin_setclear(struct eth_device *dev, int setclear)
+int fecpin_setclear(fec_info_t *info, int setclear)
 {
 	gpio_t *gpio = (gpio_t *) MMAP_GPIO;
 
@@ -508,14 +508,17 @@ void uart_port_conf(int port)
 }
 
 #if defined(CONFIG_CMD_NET)
-int fecpin_setclear(struct eth_device *dev, int setclear)
+int fecpin_setclear(fec_info_t *info, int setclear)
 {
-	struct fec_info_s *info = (struct fec_info_s *) dev->priv;
 	gpio_t *gpio = (gpio_t *)MMAP_GPIO;
+	u32 fec0_base;
+
+	if (fec_get_base_addr(0, &fec0_base))
+		return -1;
 
 	if (setclear) {
 		/* Enable Ethernet pins */
-		if (info->iobase == CONFIG_SYS_FEC0_IOBASE) {
+		if (info->iobase == fec0_base) {
 			setbits_be16(&gpio->par_feci2c, 0x0f00);
 			setbits_8(&gpio->par_fec0hl, 0xc0);
 		} else {
@@ -523,7 +526,7 @@ int fecpin_setclear(struct eth_device *dev, int setclear)
 			setbits_8(&gpio->par_fec1hl, 0xc0);
 		}
 	} else {
-		if (info->iobase == CONFIG_SYS_FEC0_IOBASE) {
+		if (info->iobase == fec0_base) {
 			clrbits_be16(&gpio->par_feci2c, 0x0f00);
 			clrbits_8(&gpio->par_fec0hl, 0xc0);
 		} else {
@@ -643,7 +646,7 @@ void uart_port_conf(int port)
 }
 
 #if defined(CONFIG_CMD_NET)
-int fecpin_setclear(struct eth_device *dev, int setclear)
+int fecpin_setclear(fec_info_t *info, int setclear)
 {
 	if (setclear) {
 		MCFGPIO_PASPAR |= 0x0F00;
arch/m68k/cpu/mcf532x/cpu.c +0 -1
index a01b5e65a7..fdc34dd16f 100644
@@ -145,7 +145,6 @@ int watchdog_init(void)
  * create a board-specific function called:
  * 	int board_eth_init(bd_t *bis)
  */
-
 int cpu_eth_init(bd_t *bis)
 {
 	return mcffec_initialize(bis);
arch/m68k/cpu/mcf532x/cpu_init.c +14 -7
index cbf840f76e..65882bc9d1 100644
@@ -13,7 +13,7 @@
 #include <asm/immap.h>
 #include <asm/io.h>
 
-#if defined(CONFIG_CMD_NET)
+#if defined(CONFIG_MCFFEC)
 #include <config.h>
 #include <net.h>
 #include <asm/fec.h>
@@ -93,6 +93,7 @@ void cpu_init_f(void)
 int cpu_init_r(void)
 {
 #ifdef CONFIG_MCFFEC
+	u32 fec_mii_base0, fec_mii_base1;
 	ccm_t *ccm = (ccm_t *) MMAP_CCM;
 #endif
 #ifdef CONFIG_MCFRTC
@@ -104,7 +105,10 @@ int cpu_init_r(void)
 
 #endif
 #ifdef CONFIG_MCFFEC
-	if (CONFIG_SYS_FEC0_MIIBASE != CONFIG_SYS_FEC1_MIIBASE)
+	fec_get_mii_base(0, &fec_mii_base0);
+	fec_get_mii_base(1, &fec_mii_base1);
+
+	if (fec_mii_base0 != fec_mii_base1)
 		setbits_be16(&ccm->misccr, CCM_MISCCR_FECM);
 	else
 		clrbits_be16(&ccm->misccr, CCM_MISCCR_FECM);
@@ -167,13 +171,16 @@ void uart_port_conf(int port)
 }
 
 #if defined(CONFIG_CMD_NET)
-int fecpin_setclear(struct eth_device *dev, int setclear)
+int fecpin_setclear(fec_info_t *info, int setclear)
 {
 	gpio_t *gpio = (gpio_t *) MMAP_GPIO;
-	struct fec_info_s *info = (struct fec_info_s *)dev->priv;
+	u32 fec0_base;
+
+	if (fec_get_base_addr(0, &fec0_base))
+		return -1;
 
 	if (setclear) {
-		if (info->iobase == CONFIG_SYS_FEC0_IOBASE) {
+		if (info->iobase == fec0_base) {
 			setbits_8(&gpio->par_fec,
 				GPIO_PAR_FEC0_7W_FEC | GPIO_PAR_FEC0_RMII_FEC);
 			setbits_8(&gpio->par_feci2c,
@@ -185,7 +192,7 @@ int fecpin_setclear(struct eth_device *dev, int setclear)
 				GPIO_PAR_FECI2C_MDC1 | GPIO_PAR_FECI2C_MDIO1);
 		}
 	} else {
-		if (info->iobase == CONFIG_SYS_FEC0_IOBASE) {
+		if (info->iobase == fec0_base) {
 			clrbits_8(&gpio->par_fec,
 				GPIO_PAR_FEC0_7W_FEC | GPIO_PAR_FEC0_RMII_FEC);
 			clrbits_8(&gpio->par_feci2c, ~GPIO_PAR_FECI2C_RMII0_UNMASK);
@@ -328,7 +335,7 @@ void uart_port_conf(int port)
 }
 
 #if defined(CONFIG_CMD_NET)
-int fecpin_setclear(struct eth_device *dev, int setclear)
+int fecpin_setclear(fec_info_t *info, int setclear)
 {
 	gpio_t *gpio = (gpio_t *) MMAP_GPIO;
 
arch/m68k/cpu/mcf5445x/cpu_init.c +9 -7
index 134510b00f..76a7a3e475 100644
@@ -401,15 +401,18 @@ void uart_port_conf(int port)
 }
 
 #if defined(CONFIG_CMD_NET)
-int fecpin_setclear(struct eth_device *dev, int setclear)
+int fecpin_setclear(fec_info_t *info, int setclear)
 {
 	gpio_t *gpio = (gpio_t *) MMAP_GPIO;
-#ifdef CONFIG_MCF5445x
-	struct fec_info_s *info = (struct fec_info_s *)dev->priv;
+	u32 fec0_base;
+
+	if (fec_get_base_addr(0, &fec0_base))
+		return -1;
 
+#ifdef CONFIG_MCF5445x
 	if (setclear) {
 #ifdef CONFIG_SYS_FEC_NO_SHARED_PHY
-		if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
+		if (info->iobase == fec0_base)
 			setbits_be16(&gpio->par_feci2c,
 				GPIO_PAR_FECI2C_MDC0_MDC0 |
 				GPIO_PAR_FECI2C_MDIO0_MDIO0);
@@ -422,7 +425,7 @@ int fecpin_setclear(struct eth_device *dev, int setclear)
 			GPIO_PAR_FECI2C_MDC0_MDC0 | GPIO_PAR_FECI2C_MDIO0_MDIO0);
 #endif
 
-		if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
+		if (info->iobase == fec0_base)
 			setbits_8(&gpio->par_fec, GPIO_PAR_FEC_FEC0_RMII_GPIO);
 		else
 			setbits_8(&gpio->par_fec, GPIO_PAR_FEC_FEC1_RMII_ATA);
@@ -430,7 +433,7 @@ int fecpin_setclear(struct eth_device *dev, int setclear)
 		clrbits_be16(&gpio->par_feci2c,
 			GPIO_PAR_FECI2C_MDC0_MDC0 | GPIO_PAR_FECI2C_MDIO0_MDIO0);
 
-		if (info->iobase == CONFIG_SYS_FEC0_IOBASE) {
+		if (info->iobase == fec0_base) {
 #ifdef CONFIG_SYS_FEC_FULL_MII
 			setbits_8(&gpio->par_fec, GPIO_PAR_FEC_FEC0_MII);
 #else
@@ -462,4 +465,3 @@ int fecpin_setclear(struct eth_device *dev, int setclear)
 	return 0;
 }
 #endif
-
arch/m68k/cpu/mcf547x_8x/cpu_init.c +8 -4
index 81ffc6c094..0a83c16c27 100644
@@ -16,6 +16,7 @@
 #if defined(CONFIG_CMD_NET)
 #include <config.h>
 #include <net.h>
+#include <asm/fec.h>
 #include <asm/fsl_mcdmafec.h>
 #endif
 
@@ -123,18 +124,21 @@ void uart_port_conf(int port)
 }
 
 #if defined(CONFIG_CMD_NET)
-int fecpin_setclear(struct eth_device *dev, int setclear)
+int fecpin_setclear(fec_info_t *info, int setclear)
 {
 	gpio_t *gpio = (gpio_t *) MMAP_GPIO;
-	struct fec_info_dma *info = (struct fec_info_dma *)dev->priv;
+	u32 fec0_base;
+
+	if (fec_get_base_addr(0, &fec0_base))
+		return -1;
 
 	if (setclear) {
-		if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
+		if (info->iobase == fec0_base)
 			setbits_be16(&gpio->par_feci2cirq, 0xf000);
 		else
 			setbits_be16(&gpio->par_feci2cirq, 0x0fc0);
 	} else {
-		if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
+		if (info->iobase == fec0_base)
 			clrbits_be16(&gpio->par_feci2cirq, 0xf000);
 		else
 			clrbits_be16(&gpio->par_feci2cirq, 0x0fc0);
arch/m68k/include/asm/fec.h +16 -5
index 5742829c6d..cdb8119d3e 100644
@@ -95,11 +95,12 @@ struct fec_info_s {
 	int phyname_init;
 	cbd_t *rxbd;		/* Rx BD */
 	cbd_t *txbd;		/* Tx BD */
-	uint rxIdx;
-	uint txIdx;
+	uint rx_idx;
+	uint tx_idx;
 	char *txbuf;
 	int initialized;
-	struct fec_info_s *next;
+	int to_loop;
+	struct mii_dev *bus;
 };
 
 #ifdef CONFIG_MCFFEC
@@ -336,12 +337,22 @@ typedef struct fec {
 #define	FEC_RESET_DELAY			100
 #define FEC_RX_TOUT			100
 
-int fecpin_setclear(struct eth_device *dev, int setclear);
+#ifdef CONFIG_MCF547x_8x
+typedef struct fec_info_dma fec_info_t;
+#define FEC_T fecdma_t
+#else
+typedef struct fec_info_s fec_info_t;
+#define FEC_T fec_t
+#endif
+
+int fecpin_setclear(fec_info_t *info, int setclear);
+int mii_discover_phy(fec_info_t *info);
+int fec_get_base_addr(int fec_idx, u32 *fec_iobase);
+int fec_get_mii_base(int fec_idx, u32 *mii_base);
 
 #ifdef CONFIG_SYS_DISCOVER_PHY
 void __mii_init(void);
 uint mii_send(uint mii_cmd);
-int mii_discover_phy(struct eth_device *dev);
 int mcffec_miiphy_read(struct mii_dev *bus, int addr, int devad, int reg);
 int mcffec_miiphy_write(struct mii_dev *bus, int addr, int devad, int reg,
 			u16 value);
arch/m68k/include/asm/fsl_mcdmafec.h +12 -11
index c283ad4a95..de6c548faf 100644
@@ -72,20 +72,21 @@ struct fec_info_dma {
 	int phyname_init;
 	cbd_t *rxbd;		/* Rx BD */
 	cbd_t *txbd;		/* Tx BD */
-	uint rxIdx;
-	uint txIdx;
+	uint rx_idx;
+	uint tx_idx;
 	char *txbuf;
 	int initialized;
 	struct fec_info_dma *next;
-
-	u16 rxTask;		/* DMA receive Task Number */
-	u16 txTask;		/* DMA Transmit Task Number */
-	u16 rxPri;		/* DMA Receive Priority */
-	u16 txPri;		/* DMA Transmit Priority */
-	u16 rxInit;		/* DMA Receive Initiator */
-	u16 txInit;		/* DMA Transmit Initiator */
-	u16 usedTbdIdx;		/* next transmit BD to clean */
-	u16 cleanTbdNum;	/* the number of available transmit BDs */
+	u16 rx_task;		/* DMA receive Task Number */
+	u16 tx_task;		/* DMA Transmit Task Number */
+	u16 rx_pri;		/* DMA Receive Priority */
+	u16 tx_pri;		/* DMA Transmit Priority */
+	u16 rx_init;		/* DMA Receive Initiator */
+	u16 tx_init;		/* DMA Transmit Initiator */
+	u16 used_tbd_idx;	/* next transmit BD to clean */
+	u16 clean_tbd_num;	/* the number of available transmit BDs */
+	int to_loop;
+	struct mii_dev *bus;
 };
 
 /* Bit definitions and macros for IEVENT */
arch/m68k/lib/Makefile +1 -0
index 254a0a3998..a040f40eb8 100644
@@ -12,3 +12,4 @@ obj-y	+= cache.o
 obj-y	+= interrupts.o
 obj-y	+= time.o
 obj-y	+= traps.o
+obj-y   += fec.o
arch/m68k/lib/fec.c new file +79 -0

79 lines not on this page · raw message

Signature · 1 line
2.24.0
#8 lore raw

PATCH 5/9 m68k: add dm fec support

Quoted 5 lines · Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Add architecture-related code for dm fec support.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/99fde3d7/attachment.sig>
#9 lore raw

PATCH 6/9 drivers: net: add mcf fec dm Kconfig support

In reply to Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Add ColdFire fec to Kconfig.

---
 drivers/net/Kconfig | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/net/Kconfig +16 -0
index 4182897d89..4efed81617 100644
@@ -278,6 +278,22 @@ config FTGMAC100
 	  applications.
 
 
+config MCFFEC
+	bool "ColdFire Ethernet Support"
+	depends on DM_ETH
+	select PHYLIB
+	help
+	  This driver supports the network interface units in the
+	  ColdFire family.
+
+config FSLDMAFEC
+        bool "ColdFire DMA Ethernet Support"
+	depends on DM_ETH
+	select PHYLIB
+	help
+	  This driver supports the network interface units in the
+	  ColdFire family.
+
 config MVGBE
 	bool "Marvell Orion5x/Kirkwood network interface support"
 	depends on KIRKWOOD || ORION5X
Signature · 1 line
2.24.0
#10 lore raw

PATCH 6/9 drivers: net: add mcf fec dm Kconfig support

Quoted 5 lines · Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Add ColdFire fec to Kconfig.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/8af0b6f8/attachment.sig>
#11 lore raw

PATCH 7/9 drivers: mcffec: conversion to dm

In reply to Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Full conversion to dm for all boards, legacy code removed.

---
 doc/device-tree-bindings/net/fsl,mcf-fec.txt |  22 +
 drivers/net/mcffec.c                         | 587 +++++++++----------
 2 files changed, 315 insertions(+), 294 deletions(-)
 create mode 100644 doc/device-tree-bindings/net/fsl,mcf-fec.txt
doc/device-tree-bindings/net/fsl,mcf-fec.txt new file +22 -0
new file mode 100644
index 0000000000..39bbaa52f3
@@ -0,0 +1,22 @@
+* Freescale ColdFire FEC ethernet controller
+
+Required properties:
+- compatible: should be "fsl,mcf-fec"
+- reg: address and length of the register set for the device.
+
+Optional properties:
+- mii-base: index of FEC reg area, 0 for FEC0, 1 for FEC1
+- max-speed: max speedm Mbits/sec
+- phy-addr: phy address
+- timeout-loop: integer value for driver loops time out
+
+
+Example:
+
+fec0: ethernet at fc030000 {
+	compatible = "fsl,mcf-fec";
+ 	reg = <0xfc030000 0x400>;
+	mii-base = <0>;
+	phy-addr = <0>;
+	timeout-loop = <5000>;
+};
drivers/net/mcffec.c +293 -294

701 lines not on this page · raw message

Signature · 1 line
2.24.0
#12 lore raw

PATCH 7/9 drivers: mcffec: conversion to dm

Quoted 5 lines · Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Full conversion to dm for all boards, legacy code removed.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/841f35ea/attachment.sig>
#13 lore raw

PATCH 8/9 drivers: fsl_mcdmafec: conversion to dm

In reply to Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Full conversion to dm for all boards, legacy code removed.

---
 .../net/fsl,mcf-dma-fec.txt                   |  35 +
 drivers/net/fsl_mcdmafec.c                    | 691 +++++++++---------
 2 files changed, 389 insertions(+), 337 deletions(-)
 create mode 100644 doc/device-tree-bindings/net/fsl,mcf-dma-fec.txt
doc/device-tree-bindings/net/fsl,mcf-dma-fec.txt new file +35 -0
new file mode 100644
index 0000000000..e237825bac
@@ -0,0 +1,35 @@
+* Freescale ColdFire DMA-FEC ethernet controller
+
+Required properties:
+- compatible: should be "fsl,mcf-dma-fec"
+- reg: address and length of the register set for the device.
+- rx-task: dma channel
+- tx-task: dma channel
+- rx-priority: dma channel
+- tx-priority: dma channel
+- rx-init: dma channel
+- tx-init: dma channel
+
+Optional properties:
+- mii-base: index of FEC reg area, 0 for FEC0, 1 for FEC1
+- max-speed: max speedm Mbits/sec
+- phy-addr: phy address
+- timeout-loop: integer value for driver loops time out
+
+
+Example:
+
+fec0: ethernet at 9000 {
+	compatible = "fsl,mcf-dma-fec";
+ 	reg = <0x9000 0x800>;
+	mii-base = <0>;
+	phy-addr = <0>;
+	timeout-loop = <5000>;
+	rx-task = <0>;
+	tx-task = <1>;
+	rx-piority = <6>;
+	tx-piority = <7>;
+	rx-init = <16>;
+	tx-init = <17>;
+	status = "disabled";
+};
drivers/net/fsl_mcdmafec.c +354 -337

831 lines not on this page · raw message

Signature · 1 line
2.24.0
#14 lore raw

PATCH 8/9 drivers: fsl_mcdmafec: conversion to dm

Quoted 5 lines · Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Full conversion to dm for all boards, legacy code removed.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/2084f35b/attachment.sig>
#15 lore raw

PATCH 9/9 drivers: mcfmii: add dm support

In reply to Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Add specific dm code, but maintaining this driver as is, so more in the shape of a mii library. Can be moved to dm in a further step.

---
 drivers/net/mcfmii.c | 48 +++++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 23 deletions(-)
drivers/net/mcfmii.c +25 -23
index 961618b410..27b7c5149f 100644
@@ -40,14 +40,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #	define CONFIG_SYS_UNSPEC_STRID		0
 #endif
 
-#ifdef CONFIG_MCF547x_8x
-typedef struct fec_info_dma FEC_INFO_T;
-#define FEC_T fecdma_t
-#else
-typedef struct fec_info_s FEC_INFO_T;
-#define FEC_T fec_t
-#endif
-
 typedef struct phy_info_struct {
 	u32 phyid;
 	char *strid;
@@ -77,7 +69,7 @@ phy_info_t phyinfo[] = {
  * mii_init -- Initialize the MII for MII command without ethernet
  * This function is a subset of eth_init
  */
-void mii_reset(FEC_INFO_T *info)
+void mii_reset(fec_info_t *info)
 {
 	volatile FEC_T *fecp = (FEC_T *) (info->miibase);
 	int i;
@@ -94,9 +86,13 @@ void mii_reset(FEC_INFO_T *info)
 /* send command to phy using mii, wait for result */
 uint mii_send(uint mii_cmd)
 {
-	FEC_INFO_T *info;
-	volatile FEC_T *ep;
+#ifdef CONFIG_DM_ETH
+	struct udevice *dev;
+#else
 	struct eth_device *dev;
+#endif
+	fec_info_t *info;
+	volatile FEC_T *ep;
 	uint mii_reply;
 	int j = 0;
 
@@ -109,11 +105,11 @@ uint mii_send(uint mii_cmd)
 	ep->mmfr = mii_cmd;	/* command to phy */
 
 	/* wait for mii complete */
-	while (!(ep->eir & FEC_EIR_MII) && (j < MCFFEC_TOUT_LOOP)) {
+	while (!(ep->eir & FEC_EIR_MII) && (j < info->to_loop)) {
 		udelay(1);
 		j++;
 	}
-	if (j >= MCFFEC_TOUT_LOOP) {
+	if (j >= info->to_loop) {
 		printf("MII not complete\n");
 		return -1;
 	}
@@ -130,10 +126,9 @@ uint mii_send(uint mii_cmd)
 #endif				/* CONFIG_SYS_DISCOVER_PHY || (CONFIG_MII) */
 
 #if defined(CONFIG_SYS_DISCOVER_PHY)
-int mii_discover_phy(struct eth_device *dev)
+int mii_discover_phy(fec_info_t *info)
 {
 #define MAX_PHY_PASSES 11
-	FEC_INFO_T *info = dev->priv;
 	int phyaddr, pass;
 	uint phyno, phytype;
 	int i, found = 0;
@@ -156,7 +151,7 @@ int mii_discover_phy(struct eth_device *dev)
 
 			phytype = mii_send(mk_mii_read(phyno, MII_PHYSID1));
 #ifdef ET_DEBUG
-			printf("PHY type 0x%x pass %d type\n", phytype, pass);
+			printf("PHY type 0x%x pass %d\n", phytype, pass);
 #endif
 			if (phytype == 0xffff)
 				continue;
@@ -206,9 +201,13 @@ void mii_init(void) __attribute__((weak,alias("__mii_init")));
 
 void __mii_init(void)
 {
-	FEC_INFO_T *info;
-	volatile FEC_T *fecp;
+#ifdef CONFIG_DM_ETH
+	struct udevice *dev;
+#else
 	struct eth_device *dev;
+#endif
+	fec_info_t *info;
+	volatile FEC_T *fecp;
 	int miispd = 0, i = 0;
 	u16 status = 0;
 	u16 linkgood = 0;
@@ -219,7 +218,7 @@ void __mii_init(void)
 
 	fecp = (FEC_T *) info->miibase;
 
-	fecpin_setclear(dev, 1);
+	fecpin_setclear(info, 1);
 
 	mii_reset(info);
 
@@ -233,9 +232,13 @@ void __mii_init(void)
 	miispd = (gd->bus_clk / 1000000) / 5;
 	fecp->mscr = miispd << 1;
 
-	info->phy_addr = mii_discover_phy(dev);
+#ifdef CONFIG_SYS_DISCOVER_PHY
+	info->phy_addr = mii_discover_phy(info);
+#endif
+	if (info->phy_addr == -1)
+		return;
 
-	while (i < MCFFEC_TOUT_LOOP) {
+	while (i < info->to_loop) {
 		status = 0;
 		i++;
 		/* Read PHY control register */
@@ -256,9 +259,8 @@ void __mii_init(void)
 
 		udelay(1);
 	}
-	if (i >= MCFFEC_TOUT_LOOP) {
+	if (i >= info->to_loop)
 		printf("Link UP timeout\n");
-	}
 
 	/* adapt to the duplex and speed settings of the phy */
 	info->dup_spd = miiphy_duplex(dev->name, info->phy_addr) << 16;
Signature · 1 line
2.24.0
#16 lore raw

PATCH 9/9 drivers: mcfmii: add dm support

Quoted 6 lines · Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Add specific dm code, but maintaining this driver as is, so more in the shape of a mii library. Can be moved to dm in a further step.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/9455e1fb/attachment.sig>
#17 lore raw

PATCH 1/9 m68k: add fec base node to devicetrees

In reply to Angelo Dureghello
Quoted 6 lines · Angelo Dureghello

From: Angelo Durgehello <[email protected]>

Add basic ethernet controller devicetree nodes for all ColdFire families.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/84795089/attachment.sig>