* [PATCH 1/1] at91sam9_ddrsdr: fix register on mdr read for ddr size
@ 2013-02-03 12:48 Jean-Christophe PLAGNIOL-VILLARD
2013-02-03 13:49 ` [PATCH v2] at91sam9_ddrsdr: fix register on mdr read and sdram detection " Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 3+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-02-03 12:48 UTC (permalink / raw)
To: barebox
it's currently working by luck
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h b/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h
index 2614f97..f728399 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h
@@ -146,7 +146,7 @@ static inline u32 at91_get_ddram_size(void * __iomem base, bool is_nb)
bool is_sdram;
cr = __raw_readl(base + AT91_DDRSDRC_CR);
- mdr = __raw_readl(base + AT91_DDRSDRC_CR);
+ mdr = __raw_readl(base + AT91_DDRSDRC_MDR);
is_sdram = (mdr & AT91_DDRSDRC_MD) <= AT91_DDRSDRC_MD_LOW_POWER_SDR;
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] at91sam9_ddrsdr: fix register on mdr read and sdram detection for ddr size
2013-02-03 12:48 [PATCH 1/1] at91sam9_ddrsdr: fix register on mdr read for ddr size Jean-Christophe PLAGNIOL-VILLARD
@ 2013-02-03 13:49 ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-04 8:45 ` Sascha Hauer
0 siblings, 1 reply; 3+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-02-03 13:49 UTC (permalink / raw)
To: barebox
it's currently working by luck
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
v2:
2 bug together make it work
Best Regards,
J.
arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h b/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h
index 2614f97..88796a6 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h
@@ -146,7 +146,7 @@ static inline u32 at91_get_ddram_size(void * __iomem base, bool is_nb)
bool is_sdram;
cr = __raw_readl(base + AT91_DDRSDRC_CR);
- mdr = __raw_readl(base + AT91_DDRSDRC_CR);
+ mdr = __raw_readl(base + AT91_DDRSDRC_MDR);
is_sdram = (mdr & AT91_DDRSDRC_MD) <= AT91_DDRSDRC_MD_LOW_POWER_SDR;
@@ -158,7 +158,7 @@ static inline u32 at91_get_ddram_size(void * __iomem base, bool is_nb)
size = 1;
/* COL */
size += (cr & AT91_DDRSDRC_NC) + 8;
- if (is_sdram)
+ if (!is_sdram)
size ++;
/* ROW */
size += ((cr & AT91_DDRSDRC_NR) >> 2) + 11;
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] at91sam9_ddrsdr: fix register on mdr read and sdram detection for ddr size
2013-02-03 13:49 ` [PATCH v2] at91sam9_ddrsdr: fix register on mdr read and sdram detection " Jean-Christophe PLAGNIOL-VILLARD
@ 2013-02-04 8:45 ` Sascha Hauer
0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2013-02-04 8:45 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On Sun, Feb 03, 2013 at 02:49:58PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> it's currently working by luck
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> v2:
> 2 bug together make it work
>
Applied, thanks
Sascha
> Best Regards,
> J.
> arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h b/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h
> index 2614f97..88796a6 100644
> --- a/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h
> +++ b/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h
> @@ -146,7 +146,7 @@ static inline u32 at91_get_ddram_size(void * __iomem base, bool is_nb)
> bool is_sdram;
>
> cr = __raw_readl(base + AT91_DDRSDRC_CR);
> - mdr = __raw_readl(base + AT91_DDRSDRC_CR);
> + mdr = __raw_readl(base + AT91_DDRSDRC_MDR);
>
> is_sdram = (mdr & AT91_DDRSDRC_MD) <= AT91_DDRSDRC_MD_LOW_POWER_SDR;
>
> @@ -158,7 +158,7 @@ static inline u32 at91_get_ddram_size(void * __iomem base, bool is_nb)
> size = 1;
> /* COL */
> size += (cr & AT91_DDRSDRC_NC) + 8;
> - if (is_sdram)
> + if (!is_sdram)
> size ++;
> /* ROW */
> size += ((cr & AT91_DDRSDRC_NR) >> 2) + 11;
> --
> 1.7.10.4
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
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] 3+ messages in thread
end of thread, other threads:[~2013-02-04 8:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-03 12:48 [PATCH 1/1] at91sam9_ddrsdr: fix register on mdr read for ddr size Jean-Christophe PLAGNIOL-VILLARD
2013-02-03 13:49 ` [PATCH v2] at91sam9_ddrsdr: fix register on mdr read and sdram detection " Jean-Christophe PLAGNIOL-VILLARD
2013-02-04 8:45 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox