Re: [U-Boot] [PATCH V2] cmd_bdinfo: move implementation to arch instead of common

2008-11-12 Thread Jean-Christophe PLAGNIOL-VILLARD
On 14:55 Wed 12 Nov , Mike Frysinger wrote:
> On Wed, Nov 12, 2008 at 2:45 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 14:36 Wed 12 Nov , Mike Frysinger wrote:
> >> On Wed, Nov 12, 2008 at 2:13 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >> > introduce two new weak functions board_bdinfo and soc_bdinfo to allow 
> >> > board and
> >> > soc to print more information
> >>
> >> there seems to be things that all arches print ... like memory and
> >> flash information.  perhaps that should be left in the common
> >> bdinfo().
> >
> > I've prefered to let arch print this how they wish
> >
> >> > +void arch_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> >> > +   if(soc_bdinfo)
> >> > +   if(board_bdinfo)
> >>
> >> you've got random whitespace damage all over this patch ...
> >
> > I known, but I not suposed to fix PPC whitespace in the patch
> > I've an other one when everyone will agree on this one
> 
> i wasnt talking about PPC whitespace.  i was talking about code you
> added.  the code in the common bdinfo.c did not exist until you added
> it.  the function decls in the arch bdinfo.c's did not exist until you
> added them.

sorry do see what you talk about

please show in the patch

Best Regards,
J.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] cmd_bdinfo: move implementation to arch instead of common

2008-11-12 Thread Mike Frysinger
On Wed, Nov 12, 2008 at 2:45 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 14:36 Wed 12 Nov , Mike Frysinger wrote:
>> On Wed, Nov 12, 2008 at 2:13 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>> > introduce two new weak functions board_bdinfo and soc_bdinfo to allow 
>> > board and
>> > soc to print more information
>>
>> there seems to be things that all arches print ... like memory and
>> flash information.  perhaps that should be left in the common
>> bdinfo().
>
> I've prefered to let arch print this how they wish
>
>> > +void arch_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>> > +   if(soc_bdinfo)
>> > +   if(board_bdinfo)
>>
>> you've got random whitespace damage all over this patch ...
>
> I known, but I not suposed to fix PPC whitespace in the patch
> I've an other one when everyone will agree on this one

i wasnt talking about PPC whitespace.  i was talking about code you
added.  the code in the common bdinfo.c did not exist until you added
it.  the function decls in the arch bdinfo.c's did not exist until you
added them.
-mike
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] cmd_bdinfo: move implementation to arch instead of common

2008-11-12 Thread Jean-Christophe PLAGNIOL-VILLARD
On 14:36 Wed 12 Nov , Mike Frysinger wrote:
> On Wed, Nov 12, 2008 at 2:13 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > introduce two new weak functions board_bdinfo and soc_bdinfo to allow board 
> > and
> > soc to print more information
> 
> there seems to be things that all arches print ... like memory and
> flash information.  perhaps that should be left in the common
> bdinfo().

I've prefered to let arch print this how they wish

> > +void arch_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> > +   if(soc_bdinfo)
> > +   if(board_bdinfo)
> 
> you've got random whitespace damage all over this patch ...

I known, but I not suposed to fix PPC whitespace in the patch
I've an other one when everyone will agree on this one

Best Regards,
J.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] cmd_bdinfo: move implementation to arch instead of common

2008-11-12 Thread Mike Frysinger
On Wed, Nov 12, 2008 at 2:13 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> introduce two new weak functions board_bdinfo and soc_bdinfo to allow board 
> and
> soc to print more information

there seems to be things that all arches print ... like memory and
flash information.  perhaps that should be left in the common
bdinfo().

> +void board_bdinfo(cmd_tbl_t *, int, int, char **) __attribute((weak));
> +void soc_bdinfo(cmd_tbl_t *, int, int, char **) __attribute((weak));

__attribute__

> +void arch_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> +   if(soc_bdinfo)
> +   if(board_bdinfo)

you've got random whitespace damage all over this patch ...

thanks
-mike
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V2] cmd_bdinfo: move implementation to arch instead of common

2008-11-12 Thread Jean-Christophe PLAGNIOL-VILLARD
introduce two new weak functions board_bdinfo and soc_bdinfo to allow board and
soc to print more information

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[EMAIL PROTECTED]>
---
 common/cmd_bdinfo.c |  504 ++-
 include/bdinfo.h|   54 +
 lib_arm/Makefile|1 +
 lib_arm/bdinfo.c|   58 ++
 lib_avr32/Makefile  |1 +
 lib_avr32/bdinfo.c  |   50 +
 lib_blackfin/Makefile   |1 +
 lib_blackfin/bdinfo.c   |   57 ++
 lib_i386/Makefile   |1 +
 lib_i386/bdinfo.c   |   50 +
 lib_m68k/Makefile   |1 +
 lib_m68k/bdinfo.c   |   83 
 lib_microblaze/Makefile |1 +
 lib_microblaze/bdinfo.c |   54 +
 lib_mips/Makefile   |1 +
 lib_mips/bdinfo.c   |   50 +
 lib_nios/Makefile   |1 +
 lib_nios/bdinfo.c   |   49 +
 lib_nios2/Makefile  |1 +
 lib_nios2/bdinfo.c  |   57 ++
 lib_ppc/Makefile|1 +
 lib_ppc/bdinfo.c|  119 +++
 lib_sh/Makefile |1 +
 lib_sh/bdinfo.c |   50 +
 lib_sparc/Makefile  |   13 +-
 lib_sparc/bdinfo.c  |   64 ++
 26 files changed, 872 insertions(+), 451 deletions(-)
 rewrite common/cmd_bdinfo.c (90%)
 create mode 100644 include/bdinfo.h
 create mode 100644 lib_arm/bdinfo.c
 create mode 100644 lib_avr32/bdinfo.c
 create mode 100644 lib_blackfin/bdinfo.c
 create mode 100644 lib_i386/bdinfo.c
 create mode 100644 lib_m68k/bdinfo.c
 create mode 100644 lib_microblaze/bdinfo.c
 create mode 100644 lib_mips/bdinfo.c
 create mode 100644 lib_nios/bdinfo.c
 create mode 100644 lib_nios2/bdinfo.c
 create mode 100644 lib_ppc/bdinfo.c
 create mode 100644 lib_sh/bdinfo.c
 create mode 100644 lib_sparc/bdinfo.c

diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
dissimilarity index 90%
index 087eda7..63cb6dc 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -1,447 +1,57 @@
-/*
- * (C) Copyright 2003
- * Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-/*
- * Boot support
- */
-#include 
-#include 
-#include/* for print_IPaddr */
-
-DECLARE_GLOBAL_DATA_PTR;
-
-static void print_num(const char *, ulong);
-
-#ifndef CONFIG_ARM /* PowerPC and other */
-static void print_lnum(const char *, u64);
-
-#ifdef CONFIG_PPC
-static void print_str(const char *, const char *);
-
-int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-   int i;
-   bd_t *bd = gd->bd;
-   char buf[32];
-
-#ifdef DEBUG
-   print_num ("bd address",(ulong)bd   );
-#endif
-   print_num ("memstart",  bd->bi_memstart );
-   print_lnum ("memsize",  bd->bi_memsize  );
-   print_num ("flashstart",bd->bi_flashstart   );
-   print_num ("flashsize", bd->bi_flashsize);
-   print_num ("flashoffset",   bd->bi_flashoffset  );
-   print_num ("sramstart", bd->bi_sramstart);
-   print_num ("sramsize",  bd->bi_sramsize );
-#if defined(CONFIG_5xx)  || defined(CONFIG_8xx) || \
-defined(CONFIG_8260) || defined(CONFIG_E500)
-   print_num ("immr_base", bd->bi_immr_base);
-#endif
-   print_num ("bootflags", bd->bi_bootflags);
-#if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \
-defined(CONFIG_405EP) || defined(CONFIG_XILINX_405) || \
-defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
-defined(CONFIG_440EPX) || defined(CONFIG_440GRX) ||\
-defined(CONFIG_440SP) || defined(CONFIG_440SPE)
-   print_str ("procfreq",  strmhz(buf, bd->bi_procfreq));
-   print_str ("plb_busfreq",   strmhz(buf, bd->bi_plb_busfreq));
-#if defined(CONFIG_405GP) || defined(CONFIG_405EP) || 
defined(CONFIG_XILINX_405) || \
-defined(CONFIG_440EP) || defined(CONFIG_440GR) || defined(CONFIG_440SPE) 
|| \
-defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
-   print_str ("pci_busfreq",   strmhz(buf, bd->bi_pci_busfreq));
-#endif
-#else  /* ! CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_405, 
CONFIG_440EP CONFIG_440GR */
-#if defined(CONFIG_CPM2)
-   print_str ("vco",   strmhz(buf, bd->bi_vco));
-