/* 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);
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);
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;
/*-----------------------------------------------------------------------
* 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 */
/*