]> git.sur5r.net Git - u-boot/blobdiff - board/amcc/kilauea/kilauea.c
Merge branch 'master' of git://www.denx.de/git/u-boot-blackfin
[u-boot] / board / amcc / kilauea / kilauea.c
index 09b7382c4ef2c947ba26dcc11bed6b10f1681084..37ef06ef2a77648fd26c482ff2873afd9819a7f7 100644 (file)
@@ -25,6 +25,7 @@
 #include <ppc4xx.h>
 #include <ppc405.h>
 #include <libfdt.h>
+#include <fdt_support.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 
@@ -37,14 +38,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips   */
 
-void fpga_init(void)
-{
-       /*
-        * Set FPGA regs
-        */
-       out32(CFG_FPGA_BASE, 0xff570cc0);
-}
-
 /*
  * Board early initialization function
  */
@@ -199,8 +192,6 @@ int board_early_init_f (void)
         */
        mtsdr(SDR0_SRST, 0);
 
-       fpga_init();
-
        /* Configure 405EX for NAND usage */
        val = SDR0_CUST0_MUX_NDFC_SEL |
                SDR0_CUST0_NDFC_ENABLE |
@@ -209,6 +200,20 @@ int board_early_init_f (void)
                (0x80000000 >> (28 + CFG_NAND_CS));
        mtsdr(SDR0_CUST0, val);
 
+       /*
+        * Configure PFC (Pin Function Control) registers
+        * -> Enable USB
+        */
+       val = SDR0_PFC1_USBEN | SDR0_PFC1_USBBIGEN | SDR0_PFC1_GPT_FREQ;
+       mtsdr(SDR0_PFC1, val);
+
+       /*
+        * Configure FPGA register with PCIe reset
+        */
+       out_be32((void *)CFG_FPGA_BASE, 0xff570cc4);    /* assert PCIe reset */
+       mdelay(50);
+       out_be32((void *)CFG_FPGA_BASE, 0xff570cc7);    /* deassert PCIe reset */
+
        return 0;
 }