]> git.sur5r.net Git - u-boot/blobdiff - board/esd/pci405/pci405.c
CANBT board update
[u-boot] / board / esd / pci405 / pci405.c
index a4f697409c6c4c0076ed307bb7d653d9cda62b09..05f59a8cc52b6fc2dfa70a887cf86bf86fa9856f 100644 (file)
@@ -24,7 +24,6 @@
 #include <common.h>
 #include <asm/processor.h>
 #include <command.h>
-#include <cmd_boot.h>
 #include <malloc.h>
 #include <pci.h>
 #include <405gp_pci.h>
@@ -33,7 +32,7 @@
 
 
 /* ------------------------------------------------------------------------- */
-
+extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);/*cmd_boot.c*/
 #if 0
 #define FPGA_DEBUG
 #endif
@@ -51,10 +50,10 @@ const unsigned char fpgadata[] =
 
 
 /* Prototypes */
-int gunzip(void *, int, unsigned char *, int *);
+int gunzip(void *, int, unsigned char *, unsigned long *);
 
 
-int board_pre_init (void)
+int board_early_init_f (void)
 {
        unsigned long cntrl0Reg;
 
@@ -84,6 +83,11 @@ int board_pre_init (void)
        cntrl0Reg = mfdcr(cntrl0);
        mtdcr(cntrl0, cntrl0Reg | 0x00008000);
 
+       /*
+        * EBC Configuration Register: set ready timeout to 512 ebc-clks -> ca. 25 us
+        */
+       mtebc (epcr, 0xa8400000); /* ebc always driven */
+
        return 0;
 }
 
@@ -103,7 +107,6 @@ int misc_init_r (void)
        int status;
        int index;
        int i;
-       struct pci_config_regs *pci_regs;
        unsigned int *ptr;
        unsigned int *magic;
 
@@ -113,7 +116,7 @@ int misc_init_r (void)
         */
 
        dst = malloc(CFG_FPGA_MAX_SIZE);
-       if (gunzip (dst, CFG_FPGA_MAX_SIZE, (uchar *)fpgadata, (int *)&len) != 0) {
+       if (gunzip (dst, CFG_FPGA_MAX_SIZE, (uchar *)fpgadata, &len) != 0) {
                printf ("GUNZIP ERROR - must RESET board to recover\n");
                do_reset (NULL, 0, 0, NULL);
        }
@@ -187,7 +190,7 @@ int misc_init_r (void)
                        }
                }
                mtdcr(uicsr, 0xFFFFFFFF);        /* clear all ints */
-               
+
                *magic = 0;      /* clear pci reconfig magic again */
        }