]> www.infradead.org Git - users/rw/ppcboot.git/commitdiff
Add support for new 8260 mask revisions.
authorwdenk <wdenk>
Tue, 4 Dec 2001 08:57:14 +0000 (08:57 +0000)
committerwdenk <wdenk>
Tue, 4 Dec 2001 08:57:14 +0000 (08:57 +0000)
Fix bugs in EEPROM commands introduced by Erik Theisen patch 8.
Fix bug in IP address initialization.
Allow TQM8260 configuration via Makefile target

CHANGELOG
Makefile
common/board.c
common/cmd_eeprom.c
cpu/mpc8260/cpu.c
include/config_TQM8260.h

index 8dd737e7d203025a888fdd07a106b8852e0c217f..771578a3adc48c718d4b4229fe95781856de9bab 100644 (file)
--- 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
index 47ead18f7dc2b2e77735b9c6dfb97111eb3b2a1d..e8b10f221d0cad002548c75c3b52356acda55e75 100644 (file)
--- 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 <config_$(call xtract,$@).h>"           >>include/config.h
+       @echo "#include <config_$(call xtract,$@).h>"   >>include/config.h
 
 #########################################################################
 ## PPC4xx Systems
@@ -581,13 +581,22 @@ sbc8260_config:   unconfig
        echo "CPU   = mpc8260"  >>config.mk ;   \
        echo "#include <config_$(@:_config=).h>" >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_$(@:_config=).h>" >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 <config_$(call xtract,$@).h>"   >>include/config.h
 
 #########################################################################
 ## MPC74xx Systems
index 9b8f70e1243b8bce1a70fdbab63b043a7f25fb1a..de3bf8d36de687ad16898912bc54281bb3037f23 100644 (file)
@@ -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)
index ec854b4f4c138fc0b21d2085e0a6d0b77857c92d..0d5f3523f598cce977a111f8073485c2fde7c85b 100644 (file)
@@ -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);
 
index cf4c5391f2d858cb1fc9790a62d02c096b0e93b5..72f43d1ddd1915a644f7c833da089f3e02e421b5 100644 (file)
@@ -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;
   }
 
index 2d0e559ee9789628f43772f83b5b8b5ab9a5352d..e2d6c13affa81dc01e145d92b29c2251e62b717b 100644 (file)
 #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 */