HiKey: Add BOARD_VENDOR_RAMDISK_KERNEL_MODULES for HiKey am: cd76b134a5 am: 9a11156b98 am: 5744cc8359
Change-Id: I2f02e210cf1f0c9e6943ba5ead1b88296859b512
diff --git a/hikey.mk b/hikey.mk
index 9e29243..1c26335 100644
--- a/hikey.mk
+++ b/hikey.mk
@@ -14,7 +14,36 @@
PRODUCT_DEVICE := hikey
PRODUCT_BRAND := Android
-HIKEY_MODS := $(wildcard device/linaro/hikey-kernel/hikey/$(TARGET_KERNEL_USE)/*.ko)
+ifneq ($(HIKEY_USES_GKI),)
+HIKEY_MOD_DIR := device/linaro/hikey-kernel/hikey/5.4/
+HIKEY_MODS := $(wildcard $(HIKEY_MOD_DIR)/*.ko)
ifneq ($(HIKEY_MODS),)
BOARD_VENDOR_KERNEL_MODULES += $(HIKEY_MODS)
+ # XXX dwc2/phy-hi6220-usb have some timing
+ # issue that prevents gadget mode from working
+ # unless they are loaded from initrd. Need to fix.
+ BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
+ $(HIKEY_MOD_DIR)/dwc2.ko \
+ $(HIKEY_MOD_DIR)/phy-hi6220-usb.ko
+
+ # make sure ion cma heap loads early
+ BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
+ $(HIKEY_MOD_DIR)/ion_cma_heap.ko
+
+ # Not sure why, but powerkey has to be initrd
+ # or else we'll see stalls or issues at bootup
+ BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
+ $(HIKEY_MOD_DIR)/hisi_powerkey.ko
+
+ BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
+ $(HIKEY_MOD_DIR)/hi655x-regulator.ko \
+ $(HIKEY_MOD_DIR)/clk-hi655x.ko \
+ $(HIKEY_MOD_DIR)/hi655x-pmic.ko \
+ $(HIKEY_MOD_DIR)/mmc_core.ko \
+ $(HIKEY_MOD_DIR)/mmc_block.ko \
+ $(HIKEY_MOD_DIR)/dw_mmc-k3.ko \
+ $(HIKEY_MOD_DIR)/dw_mmc-pltfm.ko \
+ $(HIKEY_MOD_DIR)/dw_mmc.ko \
+
+endif
endif