public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH 4/8] SPARC: Added SPARC board information to bdinfo command
@ 2008-03-13  9:39 Daniel Hellstrom
  2008-03-13 12:18 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Hellstrom @ 2008-03-13  9:39 UTC (permalink / raw)
  To: u-boot

This patch adds support for the U-Boot command 'bdinfo' for SPARC boards,
the output is as shown below.

######################
U-Boot 1.3.2-gb42c95ff-dirty (Mar 12 2008 - 21:07:56)Gaisler GRSIM

CPU: LEON3
Board: GRSIM/TSIM
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   GRETH 10/100

Type "run flash_nfs" to mount root filesystem over NFS

Hit any key to stop autoboot:  0
=> bdinfo
memstart               = 0x40000000
memsize                = 0x04000000
flashstart             = 0x00000000
CFG_MONITOR_BASE       = 0x00000000
CFG_ENV_ADDR           = 0x007F8000
CFG_RELOC_MONITOR_BASE = 0x43f8e000 (262144)
CFG_MALLOC_BASE        = 0x43fce000 (131072)
CFG_INIT_SP_OFFSET     = 0x43ffdfe0 (65504)
CFG_PROM_OFFSET        = 0x43ffe000 (8064)
CFG_GBL_DATA_OFFSET    = 0x43ffff80 (128)
ethaddr                = 00:00:7A:CC:00:12
IP addr                = 192.168.0.80
baudrate               =  38400 bps
=>
######################

Best Regards,
Daniel Hellstrom


commit 6bc2ec61fd40610461266f6a7f21a01a4a47016c
Author: Daniel Hellstrom <daniel@gaisler.com>
Date:   Wed Mar 12 21:16:14 2008 +0100

    SPARC: added SPARC board information to the command bdinfo.
    
    Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>

 common/cmd_bdinfo.c |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)


diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index bbb0192..838c103 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -208,6 +208,40 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int 
argc, char *argv[])
     return 0;
 }
 
+#elif defined(CONFIG_SPARC)   /* SPARC */
+int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+    bd_t *bd = gd->bd;
+#if defined(CONFIG_CMD_NET)
+    int i;
+#endif
+
+#ifdef DEBUG
+    print_num ("bd address             ",(ulong)bd);
+#endif
+    print_num ("memstart               ",bd->bi_memstart);
+    print_num ("memsize                ",bd->bi_memsize);
+    print_num ("flashstart             ",bd->bi_flashstart);
+    print_num ("CFG_MONITOR_BASE       ",CFG_MONITOR_BASE);
+    print_num ("CFG_ENV_ADDR           ",CFG_ENV_ADDR);
+    printf ("CFG_RELOC_MONITOR_BASE = 0x%lx 
(%d)\n",CFG_RELOC_MONITOR_BASE,CFG_MONITOR_LEN);
+    printf ("CFG_MALLOC_BASE        = 0x%lx 
(%d)\n",CFG_MALLOC_BASE,CFG_MALLOC_LEN);
+    printf ("CFG_INIT_SP_OFFSET     = 0x%lx 
(%d)\n",CFG_INIT_SP_OFFSET,CFG_STACK_SIZE);
+    printf ("CFG_PROM_OFFSET        = 0x%lx 
(%d)\n",CFG_PROM_OFFSET,CFG_PROM_SIZE);
+    printf ("CFG_GBL_DATA_OFFSET    = 0x%lx 
(%d)\n",CFG_GBL_DATA_OFFSET,CFG_GBL_DATA_SIZE);
+
+#if defined(CONFIG_CMD_NET)
+    puts ("ethaddr                =");
+    for (i=0; i<6; ++i) {
+        printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
+    }
+    puts ("\nIP addr                = ");
+    print_IPaddr (bd->bi_ip_addr);
+#endif
+    printf ("\nbaudrate               = %6ld bps\n", bd->bi_baudrate   );
+    return 0;
+}
+
 #elif defined(CONFIG_M68K) /* M68K */
 static void print_str(const char *, const char *);
 

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

* [U-Boot-Users] [PATCH 4/8] SPARC: Added SPARC board information to bdinfo command
  2008-03-13  9:39 [U-Boot-Users] [PATCH 4/8] SPARC: Added SPARC board information to bdinfo command Daniel Hellstrom
@ 2008-03-13 12:18 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2008-03-13 12:18 UTC (permalink / raw)
  To: u-boot

In message <47D8F63C.6010002@gaisler.com> you wrote:
> This patch adds support for the U-Boot command 'bdinfo' for SPARC boards,
> the output is as shown below.
...
> diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
> index bbb0192..838c103 100644
> --- a/common/cmd_bdinfo.c
> +++ b/common/cmd_bdinfo.c
> @@ -208,6 +208,40 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int 
> argc, char *argv[])
>      return 0;
>  }
>  
> +#elif defined(CONFIG_SPARC)   /* SPARC */
> +int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> +{
> +    bd_t *bd = gd->bd;
> +#if defined(CONFIG_CMD_NET)
> +    int i;
> +#endif
> +
> +#ifdef DEBUG
> +    print_num ("bd address             ",(ulong)bd);
> +#endif
> +    print_num ("memstart               ",bd->bi_memstart);
> +    print_num ("memsize                ",bd->bi_memsize);
> +    print_num ("flashstart             ",bd->bi_flashstart);
> +    print_num ("CFG_MONITOR_BASE       ",CFG_MONITOR_BASE);
> +    print_num ("CFG_ENV_ADDR           ",CFG_ENV_ADDR);
> +    printf ("CFG_RELOC_MONITOR_BASE = 0x%lx 
> (%d)\n",CFG_RELOC_MONITOR_BASE,CFG_MONITOR_LEN);
> +    printf ("CFG_MALLOC_BASE        = 0x%lx 
> (%d)\n",CFG_MALLOC_BASE,CFG_MALLOC_LEN);
> +    printf ("CFG_INIT_SP_OFFSET     = 0x%lx 
> (%d)\n",CFG_INIT_SP_OFFSET,CFG_STACK_SIZE);
> +    printf ("CFG_PROM_OFFSET        = 0x%lx 
> (%d)\n",CFG_PROM_OFFSET,CFG_PROM_SIZE);
> +    printf ("CFG_GBL_DATA_OFFSET    = 0x%lx 
> (%d)\n",CFG_GBL_DATA_OFFSET,CFG_GBL_DATA_SIZE);

The patch is line-wrapped and thus unusable, and you have again lots
of coding style issues.

Best regards,

Wolfgang Denk

-- 
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
"The value of marriage is not that adults produce children, but  that
children produce adults."                            - Peter De Vries

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

end of thread, other threads:[~2008-03-13 12:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-13  9:39 [U-Boot-Users] [PATCH 4/8] SPARC: Added SPARC board information to bdinfo command Daniel Hellstrom
2008-03-13 12:18 ` Wolfgang Denk

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