summaryrefslogtreecommitdiff
path: root/arch/m68k/cpu/mcf5445x/cpu_init.c
diff options
context:
space:
mode:
authorWolfgang Wegner <w.wegner@astro-kom.de>2010-03-30 19:19:50 +0100
committerTsiChung Liew <tsicliew@gmail.com>2010-05-28 02:15:55 -0500
commitae49099755affc942171a7727c1b12c51d167abf (patch)
treecde68195336a4e1112b32f0535b314ee6c184645 /arch/m68k/cpu/mcf5445x/cpu_init.c
parente9b43cae1a20af13d1baeb13038b3f34905c14b5 (diff)
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>
Diffstat (limited to 'arch/m68k/cpu/mcf5445x/cpu_init.c')
-rw-r--r--arch/m68k/cpu/mcf5445x/cpu_init.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/m68k/cpu/mcf5445x/cpu_init.c b/arch/m68k/cpu/mcf5445x/cpu_init.c
index 259985f06d..e2a1293cac 100644
--- a/arch/m68k/cpu/mcf5445x/cpu_init.c
+++ b/arch/m68k/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;