diff options
author | Matteo Fortini <matteo.fortini@gmail.com> | 2014-05-29 14:44:39 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-06-02 08:53:53 +0200 |
commit | dc2dacd2610ae541bd63124ef0fad5ea9a2148ba (patch) | |
tree | fb3c756ee32678d6328f4c51c69203a4becde6ba /arch | |
parent | d4d9fc125f51996824c1e8d1a446a8801aef5b05 (diff) | |
download | barebox-dc2dacd2610ae541bd63124ef0fad5ea9a2148ba.tar.gz barebox-dc2dacd2610ae541bd63124ef0fad5ea9a2148ba.tar.xz |
sama5d3x: fix AT91_SMC_CS offset stride
As stated in section 29.19.32 of SAMA5D3 Series datasheet, to move
from CS(n) to CS(n+1) the stride is 0x14 and not 0x10 as in the
other AT91 CPUs
Signed-off-by: Matteo Fortini <matteo.fortini@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-at91/sam9_smc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c index a137da4266..c7bfdfda63 100644 --- a/arch/arm/mach-at91/sam9_smc.c +++ b/arch/arm/mach-at91/sam9_smc.c @@ -12,11 +12,13 @@ #include <init.h> #include <io.h> #include <mach/hardware.h> +#include <mach/cpu.h> #include <mach/io.h> #include <mach/at91sam9_smc.h> -#define AT91_SMC_CS(id, n) (smc_base_addr[id] + ((n) * 0x10)) +#define AT91_SMC_CS_STRIDE ((at91_soc_initdata.type == AT91_SOC_SAMA5D3) ? 0x14 : 0x10) +#define AT91_SMC_CS(id, n) (smc_base_addr[id] + ((n) * AT91_SMC_CS_STRIDE)) static void __iomem *smc_base_addr[2]; |