diff options
author | Andrew Victor <linux@maxim.org.za> | 2008-10-06 15:01:00 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-12-01 12:18:10 -0500 |
commit | 461d3b4dcf2b3b92f819b668d16b36a87046fd98 (patch) | |
tree | b4a2f88b992997a5c7d7771f6e9c4376e6489d44 /arch/arm/mach-at91/at91sam9260_devices.c | |
parent | 6781002bec5237ee8ac1e1daeb0ba976e780a884 (diff) |
[ARM] 5288/1: [AT91] Remove SMC configuration from devices.c files
In at91_add_device_nand(), do not configure the Static Memory
controller with specific timing values.
The *_devices.c files are board independent, and the SMC timing values
are specific to the NAND devices that are installed on the board.
The board-specific files are now responsible for configuring the
Static Memory controller (if the don't want to leave it up to a
bootloader).
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/at91sam9260_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9260_devices.c | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 7774d17dde74..fdde1ea21b07 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -313,7 +313,7 @@ static struct platform_device at91sam9260_nand_device = { | |||
313 | 313 | ||
314 | void __init at91_add_device_nand(struct atmel_nand_data *data) | 314 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
315 | { | 315 | { |
316 | unsigned long csa, mode; | 316 | unsigned long csa; |
317 | 317 | ||
318 | if (!data) | 318 | if (!data) |
319 | return; | 319 | return; |
@@ -321,42 +321,6 @@ void __init at91_add_device_nand(struct atmel_nand_data *data) | |||
321 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | 321 | csa = at91_sys_read(AT91_MATRIX_EBICSA); |
322 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA); | 322 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA); |
323 | 323 | ||
324 | if (cpu_is_at91sam9260()) { | ||
325 | /* Timing for sam9260 */ | ||
326 | /* set the bus interface characteristics */ | ||
327 | at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) | ||
328 | | AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0)); | ||
329 | |||
330 | at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) | ||
331 | | AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3)); | ||
332 | |||
333 | at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5)); | ||
334 | |||
335 | if (data->bus_width_16) | ||
336 | mode = AT91_SMC_DBW_16; | ||
337 | else | ||
338 | mode = AT91_SMC_DBW_8; | ||
339 | at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(2)); | ||
340 | } | ||
341 | |||
342 | if (cpu_is_at91sam9g20()) { | ||
343 | /* Timing for sam9g20 */ | ||
344 | /* set the bus interface characteristics */ | ||
345 | at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(2) | AT91_SMC_NCS_WRSETUP_(0) | ||
346 | | AT91_SMC_NRDSETUP_(2) | AT91_SMC_NCS_RDSETUP_(0)); | ||
347 | |||
348 | at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(4) | AT91_SMC_NCS_WRPULSE_(4) | ||
349 | | AT91_SMC_NRDPULSE_(4) | AT91_SMC_NCS_RDPULSE_(4)); | ||
350 | |||
351 | at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7)); | ||
352 | |||
353 | if (data->bus_width_16) | ||
354 | mode = AT91_SMC_DBW_16; | ||
355 | else | ||
356 | mode = AT91_SMC_DBW_8; | ||
357 | at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(3)); | ||
358 | } | ||
359 | |||
360 | /* enable pin */ | 324 | /* enable pin */ |
361 | if (data->enable_pin) | 325 | if (data->enable_pin) |
362 | at91_set_gpio_output(data->enable_pin, 1); | 326 | at91_set_gpio_output(data->enable_pin, 1); |