public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] test/py: support 'memstart =' in u_boot_utils.find_ram_base()
@ 2016-07-06 10:44 Daniel Schwierzeck
  2016-07-06 14:37 ` Stephen Warren
  2016-07-09 13:24 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Schwierzeck @ 2016-07-06 10:44 UTC (permalink / raw)
  To: u-boot

Some archs like MIPS or PPC have a different 'bdinfo' output
than ARM regarding the memory configuration. Also support
'memstart = 0x*' in u_boot_utils.find_ram_base() to make
all tests requiring the RAM base working on those archs.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

---

 test/py/u_boot_utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/py/u_boot_utils.py b/test/py/u_boot_utils.py
index 6a6b2ec..e4765e3 100644
--- a/test/py/u_boot_utils.py
+++ b/test/py/u_boot_utils.py
@@ -201,7 +201,7 @@ def find_ram_base(u_boot_console):
     with u_boot_console.log.section('find_ram_base'):
         response = u_boot_console.run_command('bdinfo')
         for l in response.split('\n'):
-            if '-> start' in l:
+            if '-> start' in l or 'memstart    =' in l:
                 ram_base = int(l.split('=')[1].strip(), 16)
                 break
         if ram_base is None:
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] test/py: support 'memstart =' in u_boot_utils.find_ram_base()
  2016-07-06 10:44 [U-Boot] [PATCH] test/py: support 'memstart =' in u_boot_utils.find_ram_base() Daniel Schwierzeck
@ 2016-07-06 14:37 ` Stephen Warren
  2016-07-06 14:49   ` Daniel Schwierzeck
  2016-07-09 13:24 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2016-07-06 14:37 UTC (permalink / raw)
  To: u-boot

On 07/06/2016 04:44 AM, Daniel Schwierzeck wrote:
> Some archs like MIPS or PPC have a different 'bdinfo' output
> than ARM regarding the memory configuration. Also support
> 'memstart = 0x*' in u_boot_utils.find_ram_base() to make
> all tests requiring the RAM base working on those archs.

Acked-by: Stephen Warren <swarren@nvidia.com>

... although wouldn't it be better to fix the bdinfo command so that it 
printed the same thing on all architectures?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] test/py: support 'memstart =' in u_boot_utils.find_ram_base()
  2016-07-06 14:37 ` Stephen Warren
@ 2016-07-06 14:49   ` Daniel Schwierzeck
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Schwierzeck @ 2016-07-06 14:49 UTC (permalink / raw)
  To: u-boot



Am 06.07.2016 um 16:37 schrieb Stephen Warren:
> On 07/06/2016 04:44 AM, Daniel Schwierzeck wrote:
>> Some archs like MIPS or PPC have a different 'bdinfo' output
>> than ARM regarding the memory configuration. Also support
>> 'memstart = 0x*' in u_boot_utils.find_ram_base() to make
>> all tests requiring the RAM base working on those archs.
> 
> Acked-by: Stephen Warren <swarren@nvidia.com>
> 
> ... although wouldn't it be better to fix the bdinfo command so that it
> printed the same thing on all architectures?

yes, but bdinfo isn't the only one affected. Currently we have two variants in "struct bd_info" of how to store the memory configuration:

- bi_memstart and bi_memsize
- struct bi_dram[CONFIG_NR_DRAM_BANKS] if a board or arch defines CONFIG_NR_DRAM_BANKS

Maybe we could unify this one day. But this requires changes to other commands and generic board init. Until then test/py should support both variants.

-- 
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160706/d716974b/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] test/py: support 'memstart =' in u_boot_utils.find_ram_base()
  2016-07-06 10:44 [U-Boot] [PATCH] test/py: support 'memstart =' in u_boot_utils.find_ram_base() Daniel Schwierzeck
  2016-07-06 14:37 ` Stephen Warren
@ 2016-07-09 13:24 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-07-09 13:24 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 06, 2016 at 12:44:22PM +0200, Daniel Schwierzeck wrote:

> Some archs like MIPS or PPC have a different 'bdinfo' output
> than ARM regarding the memory configuration. Also support
> 'memstart = 0x*' in u_boot_utils.find_ram_base() to make
> all tests requiring the RAM base working on those archs.
> 
> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> Acked-by: Stephen Warren <swarren@nvidia.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160709/cbebf5ba/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-09 13:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06 10:44 [U-Boot] [PATCH] test/py: support 'memstart =' in u_boot_utils.find_ram_base() Daniel Schwierzeck
2016-07-06 14:37 ` Stephen Warren
2016-07-06 14:49   ` Daniel Schwierzeck
2016-07-09 13:24 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox