]> git.sur5r.net Git - u-boot/blobdiff - board/esd/ash405/ash405.c
* Patch by Xiao Xianghua, 23 Oct 2003:
[u-boot] / board / esd / ash405 / ash405.c
index 39810c7cad2524d668174ba3dd0a9f580cb4c73b..39b2dfcfc42375d052acb5bb22e8cdcf0175c4a8 100644 (file)
@@ -24,7 +24,6 @@
 #include <common.h>
 #include <asm/processor.h>
 #include <command.h>
-#include <cmd_boot.h>
 #include <malloc.h>
 
 /* ------------------------------------------------------------------------- */
@@ -33,6 +32,8 @@
 #define FPGA_DEBUG
 #endif
 
+extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+
 /* fpga configuration data - gzip compressed and generated by bin2c */
 const unsigned char fpgadata[] =
 {
@@ -66,7 +67,7 @@ int board_pre_init (void)
        mtdcr(uicsr, 0xFFFFFFFF);       /* clear all ints */
        mtdcr(uicer, 0x00000000);       /* disable all ints */
        mtdcr(uiccr, 0x00000000);       /* set all to be non-critical*/
-       mtdcr(uicpr, 0xFFFFFF81);       /* set int polarities */
+       mtdcr(uicpr, 0xFFFFFF9F);       /* set int polarities */
        mtdcr(uictr, 0x10000000);       /* set int trigger levels */
        mtdcr(uicvcr, 0x00000001);      /* set vect base=0,INT0 highest priority*/
        mtdcr(uicsr, 0xFFFFFFFF);       /* clear all ints */
@@ -238,10 +239,14 @@ int testdram (void)
 /* ------------------------------------------------------------------------- */
 
 #if (CONFIG_COMMANDS & CFG_CMD_NAND)
-extern void nand_probe(ulong physadr);
+#include <linux/mtd/nand.h>
+extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
+
 void nand_init(void)
 {
-       printf("Probing at 0x%.8x\n", CFG_NAND_BASE);
        nand_probe(CFG_NAND_BASE);
+       if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) {
+               print_size(nand_dev_desc[0].totlen, "\n");
+       }
 }
 #endif