diff options
| author | Wenyou Yang <wenyou.yang@atmel.com> | 2016-09-29 06:07:07 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-24 08:29:08 -0400 |
| commit | ed19ece135a6908244e22e4ab395165999a4d3ab (patch) | |
| tree | 2ebe7351d98a40cb0654ac8aa90c5771485c659a /drivers/usb/host | |
| parent | 36de70ea8d237b66b9aa579a9ee0cb259eb5192d (diff) | |
usb: ohci-at91: Set RemoteWakeupConnected bit explicitly.
The reset value of RWC is 0, set RemoteWakeupConnected bit explicitly
before calling ohci_run, it also fixes the issue that the mass
storage stick connected wasn't suspended when the system suspend.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
| -rw-r--r-- | drivers/usb/host/ohci-at91.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 5b5880c0ae19..b38a228134df 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c | |||
| @@ -221,6 +221,12 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, | |||
| 221 | ohci->num_ports = board->ports; | 221 | ohci->num_ports = board->ports; |
| 222 | at91_start_hc(pdev); | 222 | at91_start_hc(pdev); |
| 223 | 223 | ||
| 224 | /* | ||
| 225 | * The RemoteWakeupConnected bit has to be set explicitly | ||
| 226 | * before calling ohci_run. The reset value of this bit is 0. | ||
| 227 | */ | ||
| 228 | ohci->hc_control = OHCI_CTRL_RWC; | ||
| 229 | |||
| 224 | retval = usb_add_hcd(hcd, irq, IRQF_SHARED); | 230 | retval = usb_add_hcd(hcd, irq, IRQF_SHARED); |
| 225 | if (retval == 0) { | 231 | if (retval == 0) { |
| 226 | device_wakeup_enable(hcd->self.controller); | 232 | device_wakeup_enable(hcd->self.controller); |
| @@ -677,9 +683,6 @@ ohci_hcd_at91_drv_suspend(struct device *dev) | |||
| 677 | * REVISIT: some boards will be able to turn VBUS off... | 683 | * REVISIT: some boards will be able to turn VBUS off... |
| 678 | */ | 684 | */ |
| 679 | if (!ohci_at91->wakeup) { | 685 | if (!ohci_at91->wakeup) { |
| 680 | ohci->hc_control = ohci_readl(ohci, &ohci->regs->control); | ||
| 681 | ohci->hc_control &= OHCI_CTRL_RWC; | ||
| 682 | ohci_writel(ohci, ohci->hc_control, &ohci->regs->control); | ||
| 683 | ohci->rh_state = OHCI_RH_HALTED; | 686 | ohci->rh_state = OHCI_RH_HALTED; |
| 684 | 687 | ||
| 685 | /* flush the writes */ | 688 | /* flush the writes */ |
