Skip to contentSkip to conversation

qe: kconfig: U QE kconfig

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

lore
Share & tools
lore

Ran Wang

author
#0 lore raw

PATCH v2 1/3 qe: kconfig: U QE kconfig

add Kconfig option for U QUICC Engine.

---
Change in v2:
Add more conditional define to support more platforms.

 drivers/Kconfig    |  2 ++
 drivers/qe/Kconfig | 12 ++++++++++++
 2 files changed, 14 insertions(+)
 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..c47b54ab12
@@ -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.
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v2 2/3 arm: layerscape: Remove CONFIG_U_QE define in head files

Because it has been moved to drivers/qe/Kconfig instead. Following platforms are involved:
T102xQDS, T102xRDB, T1040QDS, ls1021aqds, ls1021atwr, ls1043ardb

---
Change in v2:
Remove CONFIG_U_QE from more platforms besides ls1021a

 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 -------
 6 files changed, 12 deletions(-)
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
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 2/3 arm: layerscape: Remove CONFIG_U_QE define in head files

Quoted 9 lines · Ran Wang

Because it has been moved to drivers/qe/Kconfig instead. Following platforms are involved:
T102xQDS, T102xRDB, T1040QDS, ls1021aqds, ls1021atwr, ls1043ardb

---
Change in v2:
Remove CONFIG_U_QE from more platforms besides ls1021a

Quoted 7 lines
 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 -------
 6 files changed, 12 deletions(-)

After removing all defines, please remove it from config_whitelist.txt.

York

author
#3 lore raw

PATCH v2 2/3 arm: layerscape: Remove CONFIG_U_QE define in head files

Hi York,

Quoted 26 lines

-----Original Message-----
From: York Sun
Sent: Wednesday, September 26, 2018 01:02
To: Ran Wang <[email protected]>; Alison Wang <[email protected]>
Cc: Qiang Zhao <[email protected]>; u-boot at lists.denx.de
Subject: Re: [PATCH v2 2/3] arm: layerscape: Remove CONFIG_U_QE define in head files

Quoted 9 lines · Ran Wang

Because it has been moved to drivers/qe/Kconfig instead. Following platforms are involved:
T102xQDS, T102xRDB, T1040QDS, ls1021aqds, ls1021atwr, ls1043ardb

---
Change in v2:
Remove CONFIG_U_QE from more platforms besides ls1021a

Quoted 7 lines
 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 -------
 6 files changed, 12 deletions(-)
Quoted 1 line

After removing all defines, please remove it from config_whitelist.txt.

Got it, will add it in next version.

Ran

author
#4 lore raw

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

In reply to Ran Wang

Otherwise system will hang after executing wfi.

---
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
#5 lore raw

PATCH v2 1/3 qe: kconfig: U QE kconfig

In reply to Ran Wang
Quoted 31 lines · Ran Wang

add Kconfig option for U QUICC Engine.

---
Change in v2:
Add more conditional define to support more platforms.

 drivers/Kconfig    |  2 ++
 drivers/qe/Kconfig | 12 ++++++++++++
 2 files changed, 14 insertions(+)
 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 +0 -0
new file mode 100644
index 0000000000..c47b54ab12

drivers/qe/Kconfig line 4

Quoted 4 lines
drivers/qe/Kconfig new file +4 -0
@@ -0,0 +1,12 @@
+#
+# QUICC Engine Drivers
+#
+config  U_QE

Did you notice you have extra space here?

York

author
#6 lore raw

PATCH v2 1/3 qe: kconfig: U QE kconfig

Hi York,

Quoted 32 lines

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

Quoted 24 lines · Ran Wang

add Kconfig option for U QUICC Engine.

---
Change in v2:
Add more conditional define to support more platforms.

 drivers/Kconfig    |  2 ++
 drivers/qe/Kconfig | 12 ++++++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 drivers/qe/Kconfig
drivers/Kconfig index renamed from drivers/Kconfig +0 -0

56536c4b19..884a945a19 100644

drivers/Kconfig +2 -0
@@ -74,6 +74,8 @@ source "drivers/power/Kconfig"
 
 source "drivers/pwm/Kconfig"
 
+source "drivers/qe/Kconfig"
+
 source "drivers/ram/Kconfig"
 
Quoted 12 lines

drivers/qe/Kconfig line 4

Quoted 10 lines
drivers/Kconfig +0 -0
 source "drivers/remoteproc/Kconfig"
drivers/qe/Kconfig new file mode renamed from drivers/qe/Kconfig +0 -0

100644 index 0000000000..c47b54ab12

drivers/qe/Kconfig new file +4 -0
@@ -0,0 +1,12 @@
+#
+# QUICC Engine Drivers
+#
+config  U_QE

Did you notice you have extra space here?

My bad, will correct it, thanks for point out.

Ran