Skip to contentSkip to conversation

qe: Kconfig: Move CONFIG_U_QE to Kconfig

PATCH New Ran Wang 2 participants 5 messages Sep 26, 2018 – Sep 28, 2018 Arm (32-bit)

lore
Share & tools
lore

Ran Wang

author
#0 lore raw

PATCH v3 1/2 qe: Kconfig: Move CONFIG_U_QE to Kconfig

This patch moves CONFIG_U_QE to Kconfig

---
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
drivers/Kconfig +2 -0
index 56536c4b19..884a945a19 100644
@@ -74,6 +74,8 @@ source "drivers/power/Kconfig"
 
 source "drivers/pwm/Kconfig"
 
+source "drivers/qe/Kconfig"
+
 source "drivers/ram/Kconfig"
 
 source "drivers/remoteproc/Kconfig"
drivers/qe/Kconfig new file +12 -0
new file mode 100644
index 0000000000..49a6e32b16
@@ -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.
include/configs/T102xQDS.h +0 -1
index 8a38c5e19c..191616b8b0 100644
@@ -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)
 /*
include/configs/T102xRDB.h +0 -1
index f7a54f7a97..ac5de8d164 100644
@@ -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)
include/configs/T1040QDS.h +0 -1
index e890860b7e..25615be40e 100644
@@ -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)
 /*
include/configs/ls1021aqds.h +0 -1
index 994e6ca362..7f7ffdede1 100644
@@ -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
 
include/configs/ls1021atwr.h +0 -1
index 75b2e2fbbd..ddd024e8c0 100644
@@ -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
 
include/configs/ls1043ardb.h +0 -7
index bc639e586f..ffd92dbb43 100644
@@ -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
scripts/config_whitelist.txt +0 -1
index 94953d8738..cf97b64296 100644
@@ -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
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v3 2/2 armv7: ls102xa: Disable QE before enter deep sleep

Otherwise system will hang after executing wfi.

---
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(+)
arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c +4 -0
index af413f8622..bb169aaaf4 100644
@@ -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();
arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h +2 -0
index 13a282ffe1..a3d1171aa9 100644
@@ -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 */
Signature · 1 line
2.17.1
#2 lore raw

PATCH v3 2/2 armv7: ls102xa: Disable QE before enter deep sleep

Quoted 1 line · Ran Wang

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

author
#3 lore raw

PATCH v3 2/2 armv7: ls102xa: Disable QE before enter deep sleep

Hi York,

Quoted 8 lines

-----Original Message-----
From: York Sun
Sent: Friday, September 28, 2018 00:53
To: Ran Wang <[email protected]>; Alison Wang <[email protected]>
Cc: Qiang Zhao <[email protected]>; u-boot at lists.denx.de
Subject: Re: [PATCH v3 2/2] armv7: ls102xa: Disable QE before enter deep sleep

Quoted 4 lines
Quoted 1 line · Ran Wang

Otherwise system will hang after executing wfi.

This patch doesn't depend on the first patch, does it?

Yes

Quoted 3 lines

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

Quoted 1 line

York

#4 lore raw

PATCH v3 1/2 qe: Kconfig: Move CONFIG_U_QE to Kconfig

In reply to Ran Wang
Quoted 12 lines · Ran Wang

This patch moves CONFIG_U_QE to Kconfig

---
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