]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/board-omap3beagle.c
USB: Clean-up USB init code for next merge window
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-omap3beagle.c
index fe97bab53e988574627199b3c3d74b196a981116..5f5cc3965319890b646711c8bae73a6048210ec1 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/mtd/nand.h>
 
 #include <linux/regulator/machine.h>
+#include <linux/i2c/twl4030.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -37,8 +38,7 @@
 #include <asm/mach/flash.h>
 
 #include <mach/board.h>
-#include <mach/usb-musb.h>
-#include <mach/usb-ehci.h>
+#include <mach/usb.h>
 #include <mach/common.h>
 #include <mach/gpmc.h>
 #include <mach/nand.h>
@@ -126,6 +126,14 @@ static struct twl4030_hsmmc_info mmc[] = {
        {}      /* Terminator */
 };
 
+static struct regulator_consumer_supply beagle_vmmc1_supply = {
+       .supply                 = "vmmc",
+};
+
+static struct regulator_consumer_supply beagle_vsim_supply = {
+       .supply                 = "vmmc_dat4..7",
+};
+
 static struct gpio_led gpio_leds[];
 
 static int beagle_twl_gpio_setup(struct device *dev,
@@ -136,6 +144,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
        mmc[0].gpio_cd = gpio + 0;
        twl4030_mmc_init(mmc);
 
+       /* link regulators to MMC adapters */
+       beagle_vmmc1_supply.dev = mmc[0].dev;
+       beagle_vsim_supply.dev = mmc[0].dev;
+
        /* REVISIT: need ehci-omap hooks for external VBUS
         * power switch and overcurrent detect
         */
@@ -173,6 +185,8 @@ static struct regulator_init_data beagle_vmmc1 = {
                                | REGULATOR_CHANGE_MODE
                                | REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &beagle_vmmc1_supply,
 };
 
 /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -184,6 +198,8 @@ static struct regulator_init_data beagle_vsim = {
                                | REGULATOR_CHANGE_MODE
                                | REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &beagle_vsim_supply,
 };
 
 /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */