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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user