diff options
author | Deepak Saxena <dsaxena@plexity.net> | 2006-01-05 20:59:29 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-01-05 20:59:29 +0000 |
commit | 54e269ead6e672325866037b0617a72edd1396b9 (patch) | |
tree | 3076c2e0187657daed3054d511b62dc33a4c8f8b /arch/arm/mach-ixp4xx/nas100d-setup.c | |
parent | 2b9ac7c15c0c5c9d6057b9e297dabaebd208ffe8 (diff) | |
download | blackbird-obmc-linux-54e269ead6e672325866037b0617a72edd1396b9.tar.gz blackbird-obmc-linux-54e269ead6e672325866037b0617a72edd1396b9.zip |
[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.c | 6 |
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 = { }; static struct resource nas100d_flash_resource = { - .start = NAS100D_FLASH_BASE, - .end = NAS100D_FLASH_BASE + NAS100D_FLASH_SIZE, .flags = IORESOURCE_MEM, }; @@ -115,6 +113,10 @@ static void __init nas100d_init(void) { ixp4xx_sys_init(); + nas100d_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); + nas100d_flash_resource.end = + IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; + pm_power_off = nas100d_power_off; platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices)); |