Fix bugs in EEPROM commands introduced by Erik Theisen patch 8.
Fix bug in IP address initialization.
Allow TQM8260 configuration via Makefile target
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
# 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 \
{ 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
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
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 */
/* 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)
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 ();
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);
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;
}
#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 */