Add-Synopsys-DesignWare-HS-USB-OTG-driver
v6 cover Add-Synopsys-DesignWare-HS-USB-OTG-driver
From: Tirumala Marri <[email protected]>
v6:
1. Replaced register definitions and bit fields with macros.
2. Replace printks with dev_dbg or dev_err functions.
3. Cleanup some assignments.
4. Remove chip specific selections in Kconfig file.
v5:
1. "PATCH V5" has a new license header from Synopsys and APM
Tirumala Marri (10):
USB/ppc4xx: Add Synopsys DWC OTG Register definitions USB/ppc4xx: Add Synopsys DWC OTG driver framework USB/ppc4xx: Add Synopsys DWC OTG Core Interface Layer (CIL) USB/ppc4xx: Add Synopsys DWC OTG HCD function USB/ppc4xx: Add Synopsys DWC OTG HCD interrupt function USB/ppc4xx: Add Synopsys DWC OTG HCD queue function USB/ppc4xx: Add Synopsys DWC OTG PCD function
USB ppc4xx: Add Synopsys DWC OTG PCD interrupt function USB/ppc4xx:Synopsys DWC OTG driver enable gadget support USB ppc4xx: Add Synopsys DWC OTG driver kernel configuration and
Makefile
drivers/Makefile | 2 + drivers/usb/Kconfig | 3 +- drivers/usb/dwc_otg/Kconfig | 96 ++ drivers/usb/dwc_otg/Makefile | 19 + drivers/usb/dwc_otg/dwc_otg_apmppc.c | 413 ++++++ drivers/usb/dwc_otg/dwc_otg_cil.c | 944 ++++++++++++ drivers/usb/dwc_otg/dwc_otg_cil.h | 1215 ++++++++++++++++ drivers/usb/dwc_otg/dwc_otg_cil_intr.c | 617 ++++++++ drivers/usb/dwc_otg/dwc_otg_driver.h | 78 + drivers/usb/dwc_otg/dwc_otg_hcd.c | 2408 +++++++++++++++++++++++++++++++ drivers/usb/dwc_otg/dwc_otg_hcd.h | 416 ++++++ drivers/usb/dwc_otg/dwc_otg_hcd_intr.c | 1470 +++++++++++++++++++ drivers/usb/dwc_otg/dwc_otg_hcd_queue.c | 697 +++++++++ drivers/usb/dwc_otg/dwc_otg_param.c | 182 +++ drivers/usb/dwc_otg/dwc_otg_pcd.c | 1736 ++++++++++++++++++++++ drivers/usb/dwc_otg/dwc_otg_pcd.h | 138 ++ drivers/usb/dwc_otg/dwc_otg_pcd_intr.c | 2278 +++++++++++++++++++++++++++++ drivers/usb/dwc_otg/dwc_otg_regs.h | 1313 +++++++++++++++++ drivers/usb/gadget/Kconfig | 22 + drivers/usb/gadget/gadget_chips.h | 8 + 20 files changed, 14054 insertions(+), 1 deletions(-) create mode 100644 drivers/usb/dwc_otg/Kconfig create mode 100644 drivers/usb/dwc_otg/Makefile create mode 100644 drivers/usb/dwc_otg/dwc_otg_apmppc.c create mode 100644 drivers/usb/dwc_otg/dwc_otg_cil.c create mode 100644 drivers/usb/dwc_otg/dwc_otg_cil.h create mode 100644 drivers/usb/dwc_otg/dwc_otg_cil_intr.c create mode 100644 drivers/usb/dwc_otg/dwc_otg_driver.h create mode 100644 drivers/usb/dwc_otg/dwc_otg_hcd.c create mode 100644 drivers/usb/dwc_otg/dwc_otg_hcd.h create mode 100644 drivers/usb/dwc_otg/dwc_otg_hcd_intr.c create mode 100644 drivers/usb/dwc_otg/dwc_otg_hcd_queue.c create mode 100644 drivers/usb/dwc_otg/dwc_otg_param.c create mode 100644 drivers/usb/dwc_otg/dwc_otg_pcd.c create mode 100644 drivers/usb/dwc_otg/dwc_otg_pcd.h create mode 100644 drivers/usb/dwc_otg/dwc_otg_pcd_intr.c create mode 100644 drivers/usb/dwc_otg/dwc_otg_regs.h
Quoted 7 lines · On Wed, Dec 08, 2010 at 04:28:59PM -0800, [email protected] wrote:
From: Tirumala Marri <[email protected]>
v6:
1. Replaced register definitions and bit fields with macros.
2. Replace printks withdev_dbgordev_errfunctions.
3. Cleanup some assignments.
4. Remove chip specific selections inKconfigfile.
Much nicer, thanks.
Do you wish for me to apply this to the tree if it passes review?
thanks,
greg k-h
Yes please.
Regards,
Marri
Quoted 17 lines · Greg KH
Quoted 7 lines · On Wed, Dec 08, 2010 at 04:28:59PM -0800, [email protected] wrote:
From: Tirumala Marri <[email protected]>
v6:
1. Replaced register definitions and bit fields with macros.
2. Replace printks withdev_dbgordev_errfunctions.
3. Cleanup some assignments.
4. Remove chip specific selections inKconfigfile.Much nicer, thanks.
Do you wish for me to apply this to the tree if it passes review?
thanks,
greg k-h
Quoted 7 lines
Much nicer, thanks.
Do you wish for me to apply this to the tree if it passes review?
thanks,
greg k-h
Yes, please.
Thanks,
marri
Hi,
В Wed, 8 Dec 2010 16:28:59 -0800
tmarri at apm.com (tmarri at apm.com) пишет:
Quoted 7 lines
From: Tirumala Marri <tmarri at apm.com>
v6:
1. Replaced register definitions and bit fields with macros.
2. Replace printks withdev_dbgordev_errfunctions.
3. Cleanup some assignments.
4. Remove chip specific selections inKconfigfile.
Thanks for the update!
I'm currently working on USB support for Ralink RT3050 (mipsel) boards which have the same USB OTG controller. I've based my work on the previous version of your patchset. The were several arch-specific issues that I'd like to be fixed here before it hits mainline (BTW, is it going to be mainlined?). I'll reply to the subsequent e-mails about the specific issues. Is this ok?
Also I'd like to note that s3c-hsotg driver that is already in the kernel seems to be quite similar from the register definitions at least. It handles gadget mode only and the code looks different. I think it should be replaced somehow by this new driver (which is based on the "official" driver).
Signature · 1 line
Alexander
On Thu, Dec 9, 2010 at 8:52 PM, Alexander Gordeev <[email protected]> w= rote:
Quoted 13 lines
Hi,
=D0=92 Wed, =C2=A08 Dec 2010 16:28:59 -0800
tmarri at apm.com (tmarri at apm.com) =D0=BF=D0=B8=D1=88=D0=B5=D1=82:Quoted 7 lines
From: Tirumala Marri <tmarri at apm.com>
v6:
=C2=A01. Replaced register definitions and bit fields with macros. =C2=A02. Replace printks withdev_dbgordev_errfunctions. =C2=A03. Cleanup some assignments.
=C2=A04. Remove chip specific selections inKconfigfile.
Quoted 8 lines
Thanks for the update!
I'm currently working on USB support for Ralink RT3050 (mipsel) boards which have the same USB OTG controller. I've based my work on the previous version of your patchset. The were several arch-specific issues that I'd like to be fixed here before it hits mainline (BTW, is it going to be mainlined?). I'll reply to the subsequent e-mails about the specific issues. Is this ok?
Yes the idea is to push into main line. I am not sure if it is good idea
to push all the changes in one go. I would wait for this patch to be acce=
pted
first and add your changes on top of that.
Quoted 6 lines
Also I'd like to note that s3c-hsotg driver that is already in the kernel seems to be quite similar from the register definitions at least. It handles gadget mode only and the code looks different. I think it should be replaced somehow by this new driver (which is based on the "official" driver).
It sound similar to gadget portion of this OTG driver. After this patch acc= epted
I will take a look and see if we can completely eliminate s3c-hsotg .
Thanks,
Marri
Quoted 7 lines · On Wed, Dec 08, 2010 at 04:28:59PM -0800, [email protected] wrote:
From: Tirumala Marri <[email protected]>
v6:
1. Replaced register definitions and bit fields with macros.
2. Replace printks withdev_dbgordev_errfunctions.
3. Cleanup some assignments.
4. Remove chip specific selections inKconfigfile.
There are still a lot of checkpatch errors and warnings in these patches. Patch 1-8 has:
total: 64 errors, 126 warnings, 13905 lines checked
Care to fix all of these up in your next submission? I can't take these as-is, sorry.
And, if you haven't run checkpatch.pl before, odds are you haven't run 'sparse'. Please run that as well and resolve the issues it finds.
thanks,
greg k-h
Quoted 9 lines · Greg KH
Quoted 7 lines · On Wed, Dec 08, 2010 at 04:28:59PM -0800, [email protected] wrote:
From: Tirumala Marri <[email protected]>
v6:
=A01. Replaced register definitions and bit fields with macros. =A02. Replace printks withdev_dbgordev_errfunctions. =A03. Cleanup some assignments.
=A04. Remove chip specific selections inKconfigfile.
Quoted 5 lines
There are still a lot of checkpatch errors and warnings in these patches. =A0Patch 1-8 has:
=A0 =A0 =A0 =A0total: 64 errors, 126 warnings, 13905 lines checkedCare to fix all of these up in your next submission? =A0I can't take thes=
e
Quoted 9 lines
as-is, sorry.
And, if you haven't run checkpatch.pl before, odds are you haven't run 'sparse'. =A0Please run that as well and resolve the issues it finds.
thanks,
greg k-h
I will fix the all these errors. Also will run use the sparse tool .
Regards,
Marri
Hi,
We are currently using the latest version of this Synopsis IP in some of our customers SoC's.
The latest hardware adds a new DMA mode which is less Interrupt intensive as well as a few other features.
I have spent (and im still spending) a long time fixing up this driver to be linux standards compliant with the intention of pushing it upstream once complete, its still not ready yet.
One of the major issues we had is the driver isn't SMP safe, I've not had chance to review your patches yet but have your run the driver with lock checking turned on ?
Would it be possible to get the changes for the latest version of the IP merged into this driver, I can supply my current version as a reference.
In my driver :
Currently host support is working well and i've tested it with multiple devices and done the test outlined on
http://www.linux-usb.org/usbtest/, the driver passed checkpatches and runs with lockdeps on and on a SMP system, Im still working on the device mode (PCD) part of the driver generally it works, but im still getting the odd lock dep warning and a panic on un-loading of certain gadget kernel modules. The only issue with our driver is I have not converted all the bitfield usage to macros so it might make diffing a pain.
Cheers
Neil
Quoted 9 lines · Greg KH
Quoted 7 lines · On Wed, Dec 08, 2010 at 04:28:59PM -0800, [email protected] wrote:
From: Tirumala Marri <[email protected]>
v6:
=C2=A01. Replaced register definitions and bit fields with macros. =C2=A02. Replace printks withdev_dbgordev_errfunctions. =C2=A03. Cleanup some assignments.
=C2=A04. Remove chip specific selections inKconfigfile.
Quoted 3 lines
There are still a lot of checkpatch errors and warnings in these patches. =C2=A0Patch 1-8 has:
=C2=A0 =C2=A0 =C2=A0 =C2=A0total: 64 errors, 126 warnings, 13905 lines ch=
ecked
Quoted 2 lines
Care to fix all of these up in your next submission? =C2=A0I can't take t=
hese
Quoted 13 lines
as-is, sorry.
And, if you haven't run checkpatch.pl before, odds are you haven't run 'sparse'. =C2=A0Please run that as well and resolve the issues it finds.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at =C2=A0http://vger.kernel.org/majordomo-info.html
Hi,
I've looked at the patches but your email states there are 10 patches, I can't see #1 and #10, only 2- 8 ??
It doesn't look like you have resolved the lockdep issues we have been seeing, please get in contact as it
would be good to discuss our issues with this driver ( and our distain for Synopsis ;-) ).
Cheers
Neil
Quoted 32 lines · Neil Jones
Hi,
We are currently using the latest version of this Synopsis IP in some of our customers SoC's.
The latest hardware adds a new DMA mode which is less Interrupt intensive as well as a few other features.
I have spent (and im still spending) a long time fixing up this driver to be linux standards compliant with the intention of pushing it upstream once complete, its still not ready yet.
One of the major issues we had is the driver isn't SMP safe, I've not had chance to review your patches yet but have your run the driver with lock checking turned on ?
Would it be possible to get the changes for the latest version of the IP merged into this driver, I can supply my current version as a reference.
In my driver :
Currently host support is working well and i've tested it with multiple devices and done the test outlined on
http://www.linux-usb.org/usbtest/, the driver passed checkpatches and runs with lockdeps on and on a SMP system, Im still working on the device mode (PCD) part of the driver generally it works, but im still getting the odd lock dep warning and a panic on un-loading of certain gadget kernel modules. The only issue with our driver is I have not converted all the bitfield usage to macros so it might make diffing a pain.
Quoted 17 lines
Cheers
Neil
Quoted 12 lines · Greg KH
Quoted 7 lines · On Wed, Dec 08, 2010 at 04:28:59PM -0800, [email protected] wrote:
From: Tirumala Marri <[email protected]>
v6:
=C2=A01. Replaced register definitions and bit fields with macros. =C2=A02. Replace printks withdev_dbgordev_errfunctions. =C2=A03. Cleanup some assignments.
=C2=A04. Remove chip specific selections inKconfigfile.There are still a lot of checkpatch errors and warnings in these patches. =C2=A0Patch 1-8 has:
=C2=A0 =C2=A0 =C2=A0 =C2=A0total: 64 errors, 126 warnings, 13905 lines c=
hecked
Quoted 2 lines
Quoted 2 lines
Care to fix all of these up in your next submission? =C2=A0I can't take =
these
Quoted 14 lines
Quoted 13 lines
as-is, sorry.
And, if you haven't run checkpatch.pl before, odds are you haven't run 'sparse'. =C2=A0Please run that as well and resolve the issues it finds.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at =C2=A0http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Neil Jones
Hi,
I've looked at the patches but your email states there are 10 patches, I can't see #1 and #10, only 2- 8 ??
It doesn't look like you have resolved the lockdep issues we have been seeing, please get in contact as it
would be good to discuss our issues with this driver ( and our distain for Synopsis ;-) ).
Quoted 40 lines
Cheers
Neil
Quoted 35 lines · Neil Jones
Hi,
We are currently using the latest version of this Synopsis IP in some of our customers SoC's.
The latest hardware adds a new DMA mode which is less Interrupt intensive as well as a few other features.
I have spent (and im still spending) a long time fixing up this driver to be linux standards compliant with the intention of pushing it upstream once complete, its still not ready yet.
One of the major issues we had is the driver isn't SMP safe, I've not had chance to review your patches yet but have your run the driver with lock checking turned on ?
Would it be possible to get the changes for the latest version of the IP merged into this driver, I can supply my current version as a reference.
In my driver :
Currently host support is working well and i've tested it with multiple devices and done the test outlined on
http://www.linux-usb.org/usbtest/, the driver passed checkpatches and runs with lockdeps on and on a SMP system, Im still working on the device mode (PCD) part of the driver generally it works, but im still getting the odd lock dep warning and a panic on un-loading of certain gadget kernel modules. The only issue with our driver is I have not converted all the bitfield usage to macros so it might make diffing a pain.Cheers
Neil
Hi,
Sorry for the late reply, I was busy working on the patch. Idea is to
functional patch for PPC architecture initially and extend that to SMP and resolve other bugs if there at all. To push all the features in one go is kind
of hard and increases the size of patches.
Sure let us discuss further if there are know issues need to be resolved
in the driver.
Thanks,
Marri