mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/4] ARM: at91: remove duplicate get_ddram_size code
Date: Sun, 24 Feb 2019 13:35:29 +0100	[thread overview]
Message-ID: <20190224123529.GA19669@ravnborg.org> (raw)
In-Reply-To: <20190219120612.728-5-a.fatoum@pengutronix.de>

Hi Ahmad.

On Tue, Feb 19, 2019 at 01:06:12PM +0100, Ahmad Fatoum wrote:
> Both at91_get_ddram_size and at91sama5_get_ddram_size are the
> same if is_sdram == false and is_nb == true.
> 
> is_sdram is always false, because according to the sama5d{2,3,4}
> datasheets, the lowest possible value for AT91_DDRSDRC_MD is 3
> (i.e. none of them supports SDR SDRAM).
> 
> Therefore have at91sama5_get_ddram_size call at91_get_ddram_size
> with is_nb == true and remove the duplicate code.

This patch breaks the build of sama5d4_xplained and sama5d4ek.
The root cause is the use of wrong definitions.
Following patch fixes this:

If you apply this patch before the offending patch you
can add my:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Sam Ravnborg <sam@ravnborg.org>

For all patches in this series.

	Sam

From 050e9fa72d67e5f5c6cb4b95c18d52e4c3e31625 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Sun, 24 Feb 2019 13:31:08 +0100
Subject: [PATCH 1/3] arm: sama5d4: fix stack setup

The code that configure the stack uses sama5d3 constants.
Fix this to use the proper sama5d4 constants.

Boot tested on sama5d4_xplained.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 arch/arm/boards/sama5d4_xplained/lowlevel.c | 2 +-
 arch/arm/boards/sama5d4ek/lowlevel.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/sama5d4_xplained/lowlevel.c b/arch/arm/boards/sama5d4_xplained/lowlevel.c
index b791f2a03..d4d27d2ec 100644
--- a/arch/arm/boards/sama5d4_xplained/lowlevel.c
+++ b/arch/arm/boards/sama5d4_xplained/lowlevel.c
@@ -17,7 +17,7 @@ void __naked __bare_init barebox_arm_reset_vector(void)
 {
 	arm_cpu_lowlevel_init();
 
-	arm_setup_stack(SAMA5D3_SRAM_BASE + SAMA5D3_SRAM_SIZE - 16);
+	arm_setup_stack(SAMA5D4_SRAM_BASE + SAMA5D4_SRAM_SIZE - 16);
 
 	barebox_arm_entry(SAMA5_DDRCS, at91sama5_get_ddram_size(), NULL);
 }
diff --git a/arch/arm/boards/sama5d4ek/lowlevel.c b/arch/arm/boards/sama5d4ek/lowlevel.c
index b791f2a03..d4d27d2ec 100644
--- a/arch/arm/boards/sama5d4ek/lowlevel.c
+++ b/arch/arm/boards/sama5d4ek/lowlevel.c
@@ -17,7 +17,7 @@ void __naked __bare_init barebox_arm_reset_vector(void)
 {
 	arm_cpu_lowlevel_init();
 
-	arm_setup_stack(SAMA5D3_SRAM_BASE + SAMA5D3_SRAM_SIZE - 16);
+	arm_setup_stack(SAMA5D4_SRAM_BASE + SAMA5D4_SRAM_SIZE - 16);
 
 	barebox_arm_entry(SAMA5_DDRCS, at91sama5_get_ddram_size(), NULL);
 }
-- 
2.12.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-02-24 12:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 12:06 [PATCH 0/4] ARM: at91: misc fixes and cleanup Ahmad Fatoum
2019-02-19 12:06 ` [PATCH 1/4] ARM: at91: replace __raw_{readl, writel} of peripherals with readl, writel Ahmad Fatoum
2019-02-19 12:06 ` [PATCH 2/4] ARM: at91: debug_ll: make UART base address configurable Ahmad Fatoum
2019-02-19 20:42   ` Sam Ravnborg
2019-02-19 21:10     ` Ahmad Fatoum
2019-02-19 21:12       ` Ahmad Fatoum
2019-02-19 21:30       ` Sam Ravnborg
2019-02-20  7:55       ` Sascha Hauer
2019-02-26  9:09         ` Ahmad Fatoum
2019-02-19 12:06 ` [PATCH 3/4] ARM: at91: fix at91sama5_get_ddram_size for sama5d4 Ahmad Fatoum
2019-02-19 12:06 ` [PATCH 4/4] ARM: at91: remove duplicate get_ddram_size code Ahmad Fatoum
2019-02-24 12:35   ` Sam Ravnborg [this message]
2019-02-26  9:10     ` Ahmad Fatoum
2019-02-26  9:56       ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190224123529.GA19669@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox