]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/plat-omap/gpio.c
ARM: OMAP: Enable 24xx GPIO autoidling
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / gpio.c
index b8c01de208b4d0469dd0a9499e3109b1ec1fdd13..e2547a73f07f70d3023519f7ceda2555429b7164 100644 (file)
@@ -1083,6 +1083,10 @@ static int __init _omap_gpio_init(void)
                if (bank->method == METHOD_GPIO_24XX) {
                        __raw_writel(0x00000000, bank->base + OMAP24XX_GPIO_IRQENABLE1);
                        __raw_writel(0xffffffff, bank->base + OMAP24XX_GPIO_IRQSTATUS1);
+                       __raw_writew(0x0015, bank->base + OMAP24XX_GPIO_SYSCONFIG);
+
+                       /* Initialize interface clock ungated, module enabled */
+                       __raw_writel(0, bank->base + OMAP24XX_GPIO_CTRL);
 
                        gpio_count = 32;
                }
@@ -1105,6 +1109,12 @@ static int __init _omap_gpio_init(void)
        if (cpu_is_omap16xx())
                omap_writel(omap_readl(ULPD_CAM_CLK_CTRL) | 0x04, ULPD_CAM_CLK_CTRL);
 
+#ifdef CONFIG_ARCH_OMAP24XX
+       /* Enable autoidle for the OCP interface */
+       if (cpu_is_omap24xx())
+               omap_writel(1 << 0, 0x48019010);
+#endif
+
        return 0;
 }