kernel: modules: usb: Add DWC3 Qualcomm kmod
authorRobert Marko <robimarko@gmail.com>
Sun, 16 Dec 2018 22:06:17 +0000 (23:06 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Thu, 27 Dec 2018 13:06:38 +0000 (14:06 +0100)
Since kernel 4.18 support for Qualcomm glue layer was
moved from DWC3 OF Simple to a separate DWC3 QCOM module.
So lets add it and make it depend on 4.19 kernel and make
sure that DWC3 OF Simple is not included if 4.19 is used.

Signed-off-by: Robert Marko <robimarko@gmail.com>
package/kernel/linux/modules/usb.mk

index fafa9a021e10c3f965f0325e99db3375fa45c4ab..c5991141b584c0c57dd672ed216ada4df51aa9d7 100644 (file)
@@ -459,7 +459,7 @@ $(eval $(call KernelPackage,usb-dwc3))
 
 define KernelPackage/usb-dwc3-of-simple
   TITLE:=DWC3 USB simple OF driver
 
 define KernelPackage/usb-dwc3-of-simple
   TITLE:=DWC3 USB simple OF driver
-  DEPENDS:=@TARGET_ipq40xx||@TARGET_ipq806x +kmod-usb-dwc3
+  DEPENDS:=@!LINUX_4_19 @TARGET_ipq40xx||@TARGET_ipq806x +kmod-usb-dwc3
   KCONFIG:= CONFIG_USB_DWC3_OF_SIMPLE
   FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-of-simple.ko
   AUTOLOAD:=$(call AutoLoad,53,dwc3-of-simple,1)
   KCONFIG:= CONFIG_USB_DWC3_OF_SIMPLE
   FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-of-simple.ko
   AUTOLOAD:=$(call AutoLoad,53,dwc3-of-simple,1)
@@ -474,6 +474,26 @@ endef
 
 $(eval $(call KernelPackage,usb-dwc3-of-simple))
 
 
 $(eval $(call KernelPackage,usb-dwc3-of-simple))
 
+
+define KernelPackage/usb-dwc3-qcom
+  TITLE:=DWC3 Qualcomm USB driver
+  DEPENDS:=@LINUX_4_19 @TARGET_ipq40xx||@TARGET_ipq806x +kmod-usb-dwc3
+  KCONFIG:= CONFIG_USB_DWC3_QCOM
+  FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko
+  AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom,1)
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-dwc3-qcom/description
+ Some Qualcomm SoCs use DesignWare Core IP for USB2/3 functionality.
+ This driver also handles Qscratch wrapper which is needed for
+ peripheral mode support.
+endef
+
+
+$(eval $(call KernelPackage,usb-dwc3-qcom))
+
+
 define KernelPackage/usb-acm
   TITLE:=Support for modems/isdn controllers
   KCONFIG:=CONFIG_USB_ACM
 define KernelPackage/usb-acm
   TITLE:=Support for modems/isdn controllers
   KCONFIG:=CONFIG_USB_ACM