diff options
Diffstat (limited to 'arch/arm/mach-at91/board-sam9rlek.c')
-rw-r--r-- | arch/arm/mach-at91/board-sam9rlek.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index 270851864308..9b937ee4815a 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -29,8 +29,9 @@ | |||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/board.h> | 30 | #include <mach/board.h> |
31 | #include <mach/gpio.h> | 31 | #include <mach/gpio.h> |
32 | #include <mach/at91sam9_smc.h> | 32 | #include <mach/at91_shdwc.h> |
33 | 33 | ||
34 | #include "sam9_smc.h" | ||
34 | #include "generic.h" | 35 | #include "generic.h" |
35 | 36 | ||
36 | 37 | ||
@@ -103,9 +104,34 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
103 | .rdy_pin = AT91_PIN_PD17, | 104 | .rdy_pin = AT91_PIN_PD17, |
104 | .enable_pin = AT91_PIN_PB6, | 105 | .enable_pin = AT91_PIN_PB6, |
105 | .partition_info = nand_partitions, | 106 | .partition_info = nand_partitions, |
106 | .bus_width_16 = 0, | ||
107 | }; | 107 | }; |
108 | 108 | ||
109 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
110 | .ncs_read_setup = 0, | ||
111 | .nrd_setup = 1, | ||
112 | .ncs_write_setup = 0, | ||
113 | .nwe_setup = 1, | ||
114 | |||
115 | .ncs_read_pulse = 3, | ||
116 | .nrd_pulse = 3, | ||
117 | .ncs_write_pulse = 3, | ||
118 | .nwe_pulse = 3, | ||
119 | |||
120 | .read_cycle = 5, | ||
121 | .write_cycle = 5, | ||
122 | |||
123 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8, | ||
124 | .tdf_cycles = 2, | ||
125 | }; | ||
126 | |||
127 | static void __init ek_add_device_nand(void) | ||
128 | { | ||
129 | /* configure chip-select 3 (NAND) */ | ||
130 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
131 | |||
132 | at91_add_device_nand(&ek_nand_data); | ||
133 | } | ||
134 | |||
109 | 135 | ||
110 | /* | 136 | /* |
111 | * SPI devices | 137 | * SPI devices |
@@ -188,7 +214,7 @@ static void __init ek_board_init(void) | |||
188 | /* I2C */ | 214 | /* I2C */ |
189 | at91_add_device_i2c(NULL, 0); | 215 | at91_add_device_i2c(NULL, 0); |
190 | /* NAND */ | 216 | /* NAND */ |
191 | at91_add_device_nand(&ek_nand_data); | 217 | ek_add_device_nand(); |
192 | /* SPI */ | 218 | /* SPI */ |
193 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); | 219 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); |
194 | /* MMC */ | 220 | /* MMC */ |