]> git.sur5r.net Git - u-boot/commitdiff
board: ls1043ardb: Add micro QE support for ls1043ardb
authorZhao Qiang <qiang.zhao@nxp.com>
Fri, 5 Feb 2016 02:04:17 +0000 (10:04 +0800)
committerYork Sun <york.sun@nxp.com>
Wed, 24 Feb 2016 16:51:14 +0000 (08:51 -0800)
Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
board/freescale/ls1043ardb/ls1043ardb.c
drivers/qe/qe.c
include/configs/ls1043ardb.h

index c8f723a1085a5bae4b9b4ec01e604bc83b6c47bc..2e61f3a08e7fa0d1d35a103e00cc1d6528e578ee 100644 (file)
 #include <environment.h>
 #include <fsl_sec.h>
 #include "cpld.h"
+#ifdef CONFIG_U_QE
+#include <fsl_qe.h>
+#endif
+
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -113,6 +117,10 @@ int board_init(void)
        enable_layerscape_ns_access();
 #endif
 
+#ifdef CONFIG_U_QE
+       u_qe_init();
+#endif
+
        return 0;
 }
 
index 31e0e3b4d50d759e6d2d87fa74c3e527766ce0f0..2b98984ef26d5f777dc4bcdcfb50cc74b7d02599 100644 (file)
@@ -192,8 +192,7 @@ void qe_init(uint qe_base)
 #ifdef CONFIG_U_QE
 void u_qe_init(void)
 {
-       uint qe_base = CONFIG_SYS_IMMR + 0x01400000; /* QE immr base */
-       qe_immr = (qe_map_t *)qe_base;
+       qe_immr = (qe_map_t *)(CONFIG_SYS_IMMR + QE_IMMR_OFFSET);
 
        u_qe_upload_firmware((const void *)CONFIG_SYS_QE_FW_ADDR);
        out_be32(&qe_immr->iram.iready, QE_IRAM_READY);
@@ -204,9 +203,8 @@ void u_qe_init(void)
 void u_qe_resume(void)
 {
        qe_map_t *qe_immrr;
-       uint qe_base = CONFIG_SYS_IMMR + QE_IMMR_OFFSET; /* QE immr base */
-       qe_immrr = (qe_map_t *)qe_base;
 
+       qe_immrr = (qe_map_t *)(CONFIG_SYS_IMMR + QE_IMMR_OFFSET);
        u_qe_firmware_resume((const void *)CONFIG_SYS_QE_FW_ADDR, qe_immrr);
        out_be32(&qe_immrr->iram.iready, QE_IRAM_READY);
 }
index 506f50d8955dc33623e9f927af0d6ffbf6a4a2e7..bc40b06a89f54be30b54fd6165d99fff1fea64df 100644 (file)
 #define CONFIG_ETHPRIME                        "FM1@DTSEC3"
 #endif
 
+/* QE */
+#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \
+       !defined(CONFIG_QSPI_BOOT)
+#define CONFIG_U_QE
+#endif
+#define CONFIG_SYS_QE_FW_ADDR     0x60600000
+
 /* USB */
 #define CONFIG_HAS_FSL_XHCI_USB
 #ifdef CONFIG_HAS_FSL_XHCI_USB