introduce 3 new weak functions board_bdinfo, cpu_bdinfo and soc_bdinfo to allow
board, cpu and soc to print more information
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
Acked-by: Mike Frysinger
Acked-by: Haavard Skinnemoen
---
V4 -> V5
Rebase
common/cmd_bdinfo.c | 464 ---
include/bdinfo.h| 49 +
lib_arm/Makefile|1 +
lib_arm/bdinfo.c| 50 +
lib_avr32/Makefile |1 +
lib_avr32/bdinfo.c | 44 +
lib_blackfin/Makefile |1 +
lib_blackfin/bdinfo.c | 52 ++
lib_i386/Makefile |1 +
lib_i386/bdinfo.c | 44 +
lib_m68k/Makefile |1 +
lib_m68k/bdinfo.c | 72
lib_microblaze/Makefile |1 +
lib_microblaze/bdinfo.c | 47 +
lib_mips/Makefile |1 +
lib_mips/bdinfo.c | 44 +
lib_nios/Makefile |1 +
lib_nios/bdinfo.c | 43 +
lib_nios2/Makefile |1 +
lib_nios2/bdinfo.c | 51 +
lib_ppc/Makefile|1 +
lib_ppc/bdinfo.c| 104 +++
lib_sh/Makefile |1 +
lib_sh/bdinfo.c | 44 +
lib_sparc/Makefile | 13 +-
lib_sparc/bdinfo.c | 58 ++
26 files changed, 798 insertions(+), 392 deletions(-)
rewrite common/cmd_bdinfo.c (89%)
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 89%
index b230924..2609854 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -1,388 +1,76 @@
-/*
- * (C) Copyright 2003
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * 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
-
-DECLARE_GLOBAL_DATA_PTR;
-
-static void print_num(const char *, ulong);
-
-#if !defined(CONFIG_ARM) || defined(CONFIG_CMD_NET)
-static void print_eth(int idx);
-#endif
-
-#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[])
-{
- 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 */