[U-Boot] [PATCH] add CONFIG_SYS_FEC_NO_SHARED_PHY for MCF5445x

Liew Tsi Chung-R5AAHP r5aahp at freescale.com
Tue Mar 30 19:24:36 CEST 2010


Acked. 

Best Regards,
TsiChung


-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de]
On Behalf Of Wolfgang Wegner
Sent: Tuesday, March 30, 2010 12:20 PM
To: u-boot at lists.denx.de
Cc: Wolfgang Wegner
Subject: [U-Boot] [PATCH] add CONFIG_SYS_FEC_NO_SHARED_PHY for MCF5445x

This patch adds the possibility to handle seperate PHYs to MCF5445x.
Naming is chosen to resemble the contrary CONFIG_FEC_SHARED_PHY in the
linux kernel.

Signed-off-by: Wolfgang Wegner <w.wegner at astro-kom.de>
---
 cpu/mcf5445x/cpu_init.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/cpu/mcf5445x/cpu_init.c b/cpu/mcf5445x/cpu_init.c index
8d51d35..db03296 100644
--- a/cpu/mcf5445x/cpu_init.c
+++ b/cpu/mcf5445x/cpu_init.c
@@ -185,8 +185,19 @@ int fecpin_setclear(struct eth_device *dev, int
setclear)
 	struct fec_info_s *info = (struct fec_info_s *)dev->priv;
 
 	if (setclear) {
+#ifdef CONFIG_SYS_FEC_NO_SHARED_PHY
+		if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
+			gpio->par_feci2c |=
+			    (GPIO_PAR_FECI2C_MDC0_MDC0 |
+			     GPIO_PAR_FECI2C_MDIO0_MDIO0);
+		else
+			gpio->par_feci2c |=
+			    (GPIO_PAR_FECI2C_MDC1_MDC1 |
+			     GPIO_PAR_FECI2C_MDIO1_MDIO1);
+#else
 		gpio->par_feci2c |=
 		    (GPIO_PAR_FECI2C_MDC0_MDC0 |
GPIO_PAR_FECI2C_MDIO0_MDIO0);
+#endif
 
 		if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
 			gpio->par_fec |= GPIO_PAR_FEC_FEC0_RMII_GPIO;
--
1.5.6.5

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot



More information about the U-Boot mailing list