Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303916
b: refs/heads/master
c: 758fc98
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Shishkin authored and Greg Kroah-Hartman committed May 11, 2012
1 parent 20f5aa5 commit 01aae00
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 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: f7daaa2d6e84f7be1e302d7bcba4f5f11567eddb
refs/heads/master: 758fc9860c19eceb56e5886a5225db623c521971
8 changes: 4 additions & 4 deletions trunk/drivers/usb/chipidea/bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#ifndef __DRIVERS_USB_CHIPIDEA_BITS_H
#define __DRIVERS_USB_CHIPIDEA_BITS_H

#include <linux/usb/ehci_def.h>

/* HCCPARAMS */
#define HCCPARAMS_LEN BIT(17)

Expand Down Expand Up @@ -70,11 +72,9 @@

/* USBMODE */
#define USBMODE_CM (0x03UL << 0)
#define USBMODE_CM_IDLE (0x00UL << 0)
#define USBMODE_CM_DEVICE (0x02UL << 0)
#define USBMODE_CM_HOST (0x03UL << 0)
#define USBMODE_CM_DC (0x02UL << 0)
#define USBMODE_SLOM BIT(3)
#define USBMODE_SDIS BIT(4)
#define USBMODE_CI_SDIS BIT(4)

/* ENDPTCTRL */
#define ENDPTCTRL_RXS BIT(0)
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/usb/chipidea/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ int hw_device_reset(struct ci13xxx *ci)
CI13XXX_CONTROLLER_RESET_EVENT);

if (ci->udc_driver->flags & CI13XXX_DISABLE_STREAMING)
hw_write(ci, OP_USBMODE, USBMODE_SDIS, USBMODE_SDIS);
hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);

/* USBMODE should be configured step by step */
hw_write(ci, OP_USBMODE, USBMODE_CM, USBMODE_CM_IDLE);
hw_write(ci, OP_USBMODE, USBMODE_CM, USBMODE_CM_DEVICE);
hw_write(ci, OP_USBMODE, USBMODE_CM, USBMODE_CM_DC);
/* HW >= 2.3 */
hw_write(ci, OP_USBMODE, USBMODE_SLOM, USBMODE_SLOM);

if (hw_read(ci, OP_USBMODE, USBMODE_CM) != USBMODE_CM_DEVICE) {
if (hw_read(ci, OP_USBMODE, USBMODE_CM) != USBMODE_CM_DC) {
pr_err("cannot enter in device mode");
pr_err("lpm = %i", ci->hw_bank.lpm);
return -ENODEV;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/chipidea/udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,7 @@ static irqreturn_t udc_irq(struct ci13xxx *udc)

if (udc->udc_driver->flags & CI13XXX_REGS_SHARED) {
if (hw_read(udc, OP_USBMODE, USBMODE_CM) !=
USBMODE_CM_DEVICE) {
USBMODE_CM_DC) {
spin_unlock(&udc->lock);
return IRQ_NONE;
}
Expand Down

0 comments on commit 01aae00

Please sign in to comment.