[U-Boot] [PATCH v16 7/9] nds32: common bdinfo, bootm, image support
Macpaul Lin
macpaul at andestech.com
Wed Oct 12 10:33:21 CEST 2011
Add support of NDS32 to common commands bdinfo, bootm, and image format.
Signed-off-by: Macpaul Lin <macpaul at andestech.com>
---
Changes for v1-v6:
- Code clean up
Changes for v7-v9:
- No Change.
Changes for v10:
- fix up according to the changes in master tree.
Changes for v11:
- No Change.
Changes for v12:
- remove seldom used bi_env parameter.
Changes for v13-v14:
- No change.
Changes for v15:
- cmd_bootm.c and image.h
- Fix for new image.h according to Mike's Contribute.
Changes for v16:
- No change.
common/cmd_bdinfo.c | 25 +++++++++++++++++++++++++
common/image.c | 1 +
include/image.h | 1 +
3 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index 6051120..b3e506f 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -413,6 +413,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 d38ce4a..d620b85 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, "", "", },
};
diff --git a/include/image.h b/include/image.h
index cca1cc5..e4c7ab9 100644
--- a/include/image.h
+++ b/include/image.h
@@ -106,6 +106,7 @@
#define IH_ARCH_BLACKFIN 16 /* Blackfin */
#define IH_ARCH_AVR32 17 /* AVR32 */
#define IH_ARCH_ST200 18 /* STMicroelectronics ST200 */
+#define IH_ARCH_NDS32 19 /* ANDES Technology - NDS32 */
/*
* Image Types
--
1.7.3.5
More information about the U-Boot
mailing list