Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185290
b: refs/heads/master
c: 5fc4e77
h: refs/heads/master
v: v3
  • Loading branch information
Ajay Kumar Gupta authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent d389073 commit 5b63034
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 51bf0d0e6cc1f9679a973f61d07cb48e71f9c992
refs/heads/master: 5fc4e77911f457b6aa910c704eebe3a58d334116
8 changes: 8 additions & 0 deletions trunk/drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2031,13 +2031,21 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
/* host side needs more setup */
if (is_host_enabled(musb)) {
struct usb_hcd *hcd = musb_to_hcd(musb);
u8 busctl;

otg_set_host(musb->xceiv, &hcd->self);

if (is_otg_enabled(musb))
hcd->self.otg_port = 1;
musb->xceiv->host = &hcd->self;
hcd->power_budget = 2 * (plat->power ? : 250);

/* program PHY to use external vBus if required */
if (plat->extvbus) {
busctl = musb_readb(musb->mregs, MUSB_ULPI_BUSCONTROL);
busctl |= MUSB_ULPI_USE_EXTVBUS;
musb_writeb(musb->mregs, MUSB_ULPI_BUSCONTROL, busctl);
}
}

/* For the host-only role, we can activate right away.
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/usb/musb/musb_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
#define MUSB_DEVCTL_HR 0x02
#define MUSB_DEVCTL_SESSION 0x01

/* MUSB ULPI VBUSCONTROL */
#define MUSB_ULPI_USE_EXTVBUS 0x01
#define MUSB_ULPI_USE_EXTVBUSIND 0x02

/* TESTMODE */
#define MUSB_TEST_FORCE_HOST 0x80
#define MUSB_TEST_FIFO_ACCESS 0x40
Expand Down Expand Up @@ -246,6 +250,7 @@

/* REVISIT: vctrl/vstatus: optional vendor utmi+phy register at 0x68 */
#define MUSB_HWVERS 0x6C /* 8 bit */
#define MUSB_ULPI_BUSCONTROL 0x70 /* 8 bit */

#define MUSB_EPINFO 0x78 /* 8 bit */
#define MUSB_RAMINFO 0x79 /* 8 bit */
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 @@ -76,6 +76,9 @@ struct musb_hdrc_platform_data {
/* (HOST or OTG) msec/2 after VBUS on till power good */
u8 potpgt;

/* (HOST or OTG) program PHY for external Vbus */
unsigned extvbus:1;

/* Power the device on or off */
int (*set_power)(int state);

Expand Down

0 comments on commit 5b63034

Please sign in to comment.