gemini: Break out USB to packages
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 18 Oct 2018 09:30:27 +0000 (11:30 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:48:07 +0000 (17:48 +0100)
This creates a new kernel package for the fotg210 host
controller and uses that with the gemini to shrink the
kernel. The SQ201 needs the USB2 PCI package as well.

The build system required me to make kernel_oldconfig
beofore it would build without errors so some minor
unrelated Kconfig entries are changed.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(backported from 10ec966f7ba7471a8af437c317cdcc5ef8865e8d)

package/kernel/linux/modules/usb.mk
target/linux/gemini/Makefile
target/linux/gemini/config-4.14
target/linux/gemini/image/Makefile

index 8a4915712bf860cbdf27f59399df3789298c25ea..61a876b4d9a24c22af74045cc7cf549d136df1e8 100644 (file)
@@ -318,6 +318,17 @@ define KernelPackage/usb-bcma
 endef
 $(eval $(call KernelPackage,usb-bcma))
 
+define KernelPackage/usb-fotg210
+  TITLE:=Support for FOTG210 USB host controllers
+  DEPENDS:=@USB_SUPPORT @TARGET_gemini
+  KCONFIG:=CONFIG_USB_FOTG210_HCD
+  FILES:= \
+       $(if $(CONFIG_USB_FOTG210_HCD),$(LINUX_DIR)/drivers/usb/host/fotg210-hcd.ko)
+  AUTOLOAD:=$(call AutoLoad,50,fotg210-hcd,1)
+  $(call AddDepends/usb)
+endef
+$(eval $(call KernelPackage,usb-fotg210))
+
 define KernelPackage/usb-ssb
   TITLE:=Support for SSB USB controllers
   DEPENDS:=@USB_SUPPORT @TARGET_brcm47xx
index 4b46bc23a1ab31141e9c713ee034141b5705b247..3204b3f5d81e1d44c8e8a23569e0e57ff8fce6fc 100644 (file)
@@ -24,6 +24,8 @@ KERNELNAME:=zImage dtbs
 include $(INCLUDE_DIR)/target.mk
 
 DEFAULT_PACKAGES += \
+       kmod-usb-core kmod-usb-fotg210 \
+       kmod-usb-ledtrig-usbport \
        kmod-leds-gpio kmod-led-trig-heartbeat \
        kmod-gpio-button-hotplug
 
index 95e6b0c2c6dba43c526b4d00628291ac55bf78db..8866a576be73fdaff8a6ffdad34240b4acedd43a 100644 (file)
@@ -51,13 +51,15 @@ CONFIG_BLK_SCSI_REQUEST=y
 CONFIG_BOUNCE=y
 # CONFIG_BPF_SYSCALL is not set
 # CONFIG_CACHE_L2X0 is not set
+CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLKSRC_MMIO=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMDLINE="console=ttyS0,19200n8"
+CONFIG_CMDLINE_FROM_BOOTLOADER=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_GEMINI=y
-CONFIG_COMPACTION=y
 CONFIG_COMPAT_BRK=y
 CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_COREDUMP=y
@@ -235,7 +237,6 @@ CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_COMPAT=y
 CONFIG_I2C_GPIO=y
 CONFIG_I2C_HELPER_AUTO=y
-# CONFIG_INITRAMFS_FORCE is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INPUT=y
 CONFIG_IOMMU_HELPER=y
@@ -414,11 +415,6 @@ CONFIG_TMPFS_POSIX_ACL=y
 CONFIG_TREE_SRCU=y
 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
 CONFIG_UNINLINE_SPIN_UNLOCK=y
-CONFIG_USB=y
-CONFIG_USB_COMMON=y
-# CONFIG_USB_EHCI_HCD is not set
-CONFIG_USB_FOTG210_HCD=y
-CONFIG_USB_SUPPORT=y
 # CONFIG_USERIO is not set
 CONFIG_USER_NS=y
 CONFIG_USE_OF=y
index a05b7111b5bcd25c8ed7cd6c7f585358ddeeda35..9e7daea03a30640bc485a98a433ecac2acea00ea 100644 (file)
@@ -137,7 +137,7 @@ define Device/sq201
        DEVICE_TITLE := ITian Square One SQ201
        IMAGES += sq201-image
        IMAGE/sq201-image := sq201-images
-       DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES) rt61-pci
+       DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES) rt61-pci usb2-pci
 endef
 TARGET_DEVICES += sq201