diff options
Diffstat (limited to 'cpu/mcf523x')
-rw-r--r-- | cpu/mcf523x/cpu.c | 4 | ||||
-rw-r--r-- | cpu/mcf523x/cpu_init.c | 24 |
2 files changed, 25 insertions, 3 deletions
diff --git a/cpu/mcf523x/cpu.c b/cpu/mcf523x/cpu.c index b9e48aa433..a1a51336c2 100644 --- a/cpu/mcf523x/cpu.c +++ b/cpu/mcf523x/cpu.c @@ -65,8 +65,8 @@ int checkcpu(void) printf("Freescale MCF%d (Mask:%01x Version:%x)\n", id, msk, ver); printf(" CPU CLK %s MHz BUS CLK %s MHz\n", - strmhz(buf1, gd->cpu_clk)), - strmhz(buf2, gd->bus_clk))); + strmhz(buf1, gd->cpu_clk), + strmhz(buf2, gd->bus_clk)); } return 0; diff --git a/cpu/mcf523x/cpu_init.c b/cpu/mcf523x/cpu_init.c index 652094485e..3c04fd4134 100644 --- a/cpu/mcf523x/cpu_init.c +++ b/cpu/mcf523x/cpu_init.c @@ -27,9 +27,14 @@ #include <common.h> #include <watchdog.h> - #include <asm/immap.h> +#if defined(CONFIG_CMD_NET) +#include <config.h> +#include <net.h> +#include <asm/fec.h> +#endif + /* * Breath some life into the CPU... * @@ -143,3 +148,20 @@ void uart_port_conf(void) break; } } + +#if defined(CONFIG_CMD_NET) +int fecpin_setclear(struct eth_device *dev, int setclear) +{ + volatile gpio_t *gpio = (gpio_t *) MMAP_GPIO; + + if (setclear) { + gpio->par_feci2c |= + (GPIO_PAR_FECI2C_EMDC_FECEMDC | GPIO_PAR_FECI2C_EMDIO_FECEMDIO); + } else { + gpio->par_feci2c &= + ~(GPIO_PAR_FECI2C_EMDC_MASK | GPIO_PAR_FECI2C_EMDIO_MASK); + } + + return 0; +} +#endif |