public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: ratbert.chuang at gmail.com <ratbert.chuang@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] arm: a320evb: fixes for relocation support
Date: Mon,  1 Nov 2010 16:07:20 +0800	[thread overview]
Message-ID: <1288598840-1929-1-git-send-email-ratbert.chuang@gmail.com> (raw)

From: Po-Yu Chuang <ratbert@faraday-tech.com>

- add CONFIG_SYS_SDRAM_BASE and CONFIG_SYS_INIT_SP_ADDR
- do not update gd->bd in dram_init() because bd is unavailable then

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
---
 board/faraday/a320evb/a320evb.c |    3 +--
 include/configs/a320evb.h       |   10 +++++++---
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/board/faraday/a320evb/a320evb.c b/board/faraday/a320evb/a320evb.c
index 85b11b9..b9343e4 100644
--- a/board/faraday/a320evb/a320evb.c
+++ b/board/faraday/a320evb/a320evb.c
@@ -46,8 +46,7 @@ int dram_init(void)
 
 	actual_size = get_ram_size((void *)sdram_base, expected_size);
 
-	gd->bd->bi_dram[0].start = sdram_base;
-	gd->bd->bi_dram[0].size  = actual_size;
+	gd->ram_size = actual_size;
 
 	if (expected_size != actual_size)
 		printf("Warning: Only %lu of %lu MiB SDRAM is working\n",
diff --git a/include/configs/a320evb.h b/include/configs/a320evb.h
index 0284d40..97bf8b9 100644
--- a/include/configs/a320evb.h
+++ b/include/configs/a320evb.h
@@ -138,15 +138,19 @@
 #define PHYS_SDRAM_1		0x10000000	/* SDRAM Bank #1 */
 #define PHYS_SDRAM_1_SIZE	0x04000000	/* 64 MB */
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x1000 - \
+					GENERATED_GBL_DATA_SIZE)
+
 /*
  * Load address and memory test area should agree with
  * board/faraday/a320/config.mk. Be careful not to overwrite U-boot itself.
  */
-#define CONFIG_SYS_LOAD_ADDR		0x12000000
+#define CONFIG_SYS_LOAD_ADDR		(PHYS_SDRAM_1 + 0x2000000)
 
 /* memtest works on 63 MB in DRAM */
-#define CONFIG_SYS_MEMTEST_START	0x10000000
-#define CONFIG_SYS_MEMTEST_END		0x13F00000
+#define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM_1
+#define CONFIG_SYS_MEMTEST_END		(PHYS_SDRAM_1 + 0x3F00000)
 
 #define CONFIG_SYS_TEXT_BASE		0
 
-- 
1.6.3.3

             reply	other threads:[~2010-11-01  8:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-01  8:07 ratbert.chuang at gmail.com [this message]
2010-12-20  9:07 ` [U-Boot] [PATCH v2 2/2] arm: a320evb: fixes for relocation support Po-Yu Chuang
2011-01-24 21:30   ` Albert ARIBAUD

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=1288598840-1929-1-git-send-email-ratbert.chuang@gmail.com \
    --to=ratbert.chuang@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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