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-cam60.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-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") |