gpio: stm32_gpio: move clock config from driver to board

This patch removes the gpio clock enable from gpio driver & move it in the
board code, making it possible to use the gpio driver with other socs.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
This commit is contained in:
Vikas Manocha
2016-02-11 15:47:17 -08:00
committed by Tom Rini
parent 52dd704bf8
commit 14cec06113
4 changed files with 67 additions and 5 deletions

View File

@@ -50,6 +50,7 @@ int uart_setup_gpio(void)
int i;
int rv = 0;
clock_setup(GPIO_A_CLOCK_CFG);
for (i = 0; i < ARRAY_SIZE(usart_gpio); i++) {
rv = stm32_gpio_config(&usart_gpio[i], &gpio_ctl_usart);
if (rv)
@@ -115,6 +116,13 @@ static int fmc_setup_gpio(void)
int rv = 0;
int i;
clock_setup(GPIO_B_CLOCK_CFG);
clock_setup(GPIO_C_CLOCK_CFG);
clock_setup(GPIO_D_CLOCK_CFG);
clock_setup(GPIO_E_CLOCK_CFG);
clock_setup(GPIO_F_CLOCK_CFG);
clock_setup(GPIO_G_CLOCK_CFG);
for (i = 0; i < ARRAY_SIZE(ext_ram_fmc_gpio); i++) {
rv = stm32_gpio_config(&ext_ram_fmc_gpio[i],
&gpio_ctl_fmc);