Patchwork [U-Boot,v2,batch,3,01/17] common: Update cmd_bdinfo for PPC

login
register
mail settings
Submitter York Sun
Date March 25, 2013, 5:39 p.m.
Message ID <1364233180-31149-1-git-send-email-yorksun@freescale.com>
Download mbox | patch
Permalink /patch/230809/
State Changes Requested
Delegated to: Andy Fleming
Headers show

Comments

York Sun - March 25, 2013, 5:39 p.m.
Add board detail function to print more individual board information.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Tom Rini <trini@ti.com>

---
 common/cmd_bdinfo.c |    7 +++++++
 1 file changed, 7 insertions(+)
Andy Fleming - May 10, 2013, 8:16 p.m.
On Mon, Mar 25, 2013 at 12:39 PM, York Sun <yorksun@freescale.com> wrote:

> Add board detail function to print more individual board information.
>
> Signed-off-by: York Sun <yorksun@freescale.com>
> CC: Wolfgang Denk <wd@denx.de>
> CC: Tom Rini <trini@ti.com>
>


Tom, Wolfgang, I can take this in through my tree, but I'd like an ACK
before I do so.



>
> ---
>  common/cmd_bdinfo.c |    7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
> index 85279d5..3bf8cf2 100644
> --- a/common/cmd_bdinfo.c
> +++ b/common/cmd_bdinfo.c
> @@ -84,6 +84,12 @@ static void print_mhz(const char *name, unsigned long
> hz)
>  }
>
>  #if defined(CONFIG_PPC)
> +static void __board_detail(void)
> +{
> +       /* Please define boot_detail() for your platform */
> +}
> +
> +void board_detail(void) __attribute__((weak, alias("__board_detail")));
>
>  int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>  {
> @@ -169,6 +175,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
> char * const argv[])
>         printf("IP addr     = %s\n", getenv("ipaddr"));
>         printf("baudrate    = %6u bps\n", bd->bi_baudrate);
>         print_num("relocaddr", gd->relocaddr);
> +       board_detail();
>         return 0;
>  }
>
> --
> 1.7.9.5
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
Tom Rini - May 10, 2013, 8:30 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/10/2013 04:16 PM, Andy Fleming wrote:
> 
> 
> 
> On Mon, Mar 25, 2013 at 12:39 PM, York Sun <yorksun@freescale.com 
> <mailto:yorksun@freescale.com>> wrote:
> 
> Add board detail function to print more individual board
> information.
> 
> Signed-off-by: York Sun <yorksun@freescale.com 
> <mailto:yorksun@freescale.com>> CC: Wolfgang Denk <wd@denx.de
> <mailto:wd@denx.de>> CC: Tom Rini <trini@ti.com
> <mailto:trini@ti.com>>
> 
> 
> 
> Tom, Wolfgang, I can take this in through my tree, but I'd like an
> ACK before I do so.
> 
> 
> 
> 
> --- common/cmd_bdinfo.c |    7 +++++++ 1 file changed, 7
> insertions(+)
> 
> diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index
> 85279d5..3bf8cf2 100644 --- a/common/cmd_bdinfo.c +++
> b/common/cmd_bdinfo.c @@ -84,6 +84,12 @@ static void
> print_mhz(const char *name, unsigned long hz) }
> 
> #if defined(CONFIG_PPC) +static void __board_detail(void) +{ +
> /* Please define boot_detail() for your platform */ +} + +void
> board_detail(void) __attribute__((weak, alias("__board_detail")));

This should be using __weak from <linux/compiler.h>

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRjVjbAAoJENk4IS6UOR1WU24P/janPXULTG3dl3JelXRN1622
OoiwxD0QhDUecfp66qa3Tc8uvrk3a20ZIiZon7hdbbFpP6caqp+mBuyRGkyFHrgE
dLCZeRPNhQqS4XONDzW21DbsKEJuxzmfZSxajFRGUaACdQnFh1qJL5vmchCp1D9c
Wrx8uGevkMuLhUE8yjog6VOXEJ4NkWQ8ZQHVrVuPwbdNo7lpVAZau0u+bKdVWKei
jOukn4VJOMTgjPIE5ZWumoQ62y9/GVQih563ZbdXAQzoYWybms38am9FvO064GZN
5zMpVnmWLn/XegOpx1O/ia4FiGhgufRRjsbQETsBLwTiAFTU7PVmgyPfzlTYnqFN
WNmvedXr2y39w5BhTnCBCuJ6YvV/E23G1RxT4c4E6kGd6PJEqTiD9FlXJgedM72W
fD9ODMllcQDhpTtTObeTbgQ9Bp7E04BGMrlXxqzQH1gabi7D+YyB7HsV/F8EXpIH
iqFoq3Zn7TB+SSRvt+JUJcK3xW/36zcxRCKlg7iPtUZ69EICI9GkNog2aX0vyHsT
0Qkk41SWPkIr3VrQojF4ni/l7vx6aekbmuYWs7duK1z8oM8ba7lv0uqdOYJm3uDS
Xd/CoUQIbwDolhZGr/ZQYf8rwK02umvWDsvPxV70yngQ1kBGMETGHcMvb87F7cR/
716aouDllgeSYAFpeVKw
=PUux
-----END PGP SIGNATURE-----

Patch

diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index 85279d5..3bf8cf2 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -84,6 +84,12 @@  static void print_mhz(const char *name, unsigned long hz)
 }
 
 #if defined(CONFIG_PPC)
+static void __board_detail(void)
+{
+	/* Please define boot_detail() for your platform */
+}
+
+void board_detail(void) __attribute__((weak, alias("__board_detail")));
 
 int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
@@ -169,6 +175,7 @@  int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	printf("IP addr     = %s\n", getenv("ipaddr"));
 	printf("baudrate    = %6u bps\n", bd->bi_baudrate);
 	print_num("relocaddr", gd->relocaddr);
+	board_detail();
 	return 0;
 }