diff options
Diffstat (limited to 'arch/arm/mach-at91/board-cam60.c')
-rw-r--r-- | arch/arm/mach-at91/board-cam60.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index cdddca54b938..d3ba29c5d8c8 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -39,7 +39,9 @@ | |||
39 | 39 | ||
40 | #include <mach/board.h> | 40 | #include <mach/board.h> |
41 | #include <mach/gpio.h> | 41 | #include <mach/gpio.h> |
42 | #include <mach/at91sam9_smc.h> | ||
42 | 43 | ||
44 | #include "sam9_smc.h" | ||
43 | #include "generic.h" | 45 | #include "generic.h" |
44 | 46 | ||
45 | 47 | ||
@@ -151,6 +153,32 @@ static struct atmel_nand_data __initdata cam60_nand_data = { | |||
151 | .partition_info = nand_partitions, | 153 | .partition_info = nand_partitions, |
152 | }; | 154 | }; |
153 | 155 | ||
156 | static struct sam9_smc_config __initdata cam60_nand_smc_config = { | ||
157 | .ncs_read_setup = 0, | ||
158 | .nrd_setup = 1, | ||
159 | .ncs_write_setup = 0, | ||
160 | .nwe_setup = 1, | ||
161 | |||
162 | .ncs_read_pulse = 3, | ||
163 | .nrd_pulse = 3, | ||
164 | .ncs_write_pulse = 3, | ||
165 | .nwe_pulse = 3, | ||
166 | |||
167 | .read_cycle = 5, | ||
168 | .write_cycle = 5, | ||
169 | |||
170 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8, | ||
171 | .tdf_cycles = 2, | ||
172 | }; | ||
173 | |||
174 | static void __init cam60_add_device_nand(void) | ||
175 | { | ||
176 | /* configure chip-select 3 (NAND) */ | ||
177 | sam9_smc_configure(3, &cam60_nand_smc_config); | ||
178 | |||
179 | at91_add_device_nand(&cam60_nand_data); | ||
180 | } | ||
181 | |||
154 | 182 | ||
155 | static void __init cam60_board_init(void) | 183 | static void __init cam60_board_init(void) |
156 | { | 184 | { |
@@ -165,7 +193,7 @@ static void __init cam60_board_init(void) | |||
165 | at91_set_gpio_output(AT91_PIN_PB18, 1); | 193 | at91_set_gpio_output(AT91_PIN_PB18, 1); |
166 | at91_add_device_usbh(&cam60_usbh_data); | 194 | at91_add_device_usbh(&cam60_usbh_data); |
167 | /* NAND */ | 195 | /* NAND */ |
168 | at91_add_device_nand(&cam60_nand_data); | 196 | cam60_add_device_nand(); |
169 | } | 197 | } |
170 | 198 | ||
171 | MACHINE_START(CAM60, "KwikByte CAM60") | 199 | MACHINE_START(CAM60, "KwikByte CAM60") |