Re: [PATCH 0/7] usb: dwc2/s3c-hsotg: Combine drivers into a single DRD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, February 14, 2014 2:27 PM, Peter Chen wrote:
> On Thu, Feb 13, 2014 at 03:10:40PM -0600, dinguyen@xxxxxxxxxx wrote:
> > From: Dinh Nguyen <dinguyen@xxxxxxxxxx>
> >
> > Hello,
> >
> > This patch series combines the dwc2 host driver and the s3c-hsotg peripheral
> > driver into a single dual-roler driver similar to the dwc3.
> 
> Does s3c-hsotg use dwc usb2 ip too? If it is, the structure should
> like ip driver + glue layer. If not, why needs to put them
> together, I am a little puzzled here.

Yes, 's3c-hsotg' also uses DWC USB2 IP.
As DWC3 USB driver (./drivers/usb/dwc3/), 'IP driver + glue layer'
looks good.

Best regards,
Jingoo Han

> 
> Peter
> 
> >
> > The patch series moves the s3c-hsotg files into the /dwc2 folder, so this is
> > the final location of the driver. When the driver is built as a kernel module,
> > it will be dwc2.ko and dwc2_platform.ko.
> >
> > patch 1/7 : Edit the defines in dwc2/hw.h so that the s3c-hsotg driver can use
> >             the defines in hw.h. So we can remove s3c-hsotg.h in a subsequent
> >             patch.
> > patch 2/7 : Moves the s3c-hsotg driver into /dwc2 folder. Building the s3c-hsotg
> >             driver will now be a Kconfig option under DWC2. Also replaces the
> >             s3c-hsotg.h header file for dwc2/hw.h.
> > patch 3/7 : Moves the s3c-hsotg data structure into a common place, core.h, so
> >             that final DRD can use it.
> > patch 4/7 : Add the gadget data structure to a common data structure,
> >             dwc2_hsotg, which is the data structure that will encapsulate host
> >             and peripheral modes for the final DRD. The bulk for this patch
> >             is edits the in s3c-hsotg.c to reference the new data structure.
> > patch 5/7 : Replaces the s3c_hostg_irq handler with the dwc2_handle_common_intr
> >             in dwc2. Updates the dwc2 IRQ routines to call the s3c-hsotg gadget
> >             functions for peripheral mode.
> > patch 6/7 : Update the Kconfig and Makefile to enable building of the single
> >             DRD. At this stage the the driver is behaving as a dual-role driver.
> > patch 7/7 : Decouple host/peripheral functionality when buildling the driver in
> >             host or peripheral mode only.
> >
> > This patchset is based on 3.14-rc2. I have only tested on the SOCFPGA platform
> > which has v2.93a of dual-role IP.
> >
> > Thanks,
> >
> > Dinh Nguyen (7):
> >   usb: dwc2: Add defines to support the s3c-hsotg driver
> >   usb: s3c-hsotg: Move s3c-hsotg into dwc2 folder
> >   usb: s3c-hsotg: Move s3c-hsotg data structures
> >   usb: dwc2: Add the s3c-hsotg data structures to main dwc2_hsotg data
> >     structure
> >   usb: dwc2: combine the dwc2 and s3c_hsotg to use a single IRQ handler
> >   usb: dwc2: Enable the dwc2/s3c-hsotg to be a single dual-role driver
> >   usb: dwc2: Split out the dwc2/sc3-hsotg driver mode's build
> >     dependency
> >
> >  drivers/usb/dwc2/Kconfig                 |   28 +
> >  drivers/usb/dwc2/Makefile                |   17 +-
> >  drivers/usb/dwc2/core.c                  |    1 +
> >  drivers/usb/dwc2/core.h                  |  225 +++-
> >  drivers/usb/dwc2/core_intr.c             |  108 +-
> >  drivers/usb/dwc2/hcd.c                   |    7 +-
> >  drivers/usb/dwc2/hcd.h                   |   23 +-
> >  drivers/usb/dwc2/hw.h                    |   23 +-
> >  drivers/usb/dwc2/platform.c              |   50 +-
> >  drivers/usb/{gadget => dwc2}/s3c-hsotg.c | 1807 +++++++++++-------------------
> >  drivers/usb/gadget/Kconfig               |    7 -
> >  drivers/usb/gadget/Makefile              |    1 -
> >  drivers/usb/gadget/s3c-hsotg.h           |  378 -------
> >  13 files changed, 1128 insertions(+), 1547 deletions(-)
> >  rename drivers/usb/{gadget => dwc2}/s3c-hsotg.c (57%)
> >  delete mode 100644 drivers/usb/gadget/s3c-hsotg.h
> > ---
> > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Cc: Paul Zimmerman <paulz@xxxxxxxxxxxx>
> > Cc: Felipe Balbi <balbi@xxxxxx>
> > Cc: Ben Dooks <ben-linux@xxxxxxxxx>
> > Cc: Matt Porter <mporter@xxxxxxxxxx>
> > Cc: Kukjin Kim <kgene.kim@xxxxxxxxxxx>
> > Cc: Stephen Warren <swarren@xxxxxxxxxxxxx>
> > Cc: Matthijs Kooijman <matthijs@xxxxxxxx>
> > Cc: Jingoo Han <jg1.han@xxxxxxxxxxx>
> > Cc: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
> > Cc: Robert Baldyga <r.baldyga@xxxxxxxxxxx>
> >
> > --
> > 1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux