aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/nas100d-setup.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2006-01-05 15:59:29 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-05 15:59:29 -0500
commit54e269ead6e672325866037b0617a72edd1396b9 (patch)
tree3076c2e0187657daed3054d511b62dc33a4c8f8b /arch/arm/mach-ixp4xx/nas100d-setup.c
parent2b9ac7c15c0c5c9d6057b9e297dabaebd208ffe8 (diff)
[ARM] 3226/1: IXP4xx runtime expansion bus window size configuration
Patch from Deepak Saxena The expansion bus on the IXP46x NPU can be configured for either 32MiB or 16MiB windows and changing the configuration causes the base address for each chip select for each region to change. Because of this, we cannot hardcode the physical base as we currently do. This patch checks the expansion bus configuration registers at runtime to determine the appropriate window size. Note that this requires that the bootloader already configured the device sizes appropriately, but I feel that is valid assumption to make as the bootloader must configure and access the flash window, the output display (LCD, LEDs, etc) window, and other expansion bus devices. Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ixp4xx/nas100d-setup.c')
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-setup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
index bde9648e7afc..49998a8bd4e8 100644
--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -26,8 +26,6 @@ static struct flash_platform_data nas100d_flash_data = {
26}; 26};
27 27
28static struct resource nas100d_flash_resource = { 28static struct resource nas100d_flash_resource = {
29 .start = NAS100D_FLASH_BASE,
30 .end = NAS100D_FLASH_BASE + NAS100D_FLASH_SIZE,
31 .flags = IORESOURCE_MEM, 29 .flags = IORESOURCE_MEM,
32}; 30};
33 31
@@ -115,6 +113,10 @@ static void __init nas100d_init(void)
115{ 113{
116 ixp4xx_sys_init(); 114 ixp4xx_sys_init();
117 115
116 nas100d_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
117 nas100d_flash_resource.end =
118 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
119
118 pm_power_off = nas100d_power_off; 120 pm_power_off = nas100d_power_off;
119 121
120 platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices)); 122 platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices));