From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 13 Sep 2013 15:53:00 +0200 Subject: [U-Boot] [PATCH RFC] usb: Prevent using reserved registers on DM36x usb In-Reply-To: <1379067189-2082-1-git-send-email-amurray@embedded-bits.co.uk> References: <1379067189-2082-1-git-send-email-amurray@embedded-bits.co.uk> Message-ID: <201309131553.00263.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Cc: Tom Rini > Signed-off-by: Andrew Murray > --- > 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