From: wdenk Date: Wed, 12 Sep 2001 20:42:49 +0000 (+0000) Subject: Add support for AMX860 Flash Expansion Module X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3c6111c6944536c31a2dea21c9f7da4dd88a1554;p=users%2Frw%2Fppcboot.git Add support for AMX860 Flash Expansion Module --- diff --git a/board/westel/amx860/flash.c b/board/westel/amx860/flash.c index 2432ef7..ea2c21f 100644 --- a/board/westel/amx860/flash.c +++ b/board/westel/amx860/flash.c @@ -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; diff --git a/include/config_AMX860.h b/include/config_AMX860.h index 3b904ec..0cce616 100644 --- a/include/config_AMX860.h +++ b/include/config_AMX860.h @@ -156,7 +156,7 @@ /*----------------------------------------------------------------------- * 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) */ @@ -257,7 +257,7 @@ #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 */ /*