From 64d614617f3b74d360717edbf2960cfd84594cf1 Mon Sep 17 00:00:00 2001 From: Macpaul Lin Date: Wed, 19 Oct 2011 20:41:09 +0000 Subject: nds32: common bdinfo, bootm, image support Add support of NDS32 to common commands bdinfo, bootm, and image format. Signed-off-by: Macpaul Lin --- common/cmd_bdinfo.c | 25 +++++++++++++++++++++++++ common/image.c | 1 + 2 files changed, 26 insertions(+) (limited to 'common') diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index e84948959a1..688b2382a7d 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -435,6 +435,31 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +#elif defined(CONFIG_NDS32) + +int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int i; + bd_t *bd = gd->bd; + + print_num("arch_number", bd->bi_arch_number); + print_num("boot_params", (ulong)bd->bi_boot_params); + + for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) { + print_num("DRAM bank", i); + print_num("-> 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); +#endif + printf("baudrate = %d bps\n", bd->bi_baudrate); + + return 0; +} + #else #error "a case for this architecture does not exist!" #endif diff --git a/common/image.c b/common/image.c index 32ad4da1d32..1538256508f 100644 --- a/common/image.c +++ b/common/image.c @@ -93,6 +93,7 @@ static const table_entry_t uimage_arch[] = { { IH_ARCH_SPARC64, "sparc64", "SPARC 64 Bit", }, { IH_ARCH_BLACKFIN, "blackfin", "Blackfin", }, { IH_ARCH_AVR32, "avr32", "AVR32", }, + { IH_ARCH_NDS32, "nds32", "NDS32", }, { -1, "", "", }, }; -- cgit v1.2.3