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-sam9rlek.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-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 */ |