X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Ftotal5200%2Ftotal5200.c;h=61b5b807af0ea166ead4143b4f8749b170816874;hb=c083e4bab1679814969405dbde9b75b8b97cf850;hp=f32dadf5a2cc1900a89cf233d21932da4ffc0873;hpb=d39b57415838c73fb0a37eca84de3c68ba990586;p=u-boot diff --git a/board/total5200/total5200.c b/board/total5200/total5200.c index f32dadf5a2..61b5b807af 100644 --- a/board/total5200/total5200.c +++ b/board/total5200/total5200.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "sdram.h" @@ -36,7 +37,7 @@ #include "mt48lc16m16a2-75.h" #endif -long int initdram (int board_type) +phys_size_t initdram (int board_type) { sdram_conf_t sdram_conf; @@ -46,58 +47,35 @@ long int 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 %08X)\n", *(vu_long *) (CFG_FPGA_BASE + 0x400)); + /* + * Retrieve FPGA Revision. + */ + printf ("(FPGA %08lX)\n", *(vu_long *) (CONFIG_SYS_FPGA_BASE + 0x400)); -/* - * Take all peripherals in power-up mode. - */ + /* + * 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; @@ -118,7 +96,7 @@ void init_ide_reset (void) { debug ("init_ide_reset\n"); - /* Configure IRDA_1 (PSC6_3) as GPIO output for ATA reset */ + /* Configure IRDA_1 (PSC6_3) as GPIO output for ATA reset */ *(vu_long *) MPC5XXX_GPIO_ENABLE |= GPIO_IRDA_1; *(vu_long *) MPC5XXX_GPIO_DIR |= GPIO_IRDA_1; } @@ -265,9 +243,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 +259,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 +284,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); +}