aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-sam9263ek.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/board-sam9263ek.c')
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c36
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
208static 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
226static 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 */