mxc_udc: add workaround for ENGcm09152 for i.MX35
Subsystems (4)
PATCH 1/1 mxc_udc: add workaround for ENGcm09152 for i.MX35
this patch gives the possibility to workaround bug ENGcm09152 on i.MX35 when the hardware workaround is also implemented on the board.
It covers the workaround described on page 25 of the following Errata :
http://cache.freescale.com/files/dsp/doc/errata/IMX35CE.pdf
--- arch/arm/mach-mx3/mach-cpuimx35.c | 1 + drivers/usb/gadget/fsl_mxc_udc.c | 15 +++++++++++++++ include/linux/fsl_devices.h | 3 +++ 3 files changed, 19 insertions(+), 0 deletions(-)
arch/arm/mach-mx3/mach-cpuimx35.c +1 -0
@@ -132,6 +132,7 @@ static struct mxc_usbh_platform_data __maybe_unused usbh1_pdata = {static struct fsl_usb2_platform_data otg_device_pdata = { .operating_mode =FSL_USB2_DR_DEVICE , .phy_mode =FSL_USB2_PHY_UTMI , + .workaround =FLS_USB2_WORKAROUND_ENGCM09152 , };static int otg_mode_host;
drivers/usb/gadget/fsl_mxc_udc.c +15 -0
@@ -22,6 +22,10 @@static struct clk *mxc_ahb_clk;static struct clk *mxc_usb_clk; +/* workaround ENGcm09152 for i.MX35 */ +#define USBPHYCTRL_OTGBASE_OFFSET 0x608 +#define USBPHYCTRL_EVDO (1 << 23) +int fsl_udc_clk_init (struct platform_device *pdev) {struct fsl_usb2_platform_data *pdata;
@@ -84,6 +88,17 @@ eenahb:void fsl_udc_clk_finalize (struct platform_device *pdev) {struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; +#if defined(CONFIG_ARCH_MX35 ) +unsigned int v; + +/* workaround ENGcm09152 for i.MX35 */ +if (pdata->workaround &FLS_USB2_WORKAROUND_ENGCM09152 ) { + v =readl (MX35_IO_ADDRESS (MX35_OTG_BASE_ADDR + +USBPHYCTRL_OTGBASE_OFFSET )); +writel (v |USBPHYCTRL_EVDO ,MX35_IO_ADDRESS (MX35_OTG_BASE_ADDR + +USBPHYCTRL_OTGBASE_OFFSET )); + } +#endif /* ULPI transceivers don't need usbpll */ if (pdata->phy_mode ==FSL_USB2_PHY_ULPI ) {
include/linux/fsl_devices.h +3 -0
@@ -63,12 +63,15 @@ struct fsl_usb2_platform_data {enum fsl_usb2_operating_modes operating_mode;enum fsl_usb2_phy_modes phy_mode;unsigned int port_enables; +unsigned int workaround; };/* Flags in fsl_usb2_mph_platform_data */ #define FSL_USB2_PORT0_ENABLED 0x00000001#define FSL_USB2_PORT1_ENABLED 0x00000002 +#define FLS_USB2_WORKAROUND_ENGCM09152 (1 << 0) +struct spi_device ;struct fsl_spi_platform_data {
Signature · 1 line
1.7.0.4
Quoted 6 lines · Eric B?nard
this patch gives the possibility to workaround bug ENGcm09152 on i.MX35 when the hardware workaround is also implemented on the board.
It covers the workaround described on page 25 of the following Errata :
http://cache.freescale.com/files/dsp/doc/errata/IMX35CE.pdf
Quoted 6 lines
Signed-off-by Eric B?nard <[email protected]>--- arch/arm/mach-mx3/mach-cpuimx35.c | 1 + drivers/usb/gadget/fsl_mxc_udc.c | 15 +++++++++++++++ include/linux/fsl_devices.h | 3 +++ 3 files changed, 19 insertions(+), 0 deletions(-)
Do you want me to take this through my usb tree, or will it go through some other developer's tree?
Either is fine with me.
thanks,
greg k-h
Hi Greg,
Le 15/10/2010 21:10, Greg KH a ?crit :
Quoted 14 lines · Eric B?nard
Quoted 6 lines
this patch gives the possibility to workaround bug ENGcm09152 on i.MX35 when the hardware workaround is also implemented on the board.
It covers the workaround described on page 25 of the following Errata :
http://cache.freescale.com/files/dsp/doc/errata/IMX35CE.pdfQuoted 6 lines
Signed-off-by Eric B?nard<[email protected]>--- arch/arm/mach-mx3/mach-cpuimx35.c | 1 + drivers/usb/gadget/fsl_mxc_udc.c | 15 +++++++++++++++ include/linux/fsl_devices.h | 3 +++ 3 files changed, 19 insertions(+), 0 deletions(-)
Quoted 3 lines
Do you want me to take this through my usb tree, or will it go through some other developer's tree?
as most of the changes are in drivers/usb that would be great if you can take it.
Thanks
Eric
Quoted 17 lines · Eric B?nard
Hi Greg,
Le 15/10/2010 21:10, Greg KH a ?crit :
Quoted 14 lines · Eric B?nard
Quoted 12 lines
this patch gives the possibility to workaround bug ENGcm09152 on i.MX35 when the hardware workaround is also implemented on the board.
It covers the workaround described on page 25 of the following Errata :
http://cache.freescale.com/files/dsp/doc/errata/IMX35CE.pdfSigned-off-by Eric B?nard<[email protected]>--- arch/arm/mach-mx3/mach-cpuimx35.c | 1 + drivers/usb/gadget/fsl_mxc_udc.c | 15 +++++++++++++++ include/linux/fsl_devices.h | 3 +++ 3 files changed, 19 insertions(+), 0 deletions(-)
Quoted 4 lines
Quoted 3 lines
Do you want me to take this through my usb tree, or will it go through some other developer's tree?
as most of the changes are in
drivers/usbthat would be great if you can take it.
No problem, now queued up.
greg k-h