ARM: mach-omap2: omap3: Fix GPIO clocking in SPL
Subsystems (3)
PATCH 1/1 ARM: mach-omap2: omap3: Fix GPIO clocking in SPL
OMAP3_GPIO_x is needed to enable each GPIO bank on the OMAP3 boards. At one point, the #ifdef's were replaced with if CONFIG_IS_ENABLED but this won't work for people who need OMAP3_GPIO_x in SPL since the SPL prefix for this option isn't used in Kconfig. This patch moves the check to #if defined and also makes Kconfig select the banks if CMD_GPIO is used which makes the checks in the code less cumbersome.
all GPIO with CMD_GPIO")
arch/arm/mach-omap2/omap3/Kconfig +5 -0
@@ -3,18 +3,23 @@ if OMAP34XX # We only enable the clocks for the GPIO banks that a given board requies. config OMAP3_GPIO_2 bool + default y if CMD_GPIO config OMAP3_GPIO_3 bool + default y if CMD_GPIO config OMAP3_GPIO_4 bool + default y if CMD_GPIO config OMAP3_GPIO_5 bool + default y if CMD_GPIO config OMAP3_GPIO_6 bool + default y if CMD_GPIO choice prompt "OMAP3 board select"
arch/arm/mach-omap2/omap3/clock.c +5 -5
@@ -750,23 +750,23 @@ void per_clocks_enable(void)setbits_le32 (&prcm_base->iclken_per,0x00000800 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_2 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_2 )setbits_le32 (&prcm_base->fclken_per,0x00002000 );setbits_le32 (&prcm_base->iclken_per,0x00002000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_3 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_3 )setbits_le32 (&prcm_base->fclken_per,0x00004000 );setbits_le32 (&prcm_base->iclken_per,0x00004000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_4 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_4 )setbits_le32 (&prcm_base->fclken_per,0x00008000 );setbits_le32 (&prcm_base->iclken_per,0x00008000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_5 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_5 )setbits_le32 (&prcm_base->fclken_per,0x00010000 );setbits_le32 (&prcm_base->iclken_per,0x00010000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_6 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_6 )setbits_le32 (&prcm_base->fclken_per,0x00020000 );setbits_le32 (&prcm_base->iclken_per,0x00020000 );#endif
Signature · 1 line
2.17.1
PATCH 1/1 ARM: mach-omap2: omap3: Fix GPIO clocking in SPL
Not sure why, but this patch didn't work for me on omap3_overo and would like to NAK this patch. I needed to change to:
#if defined(CONFIG_OMAP3_GPIO2)
Quoted 81 lines · Adam Ford
OMAP3_GPIO_xis needed to enable each GPIO bank on the OMAP3 boards. At one point, the #ifdef's were replaced with ifCONFIG_IS_ENABLEDbut this won't work for people who needOMAP3_GPIO_xin SPL since the SPL prefix for this option isn't used inKconfig. This patch moves the check to #if defined and also makesKconfigselect the banks ifCMD_GPIOis used which makes the checks in the code less cumbersome.Fixes bd8a9c14c91c ("arm: mach-omap2/omap3/clock.c: Enableall GPIO with
CMD_GPIO")Reported-by Liam O'Shaughnessy <[email protected]>Signed-off-by Adam Ford <[email protected]>arch/arm/mach-omap2/omap3/Kconfig +5
-0@@ -3,18 +3,23 @@ if OMAP34XX # We only enable the clocks for the GPIO banks that a given board requies. config OMAP3_GPIO_2 bool + default y if CMD_GPIO config OMAP3_GPIO_3 bool + default y if CMD_GPIO config OMAP3_GPIO_4 bool + default y if CMD_GPIO config OMAP3_GPIO_5 bool + default y if CMD_GPIO config OMAP3_GPIO_6 bool + default y if CMD_GPIO choice prompt "OMAP3 board select"arch/arm/mach-omap2/omap3/clock.c +5
-6@@ -750,23 +750,23 @@ void per_clocks_enable(void)setbits_le32 (&prcm_base->iclken_per,0x00000800 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_2 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_2 )setbits_le32 (&prcm_base->fclken_per,0x00002000 );setbits_le32 (&prcm_base->iclken_per,0x00002000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_3 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_3 )setbits_le32 (&prcm_base->fclken_per,0x00004000 );setbits_le32 (&prcm_base->iclken_per,0x00004000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_4 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_4 )setbits_le32 (&prcm_base->fclken_per,0x00008000 );setbits_le32 (&prcm_base->iclken_per,0x00008000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_5 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_5 )setbits_le32 (&prcm_base->fclken_per,0x00010000 );setbits_le32 (&prcm_base->iclken_per,0x00010000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_6 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_6 )setbits_le32 (&prcm_base->fclken_per,0x00020000 );setbits_le32 (&prcm_base->iclken_per,0x00020000 );#endif --2.17.1
PATCH 1/1 ARM: mach-omap2: omap3: Fix GPIO clocking in SPL
Quoted 5 lines · Liam O'Shaughnessey
Not sure why, but this patch didn't work for me on
omap3_overoand would like to NAK this patch. I needed to change to:#if
defined(CONFIG_OMAP3_GPIO2)
blah! I forgot to add the CONFIG_ prefix. My bad. A V2 is now avaiable with the CONFIG_ back.
adam
Quoted 80 lines · Adam Ford
Quoted 79 lines
OMAP3_GPIO_xis needed to enable each GPIO bank on the OMAP3 boards. At one point, the #ifdef's were replaced with ifCONFIG_IS_ENABLEDbut this won't work for people who needOMAP3_GPIO_xin SPL since the SPL prefix for this option isn't used inKconfig. This patch moves the check to #if defined and also makesKconfigselect the banks ifCMD_GPIOis used which makes the checks in the code less cumbersome.Fixes bd8a9c14c91c ("arm: mach-omap2/omap3/clock.c: Enableall GPIO with
CMD_GPIO")Reported-by Liam O'Shaughnessy <[email protected]>Signed-off-by Adam Ford <[email protected]>arch/arm/mach-omap2/omap3/Kconfig +5
-0@@ -3,18 +3,23 @@ if OMAP34XX # We only enable the clocks for the GPIO banks that a given board requies. config OMAP3_GPIO_2 bool + default y if CMD_GPIO config OMAP3_GPIO_3 bool + default y if CMD_GPIO config OMAP3_GPIO_4 bool + default y if CMD_GPIO config OMAP3_GPIO_5 bool + default y if CMD_GPIO config OMAP3_GPIO_6 bool + default y if CMD_GPIO choice prompt "OMAP3 board select"arch/arm/mach-omap2/omap3/clock.c +5
-6@@ -750,23 +750,23 @@ void per_clocks_enable(void)setbits_le32 (&prcm_base->iclken_per,0x00000800 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_2 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_2 )setbits_le32 (&prcm_base->fclken_per,0x00002000 );setbits_le32 (&prcm_base->iclken_per,0x00002000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_3 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_3 )setbits_le32 (&prcm_base->fclken_per,0x00004000 );setbits_le32 (&prcm_base->iclken_per,0x00004000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_4 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_4 )setbits_le32 (&prcm_base->fclken_per,0x00008000 );setbits_le32 (&prcm_base->iclken_per,0x00008000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_5 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_5 )setbits_le32 (&prcm_base->fclken_per,0x00010000 );setbits_le32 (&prcm_base->iclken_per,0x00010000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_6 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_6 )setbits_le32 (&prcm_base->fclken_per,0x00020000 );setbits_le32 (&prcm_base->iclken_per,0x00020000 );#endif --2.17.1
PATCH 1/1 ARM: mach-omap2: omap3: Fix GPIO clocking in SPL
V2 works for me on omap3_overo.
Quoted 93 lines · Adam Ford
Quoted 5 lines · Liam O'Shaughnessey
Not sure why, but this patch didn't work for me on
omap3_overoand would like to NAK this patch. I needed to change to:#if
defined(CONFIG_OMAP3_GPIO2)blah! I forgot to add the
CONFIG_prefix. My bad. A V2 is now avaiable with theCONFIG_back.adam
Quoted 80 lines · Adam Ford
Quoted 79 lines
OMAP3_GPIO_xis needed to enable each GPIO bank on the OMAP3 boards. At one point, the #ifdef's were replaced with ifCONFIG_IS_ENABLEDbut this won't work for people who needOMAP3_GPIO_xin SPL since the SPL prefix for this option isn't used inKconfig. This patch moves the check to #if defined and also makesKconfigselect the banks ifCMD_GPIOis used which makes the checks in the code less cumbersome.Fixes bd8a9c14c91c ("arm: mach-omap2/omap3/clock.c: Enableall GPIO with
CMD_GPIO")Reported-by Liam O'Shaughnessy <[email protected]>Signed-off-by Adam Ford <[email protected]>arch/arm/mach-omap2/omap3/Kconfig +5
-0@@ -3,18 +3,23 @@ if OMAP34XX # We only enable the clocks for the GPIO banks that a given board requies. config OMAP3_GPIO_2 bool + default y if CMD_GPIO config OMAP3_GPIO_3 bool + default y if CMD_GPIO config OMAP3_GPIO_4 bool + default y if CMD_GPIO config OMAP3_GPIO_5 bool + default y if CMD_GPIO config OMAP3_GPIO_6 bool + default y if CMD_GPIO choice prompt "OMAP3 board select"arch/arm/mach-omap2/omap3/clock.c +5
-6@@ -750,23 +750,23 @@ void per_clocks_enable(void)setbits_le32 (&prcm_base->iclken_per,0x00000800 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_2 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_2 )setbits_le32 (&prcm_base->fclken_per,0x00002000 );setbits_le32 (&prcm_base->iclken_per,0x00002000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_3 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_3 )setbits_le32 (&prcm_base->fclken_per,0x00004000 );setbits_le32 (&prcm_base->iclken_per,0x00004000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_4 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_4 )setbits_le32 (&prcm_base->fclken_per,0x00008000 );setbits_le32 (&prcm_base->iclken_per,0x00008000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_5 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_5 )setbits_le32 (&prcm_base->fclken_per,0x00010000 );setbits_le32 (&prcm_base->iclken_per,0x00010000 );#endif -#if (CONFIG_IS_ENABLED (OMAP3_GPIO_6 ) ||CONFIG_IS_ENABLED (CMD_GPIO )) +#if defined(OMAP3_GPIO_6 )setbits_le32 (&prcm_base->fclken_per,0x00020000 );setbits_le32 (&prcm_base->iclken_per,0x00020000 );#endif --2.17.1