Michael Grzeschik <mgr@xxxxxxxxxxxxxx> writes: > Hi, > > On Mon, Jun 10, 2013 at 04:52:06PM +0300, Alexander Shishkin wrote: >> Michael Grzeschik <mgr@xxxxxxxxxxxxxx> writes: >> >> > From: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx> >> > >> > This patch makes it possible to set the chipidea udc >> > into full-speed only mode. It can be set by the oftree >> > property "force-full-speed". >> > >> > Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx> >> > Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> >> > --- >> > Fixed the compilation issues on x86. >> > >> > Thanks to Alex, >> > Michael >> > >> > >> > Documentation/devicetree/bindings/usb/ci13xxx-imx.txt | 2 ++ >> > drivers/usb/chipidea/bits.h | 2 ++ >> > drivers/usb/chipidea/core.c | 6 ++++++ >> > 3 files changed, 10 insertions(+) >> > >> > diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt >> > index b4b5b79..1943aef 100644 >> > --- a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt >> > +++ b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt >> > @@ -18,6 +18,7 @@ Optional properties: >> > - vbus-supply: regulator for vbus >> > - disable-over-current: disable over current detect >> > - external-vbus-divider: enables off-chip resistor divider for Vbus >> > +- force-full-speed: limit the maximum connection speed to full-speed >> > >> > Examples: >> > usb@02184000 { /* USB OTG */ >> > @@ -28,4 +29,5 @@ usb@02184000 { /* USB OTG */ >> > fsl,usbmisc = <&usbmisc 0>; >> > disable-over-current; >> > external-vbus-divider; >> > + force-full-speed; >> > }; >> > diff --git a/drivers/usb/chipidea/bits.h b/drivers/usb/chipidea/bits.h >> > index 93efe4e..4c14ab7 100644 >> > --- a/drivers/usb/chipidea/bits.h >> > +++ b/drivers/usb/chipidea/bits.h >> > @@ -49,11 +49,13 @@ >> > #define PORTSC_HSP BIT(9) >> > #define PORTSC_PTC (0x0FUL << 16) >> > /* PTS and PTW for non lpm version only */ >> > +#define PORTSC_PFSC BIT(24) >> > #define PORTSC_PTS(d) ((((d) & 0x3) << 30) | (((d) & 0x4) ? BIT(25) : 0)) >> > #define PORTSC_PTW BIT(28) >> > #define PORTSC_STS BIT(29) >> > >> > /* DEVLC */ >> > +#define DEVLC_PFSC BIT(23) >> > #define DEVLC_PSPD (0x03UL << 25) >> > #define DEVLC_PSPD_HS (0x02UL << 25) >> > #define DEVLC_PTW BIT(27) >> > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c >> > index ae239c7..cf1c9ee 100644 >> > --- a/drivers/usb/chipidea/core.c >> > +++ b/drivers/usb/chipidea/core.c >> > @@ -65,6 +65,7 @@ >> > #include <linux/usb/otg.h> >> > #include <linux/usb/chipidea.h> >> > #include <linux/usb/of.h> >> > +#include <linux/of.h> >> > #include <linux/phy.h> >> > >> > #include "ci.h" >> > @@ -240,6 +241,11 @@ static void hw_phymode_configure(struct ci13xxx *ci) >> > return; >> > } >> > >> > + if (of_property_read_bool(ci->dev->of_node, "force-full-speed")) { >> > + portsc |= PORTSC_PFSC; >> > + lpm |= DEVLC_PFSC; >> > + } >> > + >> >> Actually, now that I'm looking at it, it's inconsistent with the rest of >> the code. And it also denies the possibility to force fullspeed for >> non-OF platforms. >> >> Can you amend it? > > Yes, i will rework it. I somehow also didn't like the way that hunk > looks like. Beside that, thanks for applying this and the multitd series. Thanks for *making* the improvements! Regards, -- Alex -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html