Commit 0cb0b0d3 authored by Eric Miao's avatar Eric Miao Committed by Russell King

[ARM] ohci-pxa27x: introduce pxa27x_clear_otgph()

Direct access to pxa27x specific register PSSR in a generic ohci driver
is no good, introduce pxa27x_clear_otgph() and move the implementation
into processor specific code.
Signed-off-by: default avatarEric Miao <eric.miao@marvell.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 84bab739
...@@ -34,6 +34,13 @@ ...@@ -34,6 +34,13 @@
#include "devices.h" #include "devices.h"
#include "clock.h" #include "clock.h"
void pxa27x_clear_otgph(void)
{
if (cpu_is_pxa27x() && (PSSR & PSSR_OTGPH))
PSSR |= PSSR_OTGPH;
}
EXPORT_SYMBOL(pxa27x_clear_otgph);
/* Crystal clock: 13MHz */ /* Crystal clock: 13MHz */
#define BASE_CLK 13000000 #define BASE_CLK 13000000
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/pxa2xx-regs.h> /* FIXME: for PSSR */
#include <mach/ohci.h> #include <mach/ohci.h>
/* /*
...@@ -182,6 +181,12 @@ static inline void pxa27x_setup_hc(struct pxaohci_platform_data *inf) ...@@ -182,6 +181,12 @@ static inline void pxa27x_setup_hc(struct pxaohci_platform_data *inf)
UHCRHDA = uhcrhda; UHCRHDA = uhcrhda;
} }
#ifdef CONFIG_CPU_PXA27x
extern void pxa27x_clear_otgph(void);
#else
#define pxa27x_clear_otgph() do {} while (0)
#endif
static int pxa27x_start_hc(struct device *dev) static int pxa27x_start_hc(struct device *dev)
{ {
int retval = 0; int retval = 0;
...@@ -212,9 +217,7 @@ static int pxa27x_start_hc(struct device *dev) ...@@ -212,9 +217,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 (cpu_is_pxa27x() && (PSSR & PSSR_OTGPH)) pxa27x_clear_otgph();
PSSR |= PSSR_OTGPH;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment