Skip to contentSkip to conversation

post, memorytest: add support for none powerpc archs

PATCH New Heiko Schocher 2 participants 2 messages Jun 3, 2011 – Jul 27, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): Message-Id: <[email protected]

#1 lore raw

PATCH v2 1/1 post, memorytest: add support for none powerpc archs

change bd->bi_memsize to gd->ram_size, as this is defined on all archs, so this post test can used on none powerpc archs too.

cc Wolfgang Denk <[email protected]>
cc Mike Frysinger <[email protected]>

---
changes for v2:
added comment from Wolfgang Denk:
- add comment, that this function is only valid for contiguous memory banks.
added comment from Mike Frysinger:
- use gd->ram_size instead of bd->bi_memsize -> no ifdef needed.

 post/drivers/memory.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
post/drivers/memory.c +6 -2
index b7943ef..b286e3f 100644
@@ -452,13 +452,17 @@ static int memory_post_tests (unsigned long start, unsigned long size)
 	return ret;
 }
 
+/*
+ * !! this is only valid, if you have contiguous memory banks !!
+ */
 __attribute__((weak))
 int arch_memory_test_prepare(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
 {
 	bd_t *bd = gd->bd;
+
 	*vstart = CONFIG_SYS_SDRAM_BASE;
-	*size = (bd->bi_memsize >= 256 << 20 ?
-			256 << 20 : bd->bi_memsize) - (1 << 20);
+	*size = (gd->ram_size >= 256 << 20 ?
+			256 << 20 : gd->ram_size) - (1 << 20);
 
 	/* Limit area to be tested with the board info struct */
 	if ((*vstart) + (*size) > (ulong)bd)
Signature · 1 line
1.7.4.4
#2 lore raw

PATCH v2 1/1 post, memorytest: add support for none powerpc archs

Dear Heiko Schocher,

Quoted 16 lines · In message <[email protected]> you wrote:

change bd->bi_memsize to gd->ram_size, as this is defined on all archs, so this post test can used on none powerpc archs too.

cc Wolfgang Denk <[email protected]>
cc Mike Frysinger <[email protected]>

---
changes for v2:
added comment from Wolfgang Denk:
- add comment, that this function is only valid for contiguous memory banks.
added comment from Mike Frysinger:
- use gd->ram_size instead of bd->bi_memsize -> no ifdef needed.

Quoted 2 lines
 post/drivers/memory.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Fascinating, a totally parochial attitude.
	-- Spock, "Metamorphosis", stardate 3219.8