Commit cc787081 authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by John W. Linville

bcma: add and use constants for the flash windows

Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 360dc31e
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
static struct resource bcma_sflash_resource = { static struct resource bcma_sflash_resource = {
.name = "bcma_sflash", .name = "bcma_sflash",
.start = BCMA_SFLASH, .start = BCMA_SOC_FLASH2,
.end = 0, .end = 0,
.flags = IORESOURCE_MEM | IORESOURCE_READONLY, .flags = IORESOURCE_MEM | IORESOURCE_READONLY,
}; };
...@@ -116,7 +116,7 @@ int bcma_sflash_init(struct bcma_drv_cc *cc) ...@@ -116,7 +116,7 @@ int bcma_sflash_init(struct bcma_drv_cc *cc)
return -ENOTSUPP; return -ENOTSUPP;
} }
sflash->window = BCMA_SFLASH; sflash->window = BCMA_SOC_FLASH2;
sflash->blocksize = e->blocksize; sflash->blocksize = e->blocksize;
sflash->numblocks = e->numblocks; sflash->numblocks = e->numblocks;
sflash->size = sflash->blocksize * sflash->numblocks; sflash->size = sflash->blocksize * sflash->numblocks;
......
...@@ -191,8 +191,8 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore) ...@@ -191,8 +191,8 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
case BCMA_CC_FLASHT_PARA: case BCMA_CC_FLASHT_PARA:
bcma_debug(bus, "Found parallel flash\n"); bcma_debug(bus, "Found parallel flash\n");
bus->drv_cc.pflash.present = true; bus->drv_cc.pflash.present = true;
bus->drv_cc.pflash.window = 0x1c000000; bus->drv_cc.pflash.window = BCMA_SOC_FLASH2;
bus->drv_cc.pflash.window_size = 0x02000000; bus->drv_cc.pflash.window_size = BCMA_SOC_FLASH2_SZ;
if ((bcma_read32(bus->drv_cc.core, BCMA_CC_FLASH_CFG) & if ((bcma_read32(bus->drv_cc.core, BCMA_CC_FLASH_CFG) &
BCMA_CC_FLASH_CFG_DS) == 0) BCMA_CC_FLASH_CFG_DS) == 0)
......
...@@ -85,6 +85,9 @@ ...@@ -85,6 +85,9 @@
* (2 ZettaBytes), high 32 bits * (2 ZettaBytes), high 32 bits
*/ */
#define BCMA_SFLASH 0x1c000000 #define BCMA_SOC_FLASH1 0x1fc00000 /* MIPS Flash Region 1 */
#define BCMA_SOC_FLASH1_SZ 0x00400000 /* MIPS Size of Flash Region 1 */
#define BCMA_SOC_FLASH2 0x1c000000 /* Flash Region 2 (region 1 shadowed here) */
#define BCMA_SOC_FLASH2_SZ 0x02000000 /* Size of Flash Region 2 */
#endif /* LINUX_BCMA_REGS_H_ */ #endif /* LINUX_BCMA_REGS_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment