From: wdenk Date: Tue, 4 Dec 2001 08:57:14 +0000 (+0000) Subject: Add support for new 8260 mask revisions. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=93304110f01bc12c25ef9033534e24708cde7c1c;p=users%2Frw%2Fppcboot.git Add support for new 8260 mask revisions. Fix bugs in EEPROM commands introduced by Erik Theisen patch 8. Fix bug in IP address initialization. Allow TQM8260 configuration via Makefile target --- diff --git a/CHANGELOG b/CHANGELOG index 8dd737e..771578a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -56,6 +56,8 @@ To do: Modifications for 1.1.2: ====================================================================== +* Add new 8260 mask revision support + * Add support for TTTech C2MON board * The Big Rename: renamed 8240 ==> 824x to allow for easier diff --git a/Makefile b/Makefile index 47ead18..e8b10f2 100644 --- a/Makefile +++ b/Makefile @@ -347,13 +347,13 @@ SXNI855T_config: unconfig # All boards can come with 80MHz clock, # but only 855 and 860 boards may come with FEC # and 823 boards may have LCD support -xtract = $(subst _80MHz,,$(subst _LCD,,$(subst _FEC,,$(subst _config,,$1)))) +xtract = $(subst _L2,,$(subst _80MHz,,$(subst _LCD,,$(subst _FEC,,$(subst _config,,$1))))) FPS850L_config \ TQM823L_config \ TQM823L_80MHz_config \ -TQM823L_LCD_config \ -TQM823L_LCD_80MHz_config \ +TQM823L_LCD_config \ +TQM823L_LCD_80MHz_config \ TQM850L_config \ TQM850L_80MHz_config \ TQM855L_config \ @@ -382,7 +382,7 @@ TQM860L_FEC_80MHz_config: unconfig { echo "#define CONFIG_LCD" >>include/config.h ; \ echo "... with LCD display" ; \ } - @echo "#include " >>include/config.h + @echo "#include " >>include/config.h ######################################################################### ## PPC4xx Systems @@ -581,13 +581,22 @@ sbc8260_config: unconfig echo "CPU = mpc8260" >>config.mk ; \ echo "#include " >config.h -TQM8260_config: unconfig - @echo "Configuring for $(@:_config=) Board..." ; \ +TQM8260_config \ +TQM8260_L2_config: unconfig + @echo "Configuring for $(call xtract,$@) Board..." ; \ cd ./include ; \ echo "ARCH = ppc" > config.mk ; \ echo "BOARD = tqm8260" >>config.mk ; \ - echo "CPU = mpc8260" >>config.mk ; \ - echo "#include " >config.h + echo "CPU = mpc8260" >>config.mk ; + @echo "/* Automatically generated - do not edit */" >include/config.h + @if [ "$(findstring _L2_,$@)" ] ; then \ + echo "#define CONFIG_L2_CACHE" >>include/config.h ; \ + echo "... with L2 Cache support (60x Bus Mode)" ; \ + else \ + echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \ + echo "... without L2 Cache support (82xx Bus Mode)" ; \ + fi + @echo "#include " >>include/config.h ######################################################################### ## MPC74xx Systems diff --git a/common/board.c b/common/board.c index 9b8f70e..de3bf8d 100644 --- a/common/board.c +++ b/common/board.c @@ -624,9 +624,6 @@ void board_init_r (bd_t *bd, ulong dest_addr) bd->bi_flashoffset = 0; #endif - /* IP Address */ - bd->bi_ip_addr = getenv_IPaddr ("ipaddr"); - WATCHDOG_RESET(); /* initialize higher level parts of CPU like time base and timers */ @@ -651,6 +648,9 @@ void board_init_r (bd_t *bd, ulong dest_addr) /* relocate environment function pointers etc. */ env_relocate (reloc_off); + /* IP Address */ + bd->bi_ip_addr = getenv_IPaddr ("ipaddr"); + WATCHDOG_RESET(); #if defined(CONFIG_PCI) && !defined(CONFIG_BAB750) diff --git a/common/cmd_eeprom.c b/common/cmd_eeprom.c index ec854b4..0d5f352 100644 --- a/common/cmd_eeprom.c +++ b/common/cmd_eeprom.c @@ -50,18 +50,21 @@ int do_eeprom (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) { const char *const fmt = - "\nEEPROM %s: dev_addr %lx addr %08lx off %04lx count %ld ... "; + "\nEEPROM @0x%lX %s: addr %08lx off %04lx count %ld ... "; #if defined(CFG_I2C_MULTI_EEPROMS) if (argc == 6) { ulong dev_addr = simple_strtoul (argv[2], NULL, 16); + ulong addr = simple_strtoul (argv[3], NULL, 16); + ulong off = simple_strtoul (argv[4], NULL, 16); + ulong cnt = simple_strtoul (argv[5], NULL, 16); #else if (argc == 5) { ulong dev_addr = CFG_DEF_EEPROM_ADDR; + ulong addr = simple_strtoul (argv[2], NULL, 16); + ulong off = simple_strtoul (argv[3], NULL, 16); + ulong cnt = simple_strtoul (argv[4], NULL, 16); #endif /* CFG_I2C_MULTI_EEPROMS */ - ulong addr = simple_strtoul (argv[3], NULL, 16); - ulong off = simple_strtoul (argv[4], NULL, 16); - ulong cnt = simple_strtoul (argv[5], NULL, 16); # ifndef CONFIG_SPI eeprom_init (); @@ -70,16 +73,16 @@ int do_eeprom (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, if (strcmp (argv[1], "read") == 0) { int rcode; - printf (fmt, argv[1], dev_addr, addr, off, cnt); + printf (fmt, dev_addr, argv[1], addr, off, cnt); rcode = eeprom_read (dev_addr, off, (uchar *) addr, cnt); printf ("done\n"); return rcode; - } else if (strcmp (argv[2], "write") == 0) { + } else if (strcmp (argv[1], "write") == 0) { int rcode; - printf (fmt, argv[1], dev_addr, addr, off, cnt); + printf (fmt, dev_addr, argv[1], addr, off, cnt); rcode = eeprom_write (dev_addr, off, (uchar *) addr, cnt); diff --git a/cpu/mpc8260/cpu.c b/cpu/mpc8260/cpu.c index cf4c539..72f43d1 100644 --- a/cpu/mpc8260/cpu.c +++ b/cpu/mpc8260/cpu.c @@ -73,12 +73,14 @@ checkcpu(long clock) k = *((ushort *)&immap->im_dprambase[PROFF_REVNUM]); switch(m) { - case 0x0000: printf("0.2 2J24M"); break; - case 0x0010: printf("A.0 K22A"); break; - case 0x0011: printf("A.1 1K22A-XC"); break; - case 0x0001: printf("B.1 1K23A"); break; - case 0x0021: printf("B.2 2K23A-XC"); break; - case 0x0023: printf("B.3 3K23A"); break; + case 0x0000: printf("0.2 2J24M"); break; + case 0x0010: printf("A.0 K22A"); break; + case 0x0011: printf("A.1 1K22A-XC"); break; + case 0x0001: printf("B.1 1K23A"); break; + case 0x0021: printf("B.2 2K23A-XC"); break; + case 0x0023: printf("B.3 3K23A"); break; + case 0x0024: printf("C.2 6K23A"); break; + case 0x0060: printf("A.0(A) 2K25A"); break; default: printf("unknown [immr=0x%04x,k=0x%04x]", m, k); break; } diff --git a/include/config_TQM8260.h b/include/config_TQM8260.h index 2d0e559..e2d6c13 100644 --- a/include/config_TQM8260.h +++ b/include/config_TQM8260.h @@ -28,29 +28,33 @@ #ifndef __CONFIG_H #define __CONFIG_H +/* + * Imported from global configuration: CONFIG_L2_CACHE + */ + /* * High Level Configuration Options * (easy to change) */ #define CONFIG_MPC8260 1 /* This is a MPC8260 CPU */ -/* #define CONFIG_TQM8260 100 / * ...on a TQM8260 module Rev.100 */ + +#if 0 +#define CONFIG_TQM8260 100 /* ...on a TQM8260 module Rev.100 */ +#else #define CONFIG_TQM8260 200 /* ...on a TQM8260 module Rev.200 */ +#endif /* Define 60x busmode only if your TQM8260 has L2 cache! */ -#if 1 -#define CONFIG_BUSMODE_60x 1 /* bus mode: 60x */ +#ifdef CONFIG_L2_CACHE +# define CONFIG_BUSMODE_60x 1 /* bus mode: 60x */ #else -#undef CONFIG_BUSMODE_60x /* bus mode: 8260 */ +# undef CONFIG_BUSMODE_60x /* bus mode: 8260 */ #endif #define CONFIG_82xx_CONS_SMC1 1 /* console on SMC1 */ -#if 0 -#define CONFIG_BOOTDELAY -1 /* autoboot disabled */ -#else #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ -#endif #define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */