Merge pull request #1064 from 5kft/enable-r-pio

enable R_PIO GPIO access in the SPL (H3 and H5)
This commit is contained in:
Igor Pečovnik 2018-07-30 08:58:07 +02:00 committed by GitHub
commit 0e50f11d87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,17 @@
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
index 6bfda31..59d556f 100644
--- a/arch/arm/mach-sunxi/clock_sun6i.c
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
@@ -76,6 +76,12 @@ void clock_init_sec(void)
PRCM_SEC_SWITCH_APB0_CLK_NONSEC |
PRCM_SEC_SWITCH_PLL_CFG_NONSEC |
PRCM_SEC_SWITCH_PWR_GATE_NONSEC);
+
+#if defined(CONFIG_SPL_BUILD) && (CONFIG_CONS_INDEX < 5)
+ /* enable R_PIO access within the SPL */
+ prcm_apb0_enable(PRCM_APB0_GATE_PIO);
+#endif
+
#endif
}