|
@@ -26,16 +26,17 @@
|
|
|
*/
|
|
|
#define IXP4XX_EXP_BUS_BASE_PHYS (0x50000000)
|
|
|
|
|
|
-#define IXP4XX_EXP_BUS_CSX_REGION_SIZE (0x01000000)
|
|
|
-
|
|
|
-#define IXP4XX_EXP_BUS_CS0_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x00000000)
|
|
|
-#define IXP4XX_EXP_BUS_CS1_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x01000000)
|
|
|
-#define IXP4XX_EXP_BUS_CS2_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x02000000)
|
|
|
-#define IXP4XX_EXP_BUS_CS3_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x03000000)
|
|
|
-#define IXP4XX_EXP_BUS_CS4_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x04000000)
|
|
|
-#define IXP4XX_EXP_BUS_CS5_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x05000000)
|
|
|
-#define IXP4XX_EXP_BUS_CS6_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x06000000)
|
|
|
-#define IXP4XX_EXP_BUS_CS7_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x07000000)
|
|
|
+/*
|
|
|
+ * The expansion bus on the IXP4xx can be configured for either 16 or
|
|
|
+ * 32MB windows and the CS offset for each region changes based on the
|
|
|
+ * current configuration. This means that we cannot simply hardcode
|
|
|
+ * each offset. ixp4xx_sys_init() looks at the expansion bus configuration
|
|
|
+ * as setup by the bootloader to determine our window size.
|
|
|
+ */
|
|
|
+extern unsigned long ixp4xx_exp_bus_size;
|
|
|
+
|
|
|
+#define IXP4XX_EXP_BUS_BASE(region)\
|
|
|
+ (IXP4XX_EXP_BUS_BASE_PHYS + ((region) * ixp4xx_exp_bus_size))
|
|
|
|
|
|
#define IXP4XX_FLASH_WRITABLE (0x2)
|
|
|
#define IXP4XX_FLASH_DEFAULT (0xbcd23c40)
|