From: wdenk Date: Tue, 15 Mar 2005 22:56:53 +0000 (+0000) Subject: Update code for TQM8540 board (and 85xx in general): X-Git-Tag: LABEL_2006_03_12_0025~352 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6c9e789e9e47de6146efefa48224b085501bc094;p=oweals%2Fu-boot.git Update code for TQM8540 board (and 85xx in general): - Change the name of the Ethernet driver: MOTO ENET -> ENET - Reformat boot messages - Enable redundant environment - Replace the -O2 optimization flag with -mno-string --- diff --git a/CHANGELOG b/CHANGELOG index c38e5e8f29..1670482a87 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,12 @@ Changes for U-Boot 1.1.3: ====================================================================== +* Update code for TQM8540 board (and 85xx in general): + - Change the name of the Ethernet driver: MOTO ENET -> ENET + - Reformat boot messages + - Enable redundant environment + - Replace the -O2 optimization flag with -mno-string + * Patch by David Brownell, 10 Mar 2005: Restore copyright statements in OHCI drivers. diff --git a/board/tqm8540/tqm8540.c b/board/tqm8540/tqm8540.c index 8e25081aef..ee10d00427 100644 --- a/board/tqm8540/tqm8540.c +++ b/board/tqm8540/tqm8540.c @@ -52,10 +52,10 @@ int checkboard (void) puts ("Board: TQM8540\n"); #ifdef CONFIG_PCI - printf (" PCI1: 32 bit, %d MHz (compiled)\n", + printf ("PCI1: 32 bit, %d MHz (compiled)\n", CONFIG_SYS_CLK_FREQ / 1000000); #else - printf (" PCI1: disabled\n"); + printf ("PCI1: disabled\n"); #endif /* * Initialize local bus. @@ -72,8 +72,6 @@ long int initdram (int board_type) extern long spd_sdram (void); volatile immap_t *immap = (immap_t *) CFG_IMMR; - puts ("Initializing\n"); - #if defined(CONFIG_DDR_DLL) { volatile ccsr_gur_t *gur = &immap->im_gur; @@ -101,7 +99,6 @@ long int initdram (int board_type) ddr_enable_ecc (dram_size); #endif - puts (" DDR: "); return dram_size; } diff --git a/cpu/mpc85xx/config.mk b/cpu/mpc85xx/config.mk index a51527a6bc..1d0b1929cc 100644 --- a/cpu/mpc85xx/config.mk +++ b/cpu/mpc85xx/config.mk @@ -23,4 +23,4 @@ PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float -O2 +PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float -mno-string diff --git a/cpu/mpc85xx/cpu.c b/cpu/mpc85xx/cpu.c index 8eb9317241..fe678dfa63 100644 --- a/cpu/mpc85xx/cpu.c +++ b/cpu/mpc85xx/cpu.c @@ -41,30 +41,12 @@ int checkcpu (void) uint ver; uint major, minor; - puts("Freescale PowerPC\n"); - - pvr = get_pvr(); - ver = PVR_VER(pvr); - major = PVR_MAJ(pvr); - minor = PVR_MIN(pvr); - - printf(" Core: "); - switch (ver) { - case PVR_VER(PVR_85xx): - puts("E500"); - break; - default: - puts("Unknown"); - break; - } - printf(", Version: %d.%d, (0x%08x)\n", major, minor, pvr); - svr = get_svr(); ver = SVR_VER(svr); major = SVR_MAJ(svr); minor = SVR_MIN(svr); - puts(" System: "); + puts("CPU: "); switch (ver) { case SVR_8540: puts("8540"); @@ -84,12 +66,28 @@ int checkcpu (void) } printf(", Version: %d.%d, (0x%08x)\n", major, minor, svr); + pvr = get_pvr(); + ver = PVR_VER(pvr); + major = PVR_MAJ(pvr); + minor = PVR_MIN(pvr); + + printf("Core: "); + switch (ver) { + case PVR_VER(PVR_85xx): + puts("E500"); + break; + default: + puts("Unknown"); + break; + } + printf(", Version: %d.%d, (0x%08x)\n", major, minor, pvr); + get_sys_info(&sysinfo); - puts(" Clocks: "); - printf("CPU:%4lu MHz, ", sysinfo.freqProcessor / 1000000); - printf("CCB:%4lu MHz, ", sysinfo.freqSystemBus / 1000000); - printf("DDR:%4lu MHz, ", sysinfo.freqSystemBus / 2000000); + puts("Clocks Configuration:\n"); + printf(" CPU:%4lu MHz, ", sysinfo.freqProcessor / 1000000); + printf("CCB:%4lu MHz,\n", sysinfo.freqSystemBus / 1000000); + printf(" DDR:%4lu MHz, ", sysinfo.freqSystemBus / 2000000); #if defined(CFG_LBC_LCRR) lcrr = CFG_LBC_LCRR; @@ -106,15 +104,15 @@ int checkcpu (void) printf("LBC:%4lu MHz\n", sysinfo.freqSystemBus / 1000000 / clkdiv); } else { - printf(" LBC: unknown (lcrr: 0x%08x)\n", lcrr); + printf("LBC: unknown (lcrr: 0x%08x)\n", lcrr); } if (ver == SVR_8560) { - printf(" CPM: %lu Mhz\n", + printf("CPM: %lu Mhz\n", sysinfo.freqSystemBus / 1000000); } - puts(" L1 D-cache 32KB, L1 I-cache 32KB enabled.\n"); + puts("L1: D-cache 32 kB enabled\n I-cache 32 kB enabled\n"); return 0; } diff --git a/cpu/mpc85xx/cpu_init.c b/cpu/mpc85xx/cpu_init.c index 3ffd55880f..ee2f79feef 100644 --- a/cpu/mpc85xx/cpu_init.c +++ b/cpu/mpc85xx/cpu_init.c @@ -196,9 +196,9 @@ int cpu_init_r (void) temp = l2cache->l2ctl; asm("msync;isync"); - printf("L2 cache enabled: 256KB\n"); + printf("L2: 256 kB enabled\n"); #else - printf("L2 cache disabled.\n"); + printf("L2: disabled.\n"); #endif return 0; diff --git a/cpu/mpc85xx/tsec.c b/cpu/mpc85xx/tsec.c index de056d918e..992475c6a5 100644 --- a/cpu/mpc85xx/tsec.c +++ b/cpu/mpc85xx/tsec.c @@ -141,7 +141,7 @@ int tsec_initialize(bd_t *bis, int index) priv->phyaddr = tsec_info[index].phyaddr; priv->gigabit = tsec_info[index].gigabit; - sprintf(dev->name, "MOTO ENET%d", index); + sprintf(dev->name, "ENET%d", index); dev->iobase = 0; dev->priv = priv; dev->init = tsec_init; diff --git a/include/configs/TQM8540.h b/include/configs/TQM8540.h index 40d4483800..7d3d60f818 100644 --- a/include/configs/TQM8540.h +++ b/include/configs/TQM8540.h @@ -297,7 +297,7 @@ #define FEC_PHY_ADDR 0 #define FEC_PHYIDX 0 -#define CONFIG_ETHPRIME "MOTO ENET2" +#define CONFIG_ETHPRIME "ENET1" #endif /* CONFIG_TSEC_ENET */ @@ -310,6 +310,8 @@ #define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x20000) #define CFG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ #define CFG_ENV_SIZE 0x2000 + #define CFG_ENV_OFFSET_REDUND (CFG_ENV_OFFSET-CFG_ENV_SECT_SIZE) + #define CFG_ENV_SIZE_REDUND (CFG_ENV_SIZE) #else #define CFG_NO_FLASH 1 /* Flash is not usable now */ #define CFG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */