[U-Boot] [PATCH v3 1/2] qe: Kconfig: Move CONFIG_U_QE to Kconfig

This patch moves CONFIG_U_QE to Kconfig
Signed-off-by: Ran Wang ran.wang_1@nxp.com --- Change in v3: - Combine 1/3 and 2/3 patch of v2 - Remove unnecessary space in front of U-QE in drivers/qe/Kconfig - Remove CONFIG_U_QE in scripts/config_whitelist.txt
Change in v2: Add more conditional define to support more platforms.
drivers/Kconfig | 2 ++ drivers/qe/Kconfig | 12 ++++++++++++ include/configs/T102xQDS.h | 1 - include/configs/T102xRDB.h | 1 - include/configs/T1040QDS.h | 1 - include/configs/ls1021aqds.h | 1 - include/configs/ls1021atwr.h | 1 - include/configs/ls1043ardb.h | 7 ------- scripts/config_whitelist.txt | 1 - 9 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 drivers/qe/Kconfig
diff --git a/drivers/Kconfig b/drivers/Kconfig index 56536c4b19..884a945a19 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -74,6 +74,8 @@ source "drivers/power/Kconfig"
source "drivers/pwm/Kconfig"
+source "drivers/qe/Kconfig" + source "drivers/ram/Kconfig"
source "drivers/remoteproc/Kconfig" diff --git a/drivers/qe/Kconfig b/drivers/qe/Kconfig new file mode 100644 index 0000000000..49a6e32b16 --- /dev/null +++ b/drivers/qe/Kconfig @@ -0,0 +1,12 @@ +# +# QUICC Engine Drivers +# +config U_QE + bool "Enable support for U QUICC Engine" + default y if (ARCH_LS1021A && !SD_BOOT && !NAND_BOOT && !QSPI_BOOT) \ + || (TARGET_T1024QDS) \ + || (TARGET_T1024RDB) \ + || (TARGET_T1040QDS && !NOBQFMAN) \ + || (TARGET_LS1043ARDB && !SPL_NO_QE && !NAND_BOOT && !QSPI_BOOT) + help + Choose this option to add support for U QUICC Engine. diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h index 8a38c5e19c..191616b8b0 100644 --- a/include/configs/T102xQDS.h +++ b/include/configs/T102xQDS.h @@ -659,7 +659,6 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_DPAA_FMAN
#define CONFIG_QE -#define CONFIG_U_QE /* Default address of microcode for the Linux FMan driver */ #if defined(CONFIG_SPIFLASH) /* diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h index f7a54f7a97..ac5de8d164 100644 --- a/include/configs/T102xRDB.h +++ b/include/configs/T102xRDB.h @@ -669,7 +669,6 @@ unsigned long get_board_ddr_clk(void);
#ifdef CONFIG_TARGET_T1024RDB #define CONFIG_QE -#define CONFIG_U_QE #endif /* Default address of microcode for the Linux FMan driver */ #if defined(CONFIG_SPIFLASH) diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h index e890860b7e..25615be40e 100644 --- a/include/configs/T1040QDS.h +++ b/include/configs/T1040QDS.h @@ -549,7 +549,6 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_DPAA_PME
#define CONFIG_QE -#define CONFIG_U_QE /* Default address of microcode for the Linux Fman driver */ #if defined(CONFIG_SPIFLASH) /* diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h index 994e6ca362..7f7ffdede1 100644 --- a/include/configs/ls1021aqds.h +++ b/include/configs/ls1021aqds.h @@ -107,7 +107,6 @@ unsigned long get_board_ddr_clk(void);
#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \ !defined(CONFIG_QSPI_BOOT) -#define CONFIG_U_QE #define CONFIG_SYS_QE_FMAN_FW_IN_NOR #endif
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 75b2e2fbbd..ddd024e8c0 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -106,7 +106,6 @@
#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \ !defined(CONFIG_QSPI_BOOT) -#define CONFIG_U_QE #define CONFIG_SYS_QE_FMAN_FW_IN_NOR #endif
diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h index bc639e586f..ffd92dbb43 100644 --- a/include/configs/ls1043ardb.h +++ b/include/configs/ls1043ardb.h @@ -268,13 +268,6 @@ #endif #endif
-/* QE */ -#ifndef SPL_NO_QE -#if !defined(CONFIG_NAND_BOOT) && !defined(CONFIG_QSPI_BOOT) -#define CONFIG_U_QE -#endif -#endif - /* SATA */ #ifndef SPL_NO_SATA #ifndef CONFIG_CMD_EXT2 diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 94953d8738..cf97b64296 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -4635,7 +4635,6 @@ CONFIG_USE_SPIFLASH CONFIG_UTBIPAR_INIT_TBIPA CONFIG_U_BOOT_HDR_ADDR CONFIG_U_BOOT_HDR_SIZE -CONFIG_U_QE CONFIG_VAL CONFIG_VAR_SIZE_SPL CONFIG_VCT_NOR

Otherwise system will hang after executing wfi.
Signed-off-by: Ran Wang ran.wang_1@nxp.com --- Change in v3: Actually this is the same to 3/3 patch of v2
Change in v2: None
arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c | 4 ++++ arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h | 2 ++ 2 files changed, 6 insertions(+)
diff --git a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c index af413f8622..bb169aaaf4 100644 --- a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c +++ b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c @@ -73,6 +73,7 @@ static void __secure ls1_deepsleep_irq_cfg(void) * read, that is why we don't read it from register ippdexpcr1 itself. */ ippdexpcr1 = in_le32(&scfg->sparecr[7]); + out_be32(&rcpm->ippdexpcr1, ippdexpcr1);
if (ippdexpcr0 & RCPM_IPPDEXPCR0_ETSEC) pmcintecr |= SCFG_PMCINTECR_ETSECRXG0 | @@ -192,6 +193,9 @@ static void __secure ls1_deep_sleep(u32 entry_point) setbits_be32(&scfg->dpslpcr, SCFG_DPSLPCR_WDRR_EN); setbits_be32(&gur->crstsr, DCFG_CRSTSR_WDRFR);
+ /* Disable QE */ + setbits_be32(&gur->devdisr, CCSR_DEVDISR1_QE); + ls1_deepsleep_irq_cfg();
psci_v7_flush_dcache_all(); diff --git a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h index 13a282ffe1..a3d1171aa9 100644 --- a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h +++ b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h @@ -86,6 +86,8 @@ struct sys_info { unsigned long freq_localbus; };
+#define CCSR_DEVDISR1_QE 0x00000001 + /* Device Configuration and Pin Control */ struct ccsr_gur { u32 porsr1; /* POR status 1 */

On 09/25/2018 10:46 PM, Ran Wang wrote:
Otherwise system will hang after executing wfi.
This patch doesn't depend on the first patch, does it? In another word, this issue exists before, we didn't notice before because no one put the system on deep sleep. Is that right?
York

Hi York,
-----Original Message----- From: York Sun Sent: Friday, September 28, 2018 00:53 To: Ran Wang ran.wang_1@nxp.com; Alison Wang alison.wang@nxp.com Cc: Qiang Zhao qiang.zhao@nxp.com; u-boot@lists.denx.de Subject: Re: [PATCH v3 2/2] armv7: ls102xa: Disable QE before enter deep sleep
On 09/25/2018 10:46 PM, Ran Wang wrote:
Otherwise system will hang after executing wfi.
This patch doesn't depend on the first patch, does it?
Yes
In another word, this issue exists before, we didn't notice before because no one put the system on deep sleep. Is that right?
Yes, I think so, I found this issue only when try to enable deep sleep feature. Per my observation, this problem will block system enter deep sleep every time. Furthermore, this QE disabling here will not impact QE function when system wakeup due to there will be a warm reset actually.
However, I found another issue that QE re-initialization will randomly cause system hang when resume (actually it even randomly happen in normal boot, too), that's why I decide to move CONFIG_U_QE to Kconfig to allow user get chance to workaround them.
Regards, Ran
York

On 09/25/2018 10:46 PM, Ran Wang wrote:
This patch moves CONFIG_U_QE to Kconfig
Signed-off-by: Ran Wang ran.wang_1@nxp.com
Change in v3:
- Combine 1/3 and 2/3 patch of v2
- Remove unnecessary space in front of U-QE in drivers/qe/Kconfig
- Remove CONFIG_U_QE in scripts/config_whitelist.txt
Change in v2: Add more conditional define to support more platforms.
This patch set is applied to fsl-qoriq master, awaiting upstream. Thanks.
York
participants (2)
-
Ran Wang
-
York Sun