From: Zhao Qiang Date: Fri, 5 Feb 2016 02:04:17 +0000 (+0800) Subject: board: ls1043ardb: Add micro QE support for ls1043ardb X-Git-Tag: v2016.03-rc3~21^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d3e6d30cef41d929dcab2ce8dcb93d92319a49a2;p=u-boot board: ls1043ardb: Add micro QE support for ls1043ardb Signed-off-by: Zhao Qiang Reviewed-by: York Sun --- diff --git a/board/freescale/ls1043ardb/ls1043ardb.c b/board/freescale/ls1043ardb/ls1043ardb.c index c8f723a108..2e61f3a08e 100644 --- a/board/freescale/ls1043ardb/ls1043ardb.c +++ b/board/freescale/ls1043ardb/ls1043ardb.c @@ -21,6 +21,10 @@ #include #include #include "cpld.h" +#ifdef CONFIG_U_QE +#include +#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; } diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c index 31e0e3b4d5..2b98984ef2 100644 --- a/drivers/qe/qe.c +++ b/drivers/qe/qe.c @@ -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); } diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h index 506f50d895..bc40b06a89 100644 --- a/include/configs/ls1043ardb.h +++ b/include/configs/ls1043ardb.h @@ -268,6 +268,13 @@ #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