diff options
author | Andrew Victor <linux@maxim.org.za> | 2008-10-06 15:05:35 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-12-01 12:18:13 -0500 |
commit | 8cdae51aa951e22bc9134cc94c30d1206c84ea8e (patch) | |
tree | de798de64c11336cef860a2c95c2ab998cec5ec4 /arch/arm/mach-at91/board-sam9-l9260.c | |
parent | 461d3b4dcf2b3b92f819b668d16b36a87046fd98 (diff) |
[ARM] 5289/1: [AT91] Convert boards to use sam9_smc_configure()
Convert the SAM9 and CAP9 board-specific files to make use of the
sam9_smc_configure() method to configure the memory-controller for
external peripherals.
The following boards have been modified:
cam60 : NAND
cap9adk : NAND, NOR
qil-a9260 : NAND
sam9-l9260 : NAND
sam9260ek : NAND
sam9261ek : DM9000 Ethernet, NAND
sam9263 : NAND
sam9g20ek : NAND
sam9rlek : NAND
usb-a9260 : NAND
usb-a9263 .: NAND
Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91/board-sam9-l9260.c')
-rw-r--r-- | arch/arm/mach-at91/board-sam9-l9260.c | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index 99bb4cc23a09..b48346977534 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -38,7 +38,9 @@ | |||
38 | 38 | ||
39 | #include <mach/board.h> | 39 | #include <mach/board.h> |
40 | #include <mach/gpio.h> | 40 | #include <mach/gpio.h> |
41 | #include <mach/at91sam9_smc.h> | ||
41 | 42 | ||
43 | #include "sam9_smc.h" | ||
42 | #include "generic.h" | 44 | #include "generic.h" |
43 | 45 | ||
44 | 46 | ||
@@ -148,13 +150,34 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
148 | .rdy_pin = AT91_PIN_PC13, | 150 | .rdy_pin = AT91_PIN_PC13, |
149 | .enable_pin = AT91_PIN_PC14, | 151 | .enable_pin = AT91_PIN_PC14, |
150 | .partition_info = nand_partitions, | 152 | .partition_info = nand_partitions, |
151 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
152 | .bus_width_16 = 1, | ||
153 | #else | ||
154 | .bus_width_16 = 0, | ||
155 | #endif | ||
156 | }; | 153 | }; |
157 | 154 | ||
155 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
156 | .ncs_read_setup = 0, | ||
157 | .nrd_setup = 1, | ||
158 | .ncs_write_setup = 0, | ||
159 | .nwe_setup = 1, | ||
160 | |||
161 | .ncs_read_pulse = 3, | ||
162 | .nrd_pulse = 3, | ||
163 | .ncs_write_pulse = 3, | ||
164 | .nwe_pulse = 3, | ||
165 | |||
166 | .read_cycle = 5, | ||
167 | .write_cycle = 5, | ||
168 | |||
169 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8, | ||
170 | .tdf_cycles = 2, | ||
171 | }; | ||
172 | |||
173 | static void __init ek_add_device_nand(void) | ||
174 | { | ||
175 | /* configure chip-select 3 (NAND) */ | ||
176 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
177 | |||
178 | at91_add_device_nand(&ek_nand_data); | ||
179 | } | ||
180 | |||
158 | 181 | ||
159 | /* | 182 | /* |
160 | * MCI (SD/MMC) | 183 | * MCI (SD/MMC) |
@@ -178,7 +201,7 @@ static void __init ek_board_init(void) | |||
178 | /* SPI */ | 201 | /* SPI */ |
179 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); | 202 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); |
180 | /* NAND */ | 203 | /* NAND */ |
181 | at91_add_device_nand(&ek_nand_data); | 204 | ek_add_device_nand(); |
182 | /* Ethernet */ | 205 | /* Ethernet */ |
183 | at91_add_device_eth(&ek_macb_data); | 206 | at91_add_device_eth(&ek_macb_data); |
184 | /* MMC */ | 207 | /* MMC */ |