Re: [PATCHv2 2/3] usb: s3c-hsotg: Move s3c-hsotg into dwc2 folder

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

 



On Mon, Mar 03, 2014 at 05:09:28PM -0600, dinguyen@xxxxxxxxxx wrote:
> From: Dinh Nguyen <dinguyen@xxxxxxxxxx>
> 
> Moves the s3c-hsotg driver into the dwc2 folder and use the dwc2 defines in
> hw.h. The s3c-hostg driver will now be built with a kconfig option under
> the dwc2 kconfig. USB_DWC2_HOST and USB_S3C_HSOTG are mutually exclusive
> build options.
> 
> Signed-off-by: Dinh Nguyen <dinguyen@xxxxxxxxxx>
> 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>
> ---
> v2:
> - Fix whitespace damage
> - Redo s3c_hsotg_handle_rx() to use dwc2 definitions
> - Use FIFOSIZE_DEPTH_GET
> ---
>  drivers/usb/dwc2/Kconfig                 |   15 ++
>  drivers/usb/dwc2/Makefile                |   15 +-
>  drivers/usb/{gadget => dwc2}/s3c-hsotg.c |  415 +++++++++++++++---------------
>  drivers/usb/gadget/Kconfig               |    7 -
>  drivers/usb/gadget/Makefile              |    1 -
>  drivers/usb/gadget/s3c-hsotg.h           |  378 ---------------------------
>  6 files changed, 231 insertions(+), 600 deletions(-)
>  rename drivers/usb/{gadget => dwc2}/s3c-hsotg.c (91%)
>  delete mode 100644 drivers/usb/gadget/s3c-hsotg.h
> 
> diff --git a/drivers/usb/dwc2/Kconfig b/drivers/usb/dwc2/Kconfig
> index be947d6..ce14859 100644
> --- a/drivers/usb/dwc2/Kconfig
> +++ b/drivers/usb/dwc2/Kconfig
> @@ -20,6 +20,21 @@ config USB_DWC2
>  
>  if USB_DWC2
>  
> +config USB_DWC2_HOST
> +	bool "Host only mode"
> +	depends on USB=y || USB=USB_DWC2
> +	default y
> +	help
> +	  Select this when you want to use DWC2 in host mode only,
> +	  thereby the gadget feature will be regressed.
> +
> +config USB_S3C_HSOTG

while at that, you really want to rename this to USB_DWC2_PERIPHERAL

> +	depends on (ARM || USB_GADGET=y) && !USB_DWC2_HOST
> +	tristate "Designware/S3C HS/OtG USB Device controller"
> +	help
> +	  The Designware USB2.0 high-speed gadget controller
> +	  integrated into many SoCs.
> +
>  config USB_DWC2_DEBUG
>  	bool "Enable Debugging Messages"
>  	help
> diff --git a/drivers/usb/dwc2/Makefile b/drivers/usb/dwc2/Makefile
> index 11529d3..2778e16 100644
> --- a/drivers/usb/dwc2/Makefile
> +++ b/drivers/usb/dwc2/Makefile
> @@ -1,9 +1,15 @@
>  ccflags-$(CONFIG_USB_DWC2_DEBUG)	+= -DDEBUG
>  ccflags-$(CONFIG_USB_DWC2_VERBOSE)	+= -DVERBOSE_DEBUG
>  
> +ifeq ($(CONFIG_USB_DWC2_HOST),y)
>  obj-$(CONFIG_USB_DWC2)			+= dwc2.o
> -
>  dwc2-y					+= core.o core_intr.o
> +dwc2-y					+= hcd.o hcd_intr.o
> +dwc2-y					+= hcd_queue.o hcd_ddma.o
> +endif
> +obj-$(CONFIG_USB_S3C_HSOTG)		+= s3c_hsotg.o
> +s3c_hsotg-y				+= s3c-hsotg.o

also rename the file to "gadget.c" or "peripheral.c".

> @@ -13,13 +19,12 @@ dwc2-y					+= core.o core_intr.o
>  # that is done, Host mode will become an optional feature that
>  # is selected with a config option.
>  
> -dwc2-y					+= hcd.o hcd_intr.o
> -dwc2-y					+= hcd_queue.o hcd_ddma.o
> -
>  ifneq ($(CONFIG_PCI),)
>  	obj-$(CONFIG_USB_DWC2)		+= dwc2_pci.o
>  endif
> -obj-$(CONFIG_USB_DWC2)			+= dwc2_platform.o
> +ifneq ($(CONFIG_USB_DWC2_HOST),)
> +	obj-$(CONFIG_USB_DWC2)			+= dwc2_platform.o

this is wrong. You actually want to build dwc2_platform.o separately and
want to give it its own Kconfig symbol so that you can:

obj-$(CONFIG_USB_DWC2_PLATFORM)		+= dwc2_platform.o

> diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/dwc2/s3c-hsotg.c
> similarity index 91%
> rename from drivers/usb/gadget/s3c-hsotg.c
> rename to drivers/usb/dwc2/s3c-hsotg.c
> index 1172eae..9bb1ed7 100644
> --- a/drivers/usb/gadget/s3c-hsotg.c
> +++ b/drivers/usb/dwc2/s3c-hsotg.c

before accepting this, I need lots of Tested-by tags from a considerable
% of people involved with s3c-hsotg.c

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux