X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=arch%2Fm68k%2Fcpu%2Fmcf52x2%2Fcpu_init.c;h=f39fe19baf272009a97031193d4566e7c9bab6af;hb=d96c26040e901a1ab0264a105e61ee9dadbca701;hp=0882c3b8e5b2e0f21fa4f79fde65022beb3ee40c;hpb=326ea986ac150acdc7656d57fca647db80b50158;p=oweals%2Fu-boot.git diff --git a/arch/m68k/cpu/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c index 0882c3b8e5..f39fe19baf 100644 --- a/arch/m68k/cpu/mcf52x2/cpu_init.c +++ b/arch/m68k/cpu/mcf52x2/cpu_init.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2003 * Josef Baumgartner @@ -14,11 +15,10 @@ * * MCF5275 additions * Copyright (C) 2008 Arthur Shipkowski (art@videon-central.com) - * - * SPDX-License-Identifier: GPL-2.0+ */ #include +#include #include #include #include @@ -158,7 +158,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; @@ -305,7 +305,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 */ @@ -318,18 +318,6 @@ int fecpin_setclear(struct eth_device *dev, int setclear) } #endif /* CONFIG_CMD_NET */ -#if defined(CONFIG_CF_QSPI) - -/* Configure PIOs for SIN, SOUT, and SCK */ -void cfspi_port_conf(void) -{ - mbar_writeByte(MCF_GPIO_PAR_QSPI, - MCF_GPIO_PAR_QSPI_SIN_SIN | - MCF_GPIO_PAR_QSPI_SOUT_SOUT | - MCF_GPIO_PAR_QSPI_SCK_SCK); -} -#endif /* CONFIG_CF_QSPI */ - #endif /* CONFIG_M5271 */ #if defined(CONFIG_M5272) @@ -438,7 +426,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; @@ -521,14 +509,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 { @@ -536,7 +527,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 { @@ -656,7 +647,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;