ARM: 6020/1: ST SPEAr: Adding gpio pad multiplexing support
[pandora-kernel.git] / arch / arm / mach-spear3xx / spear320_evb.c
index 85bc4d2..62ac685 100644 (file)
 #include <mach/generic.h>
 #include <mach/spear.h>
 
+/* padmux devices to enable */
+static struct pmx_dev *pmx_devs[] = {
+       /* spear3xx specific devices */
+       &pmx_i2c,
+       &pmx_ssp,
+       &pmx_mii,
+       &pmx_uart0,
+
+       /* spear320 specific devices */
+       &pmx_fsmc,
+       &pmx_sdio,
+       &pmx_i2s,
+       &pmx_uart1,
+       &pmx_uart2,
+       &pmx_can,
+       &pmx_pwm0,
+       &pmx_pwm1,
+       &pmx_pwm2,
+       &pmx_mii1,
+};
+
 static struct amba_device *amba_devs[] __initdata = {
        /* spear3xx specific devices */
        &gpio_device,
@@ -37,6 +58,12 @@ static void __init spear320_evb_init(void)
        /* call spear320 machine init function */
        spear320_init();
 
+       /* padmux initialization */
+       pmx_driver.mode = &auto_net_mii_mode;
+       pmx_driver.devs = pmx_devs;
+       pmx_driver.devs_count = ARRAY_SIZE(pmx_devs);
+       spear320_pmx_init();
+
        /* Add Platform Devices */
        platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs));