Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184755
b: refs/heads/master
c: 884b836
h: refs/heads/master
i:
  184753: 0f69584
  184751: 75bebc8
v: v3
  • Loading branch information
Maulik Mankad authored and Tony Lindgren committed Feb 19, 2010
1 parent 9af12aa commit 806a174
Show file tree
Hide file tree
Showing 17 changed files with 110 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9828552b945b9522f15f9eccea6d6df0af49753
refs/heads/master: 884b8369ee78c081b5e5a99d1d09a95815d13c28
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-2430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
{} /* Terminator */
};

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static void __init omap_2430sdp_init(void)
{
int ret;
Expand All @@ -202,7 +208,7 @@ static void __init omap_2430sdp_init(void)
platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
omap_serial_init();
omap2_hsmmc_init(mmc);
usb_musb_init();
usb_musb_init(&musb_board_data);
board_smc91x_init();

/* Turn off secondary LCD backlight */
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-3430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,12 @@ static struct flash_partitions sdp_flash_partitions[] = {
},
};

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static void __init omap_3430sdp_init(void)
{
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
Expand All @@ -774,7 +780,7 @@ static void __init omap_3430sdp_init(void)
ARRAY_SIZE(sdp3430_spi_board_info));
ads7846_dev_init();
omap_serial_init();
usb_musb_init();
usb_musb_init(&musb_board_data);
board_smc91x_init();
sdp_flash_init(sdp_flash_partitions);
sdp3430_display_init();
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-cm-t35.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,12 @@ static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static void __init cm_t35_init(void)
{
omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
Expand All @@ -822,7 +828,7 @@ static void __init cm_t35_init(void)
cm_t35_init_led();
cm_t35_init_display();

usb_musb_init();
usb_musb_init(&musb_board_data);
}

MACHINE_START(CM_T35, "Compulab CM-T35")
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-devkit8000.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,12 @@ static void __init devkit8000_flash_init(void)
}
}

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {

.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
Expand Down Expand Up @@ -665,7 +671,7 @@ static void __init devkit8000_init(void)
/* REVISIT leave DVI powered down until it's needed ... */
gpio_direction_output(170, true);

usb_musb_init();
usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata);
devkit8000_flash_init();

Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-igep0020.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,12 @@ static int __init igep2_i2c_init(void)
return 0;
}

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
Expand All @@ -461,7 +467,7 @@ static void __init igep2_init(void)
igep2_i2c_init();
platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
omap_serial_init();
usb_musb_init();
usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata);

igep2_flash_init();
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-ldp.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,12 @@ static struct omap_board_mux board_mux[] __initdata = {
#define board_mux NULL
#endif

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static void __init omap_ldp_init(void)
{
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
Expand All @@ -394,7 +400,7 @@ static void __init omap_ldp_init(void)
ARRAY_SIZE(ldp_spi_board_info));
ads7846_dev_init();
omap_serial_init();
usb_musb_init();
usb_musb_init(&musb_board_data);

omap2_hsmmc_init(mmc);
/* link regulators to MMC adapters */
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-omap3beagle.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,12 @@ static struct omap_board_mux board_mux[] __initdata = {
#define board_mux NULL
#endif

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static void __init omap3_beagle_init(void)
{
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
Expand All @@ -443,7 +449,7 @@ static void __init omap3_beagle_init(void)
/* REVISIT leave DVI powered down until it's needed ... */
gpio_direction_output(170, true);

usb_musb_init();
usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata);
omap3beagle_flash_init();

Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-omap3evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,12 @@ static struct omap_board_mux board_mux[] __initdata = {
#define board_mux NULL
#endif

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static void __init omap3_evm_init(void)
{
omap3_evm_get_revision();
Expand Down Expand Up @@ -701,7 +707,7 @@ static void __init omap3_evm_init(void)
omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
ehci_pdata.reset_gpio_port[1] = 135;
}
usb_musb_init();
usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata);
ads7846_dev_init();
omap3evm_init_smsc911x();
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-omap3pandora.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,12 @@ static struct omap_board_mux board_mux[] __initdata = {
#define board_mux NULL
#endif

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static void __init omap3pandora_init(void)
{
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
Expand All @@ -569,7 +575,7 @@ static void __init omap3pandora_init(void)
omap3pandora_ads7846_init();
usb_ehci_init(&ehci_pdata);
pandora_keys_gpio_init();
usb_musb_init();
usb_musb_init(&musb_board_data);

/* Ensure SDRC pins are mux'd for self-refresh */
omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-omap3touchbook.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,12 @@ static void __init early_touchbook_revision(char **p)
}
__early_param("tbr=", early_touchbook_revision);

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static void __init omap3_touchbook_init(void)
{
pm_power_off = omap3_touchbook_poweroff;
Expand All @@ -545,7 +551,7 @@ static void __init omap3_touchbook_init(void)
spi_register_board_info(omap3_ads7846_spi_board_info,
ARRAY_SIZE(omap3_ads7846_spi_board_info));
omap3_ads7846_init();
usb_musb_init();
usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata);
omap3touchbook_flash_init();

Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-overo.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,20 @@ static struct omap_board_mux board_mux[] __initdata = {
#define board_mux NULL
#endif

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static void __init overo_init(void)
{
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
overo_i2c_init();
platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
omap_serial_init();
overo_flash_init();
usb_musb_init();
usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata);
overo_ads7846_init();
overo_init_smsc911x();
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-rx51.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,17 @@ static struct omap_board_mux board_mux[] __initdata = {
#define board_mux NULL
#endif

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_PERIPHERAL,
.power = 0,
};

static void __init rx51_init(void)
{
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap_serial_init();
usb_musb_init();
usb_musb_init(&musb_board_data);
rx51_peripherals_init();

/* Ensure SDRC pins are mux'd for self-refresh */
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/mach-omap2/board-zoom-peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ static int __init omap_i2c_init(void)
return 0;
}

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
.power = 100,
};

static void enable_board_wakeup_source(void)
{
/* T2 interrupt line (keypad) */
Expand All @@ -275,6 +281,6 @@ void __init zoom_peripherals_init(void)
{
omap_i2c_init();
omap_serial_init();
usb_musb_init();
usb_musb_init(&musb_board_data);
enable_board_wakeup_source();
}
7 changes: 5 additions & 2 deletions trunk/arch/arm/mach-omap2/usb-musb.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static struct platform_device musb_device = {
.resource = musb_resources,
};

void __init usb_musb_init(void)
void __init usb_musb_init(struct omap_musb_board_data *board_data)
{
if (cpu_is_omap243x())
musb_resources[0].start = OMAP243X_HS_BASE;
Expand All @@ -159,6 +159,9 @@ void __init usb_musb_init(void)
* musb_core.c have been converted to use use clkdev.
*/
musb_plat.clock = "ick";
musb_plat.board_data = board_data;
musb_plat.power = board_data->power >> 1;
musb_plat.mode = board_data->mode;

if (platform_device_register(&musb_device) < 0) {
printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
Expand All @@ -167,7 +170,7 @@ void __init usb_musb_init(void)
}

#else
void __init usb_musb_init(void)
void __init usb_musb_init(struct omap_musb_board_data *board_data)
{
}
#endif /* CONFIG_USB_MUSB_SOC */
11 changes: 10 additions & 1 deletion trunk/arch/arm/plat-omap/include/plat/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#ifndef __ASM_ARCH_OMAP_USB_H
#define __ASM_ARCH_OMAP_USB_H

#include <linux/usb/musb.h>
#include <plat/board.h>

#define OMAP3_HS_USB_PORTS 3
Expand Down Expand Up @@ -42,7 +43,15 @@ struct ehci_hcd_omap_platform_data {
#define UDC_BASE OMAP2_UDC_BASE
#define OMAP_OHCI_BASE OMAP2_OHCI_BASE

extern void usb_musb_init(void);
struct omap_musb_board_data {
u8 interface_type;
u8 mode;
u8 power;
};

enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};

extern void usb_musb_init(struct omap_musb_board_data *board_data);

extern void usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata);

Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/usb/musb.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ struct musb_hdrc_platform_data {

/* MUSB configuration-specific details */
struct musb_hdrc_config *config;

/* Architecture specific board data */
void *board_data;
};


Expand Down

0 comments on commit 806a174

Please sign in to comment.