Merge branch 'fix/hda' into for-linus
[pandora-kernel.git] / arch / arm / mach-omap2 / board-omap3beagle.c
index af411e1..231cb4e 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/mtd/nand.h>
 
 #include <linux/regulator/machine.h>
-#include <linux/i2c/twl4030.h>
+#include <linux/i2c/twl.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 #include <asm/mach/flash.h>
 
-#include <mach/board.h>
-#include <mach/common.h>
-#include <mach/gpmc.h>
-#include <mach/nand.h>
-#include <mach/mux.h>
-#include <mach/usb.h>
-#include <mach/timer-gp.h>
+#include <plat/board.h>
+#include <plat/common.h>
+#include <plat/gpmc.h>
+#include <plat/nand.h>
+#include <plat/usb.h>
+#include <plat/timer-gp.h>
 
+#include "mux.h"
 #include "mmc-twl4030.h"
 
 #define GPMC_CS0_BASE  0x60
@@ -140,10 +140,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
                unsigned gpio, unsigned ngpio)
 {
        if (system_rev >= 0x20 && system_rev <= 0x34301000) {
-               omap_cfg_reg(AG9_34XX_GPIO23);
+               omap_mux_init_gpio(23, OMAP_PIN_INPUT);
                mmc[0].gpio_wp = 23;
        } else {
-               omap_cfg_reg(AH8_34XX_GPIO29);
+               omap_mux_init_gpio(29, OMAP_PIN_INPUT);
        }
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
@@ -410,24 +410,46 @@ static void __init omap3beagle_flash_init(void)
        }
 }
 
+static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+
+       .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+       .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+       .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+       .phy_reset  = true,
+       .reset_gpio_port[0]  = -EINVAL,
+       .reset_gpio_port[1]  = 147,
+       .reset_gpio_port[2]  = -EINVAL
+};
+
+#ifdef CONFIG_OMAP_MUX
+static struct omap_board_mux board_mux[] __initdata = {
+       { .reg_offset = OMAP_MUX_TERMINATOR },
+};
+#else
+#define board_mux      NULL
+#endif
+
 static void __init omap3_beagle_init(void)
 {
+       omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap3_beagle_i2c_init();
        platform_add_devices(omap3_beagle_devices,
                        ARRAY_SIZE(omap3_beagle_devices));
        omap_serial_init();
 
-       omap_cfg_reg(J25_34XX_GPIO170);
+       omap_mux_init_gpio(170, OMAP_PIN_INPUT);
        gpio_request(170, "DVI_nPD");
        /* REVISIT leave DVI powered down until it's needed ... */
        gpio_direction_output(170, true);
 
        usb_musb_init();
+       usb_ehci_init(&ehci_pdata);
        omap3beagle_flash_init();
 
        /* Ensure SDRC pins are mux'd for self-refresh */
-       omap_cfg_reg(H16_34XX_SDRC_CKE0);
-       omap_cfg_reg(H17_34XX_SDRC_CKE1);
+       omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
+       omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
 }
 
 static void __init omap3_beagle_map_io(void)
@@ -439,7 +461,7 @@ static void __init omap3_beagle_map_io(void)
 MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
        /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
        .phys_io        = 0x48000000,
-       .io_pg_offst    = ((0xd8000000) >> 18) & 0xfffc,
+       .io_pg_offst    = ((0xfa000000) >> 18) & 0xfffc,
        .boot_params    = 0x80000100,
        .map_io         = omap3_beagle_map_io,
        .init_irq       = omap3_beagle_init_irq,