[U-Boot] [PATCH 1/3] qe: kconfig: U QE kconfig

add Kconfig option for U QUICC Engine.
Signed-off-by: Ran Wang ran.wang_1@nxp.com --- drivers/Kconfig | 2 ++ drivers/qe/Kconfig | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 drivers/qe/Kconfig
diff --git a/drivers/Kconfig b/drivers/Kconfig index c2e813f..da2f811 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -68,6 +68,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 0000000..e2dd2e7 --- /dev/null +++ b/drivers/qe/Kconfig @@ -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.

Move to drivers/qe/Kconfig. QE has problem in LS1021A deep sleep resume, so make this option in menuconfig instead.
Signed-off-by: Ran Wang ran.wang_1@nxp.com --- include/configs/ls1021atwr.h | 1 - 1 file changed, 1 deletion(-)
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 8f27d9e..548e0c5 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -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

Otherwise system will hang after executing wfi.
Signed-off-by: Ran Wang ran.wang_1@nxp.com --- 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 1cbe93c..8ae90f1 100644 --- a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c +++ b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c @@ -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(); diff --git a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h index fe0bbb9..d1c78b5 100644 --- a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h +++ b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h @@ -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 */

On 08/09/2018 02:56 AM, Ran Wang wrote:
add Kconfig option for U QUICC Engine.
Signed-off-by: Ran Wang ran.wang_1@nxp.com
drivers/Kconfig | 2 ++ drivers/qe/Kconfig | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 drivers/qe/Kconfig
diff --git a/drivers/Kconfig b/drivers/Kconfig index c2e813f..da2f811 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -68,6 +68,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 0000000..e2dd2e7 --- /dev/null +++ b/drivers/qe/Kconfig @@ -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

Hi York,
-----Original Message----- From: York Sun Sent: Saturday, September 22, 2018 02:50 To: Ran Wang ran.wang_1@nxp.com; Alison Wang alison.wang@nxp.com; Sumit Garg sumit.garg@nxp.com Cc: Qiang Zhao qiang.zhao@nxp.com; u-boot@lists.denx.de Subject: Re: [PATCH 1/3] qe: kconfig: U QE kconfig
On 08/09/2018 02:56 AM, Ran Wang wrote:
add Kconfig option for U QUICC Engine.
Signed-off-by: Ran Wang ran.wang_1@nxp.com
drivers/Kconfig | 2 ++ drivers/qe/Kconfig | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 drivers/qe/Kconfig
diff --git a/drivers/Kconfig b/drivers/Kconfig index c2e813f..da2f811 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -68,6 +68,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 0000000..e2dd2e7 --- /dev/null +++ b/drivers/qe/Kconfig @@ -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.
OK, will cover this in next version.
Regards, Ran
York
participants (2)
-
Ran Wang
-
York Sun