aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-sam9260ek.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/board-sam9260ek.c')
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index b49eb6e4918a..93a0f8b100eb 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -42,7 +42,10 @@
42#include <mach/hardware.h> 42#include <mach/hardware.h>
43#include <mach/board.h> 43#include <mach/board.h>
44#include <mach/gpio.h> 44#include <mach/gpio.h>
45#include <mach/at91sam9_smc.h>
46#include <mach/at91_shdwc.h>
45 47
48#include "sam9_smc.h"
46#include "generic.h" 49#include "generic.h"
47 50
48 51
@@ -195,6 +198,38 @@ static struct atmel_nand_data __initdata ek_nand_data = {
195#endif 198#endif
196}; 199};
197 200
201static struct sam9_smc_config __initdata ek_nand_smc_config = {
202 .ncs_read_setup = 0,
203 .nrd_setup = 1,
204 .ncs_write_setup = 0,
205 .nwe_setup = 1,
206
207 .ncs_read_pulse = 3,
208 .nrd_pulse = 3,
209 .ncs_write_pulse = 3,
210 .nwe_pulse = 3,
211
212 .read_cycle = 5,
213 .write_cycle = 5,
214
215 .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,
216 .tdf_cycles = 2,
217};
218
219static void __init ek_add_device_nand(void)
220{
221 /* setup bus-width (8 or 16) */
222 if (ek_nand_data.bus_width_16)
223 ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
224 else
225 ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
226
227 /* configure chip-select 3 (NAND) */
228 sam9_smc_configure(3, &ek_nand_smc_config);
229
230 at91_add_device_nand(&ek_nand_data);
231}
232
198 233
199/* 234/*
200 * MCI (SD/MMC) 235 * MCI (SD/MMC)
@@ -303,7 +338,7 @@ static void __init ek_board_init(void)
303 /* SPI */ 338 /* SPI */
304 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); 339 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
305 /* NAND */ 340 /* NAND */
306 at91_add_device_nand(&ek_nand_data); 341 ek_add_device_nand();
307 /* Ethernet */ 342 /* Ethernet */
308 at91_add_device_eth(&ek_macb_data); 343 at91_add_device_eth(&ek_macb_data);
309 /* MMC */ 344 /* MMC */