File 0562-Adjust-driver-list-to-modern-kernels.patch of Package dracut

From 1229cbc091ac11434b0b628d58630ce4c8fbe8e3 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <daniel.molkentin@suse.com>
Date: Wed, 9 Dec 2015 14:14:46 +0100
Subject: [PATCH] Adjust driver list to modern kernels

This particularly enables aarch64 and adds critical drivers of ARM platform.

Reference: bsc#1084272

Full change summary of upstream changes included:

kernel-modules: include all HID driver in hostonly mode

If a kernel is updated in the undocked state and later on docked, some
keyboard modules can be missing.

Thus include all HID drivers.

(cherry picked from commit 8d26b5661ea2fd9fb41c83048b7590e44b1c95df)

kernel-modules: add usb-storage

To save the rdsosreport.txt to a USB stick, the usb-storage module is
needed

(cherry picked from commit b4dd861a0b916368bad9413fdc5d90482fcbd65a)

kernel-modules: join instmods and install all usb/storage

(cherry picked from commit 6bc2096cf58c4b52f23ecc1bf8dc301d6122dfb5)

kernel-modules: add nvme kernel module

(cherry picked from commit a84c391b8771e0238a0edb8b382ecbf7f2d2bfd3)

modules: kernel: add phy and power modules to generic initrd

The phy and power modules are needed by some of the recent ARM
devices that have appeared like CHIP and some exynos devices.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
(cherry picked from commit e752d42de9c37dd9906a802a5cdf528fbd360453)

modules: kernel: add more usb controller modules

There's a number of usb controllers that are common yet aren't
contained in the host directory. Include these for generic host.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
(cherry picked from commit 0c5e5f271be8cb99e4f65fd6cb37ed70dd63754d)

dracut: Add drivers/clk by default on arm

This will bundle clock drivers into the initramfs on arm

Tested on ti dm8148-t410 where adpll is needed on 4.6+ kernel
This will avoid to rely on (maybe broken) bootloader clocks.

Theses modules are also usually loaded early. Having them bundled into
the initramfs will avoid lot of deferred probes and others delay.

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
(cherry picked from commit 2602a74edf543f98f2aa1eb79db3de3a1cda13f0)

Add check for aarch64 to the arm kernel module list

This adds the same list of drivers we use for arm platforms for
aarch64 too, also add the DMA drivers there too as they can add
sigficant performance for some storage/usb and often need to be
present when the storage drivers load.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
(cherry picked from commit 917e1b6b5b2669a30bce69061686adbb6abc5e35)

module-setup.sh: Add ARM specific driver to initramfs image

If a hisi_sas storage device is used as / during system install, the
resulting installation will not boot because the hisi_sas driver is not
included in the initramfs.

The Hisilicon storage driver needs to be added to the initramfs image for
aarch64 kernels.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: dzickus@redhat.com
Cc: dmarlin@redhat.com
Cc: wefu@redhat.com
Cc: harald@redhat.com
(cherry picked from commit fd24c90c363109e1693161a5d5c51190bb99cd29)

kernel-modules: add serial line drivers

(cherry picked from commit c1699b59c6ec0c86f1355fbb68eaf65281b81789)

add options to pickup dw_mmc submodules to blockfuncs

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
(cherry picked from commit f496af50b7c5ddf13154123186cee713f540c8db)

arm: add soc/extcon/mfd as they're often needed for USB and core memory/soc drivers

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
(cherry picked from commit 39018c93c2bcf20a7f5f9ee509ad1c0448d598f7)

Add rpmsg, hwspinlock and usb/misc for ARM

Some of the more complex devices now need rpmsg and hwspinlock in the early boot
process to start, and these to the initrd, and pull in usb/misc because
apparently non standard usb hubs are a thing.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
(cherry picked from commit 82651e9ef3c4c799281ba006f6ef46902e13086f)

kernel-modules: add mmc/core for arm

(cherry picked from commit f8e0c7cc6296909cff92f718ed360ff9ef1f7bae)

Add aarch64 to drm modules along side ARM

Add aarch64 to modules, also update the drivers checked for latest
kernel changes.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
(cherry picked from commit eec49634d4fd5b2d9535a99e184c2450f6026903)
---
 modules.d/50drm/module-setup.sh            |  6 ++--
 modules.d/90kernel-modules/module-setup.sh | 47 ++++++++++++++++++++----------
 2 files changed, 34 insertions(+), 19 deletions(-)

diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
index 1e2ada07..3e03a5d9 100755
--- a/modules.d/50drm/module-setup.sh
+++ b/modules.d/50drm/module-setup.sh
@@ -49,14 +49,14 @@ installkernel() {
         return 0
     }
 
-    if [[ "$(uname -p)" == arm* ]]; then
-        # arm specific modules needed by drm
+    if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]; then
+        # arm/aarch64 specific modules needed by drm
         instmods \
             "=drivers/gpu/drm/i2c" \
             "=drivers/gpu/drm/panel" \
+            "=drivers/gpu/drm/bridge" \
             "=drivers/pwm" \
             "=drivers/video/backlight" \
-            "=drivers/video/fbdev/omap2/displays-new" \
             ${NULL}
     fi
 
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 41610a24..37cc76f3 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -39,37 +39,52 @@ installkernel() {
             ehci-hcd ehci-pci ehci-platform \
             ohci-hcd ohci-pci \
             uhci-hcd \
-            xhci-hcd xhci-pci xhci-plat-hcd \
             pinctrl-cherryview pwm-lpss pwm-lpss-platform
 
-        # ensure early availability for e.g. emmc phys
-        instmods "=drivers/phy"
-
-        instmods "=drivers/pci/host"
-
-        instmods \
+        hostonly='' instmods \
+            xhci-hcd xhci-pci xhci-plat-hcd \
             "=drivers/hid" \
+            "=drivers/tty/serial" \
             "=drivers/input/serio" \
-            "=drivers/input/keyboard"
+            "=drivers/input/keyboard" \
+            "=drivers/usb/storage" \
+            "=drivers/pci/host" \
+            ${NULL}
 
-        instmods yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
-                 atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus
+        instmods \
+            yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
+            atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \
+            virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
+            "=drivers/pcmcia" =ide nvme
 
-        if [[ "$(uname -p)" == arm* ]]; then
-            # arm specific modules
+        if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]; then
+            # arm/aarch64 specific modules
+            _blockfuncs+='|dw_mc_probe|dw_mci_pltfm_register'
             instmods \
+                "=drivers/clk" \
+                "=drivers/dma" \
+                "=drivers/extcon" \
+                "=drivers/hwspinlock" \
                 "=drivers/i2c/busses" \
+                "=drivers/mfd" \
+                "=drivers/mmc/core" \
+                "=drivers/phy" \
+                "=drivers/power" \
                 "=drivers/regulator" \
+                "=drivers/rpmsg" \
                 "=drivers/rtc" \
+                "=drivers/soc" \
+                "=drivers/usb/chipidea" \
+                "=drivers/usb/dwc2" \
+                "=drivers/usb/dwc3" \
                 "=drivers/usb/host" \
+                "=drivers/usb/misc" \
+                "=drivers/usb/musb" \
                 "=drivers/usb/phy" \
+		"=drivers/scsi/hisi_sas" \
                 ${NULL}
         fi
 
-        # install virtual machine support
-        instmods virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
-            "=drivers/pcmcia" =ide "=drivers/usb/storage"
-
         find_kernel_modules  |  block_module_filter  |  instmods
 
 	# modules that will fail block_module_filter because their implementation
-- 
2.13.6

openSUSE Build Service is sponsored by