* [U-Boot] [PATCH RFC] usb: Prevent using reserved registers on DM36x usb
@ 2013-09-13 10:13 Andrew Murray
2013-09-13 13:53 ` Marek Vasut
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Murray @ 2013-09-13 10:13 UTC (permalink / raw)
To: u-boot
The musb driver defines and uses MUSB_CSR0_H_DIS_PING, however this
bit is reserved on the DM36x. Thus this patch ensures that the
reserved bit is not accesssed.
It has been observed that some USB devices will fail to enumerate
with errors such as 'error in inquiry' without this patch.
See http://www.ti.com/litv/pdf/sprufh9a for details.
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk>
---
drivers/usb/musb/musb_core.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index ec8a038..c9a9d66 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -216,7 +216,11 @@ struct musb_regs {
#define MUSB_CSR0_P_SENTSTALL 0x0004
/* CSR0 in Host mode */
+#if defined(CONFIG_SOC_DM365)
+#define MUSB_CSR0_H_DIS_PING 0x0000
+#else
#define MUSB_CSR0_H_DIS_PING 0x0800
+#endif
#define MUSB_CSR0_H_WR_DATATOGGLE 0x0400 /* Set to allow setting: */
#define MUSB_CSR0_H_DATATOGGLE 0x0200 /* Data toggle control */
#define MUSB_CSR0_H_NAKTIMEOUT 0x0080
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH RFC] usb: Prevent using reserved registers on DM36x usb
2013-09-13 10:13 [U-Boot] [PATCH RFC] usb: Prevent using reserved registers on DM36x usb Andrew Murray
@ 2013-09-13 13:53 ` Marek Vasut
2013-09-27 18:10 ` Marek Vasut
0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2013-09-13 13:53 UTC (permalink / raw)
To: u-boot
Dear Andrew Murray,
> The musb driver defines and uses MUSB_CSR0_H_DIS_PING, however this
> bit is reserved on the DM36x. Thus this patch ensures that the
> reserved bit is not accesssed.
>
> It has been observed that some USB devices will fail to enumerate
> with errors such as 'error in inquiry' without this patch.
>
> See http://www.ti.com/litv/pdf/sprufh9a for details.
>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@ti.com>
> Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk>
> ---
> drivers/usb/musb/musb_core.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
> index ec8a038..c9a9d66 100644
> --- a/drivers/usb/musb/musb_core.h
> +++ b/drivers/usb/musb/musb_core.h
> @@ -216,7 +216,11 @@ struct musb_regs {
> #define MUSB_CSR0_P_SENTSTALL 0x0004
>
> /* CSR0 in Host mode */
> +#if defined(CONFIG_SOC_DM365)
> +#define MUSB_CSR0_H_DIS_PING 0x0000
> +#else
> #define MUSB_CSR0_H_DIS_PING 0x0800
> +#endif
> #define MUSB_CSR0_H_WR_DATATOGGLE 0x0400 /* Set to allow setting: */
> #define MUSB_CSR0_H_DATATOGGLE 0x0200 /* Data toggle control
*/
> #define MUSB_CSR0_H_NAKTIMEOUT 0x0080
It would be much nicer if you avoided using this bit in musb_hcd.c instead of
hacking it like this.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH RFC] usb: Prevent using reserved registers on DM36x usb
2013-09-13 13:53 ` Marek Vasut
@ 2013-09-27 18:10 ` Marek Vasut
2013-09-29 17:06 ` Andrew Murray
0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2013-09-27 18:10 UTC (permalink / raw)
To: u-boot
Dear Andrew Murray,
>
> > The musb driver defines and uses MUSB_CSR0_H_DIS_PING, however this
> > bit is reserved on the DM36x. Thus this patch ensures that the
> > reserved bit is not accesssed.
> >
> > It has been observed that some USB devices will fail to enumerate
> > with errors such as 'error in inquiry' without this patch.
> >
> > See http://www.ti.com/litv/pdf/sprufh9a for details.
> >
> > Cc: Marek Vasut <marex@denx.de>
> > Cc: Tom Rini <trini@ti.com>
> > Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk>
> > ---
> >
> > drivers/usb/musb/musb_core.h | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
> > index ec8a038..c9a9d66 100644
> > --- a/drivers/usb/musb/musb_core.h
> > +++ b/drivers/usb/musb/musb_core.h
> > @@ -216,7 +216,11 @@ struct musb_regs {
> >
> > #define MUSB_CSR0_P_SENTSTALL 0x0004
> >
> > /* CSR0 in Host mode */
> >
> > +#if defined(CONFIG_SOC_DM365)
> > +#define MUSB_CSR0_H_DIS_PING 0x0000
> > +#else
> >
> > #define MUSB_CSR0_H_DIS_PING 0x0800
> >
> > +#endif
> >
> > #define MUSB_CSR0_H_WR_DATATOGGLE 0x0400 /* Set to allow setting: */
> > #define MUSB_CSR0_H_DATATOGGLE 0x0200 /* Data toggle control
>
> */
>
> > #define MUSB_CSR0_H_NAKTIMEOUT 0x0080
>
> It would be much nicer if you avoided using this bit in musb_hcd.c instead
> of hacking it like this.
Bump? Will we get a V2 here ?
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH RFC] usb: Prevent using reserved registers on DM36x usb
2013-09-27 18:10 ` Marek Vasut
@ 2013-09-29 17:06 ` Andrew Murray
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Murray @ 2013-09-29 17:06 UTC (permalink / raw)
To: u-boot
On 27 September 2013 19:10, Marek Vasut <marex@denx.de> wrote:
>> It would be much nicer if you avoided using this bit in musb_hcd.c instead
>> of hacking it like this.
>
> Bump? Will we get a V2 here ?
I've posted a v2 on the list, apologies for the slow response.
Andrew Murray
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-29 17:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-13 10:13 [U-Boot] [PATCH RFC] usb: Prevent using reserved registers on DM36x usb Andrew Murray
2013-09-13 13:53 ` Marek Vasut
2013-09-27 18:10 ` Marek Vasut
2013-09-29 17:06 ` Andrew Murray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox