]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Support new configuration of TRAB board with more memory
authorwdenk <wdenk>
Wed, 17 Sep 2003 22:48:07 +0000 (22:48 +0000)
committerwdenk <wdenk>
Wed, 17 Sep 2003 22:48:07 +0000 (22:48 +0000)
Minor cleanup of comments

15 files changed:
CHANGELOG
Makefile
board/trab/auto_update.c
board/trab/config.mk
board/trab/memsetup.S
cpu/arm720t/start.S
cpu/arm920t/start.S
cpu/arm920t/usb_ohci.c
cpu/arm925t/start.S
cpu/arm926ejs/start.S
cpu/at91rm9200/start.S
cpu/pxa/start.S
cpu/sa1100/start.S
include/configs/trab.h
lib_arm/board.c

index 6fa54223c99e9594dc038ea064468cf0fe1440d9..83b5b6ab682f5f65dcba714f7dc1ae2dfc3f7c8a 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,7 +2,8 @@
 Changes for U-Boot 1.0.0:
 ======================================================================
 
-* Add auto-update code for TRAB board using USB memory sticks
+* Add auto-update code for TRAB board using USB memory sticks,
+  support new configuration with more memory
 
 * disable MPC5200 bus pipelining as workaround for bus contention
 
index 7bb6f37b8901c44f7fb673e21ee90bc752ac8564..46d648b4eff6e52f0121b2b0f4dba4f3d855a403 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -796,7 +796,7 @@ shannon_config      :       unconfig
 ## ARM92xT Systems
 #########################################################################
 
-xtract_trab = $(subst _old,,$(subst _config,,$1))
+xtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1))))
 
 omap1510inn_config :   unconfig
        @./mkconfig $(@:_config=) arm arm925t omap1510inn
@@ -811,11 +811,23 @@ smdk2410_config   :       unconfig
        @./mkconfig $(@:_config=) arm arm920t smdk2410
 
 trab_config \
+trab_bigram_config \
+trab_bigflash_config \
 trab_old_config:       unconfig
        @ >include/config.h
+       @[ -z "$(findstring _bigram,$@)" ] || \
+               { echo "#define CONFIG_FLASH_8MB" >>include/config.h ; \
+                 echo "... with 8 MB Flash, 32 MB RAM" ; \
+               }
+       @[ -z "$(findstring _bigflash,$@)" ] || \
+               { echo "#define CONFIG_RAM_16MB" >>include/config.h ; \
+                 echo "... with 16 MB Flash, 16 MB RAM" ; \
+                 echo "TEXT_BASE = 0x0CF00000" >board/trab/config.tmp ; \
+               }
        @[ -z "$(findstring _old,$@)" ] || \
                { echo "#define CONFIG_OLD_VERSION" >>include/config.h ; \
                  echo "... with small memory configuration" ; \
+                 echo "TEXT_BASE = 0x0CF00000" >board/trab/config.tmp ; \
                }
        @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
 
@@ -921,7 +933,7 @@ clean:
        rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
        rm -f tools/env/fw_printenv tools/env/fw_setenv
        rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
-       rm -f board/trab/trab_fkt
+       rm -f board/trab/trab_fkt board/trab/config.tmp
 
 clobber:       clean
        find . -type f \
index 59111852f15b87dc4ccb6b18b9ee5fd7f9576aba..da3b71c77ff73b7dba0b8988382d2473a5a7b5c7 100644 (file)
 /*
  * Check whether a USB memory stick is plugged in.
  * If one is found:
- *     1) try to do an MSDOS ls
- *     2) if preinst.img is found and is not 0 length, load it into
- *             memory and run it (how to check beforehand if it's a
- *             valid HUSH command file?)
- *     3)
- *     4)
- *     5)
- *     6)
- *     7)
- *     8)
- *     9)
- *     10)
- *     11)
- *     12)
+ *     1) if prepare.img ist found load it into memory. If it is
+ *             valid then run it.
+ *     2) if preinst.img is found load it into memory. If it is
+ *             valid then run it. Update the EEPROM.
+ *     3) if firmware.img is found load it into memory. If it is valid,
+ *             burn it into FLASH and update the EEPROM.
+ *     4) if kernel.img is found load it into memory. If it is valid,
+ *             burn it into FLASH and update the EEPROM.
+ *     5) if app.img is found load it into memory. If it is valid,
+ *             burn it into FLASH and update the EEPROM.
+ *     6) if disk.img is found load it into memory. If it is valid,
+ *             burn it into FLASH and update the EEPROM.
+ *     7) if postinst.img is found load it into memory. If it is
+ *             valid then run it. Update the EEPROM.
  */
 
 #undef AU_DEBUG
 #define AU_DISK                "disk.img"
 #define AU_POSTINST    "postinst.img"
 
+struct flash_layout
+{
+       long start;
+       long end;
+};
+
 /* layout of the FLASH. ST = start address, ND = end address. */
-#ifndef CONFIG_OLD_VERSION                     /* 16 MB Flash, 32 MB RAM */
+#ifndef CONFIG_FLASH_8MB                       /* 16 MB Flash, 32 MB RAM */
 #define AU_FL_FIRMWARE_ST      0x00000000
 #define AU_FL_FIRMWARE_ND      0x0009FFFF
 #define AU_FL_VFD_ST           0x000A0000
 #define AU_FL_DISK_ND          0x007DFFFF
 #define AU_FL_VFD_ST           0x007E0000
 #define AU_FL_VFD_ND           0x007FFFFF
-#endif /* CONFIG_OLD_VERSION */
+#endif /* CONFIG_FLASH_8MB */
 
 /* a structure with the offsets to values in the EEPROM */
 struct eeprom_layout
 {
-       unsigned int time;
-       unsigned int size;
-       unsigned int dcrc;
+       int time;
+       int size;
+       int dcrc;
 };
 
 /* layout of the EEPROM - offset from the start. All entries are 32 bit. */
@@ -141,6 +147,15 @@ struct eeprom_layout
 #define AU_EEPROM_DCRC_POSTINST 132
 
 static int au_usb_stor_curr_dev; /* current device */
+
+/* index of each file in the following arrays */
+#define IDX_PREPARE    0
+#define IDX_PREINST    1
+#define IDX_FIRMWARE   2
+#define IDX_KERNEL     3
+#define IDX_APP                4
+#define IDX_DISK       5
+#define IDX_POSTINST   6
 /* max. number of files which could interest us */
 #define AU_MAXFILES 7
 /* pointers to file names */
@@ -157,16 +172,20 @@ struct eeprom_layout auee_off[AU_MAXFILES] = { \
        {AU_EEPROM_TIME_DISK, AU_EEPROM_SIZE_DISK, AU_EEPROM_DCRC_DISK,}, \
        {AU_EEPROM_TIME_POSTINST, AU_EEPROM_SIZE_POSTINST, AU_EEPROM_DCRC_POSTINST,} \
        };
-/* index of each file in the above array */
-#define IDX_PREPARE    0
-#define IDX_PREINST    1
-#define IDX_FIRMWARE   2
-#define IDX_KERNEL     3
-#define IDX_APP                4
-#define IDX_DISK       5
-#define IDX_POSTINST   6
+/* array of flash areas start and end addresses */
+struct flash_layout aufl_layout[AU_MAXFILES - 3] = { \
+       {AU_FL_FIRMWARE_ST, AU_FL_FIRMWARE_ND,}, \
+       {AU_FL_KERNEL_ST, AU_FL_KERNEL_ND,}, \
+       {AU_FL_APP_ST, AU_FL_APP_ND,}, \
+       {AU_FL_DISK_ST, AU_FL_DISK_ND,}, \
+};
+/* convert the index into aufile[] to an index into aufl_layout[] */
+#define FIDX_TO_LIDX(idx) ((idx) - 2)
+
 /* where to load files into memory */
-#define LOAD_ADDR ((unsigned char *)0x0c100000)
+#define LOAD_ADDR ((unsigned char *)0x0C100100)
+/* where to build strings in memory - 256 bytes should be enough */
+#define STRING_ADDR ((char *)0x0C100000)
 /* the disk is the largest image */
 #define MAX_LOADSZ ausize[IDX_DISK]
 
@@ -180,9 +199,9 @@ extern int i2c_write (uchar, uint, int , uchar* , int);
 extern int trab_vfd (ulong);
 extern int transfer_pic(unsigned char, unsigned char *, int, int);
 #endif
-extern int i2c_write_multiple (uchar, uint, int, uchar *, int);
-extern int i2c_read_multiple (uchar, uint, int, uchar *, int);
-
+/* change char* to void* to shutup the compiler */
+extern int i2c_write_multiple (uchar, uint, int, void *, int);
+extern int i2c_read_multiple (uchar, uint, int, void *, int);
 
 int
 au_check_valid(int idx, long nbytes)
@@ -193,6 +212,7 @@ au_check_valid(int idx, long nbytes)
 
        hdr = (image_header_t *)LOAD_ADDR;
        /* check the easy ones first */
+#undef CHECK_VALID_DEBUG
 #ifdef CHECK_VALID_DEBUG
        printf("magic %#x %#x ", ntohl(hdr->ih_magic), IH_MAGIC);
        printf("arch %#x %#x ", hdr->ih_arch, IH_CPU_ARM);
@@ -202,7 +222,7 @@ au_check_valid(int idx, long nbytes)
        if (ntohl(hdr->ih_magic) != IH_MAGIC ||
                hdr->ih_arch != IH_CPU_ARM ||
                nbytes < ntohl(hdr->ih_size)) {
-           printf ("Image %s Bad MAGIC or ARCH or SIZE\n", aufile[idx]);
+           printf ("Image %s bad MAGIC or ARCH or SIZE\n", aufile[idx]);
            return -1;
        }
        /* check the hdr CRC */
@@ -210,7 +230,7 @@ au_check_valid(int idx, long nbytes)
        hdr->ih_hcrc = 0;
 
        if (crc32 (0, (char *)hdr, sizeof(*hdr)) != checksum) {
-           printf ("Image %s Bad Header Checksum\n", aufile[idx]);
+           printf ("Image %s bad header checksum\n", aufile[idx]);
            return -1;
        }
        /* check the data CRC */
@@ -219,28 +239,28 @@ au_check_valid(int idx, long nbytes)
        if (crc32 (0, (char *)(LOAD_ADDR + sizeof(*hdr)), ntohl(hdr->ih_size))
                != checksum)
        {
-           printf ("Image %s Bad Data Checksum\n", aufile[idx]);
+           printf ("Image %s bad data checksum\n", aufile[idx]);
            return -1;
        }
        /* check the type - could do this all in one gigantic if() */
        if ((idx == IDX_FIRMWARE) && (hdr->ih_type != IH_TYPE_FIRMWARE)) {
-           printf ("Image %s Wrong Type\n", aufile[idx]);
+           printf ("Image %s wrong type\n", aufile[idx]);
            return -1;
        }
        if ((idx == IDX_KERNEL) && (hdr->ih_type != IH_TYPE_KERNEL)) {
-           printf ("Image %s Wrong Type\n", aufile[idx]);
+           printf ("Image %s wrong type\n", aufile[idx]);
            return -1;
        }
        if ((idx == IDX_DISK || idx == IDX_APP)
                && (hdr->ih_type != IH_TYPE_RAMDISK))
        {
-           printf ("Image %s Wrong Type\n", aufile[idx]);
+           printf ("Image %s wrong type\n", aufile[idx]);
            return -1;
        }
        if ((idx == IDX_PREPARE || idx == IDX_PREINST || idx == IDX_POSTINST)
                && (hdr->ih_type != IH_TYPE_SCRIPT))
        {
-           printf ("Image %s Wrong Type\n", aufile[idx]);
+           printf ("Image %s wrong type\n", aufile[idx]);
            return -1;
        }
        /* special case for prepare.img */
@@ -272,14 +292,20 @@ buf[0], buf[1], buf[2], buf[3], *((unsigned int *)buf), ntohl(hdr->ih_time));
 #define POWER_OFF (1 << 1)
 
 int
-au_do_update(int idx)
+au_do_update(int idx, long sz)
 {
        image_header_t *hdr;
        char *addr;
+       long start, end;
+       char *strbuf = STRING_ADDR;
+       int off;
+       uint nbytes;
 
        hdr = (image_header_t *)LOAD_ADDR;
+
        /* disable the power switch */
        *CPLD_VFD_BK |= POWER_OFF;
+
        /* execute a script */
        if (hdr->ih_type == IH_TYPE_SCRIPT) {
                addr = (char *)((char *)hdr + sizeof(*hdr) + 8);
@@ -287,6 +313,68 @@ au_do_update(int idx)
                        FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP);
                return 0;
        }
+
+       start = aufl_layout[FIDX_TO_LIDX(idx)].start;
+       end = aufl_layout[FIDX_TO_LIDX(idx)].end;
+
+       /* unprotect the address range */
+       /* this assumes that ONLY the firmware is protected! */
+       if (idx == IDX_FIRMWARE) {
+#undef AU_UPDATE_TEST
+#ifdef AU_UPDATE_TEST
+               /* erase it where Linux goes */
+               start = aufl_layout[1].start;
+               end = aufl_layout[1].end;
+#endif
+               debug ("protect off %lx %lx\n", start, end);
+               sprintf(strbuf, "protect off %lx %lx\n", start, end);
+               parse_string_outer(strbuf,
+                       FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP);
+       }
+
+       /* erase the address range */
+       debug ("erase %lx %lx\n", start, end);
+       sprintf(strbuf, "erase %lx %lx\n", start, end);
+       parse_string_outer(strbuf,
+               FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP);
+
+       /* strip the header - except for the kernel */
+       if (idx == IDX_FIRMWARE || idx == IDX_DISK || idx == IDX_APP) {
+               addr = (char *)((char *)hdr + sizeof(*hdr));
+#ifdef AU_UPDATE_TEST
+               /* copy it to where Linux goes */
+               if (idx == IDX_FIRMWARE)
+                       start = aufl_layout[1].start;
+#endif
+               off = 0;
+               nbytes = ntohl(hdr->ih_size);
+       } else {
+               addr = (char *)hdr;
+               off = sizeof(*hdr);
+               nbytes = sizeof(*hdr) + ntohl(hdr->ih_size);
+       }
+
+       /* copy the data from RAM to FLASH */
+       debug ("cp.b %p %lx %x\n", addr, start, nbytes);
+       sprintf(strbuf, "cp.b %p %lx %x\n", addr, start, nbytes);
+       parse_string_outer(strbuf,
+               FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP);
+
+       /* check the dcrc of the copy */
+       if (crc32 (0, (char *)(start + off), ntohl(hdr->ih_size))
+               != ntohl(hdr->ih_dcrc)) {
+           printf ("Image %s Bad Data Checksum After COPY\n", aufile[idx]);
+           return -1;
+       }
+
+       /* protect the address range */
+       /* this assumes that ONLY the firmware is protected! */
+       if (idx == IDX_FIRMWARE) {
+               printf("protect on %lx %lx\n", start, end);
+               sprintf(strbuf, "protect on %lx %lx\n", start, end);
+               parse_string_outer(strbuf,
+                       FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP);
+       }
        return 0;
 }
 
@@ -294,8 +382,22 @@ int
 au_update_eeprom(int idx)
 {
        image_header_t *hdr;
+       int off;
+       uint32_t val;
 
        hdr = (image_header_t *)LOAD_ADDR;
+       /* write the time field into EEPROM */
+       off = auee_off[idx].time;
+       val = ntohl(hdr->ih_time);
+       i2c_write_multiple(0x54, off, 1, &val, sizeof(val));
+       /* write the size field into EEPROM */
+       off = auee_off[idx].size;
+       val = ntohl(hdr->ih_size);
+       i2c_write_multiple(0x54, off, 1, &val, sizeof(val));
+       /* write the dcrc field into EEPROM */
+       off = auee_off[idx].dcrc;
+       val = ntohl(hdr->ih_dcrc);
+       i2c_write_multiple(0x54, off, 1, &val, sizeof(val));
        /* enable the power switch */
        *CPLD_VFD_BK &= ~POWER_OFF;
        return 0;
@@ -311,9 +413,10 @@ do_auto_update(void)
 {
        block_dev_desc_t *stor_dev;
        long sz;
-       int i, res, bitmap_first;
+       int i, res, bitmap_first, cnt;
        char *env;
 
+#undef ERASE_EEPROM
 #ifdef ERASE_EEPROM
        int arr[18];
        memset(arr, 0, sizeof(arr));
@@ -352,6 +455,7 @@ do_auto_update(void)
        if (file_fat_detectfs() != 0) {
                debug ("file_fat_detectfs failed\n");
        }
+
        /* initialize the array of file names */
        memset(aufile, 0, sizeof(aufile));
        aufile[IDX_PREPARE] = AU_PREPARE;
@@ -404,11 +508,19 @@ do_auto_update(void)
 #endif
                /* this is really not a good idea, but it's what the */
                /* customer wants. */
+               cnt = 0;
                do {
-                       res = au_do_update(i);
+                       res = au_do_update(i, sz);
+#ifdef AU_TEST_ONLY
+                       cnt++;
+               } while (res < 0 && cnt < 3);
+               if (cnt < 3)
+#else
                } while (res < 0);
+#endif
                au_update_eeprom(i);
        }
+       usb_stop();
        return 0;
 }
 #endif /* CONFIG_AUTO_UPDATE */
index 37ed5b1cce475bf8dbd9033cb88a706035ff9603..2cb8edabf227cea66f92d267a18bce97c7a7f9c1 100644 (file)
@@ -8,16 +8,19 @@
 #
 
 #
-# TRAB has 1 bank of 16 MB DRAM
+# TRAB has 1 bank of 16 MB or 32 MB DRAM
 #
 # 0c00'0000 to 0e00'0000
 #
 # Linux-Kernel is expected to be at 0c00'8000, entry 0c00'8000
 #
-# we load ourself to 0cf0'0000
+# we load ourself to 0CF0'0000 / 0DF0'0000
 #
-# download areas is 0c80'0000
+# download areas is 0C80'0000
 #
 
+sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
 
-TEXT_BASE = 0x0cf00000
+ifndef TEXT_BASE
+TEXT_BASE = 0x0DF00000
+endif
index 79145131cfd17bc3cca81fa72b5290bf28112d48..92f7d3ba1bb52ae983e49582ccf1f35dfde1ba0e 100644 (file)
@@ -5,7 +5,7 @@
  *                     Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl)
  *
  * Modified for the TRAB board by
- * (C) Copyright 2002
+ * (C) Copyright 2002-2003
  * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
  *
  * See file CREDITS for list of people who contributed to this
 #define B5_Tacp        0x0
 #define B5_PMC 0x0     /* normal */
 
+#ifndef CONFIG_RAM_16MB                /* 32 MB RAM */
+/* Bank6 */
+#define        B6_MT   0x3     /* SDRAM */
+#define        B6_Trcd 0x1     /* 3clk */
+#define        B6_SCAN 0x1     /* 9 bit */
+
+/* Bank7 */
+#define        B7_MT   0x3     /* SDRAM */
+#define        B7_Trcd 0x1     /* 3clk */
+#define        B7_SCAN 0x1     /* 9 bit */
+#else  /* CONFIG_RAM_16MB      =  16 MB RAM */
 /* Bank6 */
 #define        B6_MT   0x3     /* SDRAM */
 #define        B6_Trcd 0x1     /* 2clk */
 #define        B7_MT   0x3     /* SDRAM */
 #define        B7_Trcd 0x1     /* 2clk */
 #define        B7_SCAN 0x0     /* 8 bit */
+#endif /* CONFIG_RAM_16MB */
 
 /* refresh parameter */
 #define REFEN  0x1     /* enable refresh */
@@ -161,6 +173,10 @@ SMRDATA:
        .word   ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) /* GCS6 */
        .word   ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) /* GCS7 */
        .word   ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT)
+#ifndef CONFIG_RAM_16MB                /* 32 MB RAM */
+       .word   0x10    /* BUSWIDTH=32, SCLK power saving mode, BANKSIZE 32M/32M */
+#else  /* CONFIG_RAM_16MB      =  16 MB RAM */
        .word   0x17    /* BUSWIDTH=32, SCLK power saving mode, BANKSIZE 16M/16M */
+#endif /* CONFIG_RAM_16MB */
        .word   0x30    /* MRSR6, CL=3clk */
        .word   0x30    /* MRSR7 */
index 2ca91d23da9fc6a4bf0198ef48756014918f9a51..fdedc915fb5822481f59481343e142a936bac01a 100644 (file)
@@ -71,9 +71,6 @@ _fiq:                 .word fiq
  *************************************************************************
  */
 
-/*
- * CFG_MEM_END is in the board dependent config-file (configs/config_BOARD.h)
- */
 _TEXT_BASE:
        .word   TEXT_BASE
 
index 9f53b870480c4ae04338da2cce78ff5bb1fb94f4..17c5f86bc367ebb572d36253f92f64dd00b96760 100644 (file)
@@ -72,9 +72,6 @@ _fiq:                 .word fiq
  *************************************************************************
  */
 
-/*
- * CFG_MEM_END is in the board dependent config-file (configs/config_BOARD.h)
- */
 _TEXT_BASE:
        .word   TEXT_BASE
 
index 55af0348dca94d7feebd6ecefda572bb6b2dae83..8d3901ba194bae782d1350a8223682ebc16662dd 100644 (file)
@@ -1199,7 +1199,7 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
        /* ohci_dump_status(&gohci); */
        
        /* allow more time for a BULK device to react - some are slow */
-#define BULK_TO         2000   /* timeout in milliseconds */
+#define BULK_TO         5000   /* timeout in milliseconds */
        if (usb_pipetype (pipe) == PIPE_BULK)
                timeout = BULK_TO;
        else
index e8353f2a647e06cd6928ebbc483596a1571f087a..6dd3012055986883c382e913447e25a704598031 100644 (file)
@@ -81,9 +81,6 @@ _fiq:                 .word fiq
  *************************************************************************
  */
 
-/*
- * CFG_MEM_END is in the board dependent config-file (configs/config_BOARD.h)
- */
 _TEXT_BASE:
        .word   TEXT_BASE
 
index 08b2bbcb21b84f2c586f630f01020ae0c3e5395f..dd26a6bf09354aab19dd649fe6b276c21080230c 100644 (file)
@@ -90,9 +90,6 @@ _fiq:
  *************************************************************************
  */
 
-/*
- * CFG_MEM_END is in the board dependent config-file (configs/config_BOARD.h)
- */
 _TEXT_BASE:
        .word   TEXT_BASE
 
index e955d4388276e8d5c7f3a7636382a4e07243e98b..9fa1461d2d895ba8c60ed07c96a9ec7d4ceedb6c 100644 (file)
@@ -71,9 +71,6 @@ _fiq:                 .word fiq
  *************************************************************************
  */
 
-/*
- * CFG_MEM_END is in the board dependent config-file (configs/config_BOARD.h)
- */
 _TEXT_BASE:
        .word   TEXT_BASE
 
index c2b75da836c3ff45f1d07e653641277ee8b84378..a4254492659eec71e92b8a8b222fe0135b1381f1 100644 (file)
@@ -61,9 +61,6 @@ _fiq:                 .word fiq
  * - jump to second stage
  */
 
-/*
- * CFG_MEM_END is in the board dependent config-file (configs/config_BOARD.h)
- */
 _TEXT_BASE:
        .word   TEXT_BASE
 
index 82f094ae055711f685f157dc50d707ff9914054b..6b4c948913749c186c38f76e72476ec4290e3074 100644 (file)
@@ -73,9 +73,6 @@ _fiq:                 .word fiq
  *************************************************************************
  */
 
-/*
- * CFG_MEM_END is in the board dependent config-file (configs/config_BOARD.h)
- */
 _TEXT_BASE:
        .word   TEXT_BASE
 
index 6884270f298410eadb97fc854c3d5fe390d37f2c..80a4b583806b92b44db5ab4924683a913ceefb0f 100644 (file)
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#ifdef CONFIG_OLD_VERSION              /* Old configuration:           */
+#define        CONFIG_RAM_16MB                 /*      16 MB SDRAM             */
+#define CONFIG_FLASH_8MB               /*       8 MB Flash             */
+#endif
+
 /*
  * If we are developing, we might want to start armboot from ram
  * so we MUST NOT initialize critical regs like mem-timing ...
 #define CONFIG_SERVERIP                192.168.3.1
 #define CONFIG_BOOTCOMMAND     "run flash_nfs"
 
-#ifndef CONFIG_OLD_VERSION     /* current config: 16 MB flash, 32 MB RAM */
+#ifndef CONFIG_FLASH_8MB       /* current config: 16 MB flash */
 #ifdef CFG_HUSH_PARSER
 #define        CONFIG_EXTRA_ENV_SETTINGS       \
        "nfs_args=setenv bootargs root=/dev/nfs rw " \
        "mdm_init2=ATS0=1\0" \
        "mdm_flow_control=rts/cts\0"
 #endif /* CFG_HUSH_PARSER */
-#else          /* CONFIG_OLD_VERSION  => 8 MB flash, 16 MB RAM */
+#else  /* CONFIG_FLASH_8MB      => 8 MB flash */
 #ifdef CFG_HUSH_PARSER
 #define        CONFIG_EXTRA_ENV_SETTINGS       \
        "nfs_args=setenv bootargs root=/dev/nfs rw " \
        "mdm_init2=ATS0=1\0" \
        "mdm_flow_control=rts/cts\0"
 #endif /* CFG_HUSH_PARSER */
-#endif /* CONFIG_OLD_VERSION */
+#endif /* CONFIG_FLASH_8MB */
 
 #if 0  /* disabled for development */
 #define        CONFIG_AUTOBOOT_KEYED           /* Enable password protection   */
  */
 #define CONFIG_NR_DRAM_BANKS   1               /* we have 1 bank of DRAM */
 #define PHYS_SDRAM_1           0x0C000000      /* SDRAM Bank #1 */
-#ifndef CONFIG_OLD_VERSION
+#ifndef CONFIG_RAM_16MB
 #define PHYS_SDRAM_1_SIZE      0x02000000      /* 32 MB */
 #else
 #define PHYS_SDRAM_1_SIZE      0x01000000      /* 16 MB */
  * FLASH and environment organization
  */
 #define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks */
-#ifndef CONFIG_OLD_VERSION
+#ifndef CONFIG_FLASH_8MB
 #define CFG_MAX_FLASH_SECT     128     /* max number of sectors on one chip */
 #else
 #define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip */
 #define        CFG_ENV_IS_IN_FLASH     1
 
 /* Address and size of Primary Environment Sector      */
-#ifndef CONFIG_OLD_VERSION
+#ifndef CONFIG_FLASH_8MB
 #define CFG_ENV_ADDR           (CFG_FLASH_BASE + 0x60000)
 #define CFG_ENV_SIZE           0x4000
 #define CFG_ENV_SECT_SIZE      0x20000
index 93deef714935576b6699487ea7ebad72a635019d..493112d55ed1a35212e82b4b72871e6a8e1e33c2 100644 (file)
@@ -157,7 +157,7 @@ static void display_flash_config (ulong size)
 /*
  * Breath some life into the board...
  *
- * Initialize an SMC for serial comms, and carry out some hardware
+ * Initialize a serial port as console, and carry out some hardware
  * tests.
  *
  * The first part of initialization is running from Flash memory;