]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ep93xx: Configure GPIO ports in core code
authorRyan Mallon <rmallon@gmail.com>
Tue, 10 Jan 2012 22:58:30 +0000 (09:58 +1100)
committerRyan Mallon <rmallon@gmail.com>
Wed, 14 Mar 2012 00:42:30 +0000 (11:42 +1100)
Move the pinmux setting of the EP93xx GPIOs to the core code. This
removes the need for the GPIO driver to have access to the system
controller registers.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
arch/arm/mach-ep93xx/core.c
drivers/gpio/gpio-ep93xx.c

index 776b34619901f49c87d136346c4035e09a871215..bab6e470cbd70699fd827bc6f920ef9bf3f49db7 100644 (file)
@@ -909,6 +909,13 @@ void __init ep93xx_init_devices(void)
        /* Disallow access to MaverickCrunch initially */
        ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);
 
+       /* Default all ports to GPIO */
+       ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
+                              EP93XX_SYSCON_DEVCFG_GONK |
+                              EP93XX_SYSCON_DEVCFG_EONIDE |
+                              EP93XX_SYSCON_DEVCFG_GONIDE |
+                              EP93XX_SYSCON_DEVCFG_HONIDE);
+
        /* Get the GPIO working early, other devices need it */
        platform_device_register(&ep93xx_gpio_device);
 
index 1c0fc3756cb103c89c616ed6d3258b3c21864926..4ca5642e9776108b5ba873be4faa0dd37e3c08ac 100644 (file)
@@ -378,13 +378,6 @@ static int __devinit ep93xx_gpio_probe(struct platform_device *pdev)
        }
        ep93xx_gpio->mmio_base = mmio;
 
-       /* Default all ports to GPIO */
-       ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
-                              EP93XX_SYSCON_DEVCFG_GONK |
-                              EP93XX_SYSCON_DEVCFG_EONIDE |
-                              EP93XX_SYSCON_DEVCFG_GONIDE |
-                              EP93XX_SYSCON_DEVCFG_HONIDE);
-
        for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++) {
                struct bgpio_chip *bgc = &ep93xx_gpio->bgc[i];
                struct ep93xx_gpio_bank *bank = &ep93xx_gpio_banks[i];