summaryrefslogtreecommitdiff
path: root/cpu/mcf547x_8x/cpu_init.c
diff options
context:
space:
mode:
authorTsiChung Liew <Tsi-Chung.Liew@freescale.com>2008-10-21 13:47:54 +0000
committerJohn Rigby <jrigby@freescale.com>2008-11-03 09:45:58 -0700
commitf3962d3f574e5a1cffacd4e9bc48713060a2a314 (patch)
tree5dcca16fdfcc984a4ebdd85f4d25797ad877e0e1 /cpu/mcf547x_8x/cpu_init.c
parent6e80f5aa09f8d41bac50b38dc7488ecd22107802 (diff)
downloadu-boot-imx-f3962d3f574e5a1cffacd4e9bc48713060a2a314.zip
u-boot-imx-f3962d3f574e5a1cffacd4e9bc48713060a2a314.tar.gz
u-boot-imx-f3962d3f574e5a1cffacd4e9bc48713060a2a314.tar.bz2
ColdFire: Relocate FEC's GPIO and mii functions protocols
Place FEC pin assignments in cpu_init.c from platform's mii.c Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Diffstat (limited to 'cpu/mcf547x_8x/cpu_init.c')
-rw-r--r--cpu/mcf547x_8x/cpu_init.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/cpu/mcf547x_8x/cpu_init.c b/cpu/mcf547x_8x/cpu_init.c
index 9a0e040..1ba5783 100644
--- a/cpu/mcf547x_8x/cpu_init.c
+++ b/cpu/mcf547x_8x/cpu_init.c
@@ -29,6 +29,12 @@
#include <MCD_dma.h>
#include <asm/immap.h>
+#if defined(CONFIG_CMD_NET)
+#include <config.h>
+#include <net.h>
+#include <asm/fsl_mcdmafec.h>
+#endif
+
/*
* Breath some life into the CPU...
*
@@ -130,3 +136,24 @@ void uart_port_conf(void)
*pscsicr &= 0xF8;
}
+
+#if defined(CONFIG_CMD_NET)
+int fecpin_setclear(struct eth_device *dev, int setclear)
+{
+ volatile gpio_t *gpio = (gpio_t *) MMAP_GPIO;
+ struct fec_info_dma *info = (struct fec_info_dma *)dev->priv;
+
+ if (setclear) {
+ if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
+ gpio->par_feci2cirq |= 0xF000;
+ else
+ gpio->par_feci2cirq |= 0x0FC0;
+ } else {
+ if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
+ gpio->par_feci2cirq &= 0x0FFF;
+ else
+ gpio->par_feci2cirq &= 0xF03F;
+ }
+ return 0;
+}
+#endif