arm: spear: enable GPIO3 and 4 clocks when the GPIO controller driver is built

There are multiple GPIOs that can be used with the same driver depending
on the CONFIG_GPIO_BASE defined in the controller driver.

GPIO3 and 4 require a clock to be enabled so let's enable them when the
driver is built.

Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com>
This commit is contained in:
Quentin Schulz
2018-08-31 16:15:53 +02:00
committed by Tom Rini
parent 8961c8ad25
commit d2d908d258
2 changed files with 4 additions and 0 deletions

View File

@@ -49,6 +49,9 @@ int arch_cpu_init(void)
#if defined(CONFIG_USB_EHCI_SPEAR)
periph1_clken |= PERIPH_USBH1 | PERIPH_USBH2;
#endif
#if defined(CONFIG_SPEAR_GPIO)
periph1_clken |= MISC_GPIO3ENB | MISC_GPIO4ENB;
#endif
writel(periph1_clken, &misc_p->periph1_clken);