X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=board%2Ftotal5200%2Ftotal5200.c;h=345a186b2ec280bf77918d863de7bc29d0cd0e48;hb=c0bb110b695130866838518e680bdd5473e47928;hp=1ae24c4f3a3b250a1a0974c406def5a91d28a5a8;hpb=a07351fdbad1a92746d75a195eaef25d146c7f87;p=karo-tx-uboot.git diff --git a/board/total5200/total5200.c b/board/total5200/total5200.c index 1ae24c4f3a..345a186b2e 100644 --- a/board/total5200/total5200.c +++ b/board/total5200/total5200.c @@ -5,28 +5,13 @@ * (C) Copyright 2004 * Mark Jonas, Freescale Semiconductor, mark.jonas@freescale.com. * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #include #include #include +#include #include "sdram.h" @@ -46,58 +31,35 @@ phys_size_t initdram (int board_type) sdram_conf.control = SDRAM_CONTROL; sdram_conf.config1 = SDRAM_CONFIG1; sdram_conf.config2 = SDRAM_CONFIG2; -#if defined(CONFIG_MPC5200) sdram_conf.tapdelay = 0; -#endif -#if defined(CONFIG_MGT5100) - sdram_conf.addrsel = SDRAM_ADDRSEL; -#endif return mpc5xxx_sdram_init (&sdram_conf); } int checkboard (void) { -#if defined(CONFIG_MPC5200) #if CONFIG_TOTAL5200_REV==2 puts ("Board: Total5200 Rev.2 "); #else puts ("Board: Total5200 "); #endif -#elif defined(CONFIG_MGT5100) - puts ("Board: Total5100 "); -#endif /* * Retrieve FPGA Revision. */ - printf ("(FPGA %08lX)\n", *(vu_long *) (CFG_FPGA_BASE + 0x400)); + printf ("(FPGA %08lX)\n", *(vu_long *) (CONFIG_SYS_FPGA_BASE + 0x400)); /* * Take all peripherals in power-up mode. */ #if CONFIG_TOTAL5200_REV==2 - *(vu_char *) (CFG_CPLD_BASE + 0x46) = 0x70; + *(vu_char *) (CONFIG_SYS_CPLD_BASE + 0x46) = 0x70; #else - *(vu_long *) (CFG_CPLD_BASE + 0x400) = 0x70; + *(vu_long *) (CONFIG_SYS_CPLD_BASE + 0x400) = 0x70; #endif return 0; } -#if defined(CONFIG_MGT5100) -int board_early_init_r(void) -{ - /* - * Now, when we are in RAM, enable CS0 - * because CS_BOOT cannot be written. - */ - *(vu_long *)MPC5XXX_ADDECR &= ~(1 << 25); /* disable CS_BOOT */ - *(vu_long *)MPC5XXX_ADDECR |= (1 << 16); /* enable CS0 */ - - return 0; -} -#endif - #ifdef CONFIG_PCI static struct pci_controller hose; @@ -265,9 +227,7 @@ static const S1D_REGS init_regs [] = void video_get_info_str (int line_number, char *info) { if (line_number == 1) { -#ifdef CONFIG_MGT5100 - strcpy (info, " Total5100"); -#elif CONFIG_TOTAL5200_REV==1 +#if CONFIG_TOTAL5200_REV==1 strcpy (info, " Total5200"); #elif CONFIG_TOTAL5200_REV==2 strcpy (info, " Total5200 Rev.2"); @@ -283,7 +243,7 @@ void video_get_info_str (int line_number, char *info) /* Returns SED13806 base address. First thing called in the driver. */ unsigned int board_video_init (void) { - return CFG_LCD_BASE; + return CONFIG_SYS_LCD_BASE; } /* Called after initializing the SED13806 and before clearing the screen. */ @@ -308,3 +268,9 @@ int board_get_height (void) } #endif /* CONFIG_VIDEO_SED13806 */ + +int board_eth_init(bd_t *bis) +{ + cpu_eth_init(bis); /* Built in FEC comes first */ + return pci_eth_init(bis); +}