- Not power down OCRAM1 for FlexTimer to wakeup
  system with FlexTimer in deep sleep.

- Add errata ID A-008646 for workaround.

Signed-off-by: Biwen Li <biwen...@nxp.com>
---
 arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c 
b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c
index bb169aaaf4..acd74c3ba4 100644
--- a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c
+++ b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c
@@ -68,12 +68,11 @@ static void __secure ls1_deepsleep_irq_cfg(void)
 
        ippdexpcr0 = in_be32(&rcpm->ippdexpcr0);
        /*
-        * Workaround: There is bug of register ippdexpcr1, when read it always
+        * Workaround of errata A-008646: There is bug of register ippdexpcr1, 
when read it always
         * returns zero, so its value is saved to a scrachpad register to be
         * 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 |
@@ -87,8 +86,11 @@ static void __secure ls1_deepsleep_irq_cfg(void)
        if (ippdexpcr1 & RCPM_IPPDEXPCR1_LPUART)
                pmcintecr |= SCFG_PMCINTECR_LPUART;
 
-       if (ippdexpcr1 & RCPM_IPPDEXPCR1_FLEXTIMER)
+       if (ippdexpcr1 & RCPM_IPPDEXPCR1_FLEXTIMER) {
                pmcintecr |= SCFG_PMCINTECR_FTM;
+               /* Not power down OCRAM1 */
+               out_be32(&rcpm->ippdexpcr1, ippdexpcr1 | 
RCPM_IPPDEXPCR1_OCRAM1);
+       }
 
        /* Always set external IRQ pins as wakeup source */
        pmcintecr |= SCFG_PMCINTECR_IRQ0 | SCFG_PMCINTECR_IRQ1;
-- 
2.17.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to