Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100927
b: refs/heads/master
c: d438ae5
h: refs/heads/master
i:
  100925: d3cccee
  100923: efdb684
  100919: db136f8
  100911: 2d51399
  100895: 9316dde
  100863: 70aa5b6
v: v3
  • Loading branch information
Philipp Zabel authored and Russell King committed Jun 15, 2008
1 parent 24a17ce commit 060bada
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 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: 69eaf23a9797e1bdf16e210ef4da3e756a41f4de
refs/heads/master: d438ae5796085379327bdba76114929eedf94a89
5 changes: 3 additions & 2 deletions trunk/drivers/usb/gadget/pxa27x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <linux/usb.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>

#include <asm/arch/pxa2xx-regs.h> /* FIXME: for PSSR */
#include <asm/arch/udc.h>

#include "pxa27x_udc.h"
Expand Down Expand Up @@ -2359,7 +2359,8 @@ static int pxa_udc_resume(struct platform_device *_dev)
* Software must configure the USB OTG pad, UDC, and UHC
* to the state they were in before entering sleep mode.
*/
PSSR |= PSSR_OTGPH;
if (cpu_is_pxa27x())
PSSR |= PSSR_OTGPH;

return 0;
}
Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/usb/gadget/pxa27x_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,4 @@ static inline struct pxa_udc *to_gadget_udc(struct usb_gadget *gadget)
#define ep_warn(ep, fmt, arg...) \
dev_warn(ep->dev->dev, "%s:%s:" fmt, EPNAME(ep), __func__, ## arg)

/*
* Cannot include pxa-regs.h, as register names are similar.
* So PSSR is redefined here. This should be removed once UDC registers will
* be gone from pxa-regs.h.
*/
#define PSSR __REG(0x40F00004) /* Power Manager Sleep Status */
#define PSSR_OTGPH (1 << 6) /* OTG Peripheral Hold */

#endif /* __LINUX_USB_GADGET_PXA27X_H */
3 changes: 2 additions & 1 deletion trunk/drivers/usb/host/ohci-pxa27x.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <asm/mach-types.h>
#include <asm/hardware.h>
#include <asm/arch/pxa-regs.h>
#include <asm/arch/pxa2xx-regs.h> /* FIXME: for PSSR */
#include <asm/arch/ohci.h>

#define PXA_UHC_MAX_PORTNUM 3
Expand Down Expand Up @@ -104,7 +105,7 @@ static int pxa27x_start_hc(struct device *dev)
UHCHIE = (UHCHIE_UPRIE | UHCHIE_RWIE);

/* Clear any OTG Pin Hold */
if (PSSR & PSSR_OTGPH)
if (cpu_is_pxa27x() && (PSSR & PSSR_OTGPH))
PSSR |= PSSR_OTGPH;

return 0;
Expand Down

0 comments on commit 060bada

Please sign in to comment.