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-sam9263ek.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-sam9263ek.c')
-rw-r--r-- | arch/arm/mach-at91/board-sam9263ek.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 8354015c6a23..57d52528f224 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -46,7 +46,9 @@ | |||
46 | #include <mach/board.h> | 46 | #include <mach/board.h> |
47 | #include <mach/gpio.h> | 47 | #include <mach/gpio.h> |
48 | #include <mach/at91sam9_smc.h> | 48 | #include <mach/at91sam9_smc.h> |
49 | #include <mach/at91_shdwc.h> | ||
49 | 50 | ||
51 | #include "sam9_smc.h" | ||
50 | #include "generic.h" | 52 | #include "generic.h" |
51 | 53 | ||
52 | 54 | ||
@@ -203,6 +205,38 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
203 | #endif | 205 | #endif |
204 | }; | 206 | }; |
205 | 207 | ||
208 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
209 | .ncs_read_setup = 0, | ||
210 | .nrd_setup = 1, | ||
211 | .ncs_write_setup = 0, | ||
212 | .nwe_setup = 1, | ||
213 | |||
214 | .ncs_read_pulse = 3, | ||
215 | .nrd_pulse = 3, | ||
216 | .ncs_write_pulse = 3, | ||
217 | .nwe_pulse = 3, | ||
218 | |||
219 | .read_cycle = 5, | ||
220 | .write_cycle = 5, | ||
221 | |||
222 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE, | ||
223 | .tdf_cycles = 2, | ||
224 | }; | ||
225 | |||
226 | static void __init ek_add_device_nand(void) | ||
227 | { | ||
228 | /* setup bus-width (8 or 16) */ | ||
229 | if (ek_nand_data.bus_width_16) | ||
230 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | ||
231 | else | ||
232 | ek_nand_smc_config.mode |= AT91_SMC_DBW_8; | ||
233 | |||
234 | /* configure chip-select 3 (NAND) */ | ||
235 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
236 | |||
237 | at91_add_device_nand(&ek_nand_data); | ||
238 | } | ||
239 | |||
206 | 240 | ||
207 | /* | 241 | /* |
208 | * I2C devices | 242 | * I2C devices |
@@ -385,7 +419,7 @@ static void __init ek_board_init(void) | |||
385 | /* Ethernet */ | 419 | /* Ethernet */ |
386 | at91_add_device_eth(&ek_macb_data); | 420 | at91_add_device_eth(&ek_macb_data); |
387 | /* NAND */ | 421 | /* NAND */ |
388 | at91_add_device_nand(&ek_nand_data); | 422 | ek_add_device_nand(); |
389 | /* I2C */ | 423 | /* I2C */ |
390 | at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices)); | 424 | at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices)); |
391 | /* LCD Controller */ | 425 | /* LCD Controller */ |