Skip to contentSkip to conversation

arm: mach-omap2/omap3/clock.c: Enable all GPIO with CMD_GPIO

PATCH In review Adam Ford 2 participants 2 messages Jun 12, 2018 – Jun 19, 2018

Subsystems (3)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 arm: mach-omap2/omap3/clock.c: Enable all GPIO with CMD_GPIO

When CMD_GPIO is enabled the command 'gpio status -a' can cause a hang or reboot if GPIO banks are not enabled, because it scans all banks. This patch enables all GPIO banks so 'gpio status -a' can fully execute.

arch/arm/mach-omap2/omap3/clock.c +5 -5
index b9d92c62b1..9a03bfa9d3 100644
@@ -750,23 +750,23 @@ void per_clocks_enable(void)
 	setbits_le32(&prcm_base->iclken_per, 0x00000800);
 #endif
 
-#ifdef CONFIG_OMAP3_GPIO_2
+#if (CONFIG_IS_ENABLED(OMAP3_GPIO_2) || CONFIG_IS_ENABLED(CMD_GPIO))
 	setbits_le32(&prcm_base->fclken_per, 0x00002000);
 	setbits_le32(&prcm_base->iclken_per, 0x00002000);
 #endif
-#ifdef CONFIG_OMAP3_GPIO_3
+#if (CONFIG_IS_ENABLED(OMAP3_GPIO_3) || CONFIG_IS_ENABLED(CMD_GPIO))
 	setbits_le32(&prcm_base->fclken_per, 0x00004000);
 	setbits_le32(&prcm_base->iclken_per, 0x00004000);
 #endif
-#ifdef CONFIG_OMAP3_GPIO_4
+#if (CONFIG_IS_ENABLED(OMAP3_GPIO_4) || CONFIG_IS_ENABLED(CMD_GPIO))
 	setbits_le32(&prcm_base->fclken_per, 0x00008000);
 	setbits_le32(&prcm_base->iclken_per, 0x00008000);
 #endif
-#ifdef CONFIG_OMAP3_GPIO_5
+#if (CONFIG_IS_ENABLED(OMAP3_GPIO_5) || CONFIG_IS_ENABLED(CMD_GPIO))
 	setbits_le32(&prcm_base->fclken_per, 0x00010000);
 	setbits_le32(&prcm_base->iclken_per, 0x00010000);
 #endif
-#ifdef CONFIG_OMAP3_GPIO_6
+#if (CONFIG_IS_ENABLED(OMAP3_GPIO_6) || CONFIG_IS_ENABLED(CMD_GPIO))
 	setbits_le32(&prcm_base->fclken_per, 0x00020000);
 	setbits_le32(&prcm_base->iclken_per, 0x00020000);
 #endif
Signature · 1 line
2.17.1
#1 lore raw

arch/arm/mach-omap2/omap3/clock.c

Quoted 9 lines · Adam Ford

When CMD_GPIO is enabled the command 'gpio status -a' can cause a hang or reboot if GPIO banks are not enabled, because it scans all banks. This patch enables all GPIO banks so 'gpio status -a' can fully execute.

arch/arm/mach-omap2/omap3/clock.c +0 -0
index b9d92c62b1..9a03bfa9d3 100644

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180619/670807c3/attachment.sig>