@@ -24,6 +24,7 @@
#include <media/tvp514x.h>
#include <linux/spi/spi.h>
#include <linux/spi/eeprom.h>
+#include <linux/usb/musb.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
@@ -317,6 +318,12 @@ static struct spi_board_info dm355_evm_spi_info[] __initconst = {
},
};
+/* musb board specific data */
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+ .power = 250, /* (power in mA)/2 */
+ .potpgt = 4, /* (potpgt in msec)/2 */
+};
+
static __init void dm355_evm_init(void)
{
struct clk *aemif;
@@ -344,7 +351,7 @@ static __init void dm355_evm_init(void)
gpio_request(2, "usb_id_toggle");
gpio_direction_output(2, USB_ID_VALUE);
/* irlml6401 switches over 1A in under 8 msec */
- setup_usb(500, 8);
+ setup_usb(&musb_bdata);
davinci_setup_mmc(0, &dm355evm_mmc_config);
davinci_setup_mmc(1, &dm355evm_mmc_config);
@@ -21,6 +21,7 @@
#include <linux/clk.h>
#include <linux/spi/spi.h>
#include <linux/spi/eeprom.h>
+#include <linux/usb/musb.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
@@ -243,6 +244,12 @@ static struct spi_board_info dm355_leopard_spi_info[] __initconst = {
},
};
+/* musb board specific data */
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+ .power = 250, /* (power in mA)/2 */
+ .potpgt = 4, /* (potpgt in msec)/2 */
+};
+
static __init void dm355_leopard_init(void)
{
struct clk *aemif;
@@ -270,7 +277,7 @@ static __init void dm355_leopard_init(void)
gpio_request(2, "usb_id_toggle");
gpio_direction_output(2, USB_ID_VALUE);
/* irlml6401 switches over 1A in under 8 msec */
- setup_usb(500, 8);
+ setup_usb(&musb_bdata);
davinci_setup_mmc(0, &dm355leopard_mmc_config);
davinci_setup_mmc(1, &dm355leopard_mmc_config);
@@ -29,6 +29,7 @@
#include <linux/phy.h>
#include <linux/clk.h>
#include <linux/videodev2.h>
+#include <linux/usb/musb.h>
#include <media/tvp514x.h>
@@ -438,6 +439,11 @@ static struct pcf857x_platform_data pcf_data_u18 = {
.teardown = evm_u18_teardown,
};
+/* musb board specific data */
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+ .power = 250, /* (power in mA)/2 */
+ .potpgt = 4, /* (potpgt in msec)/2 */
+};
/* U35 - various I/O signals used to manage USB, CF, ATA, etc */
@@ -477,7 +483,7 @@ evm_u35_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
/* irlml6401 switches over 1A, in under 8 msec;
* now it can be managed by nDRV_VBUS ...
*/
- setup_usb(500, 8);
+ setup_usb(&musb_bdata);
return 0;
}
@@ -38,6 +38,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/io.h>
+#include <linux/usb/musb.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
@@ -149,6 +150,12 @@ static struct davinci_uart_config uart_config __initdata = {
.enabled_uarts = (1 << 0),
};
+/* musb board specific data */
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+ .power = 0, /* (power in mA)/2 */
+ .potpgt = 0, /* (potpgt in msec)/2 */
+};
+
static void __init davinci_sffsdr_map_io(void)
{
dm644x_init();
@@ -164,7 +171,7 @@ static __init void davinci_sffsdr_init(void)
davinci_serial_init(&uart_config);
soc_info->emac_pdata->phy_mask = SFFSDR_PHY_MASK;
soc_info->emac_pdata->mdio_max_freq = SFFSDR_MDIO_FREQUENCY;
- setup_usb(0, 0); /* We support only peripheral mode. */
+ setup_usb(&musb_bdata); /* We support only peripheral mode. */
/* mux VLYNQ pins */
davinci_cfg_reg(DM644X_VLYNQEN);
@@ -20,11 +20,14 @@ extern void davinci_irq_init(void);
extern void __iomem *davinci_intc_base;
extern int davinci_intc_type;
+struct device;
+#include <linux/usb/musb.h>
+
/* parameters describe VBUS sourcing for host mode */
-extern void setup_usb(unsigned mA, unsigned potpgt_msec);
+extern void setup_usb(struct musb_hdrc_board_data *board_data);
/* parameters describe VBUS sourcing for host mode */
-extern void setup_usb(unsigned mA, unsigned potpgt_msec);
+extern void setup_usb(struct musb_hdrc_board_data *board_data);
struct davinci_timer_instance {
void __iomem *base;
@@ -85,10 +85,10 @@ static struct platform_device usb_dev = {
.num_resources = ARRAY_SIZE(usb_resources),
};
-void __init setup_usb(unsigned mA, unsigned potpgt_msec)
+void __init setup_usb(struct musb_hdrc_board_data *board_data)
{
- usb_data.power = mA / 2;
- usb_data.potpgt = potpgt_msec / 2;
+ /* get board-specific data */
+ usb_data.board_data = board_data;
if (cpu_is_davinci_dm646x()) {
/* Override the defaults as DM6467 uses different IRQs. */
@@ -102,7 +102,7 @@ void __init setup_usb(unsigned mA, unsigned potpgt_msec)
#else
-void __init setup_usb(unsigned mA, unsigned potpgt_msec)
+void __init setup_usb(struct musb_hdrc_board_data *board_data)
{
}