summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahisa Kojima <masahisa.kojima@linaro.org>2018-02-27 12:06:17 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2018-02-27 12:08:42 +0000
commit7d0afe144a4ac35f321dddace37a5bdc11d80453 (patch)
tree5c0446e7ba5b1d8fec6d9f326c471fa0d4eb70c8
parentcd3de9253d90f5ab6eed046fb7bb9f4e9f87ae5a (diff)
synquacer: add more delay in GPIO poweroff sequence
To ensure that the MCU can observe a high to low transition followed by a low to high transition, force the GPIO high when configuring it as output, and add another delay to keep it in that state for ~1 ms. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-rw-r--r--plat/arm/css/common/css_pm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/plat/arm/css/common/css_pm.c b/plat/arm/css/common/css_pm.c
index 6abac246..6893e914 100644
--- a/plat/arm/css/common/css_pm.c
+++ b/plat/arm/css/common/css_pm.c
@@ -239,6 +239,12 @@ void __dead2 css_system_off(void)
/* set PD[9] high to power off the system */
gpio[5] |= 0x2; /* set output */
+ gpio[1] |= 0x2; /* set high */
+ dmbst();
+
+ for (i = 0; i < 1000000; i++)
+ __asm__("nop");
+
gpio[1] &= ~0x2; /* set low */
dmbst();