From: Graeme Russ Date: Sun, 22 Aug 2010 06:25:58 +0000 (+1000) Subject: x86: Add do_bdinfo() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a806ee6fae19a615fb806a6f01e5398b087e898a;p=project%2Fbcm63xx%2Fu-boot.git x86: Add do_bdinfo() x86 failed to compile with a message "a case for this architecture does not exist!" - Add do_bdinfo() for this arch --- diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index d43867f10b..84c6ec8e02 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -35,7 +35,7 @@ static void print_num(const char *, ulong); static void print_eth(int idx); #endif -#ifndef CONFIG_ARM /* PowerPC and other */ +#if (!defined(CONFIG_ARM) && !defined(CONFIG_X86)) static void print_lnum(const char *, u64); #endif @@ -367,6 +367,45 @@ int do_bdinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +#elif defined(CONFIG_X86) + +static void print_str(const char *, const char *); + +int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int i; + bd_t *bd = gd->bd; + char buf[32]; + + print_num ("env_t", (ulong)bd->bi_env); + print_num ("boot_params", (ulong)bd->bi_boot_params); + print_num ("bi_memstart", bd->bi_memstart); + print_num ("bi_memsize", bd->bi_memsize); + print_num ("bi_flashstart", bd->bi_flashstart); + print_num ("bi_flashsize", bd->bi_flashsize); + print_num ("bi_flashoffset", bd->bi_flashoffset); + print_num ("bi_sramstart", bd->bi_sramstart); + print_num ("bi_sramsize", bd->bi_sramsize); + print_num ("bi_bootflags", bd->bi_bootflags); + print_str ("cpufreq", strmhz(buf, bd->bi_intfreq)); + print_str ("busfreq", strmhz(buf, bd->bi_busfreq)); + + for (i=0; i start", bd->bi_dram[i].start); + print_num("-> size", bd->bi_dram[i].size); + } + +#if defined(CONFIG_CMD_NET) + print_eth(0); + printf ("ip_addr = %pI4\n", &bd->bi_ip_addr); + print_str ("ethspeed", strmhz(buf, bd->bi_ethspeed)); +#endif + printf ("baudrate = %d bps\n", bd->bi_baudrate); + + return 0; +} + #else #error "a case for this architecture does not exist!" #endif @@ -391,14 +430,17 @@ static void print_eth(int idx) } #endif -#ifndef CONFIG_ARM +#if (!defined(CONFIG_ARM) && !defined(CONFIG_X86)) static void print_lnum(const char *name, u64 value) { printf ("%-12s= 0x%.8llX\n", name, value); } #endif -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_BLACKFIN) +#if defined(CONFIG_PPC) || \ + defined(CONFIG_M68K) || \ + defined(CONFIG_BLACKFIN) || \ + defined(CONFIG_X86) static void print_str(const char *name, const char *str) { printf ("%-12s= %6s MHz\n", name, str);