All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mx1ads: Fix build by using new relocation scheme
Date: Sat, 11 Jun 2011 22:16:32 -0300	[thread overview]
Message-ID: <1307841392-29328-1-git-send-email-festevam@gmail.com> (raw)

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Build tested only. Don't have access to this hardware.

 board/mx1ads/config.mk   |   25 -------------------------
 board/mx1ads/mx1ads.c    |   27 +++++++++++++++++++--------
 include/configs/mx1ads.h |   10 ++++++++++
 3 files changed, 29 insertions(+), 33 deletions(-)
 delete mode 100644 board/mx1ads/config.mk

diff --git a/board/mx1ads/config.mk b/board/mx1ads/config.mk
deleted file mode 100644
index 2bc5b15..0000000
--- a/board/mx1ads/config.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# board/mx1ads/config.mk
-#
-# (c) Copyright 2004
-# Techware Information Technology, Inc.
-# http://www.techware.com.tw/
-#
-# Ming-Len Wu <minglen_wu@techware.com.tw>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-
-CONFIG_SYS_TEXT_BASE = 0x08400000
diff --git a/board/mx1ads/mx1ads.c b/board/mx1ads/mx1ads.c
index f8ce210..0685518 100644
--- a/board/mx1ads/mx1ads.c
+++ b/board/mx1ads/mx1ads.c
@@ -78,7 +78,7 @@ void SetAsynchMode (void)
 
 static u32 mc9328sid;
 
-int board_init (void)
+int board_early_init_f(void)
 {
 	volatile unsigned int tmp;
 
@@ -112,10 +112,6 @@ int board_init (void)
 
 	SetAsynchMode ();
 
-	gd->bd->bi_arch_number = MACH_TYPE_MX1ADS;
-
-	gd->bd->bi_boot_params = 0x08000100;	/* adress of boot parameters    */
-
 	icache_enable ();
 	dcache_enable ();
 
@@ -133,6 +129,15 @@ int board_init (void)
 	return 0;
 }
 
+int board_init(void)
+{
+	gd->bd->bi_arch_number = MACH_TYPE_MX1ADS;
+
+	gd->bd->bi_boot_params = 0x08000100;	/* adress of boot parameters */
+
+	return 0;
+}
+
 int board_late_init (void)
 {
 
@@ -161,12 +166,18 @@ int board_late_init (void)
 	return 0;
 }
 
-int dram_init (void)
+int dram_init(void)
+{
+	/* dram_init must store complete ramsize in gd->ram_size */
+	gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM_1,
+				PHYS_SDRAM_1_SIZE);
+	return 0;
+}
+
+void dram_init_banksize(void)
 {
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
 	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-	return 0;
 }
 
 #ifdef CONFIG_CMD_NET
diff --git a/include/configs/mx1ads.h b/include/configs/mx1ads.h
index 166da6c..7b68ec5 100644
--- a/include/configs/mx1ads.h
+++ b/include/configs/mx1ads.h
@@ -156,6 +156,16 @@
 #define PHYS_SDRAM_1		0x08000000	/* SDRAM  on CSD0		*/
 #define PHYS_SDRAM_1_SIZE	0x04000000	/* 64 MB			*/
 
+#define CONFIG_SYS_TEXT_BASE	0x10000000
+
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define CONFIG_SYS_INIT_RAM_ADDR	0x00300000
+#define CONFIG_SYS_INIT_RAM_SIZE	0x000FFFFF
+#define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_SIZE - \
+						GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_INIT_RAM_ADDR + \
+						CONFIG_SYS_GBL_DATA_OFFSET)
+
 #define CONFIG_SYS_MAX_FLASH_BANKS	1		/* 1 bank of SyncFlash		*/
 #define CONFIG_SYS_FLASH_BASE		0x0C000000	/* SyncFlash on CSD1		*/
 #define FLASH_BANK_SIZE		0x01000000	/* 16 MB Total			*/
-- 
1.7.1

             reply	other threads:[~2011-06-12  1:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-12  1:16 Fabio Estevam [this message]
2011-06-14  8:43 ` [U-Boot] [PATCH] mx1ads: Fix build by using new relocation scheme Stefano Babic

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=1307841392-29328-1-git-send-email-festevam@gmail.com \
    --to=festevam@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.