Skip to contentSkip to conversation

qe: kconfig: U QE kconfig

PATCH Superseded Ran Wang 2 participants 5 messages Aug 9, 2018 – Sep 25, 2018 Arm (32-bit)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ran Wang

author
#0 lore raw

PATCH 1/3 qe: kconfig: U QE kconfig

add Kconfig option for U QUICC Engine.

---
 drivers/Kconfig    | 2 ++
 drivers/qe/Kconfig | 8 ++++++++
 2 files changed, 10 insertions(+)
 create mode 100644 drivers/qe/Kconfig
drivers/Kconfig +2 -0
index c2e813f..da2f811 100644
@@ -68,6 +68,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 +8 -0
new file mode 100644
index 0000000..e2dd2e7
@@ -0,0 +1,8 @@
+#
+# QUICC Engine Drivers
+#
+config  U_QE
+	bool "Enable support for U QUICC Engine"
+	default y if ARCH_LS1021A && !SD_BOOT && !NAND_BOOT && !QSPI_BOOT
+	help
+	  Choose this option to add support for U QUICC Engine.
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 2/3 arm: layerscape: Remove CONFIG_U_QE define in ls1012atwr.h

Move to drivers/qe/Kconfig. QE has problem in LS1021A deep sleep resume, so make this option in menuconfig instead.

---
 include/configs/ls1021atwr.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/ls1021atwr.h +0 -1
index 8f27d9e..548e0c5 100644
@@ -108,7 +108,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
 
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 3/3 armv7: ls102xa: Disable QE before enter deep sleep

In reply to Ran Wang

Otherwise system will hang after executing wfi.

---
 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 1cbe93c..8ae90f1 100644
@@ -74,6 +74,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 |
@@ -193,6 +194,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 fe0bbb9..d1c78b5 100644
@@ -87,6 +87,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.7.4
#3 lore raw

PATCH 1/3 qe: kconfig: U QE kconfig

In reply to Ran Wang
Quoted 29 lines · Ran Wang

add Kconfig option for U QUICC Engine.

---
 drivers/Kconfig    | 2 ++
 drivers/qe/Kconfig | 8 ++++++++
 2 files changed, 10 insertions(+)
 create mode 100644 drivers/qe/Kconfig
drivers/Kconfig +2 -0
index c2e813f..da2f811 100644
@@ -68,6 +68,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 +0 -0
new file mode 100644
index 0000000..e2dd2e7

drivers/qe/Kconfig line 8

Quoted 8 lines
drivers/qe/Kconfig new file +8 -0
@@ -0,0 +1,8 @@
+#
+# QUICC Engine Drivers
+#
+config  U_QE
+	bool "Enable support for U QUICC Engine"
+	default y if ARCH_LS1021A && !SD_BOOT && !NAND_BOOT && !QSPI_BOOT
+	help
+	  Choose this option to add support for U QUICC Engine.

Since you add Kconfig option, you should migrate all existing #define CONFIG_U_QE to Kconfig/defconfig. So far only T102x, T1040, LS1021, LS1043 have this option defined.

York

author
#4 lore raw

PATCH 1/3 qe: kconfig: U QE kconfig

Hi York,

Quoted 43 lines

-----Original Message-----
From: York Sun
Sent: Saturday, September 22, 2018 02:50
To: Ran Wang <[email protected]>; Alison Wang <[email protected]>; Sumit Garg <[email protected]>
Cc: Qiang Zhao <[email protected]>; u-boot at lists.denx.de
Subject: Re: [PATCH 1/3] qe: kconfig: U QE kconfig

Quoted 27 lines · Ran Wang

add Kconfig option for U QUICC Engine.

---
 drivers/Kconfig    | 2 ++
 drivers/qe/Kconfig | 8 ++++++++
 2 files changed, 10 insertions(+)
 create mode 100644 drivers/qe/Kconfig
drivers/Kconfig index c2e813f..da2f811 renamed from drivers/Kconfig +0 -0

100644

drivers/Kconfig +2 -0
@@ -68,6 +68,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 mode renamed from drivers/qe/Kconfig +0 -0

100644 index 0000000..e2dd2e7

drivers/qe/Kconfig line 6

Quoted 6 lines
drivers/qe/Kconfig new file +6 -0
@@ -0,0 +1,8 @@
+#
+# QUICC Engine Drivers
+#
+config  U_QE
+	bool "Enable support for U QUICC Engine"
+	default y if ARCH_LS1021A && !SD_BOOT && !NAND_BOOT

&& !QSPI_BOOT

Quoted 7 lines

drivers/qe/Kconfig line 8

Quoted 3 lines
drivers/qe/Kconfig new file +2 -0
+	help
+	  Choose this option to add support for U QUICC Engine.

Since you add Kconfig option, you should migrate all existing #define CONFIG_U_QE to Kconfig/defconfig. So far only T102x, T1040, LS1021, LS1043 have this option defined.

OK, will cover this in next version.

Regards,
Ran

Quoted 1 line

York