]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
bcma: add and use constants for the flash windows
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 29 Sep 2012 18:33:50 +0000 (20:33 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 19 Oct 2012 19:52:36 +0000 (15:52 -0400)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/bcma/driver_chipcommon_sflash.c
drivers/bcma/driver_mips.c
include/linux/bcma/bcma_regs.h

index 2c4eec2ca5a0784bd50d392a84edc74911a58916..a0993fcd13c2914b6652ecd1784893c806d35bd6 100644 (file)
@@ -12,7 +12,7 @@
 
 static struct resource bcma_sflash_resource = {
        .name   = "bcma_sflash",
-       .start  = BCMA_SFLASH,
+       .start  = BCMA_SOC_FLASH2,
        .end    = 0,
        .flags  = IORESOURCE_MEM | IORESOURCE_READONLY,
 };
@@ -116,7 +116,7 @@ int bcma_sflash_init(struct bcma_drv_cc *cc)
                return -ENOTSUPP;
        }
 
-       sflash->window = BCMA_SFLASH;
+       sflash->window = BCMA_SOC_FLASH2;
        sflash->blocksize = e->blocksize;
        sflash->numblocks = e->numblocks;
        sflash->size = sflash->blocksize * sflash->numblocks;
index c0fb1d45c6db2d453ef764bf6a9191ea279530a8..d8e2fba482e63e011d3487ca44bb9464015abbc3 100644 (file)
@@ -191,8 +191,8 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
        case BCMA_CC_FLASHT_PARA:
                bcma_debug(bus, "Found parallel flash\n");
                bus->drv_cc.pflash.present = true;
-               bus->drv_cc.pflash.window = 0x1c000000;
-               bus->drv_cc.pflash.window_size = 0x02000000;
+               bus->drv_cc.pflash.window = BCMA_SOC_FLASH2;
+               bus->drv_cc.pflash.window_size = BCMA_SOC_FLASH2_SZ;
 
                if ((bcma_read32(bus->drv_cc.core, BCMA_CC_FLASH_CFG) &
                     BCMA_CC_FLASH_CFG_DS) == 0)
index 6c9cb93ae3de4bb3210f5037dbd3865fe18288d3..7e8104bb7a7eb11f412fb504df6552e6595ef40b 100644 (file)
@@ -85,6 +85,9 @@
                                                         * (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_ */