]> www.infradead.org Git - users/rw/ppcboot.git/commitdiff
Add support for AMX860 Flash Expansion Module
authorwdenk <wdenk>
Wed, 12 Sep 2001 20:42:49 +0000 (20:42 +0000)
committerwdenk <wdenk>
Wed, 12 Sep 2001 20:42:49 +0000 (20:42 +0000)
board/westel/amx860/flash.c
include/config_AMX860.h

index 2432ef7fcdc8e73000e01083f6d8c829f66d1417..ea2c21fe9fad20cdc4915dac61b604ca87823d38 100644 (file)
@@ -114,7 +114,7 @@ unsigned long flash_init (void)
 
        /* Remap FLASH according to real size */
        memctl->memc_or0 = (CFG_OR0_PRELIM & ~OR_AM_MSK) | (-size_b0 & OR_AM_MSK);
-       memctl->memc_br0 = CFG_BR0_PRELIM;
+       memctl->memc_br0 = (CFG_FLASH_BASE & BR_BA_MSK) | BR_MS_GPCM | BR_V;
 
        DEBUGF("## BR0: 0x%08x    OR0: 0x%08x\n",
                memctl->memc_br0, memctl->memc_or0);
@@ -145,7 +145,8 @@ unsigned long flash_init (void)
        if (size_b1) {
                memctl->memc_or1 = (CFG_OR1_PRELIM & ~OR_AM_MSK) |
                                   (-size_b1 & OR_AM_MSK);
-               memctl->memc_br1 = CFG_BR1_PRELIM;
+               memctl->memc_br1 = ((CFG_FLASH_BASE + size_b0) & BR_BA_MSK) |
+                                  BR_MS_GPCM | BR_V;
 
                DEBUGF("## BR1: 0x%08x    OR1: 0x%08x\n",
                        memctl->memc_br1, memctl->memc_or1);
@@ -305,7 +306,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
 
        DEBUGF("Manuf. ID @ 0x%08lx: 0x%08lx\n", (ulong)addr, value);
 
-       switch (value /*+ (value << 16)*/ ) {
+       switch (value) {
        case AMD_MANUFACT:
                info->flash_id = FLASH_MAN_AMD;
                break;
index 3b904ecf4cc1266f0c9792fb2f141d5a9f19903b..0cce616f07a29312c504a5558a956862fa2f703c 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
+#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks           */
 #define CFG_MAX_FLASH_SECT     35      /* max number of sectors on one chip    */
 
 #define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
 #define CFG_BR0_PRELIM 0x40000001      /* Real values for the board */
 
 #define CFG_OR1_REMAP  CFG_OR0_REMAP
-#define CFG_OR1_PRELIM 0xFFC00000      /* Real values for the board */
+#define CFG_OR1_PRELIM 0xFFC00954      /* Real values for the board */
 #define CFG_BR1_PRELIM 0x60000001      /* Real values for the board */
 
 /*