]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/mpc85xx/cpu_init.c
fsl/usb: Workaround for USB erratum-A007075
[u-boot] / arch / powerpc / cpu / mpc85xx / cpu_init.c
index 19df95fee291efce08543799d23d955f8fab8bef..0a33e8dbc1f69f5c53b8e60e1059e99c1738ffa2 100644 (file)
@@ -33,6 +33,9 @@
 #endif
 
 #include "../../../../drivers/block/fsl_sata.h"
+#ifdef CONFIG_U_QE
+#include "../../../../drivers/qe/qe.h"
+#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -84,7 +87,7 @@ void fsl_erratum_a006261_workaround(struct ccsr_usb_phy __iomem *usb_phy)
 #endif
 
 
-#ifdef CONFIG_QE
+#if defined(CONFIG_QE) && !defined(CONFIG_U_QE)
 extern qe_iop_conf_t qe_iop_conf_tab[];
 extern void qe_config_iopin(u8 port, u8 pin, int dir,
                                int open_drain, int assign);
@@ -323,10 +326,12 @@ void cpu_init_f (void)
 #if defined(CONFIG_CPM2)
        m8560_cpm_reset();
 #endif
-#ifdef CONFIG_QE
+
+#if defined(CONFIG_QE) && !defined(CONFIG_U_QE)
        /* Config QE ioports */
        config_qe_ioports();
 #endif
+
 #if defined(CONFIG_FSL_DMA)
        dma_init();
 #endif
@@ -810,15 +815,20 @@ int sata_initialize(void)
 
 void cpu_secondary_init_r(void)
 {
-#ifdef CONFIG_QE
+#ifdef CONFIG_U_QE
+       uint qe_base = CONFIG_SYS_IMMR + 0x00140000; /* QE immr base */
+#elif defined CONFIG_QE
        uint qe_base = CONFIG_SYS_IMMR + 0x00080000; /* QE immr base */
+#endif
+
+#ifdef CONFIG_QE
 #ifdef CONFIG_SYS_QE_FMAN_FW_IN_NAND
        int ret;
        size_t fw_length = CONFIG_SYS_QE_FMAN_FW_LENGTH;
 
        /* load QE firmware from NAND flash to DDR first */
        ret = nand_read(&nand_info[0], (loff_t)CONFIG_SYS_QE_FMAN_FW_IN_NAND,
-                       &fw_length, (u_char *)CONFIG_SYS_QE_FMAN_FW_ADDR);
+                       &fw_length, (u_char *)CONFIG_SYS_QE_FW_ADDR);
 
        if (ret && ret == -EUCLEAN) {
                printf ("NAND read for QE firmware at offset %x failed %d\n",