]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
nds32: common bdinfo, bootm, image support
authorMacpaul Lin <macpaul@andestech.com>
Wed, 19 Oct 2011 20:41:09 +0000 (20:41 +0000)
committerWolfgang Denk <wd@denx.de>
Fri, 21 Oct 2011 22:54:06 +0000 (00:54 +0200)
Add support of NDS32 to common commands bdinfo, bootm, and image format.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
common/cmd_bdinfo.c
common/image.c
include/image.h

index e84948959a1eacf570ad1f2729152d02d3ce56c9..688b2382a7d59ccb95d7926e3123bc5882b3fa4e 100644 (file)
@@ -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
index 32ad4da1d32701857f855cafbf39e89c321102a8..1538256508fcf8e9d7cbe8250d49590c3f87467a 100644 (file)
@@ -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,                     "",             "",             },
 };
 
index b7caaa625a88b65a767fa9a60aa5a73cc289e86a..2ec31bd9b098cab2eb3aa69741d1d30baa348dfd 100644 (file)
 #define IH_ARCH_AVR32          17      /* AVR32        */
 #define IH_ARCH_ST200          18      /* STMicroelectronics ST200  */
 #define IH_ARCH_SANDBOX                19      /* Sandbox architecture (test only) */
+#define IH_ARCH_NDS32          19      /* ANDES Technology - NDS32  */
 
 /*
  * Image Types