From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 17 Feb 2012 09:58:19 +0100 Subject: [U-Boot] [PATCH] SPEAr: Add ARM relocation support In-Reply-To: <4F3DD243.60404@st.com> References: <1329392635-22460-1-git-send-email-amit.virdi@st.com> <201202162043.44460.marek.vasut@gmail.com> <4F3DD243.60404@st.com> Message-ID: <201202170958.19708.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > On 2/17/2012 1:13 AM, Marek Vasut wrote: > >> Signed-off-by: Amit Virdi > > > > Uh, are you sure the Subject correlates with the patch ? > > > > M > > Yeah. The fix is a part of the Relocation feature. For relocation, it is > essential that dram_init stores RAM size and do nothing more i.e. no > access to bss etc. Then name it "fix dram size reporting?". Also, you don't need dram_init at all if you only call get_dram_size() if I recall correctly, check arch/arm/lib/board.c, I might be mistaken. And maybe explain why you removed all the code in the changelog, it's not clear at all. Thanks! > > ~Amit Virdi > > >> --- > >> > >> board/spear/common/spr_misc.c | 20 +------------------- > >> 1 files changed, 1 insertions(+), 19 deletions(-) > >> > >> diff --git a/board/spear/common/spr_misc.c > >> b/board/spear/common/spr_misc.c index 0812c20..3ab278f 100644 > >> --- a/board/spear/common/spr_misc.c > >> +++ b/board/spear/common/spr_misc.c > >> @@ -40,27 +40,9 @@ static struct chip_data chip_data; > >> > >> int dram_init(void) > >> { > >> > >> - struct xloader_table *xloader_tb = > >> - (struct xloader_table *)XLOADER_TABLE_ADDRESS; > >> - struct xloader_table_1_1 *table_1_1; > >> - struct xloader_table_1_2 *table_1_2; > >> - struct chip_data *chip =&chip_data; > >> - > >> + /* Store complete RAM size and return */ > >> > >> gd->ram_size = get_ram_size(PHYS_SDRAM_1, PHYS_SDRAM_1_MAXSIZE); > >> > >> - if (XLOADER_TABLE_VERSION_1_1 == xloader_tb->table_version) { > >> - table_1_1 =&xloader_tb->table.table_1_1; > >> - chip->dramfreq = table_1_1->ddrfreq; > >> - chip->dramtype = table_1_1->ddrtype; > >> - > >> - } else if (XLOADER_TABLE_VERSION_1_2 == xloader_tb->table_version) { > >> - table_1_2 =&xloader_tb->table.table_1_2; > >> - chip->dramfreq = table_1_2->ddrfreq; > >> - chip->dramtype = table_1_2->ddrtype; > >> - } else { > >> - chip->dramfreq = -1; > >> - } > >> - > >> > >> return 0; > >> > >> } > > > > .