ARM: at91: make sdram/ddr register base soc independent
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
This commit is contained in:

committed by
Nicolas Ferre

parent
1a269ade22
commit
f363c407b4
@@ -21,6 +21,7 @@
|
||||
#include <mach/board.h>
|
||||
#include <mach/at91rm9200.h>
|
||||
#include <mach/at91rm9200_mc.h>
|
||||
#include <mach/at91_ramc.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
@@ -241,15 +242,15 @@ void __init at91_add_device_cf(struct at91_cf_data *data)
|
||||
data->chipselect = 4; /* can only use EBI ChipSelect 4 */
|
||||
|
||||
/* CF takes over CS4, CS5, CS6 */
|
||||
csa = at91_sys_read(AT91_EBI_CSA);
|
||||
at91_sys_write(AT91_EBI_CSA, csa | AT91_EBI_CS4A_SMC_COMPACTFLASH);
|
||||
csa = at91_ramc_read(0, AT91_EBI_CSA);
|
||||
at91_ramc_write(0, AT91_EBI_CSA, csa | AT91_EBI_CS4A_SMC_COMPACTFLASH);
|
||||
|
||||
/*
|
||||
* Static memory controller timing adjustments.
|
||||
* REVISIT: these timings are in terms of MCK cycles, so
|
||||
* when MCK changes (cpufreq etc) so must these values...
|
||||
*/
|
||||
at91_sys_write(AT91_SMC_CSR(4),
|
||||
at91_ramc_write(0, AT91_SMC_CSR(4),
|
||||
AT91_SMC_ACSS_STD
|
||||
| AT91_SMC_DBW_16
|
||||
| AT91_SMC_BAT
|
||||
@@ -407,11 +408,11 @@ void __init at91_add_device_nand(struct atmel_nand_data *data)
|
||||
return;
|
||||
|
||||
/* enable the address range of CS3 */
|
||||
csa = at91_sys_read(AT91_EBI_CSA);
|
||||
at91_sys_write(AT91_EBI_CSA, csa | AT91_EBI_CS3A_SMC_SMARTMEDIA);
|
||||
csa = at91_ramc_read(0, AT91_EBI_CSA);
|
||||
at91_ramc_write(0, AT91_EBI_CSA, csa | AT91_EBI_CS3A_SMC_SMARTMEDIA);
|
||||
|
||||
/* set the bus interface characteristics */
|
||||
at91_sys_write(AT91_SMC_CSR(3), AT91_SMC_ACSS_STD | AT91_SMC_DBW_8 | AT91_SMC_WSEN
|
||||
at91_ramc_write(0, AT91_SMC_CSR(3), AT91_SMC_ACSS_STD | AT91_SMC_DBW_8 | AT91_SMC_WSEN
|
||||
| AT91_SMC_NWS_(5)
|
||||
| AT91_SMC_TDF_(1)
|
||||
| AT91_SMC_RWSETUP_(0) /* tDS Data Set up Time 30 - ns */
|
||||
|
Reference in New Issue
Block a user