* [PATCH V2] sama5d3x: fix AT91_SMC_CS offset stride
@ 2014-05-29 12:44 Matteo Fortini
2014-06-02 6:55 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Matteo Fortini @ 2014-05-29 12:44 UTC (permalink / raw)
To: barebox
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>
---
arch/arm/mach-at91/sam9_smc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c
index a137da4..6dd3797 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];
--
2.0.0.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH V2] sama5d3x: fix AT91_SMC_CS offset stride
2014-05-29 12:44 [PATCH V2] sama5d3x: fix AT91_SMC_CS offset stride Matteo Fortini
@ 2014-06-02 6:55 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2014-06-02 6:55 UTC (permalink / raw)
To: Matteo Fortini; +Cc: barebox
On Thu, May 29, 2014 at 02:44:39PM +0200, Matteo Fortini wrote:
> 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>
> ---
> arch/arm/mach-at91/sam9_smc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c
> index a137da4..6dd3797 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)
We follow the kernel Coding Style, so operators need whitespaces left
and right of them, so cond ? 0x14 : 0x10. Fixed this while applying.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-02 6:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-29 12:44 [PATCH V2] sama5d3x: fix AT91_SMC_CS offset stride Matteo Fortini
2014-06-02 6:55 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox