From c3f02be362aa216f2d3ee011916f9a18baf58291 Mon Sep 17 00:00:00 2001 From: 5kft <5kft@5kft.org> Date: Sat, 4 Aug 2018 12:57:39 +0000 Subject: [PATCH] update R_PIO GPIO block enable (H3/H5) Move the previous "R_PIO enable" change to initial board gpio_init (from clock_init) --- .../enable-r_pio-access-in-spl-h3-h5.patch | 17 ------------- .../enable-r_pio-gpio-access-h3-h5.patch | 24 +++++++++++++++++++ 2 files changed, 24 insertions(+), 17 deletions(-) delete mode 100644 patch/u-boot/u-boot-sunxi/enable-r_pio-access-in-spl-h3-h5.patch create mode 100644 patch/u-boot/u-boot-sunxi/enable-r_pio-gpio-access-h3-h5.patch diff --git a/patch/u-boot/u-boot-sunxi/enable-r_pio-access-in-spl-h3-h5.patch b/patch/u-boot/u-boot-sunxi/enable-r_pio-access-in-spl-h3-h5.patch deleted file mode 100644 index 31fec650b..000000000 --- a/patch/u-boot/u-boot-sunxi/enable-r_pio-access-in-spl-h3-h5.patch +++ /dev/null @@ -1,17 +0,0 @@ -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 - } - diff --git a/patch/u-boot/u-boot-sunxi/enable-r_pio-gpio-access-h3-h5.patch b/patch/u-boot/u-boot-sunxi/enable-r_pio-gpio-access-h3-h5.patch new file mode 100644 index 000000000..9d492d80d --- /dev/null +++ b/patch/u-boot/u-boot-sunxi/enable-r_pio-gpio-access-h3-h5.patch @@ -0,0 +1,24 @@ +diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c +index 7ac8360..0484e7a 100644 +--- a/arch/arm/mach-sunxi/board.c ++++ b/arch/arm/mach-sunxi/board.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include + +@@ -65,6 +66,11 @@ struct mm_region *mem_map = sunxi_mem_map; + + static int gpio_init(void) + { ++#if defined(CONFIG_MACH_SUNXI_H3_H5) ++ /* enable R_PIO GPIO access */ ++ prcm_apb0_enable(PRCM_APB0_GATE_PIO); ++#endif ++ + #if CONFIG_CONS_INDEX == 1 && defined(CONFIG_UART0_PORT_F) + #if defined(CONFIG_MACH_SUN4I) || \ + defined(CONFIG_MACH_SUN7I) || \