OMAP3, Zoom2 Initializing GPIO bank clocks
In OMAP3, the GPIO bank clocks should only be turned on as needed. This is done at the config file level.
Zoom2 uses GPIO so it must turn on the GPIO bank clocks it needs.
PATCH 1/2 OMAP3 Turn on the GPIO bank clocks
The function and interface clocks for each GPIO bank, except the first, must be explicitly turned on. These are controlled by the config level defines CONFIG_OMAP3_GPIO_n where n is from 2 to 6.
--- cpu/arm_cortexa8/omap3/clock.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-)
cpu/arm_cortexa8/omap3/clock.c +22 -0
@@ -357,6 +357,28 @@ void per_clocks_enable(void)sr32 (&prcm_base->fclken_per,11 ,1 ,0x1 );sr32 (&prcm_base->iclken_per,11 ,1 ,0x1 );#endif + +#ifdef CONFIG_OMAP3_GPIO_2 +sr32 (&prcm_base->fclken_per,13 ,1 ,1 ); +sr32 (&prcm_base->iclken_per,13 ,1 ,1 ); +#endif +#ifdef CONFIG_OMAP3_GPIO_3 +sr32 (&prcm_base->fclken_per,14 ,1 ,1 ); +sr32 (&prcm_base->iclken_per,14 ,1 ,1 ); +#endif +#ifdef CONFIG_OMAP3_GPIO_4 +sr32 (&prcm_base->fclken_per,15 ,1 ,1 ); +sr32 (&prcm_base->iclken_per,15 ,1 ,1 ); +#endif +#ifdef CONFIG_OMAP3_GPIO_5 +sr32 (&prcm_base->fclken_per,16 ,1 ,1 ); +sr32 (&prcm_base->iclken_per,16 ,1 ,1 ); +#endif +#ifdef CONFIG_OMAP3_GPIO_6 +sr32 (&prcm_base->fclken_per,17 ,1 ,1 ); +sr32 (&prcm_base->iclken_per,17 ,1 ,1 ); +#endif +#ifdef CONFIG_DRIVER_OMAP34XX_I2C /* Turn on all 3 I2C clocks */ sr32 (&prcm_base->fclken1_core,15 ,3 ,0x7 );
Signature · 1 line
1.6.0.5
PATCH 2/2 ZOOM2 Define GPIO banks used.
Enable the function and interface clocks for banks 2,3,5 and 6.
--- include/configs/omap3_zoom2.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
include/configs/omap3_zoom2.h +8 -0
@@ -115,6 +115,14 @@/* Optional value */ #define STATUS_LED_BOOT STATUS_LED_BIT +/* GPIO banks */ +#ifdef CONFIG_STATUS_LED +#define CONFIG_OMAP3_GPIO_2 /* ZOOM2_LED_BLUE2 */ +#define CONFIG_OMAP3_GPIO_6 /* ZOOM2_LED_RED */ +#endif +#define CONFIG_OMAP3_GPIO_3 /* board revision */ +#define CONFIG_OMAP3_GPIO_5 /* debug board detection, ZOOM2_LED_BLUE */ +/* commands to include */ #include <config_cmd_default.h>
Signature · 1 line
1.6.0.5
Jean-Christophe PLAGNIOL-VILLARD
AppliedPATCH 2/2 ZOOM2 Define GPIO banks used.
Quoted 4 lines · Tom Rix
Enable the function and interface clocks for banks 2,3,5 and 6.
Signed-off-by Tom Rix <[email protected]>---
applied to arm/next
Best Regards,
J.
Jean-Christophe PLAGNIOL-VILLARD
AppliedPATCH 1/2 OMAP3 Turn on the GPIO bank clocks
In reply to Tom RixQuoted 6 lines · Tom Rix
The function and interface clocks for each GPIO bank, except the first, must be explicitly turned on. These are controlled by the config level defines
CONFIG_OMAP3_GPIO_nwhere n is from 2 to 6.Signed-off-by Tom Rix <[email protected]>---
applied to arm/next
Best Regards,
J.