[ARM] 5080/1: touch PSSR_OTGPH only on pxa27x in ohci-pxa27x and pxa27x_udc

and include pxa2xx-regs.h as build fix since PSSR definitions
moved from pxa-regs.h into pxa2xx-regs.h.

Note: This change is temporary as pxa27x processor specific
code will be finally moved elsewhere (both drivers should
support pxa3xx, too).

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Philipp Zabel 2008-06-06 18:40:47 +01:00 коммит произвёл Russell King
Родитель 69eaf23a97
Коммит d438ae5796
3 изменённых файлов: 5 добавлений и 11 удалений

Просмотреть файл

@ -38,7 +38,7 @@
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/usb/ch9.h> #include <linux/usb/ch9.h>
#include <linux/usb/gadget.h> #include <linux/usb/gadget.h>
#include <asm/arch/pxa2xx-regs.h> /* FIXME: for PSSR */
#include <asm/arch/udc.h> #include <asm/arch/udc.h>
#include "pxa27x_udc.h" #include "pxa27x_udc.h"
@ -2359,7 +2359,8 @@ static int pxa_udc_resume(struct platform_device *_dev)
* Software must configure the USB OTG pad, UDC, and UHC * Software must configure the USB OTG pad, UDC, and UHC
* to the state they were in before entering sleep mode. * to the state they were in before entering sleep mode.
*/ */
PSSR |= PSSR_OTGPH; if (cpu_is_pxa27x())
PSSR |= PSSR_OTGPH;
return 0; return 0;
} }

Просмотреть файл

@ -484,12 +484,4 @@ static inline struct pxa_udc *to_gadget_udc(struct usb_gadget *gadget)
#define ep_warn(ep, fmt, arg...) \ #define ep_warn(ep, fmt, arg...) \
dev_warn(ep->dev->dev, "%s:%s:" fmt, EPNAME(ep), __func__, ## 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 */ #endif /* __LINUX_USB_GADGET_PXA27X_H */

Просмотреть файл

@ -27,6 +27,7 @@
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/arch/pxa-regs.h> #include <asm/arch/pxa-regs.h>
#include <asm/arch/pxa2xx-regs.h> /* FIXME: for PSSR */
#include <asm/arch/ohci.h> #include <asm/arch/ohci.h>
#define PXA_UHC_MAX_PORTNUM 3 #define PXA_UHC_MAX_PORTNUM 3
@ -104,7 +105,7 @@ static int pxa27x_start_hc(struct device *dev)
UHCHIE = (UHCHIE_UPRIE | UHCHIE_RWIE); UHCHIE = (UHCHIE_UPRIE | UHCHIE_RWIE);
/* Clear any OTG Pin Hold */ /* Clear any OTG Pin Hold */
if (PSSR & PSSR_OTGPH) if (cpu_is_pxa27x() && (PSSR & PSSR_OTGPH))
PSSR |= PSSR_OTGPH; PSSR |= PSSR_OTGPH;
return 0; return 0;