usb: Prevent using reserved registers on DM36x usb
Subsystems (2)
RFC PATCH 1/1 usb: Prevent using reserved registers on DM36x usb
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.
--- drivers/usb/musb/musb_core.h | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/musb/musb_core.h +4 -0
@@ -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
Signature · 1 line
1.7.9.5
RFC PATCH 1/1 usb: Prevent using reserved registers on DM36x usb
Dear Andrew Murray,
Quoted 21 lines
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 <[email protected]>Cc Tom Rini <[email protected]>Signed-off-by Andrew Murray <[email protected]>--- drivers/usb/musb/musb_core.h | 4 ++++ 1 file changed, 4 insertions(+)drivers/usb/musb/musb_core.h +0
-0
drivers/usb/musb/musb_core.h struct musb_regs { · line 225
Quoted 10 lines
drivers/usb/musb/musb_core.h +4
-0@@ -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
*/
drivers/usb/musb/musb_core.h struct musb_regs { · line 226
Quoted 1 line
drivers/usb/musb/musb_core.h +0
-0#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
RFC PATCH 1/1 usb: Prevent using reserved registers on DM36x usb
Dear Andrew Murray,
Quoted 41 lines
Quoted 28 lines
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 <[email protected]>Cc Tom Rini <[email protected]>Signed-off-by Andrew Murray <[email protected]>---
drivers/usb/musb/musb_core.h | 4 ++++ 1 file changed, 4 insertions(+)drivers/usb/musb/musb_core.h +0
-0@@ -216,7 +216,11 @@ struct musb_regs {#define MUSB_CSR0_P_SENTSTALL 0x0004/* CSR0 in Host mode */ drivers/usb/musb/musb_core.h struct musb_regs {
Quoted 10 lines
drivers/usb/musb/musb_core.h +4
-0+#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 */
Quoted 4 lines
Quoted 1 line
#define
MUSB_CSR0_H_NAKTIMEOUT0x0080It would be much nicer if you avoided using this bit in
musb_hcd.cinstead of hacking it like this.
Bump? Will we get a V2 here ?
Best regards,
Marek Vasut
RFC PATCH 1/1 usb: Prevent using reserved registers on DM36x usb
Quoted 4 lines · Marek Vasut
Quoted 2 lines
It would be much nicer if you avoided using this bit in
musb_hcd.cinstead 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