From c5e43b6547fd801793617024b51d3117227ba551 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Tue, 26 May 2020 21:38:09 +0200 Subject: kernels: remove linux-libre-aarch64 This kernel has been replaced by linux-libre-64 in libre in an attempt to unify all 64bit kernels made for 32bit rootfs. This has been tested on a SBC that has good upstream support in linux and in u-boot, and a 64bit CPU. That SBC is however not officially supported by Parabola as it still require nonfree binaries in u-boot to boot. The way to go to add official 64bit support ARM computers with 64bit CPUs is to get devices that can at least boot with fully free software. Some SBCs with an Allwinner SOCs like the A64 seem a good target to do that as some SBCs have good support in upstream Linux and u-boot and can boot with free software, and we already have an uboot4extlinux package for many boards with Allwinner SOCs, so we could probably reuse most of that work. However I don't have an SBC like that yet, so until now I tested on a board I was given at a conference. Signed-off-by: Denis 'GNUtoo' Carikli --- ...RM-atags-add-support-for-Marvell-s-u-boot.patch | 51 - ...ctl-and-CONFIG-to-disallow-unprivileged-C.patch | 132 - ...gadget-no-TTY-hangup-on-USB-disconnect-WI.patch | 39 - ...dt-retrieve-MAC-addresses-from-Marvell-bo.patch | 47 - ...02-fix-Atmel-maXTouch-touchscreen-support.patch | 37 - ...vres-add-a-helper-function-for-ioremap_uc.patch | 79 - .../0003-SMILE-Plug-device-tree-file.patch | 209 - ...d-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch | 48 - ...Do-not-disable-interrupt-twice-on-suspend.patch | 99 - .../0004-fix-mvsdio-eMMC-timing.patch | 38 - ...PCI-pciehp-Prevent-deadlock-on-disconnect.patch | 272 - ...x-Allow-mac-address-to-be-set-as-a-parame.patch | 95 - ...s2idle-Rework-ACPI-events-synchronization.patch | 78 - .../0006-set-default-cubietruck-led-triggers.patch | 33 - ...odroid-set-higher-minimum-buck2-regulator.patch | 30 - ...cie-restore-support-for-Killer-Qu-C0-NICs.patch | 36 - .../0008-ARM-dove-enable-ethernet-on-D3Plug.patch | 31 - ...-Disable-HPET-on-Intel-Ice-Lake-platforms.patch | 38 - .../0009-USB-Armory-MkII-support.patch | 555 - ...ve-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch | 87 - ...x-audio-power-up-sequence-for-gen10-displ.patch | 57 - ...tend-audio-CDCLK-2-BCLK-constraint-to-mor.patch | 41 - ...15-gt-Detect-if-we-miss-WaIdleLiteRestore.patch | 129 - ...risepoint-Add-missing-Interrupt-Status-re.patch | 35 - kernels/linux-libre-aarch64/PKGBUILD | 380 - kernels/linux-libre-aarch64/config.aarch64 | 9472 ----------------- kernels/linux-libre-aarch64/config.armv7h | 9612 ----------------- kernels/linux-libre-aarch64/config.i686 | 10513 ------------------ kernels/linux-libre-aarch64/config.x86_64 | 10526 ------------------- kernels/linux-libre-aarch64/kernel.its | 217 - kernels/linux-libre-aarch64/kernel.keyblock | Bin 1208 -> 0 bytes .../linux-libre-aarch64/kernel_data_key.vbprivk | Bin 1199 -> 0 bytes kernels/linux-libre-aarch64/linux-armv7h.preset | 10 - .../linux-libre-aarch64/linux-chromebook.install | 25 - 34 files changed, 43051 deletions(-) delete mode 100644 kernels/linux-libre-aarch64/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch delete mode 100644 kernels/linux-libre-aarch64/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch delete mode 100644 kernels/linux-libre-aarch64/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch delete mode 100644 kernels/linux-libre-aarch64/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch delete mode 100644 kernels/linux-libre-aarch64/0002-fix-Atmel-maXTouch-touchscreen-support.patch delete mode 100644 kernels/linux-libre-aarch64/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch delete mode 100644 kernels/linux-libre-aarch64/0003-SMILE-Plug-device-tree-file.patch delete mode 100644 kernels/linux-libre-aarch64/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch delete mode 100644 kernels/linux-libre-aarch64/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch delete mode 100644 kernels/linux-libre-aarch64/0004-fix-mvsdio-eMMC-timing.patch delete mode 100644 kernels/linux-libre-aarch64/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch delete mode 100644 kernels/linux-libre-aarch64/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch delete mode 100644 kernels/linux-libre-aarch64/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch delete mode 100644 kernels/linux-libre-aarch64/0006-set-default-cubietruck-led-triggers.patch delete mode 100644 kernels/linux-libre-aarch64/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch delete mode 100644 kernels/linux-libre-aarch64/0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch delete mode 100644 kernels/linux-libre-aarch64/0008-ARM-dove-enable-ethernet-on-D3Plug.patch delete mode 100644 kernels/linux-libre-aarch64/0008-x86-intel-Disable-HPET-on-Intel-Ice-Lake-platforms.patch delete mode 100644 kernels/linux-libre-aarch64/0009-USB-Armory-MkII-support.patch delete mode 100644 kernels/linux-libre-aarch64/0009-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch delete mode 100644 kernels/linux-libre-aarch64/0010-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch delete mode 100644 kernels/linux-libre-aarch64/0011-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch delete mode 100644 kernels/linux-libre-aarch64/0012-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch delete mode 100644 kernels/linux-libre-aarch64/0013-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch delete mode 100644 kernels/linux-libre-aarch64/PKGBUILD delete mode 100644 kernels/linux-libre-aarch64/config.aarch64 delete mode 100644 kernels/linux-libre-aarch64/config.armv7h delete mode 100644 kernels/linux-libre-aarch64/config.i686 delete mode 100644 kernels/linux-libre-aarch64/config.x86_64 delete mode 100644 kernels/linux-libre-aarch64/kernel.its delete mode 100644 kernels/linux-libre-aarch64/kernel.keyblock delete mode 100644 kernels/linux-libre-aarch64/kernel_data_key.vbprivk delete mode 100644 kernels/linux-libre-aarch64/linux-armv7h.preset delete mode 100644 kernels/linux-libre-aarch64/linux-chromebook.install diff --git a/kernels/linux-libre-aarch64/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch b/kernels/linux-libre-aarch64/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch deleted file mode 100644 index 074903c47..000000000 --- a/kernels/linux-libre-aarch64/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 88f69b1dcdda406ba9e4c6ad51f0577623d238b1 Mon Sep 17 00:00:00 2001 -From: Willy Tarreau -Date: Sun, 2 Dec 2012 19:59:28 +0100 -Subject: [PATCH 1/9] ARM: atags: add support for Marvell's u-boot - -Marvell uses a specific atag in its u-boot which includes among other -information the MAC addresses for up to 4 network interfaces. - -Signed-off-by: Willy Tarreau ---- - arch/arm/include/uapi/asm/setup.h | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/arch/arm/include/uapi/asm/setup.h b/arch/arm/include/uapi/asm/setup.h -index 25ceda63b284..83578c54975b 100644 ---- a/arch/arm/include/uapi/asm/setup.h -+++ b/arch/arm/include/uapi/asm/setup.h -@@ -144,6 +144,18 @@ struct tag_memclk { - __u32 fmemclk; - }; - -+/* Marvell uboot parameters */ -+#define ATAG_MV_UBOOT 0x41000403 -+struct tag_mv_uboot { -+ __u32 uboot_version; -+ __u32 tclk; -+ __u32 sysclk; -+ __u32 isUsbHost; -+ __u8 macAddr[4][6]; -+ __u16 mtu[4]; -+ __u32 nand_ecc; -+}; -+ - struct tag { - struct tag_header hdr; - union { -@@ -166,6 +178,11 @@ struct tag { - * DC21285 specific - */ - struct tag_memclk memclk; -+ -+ /* -+ * Marvell specific -+ */ -+ struct tag_mv_uboot mv_uboot; - } u; - }; - --- -2.23.0 - diff --git a/kernels/linux-libre-aarch64/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/kernels/linux-libre-aarch64/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch deleted file mode 100644 index ae31ff9b5..000000000 --- a/kernels/linux-libre-aarch64/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 524202522faf86d81efaa96dc984d1996ddda302 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Mon, 16 Sep 2019 04:53:20 +0200 -Subject: [PATCH 01/13] ZEN: Add sysctl and CONFIG to disallow unprivileged - CLONE_NEWUSER - -Our default behavior continues to match the vanilla kernel. ---- - init/Kconfig | 16 ++++++++++++++++ - kernel/fork.c | 15 +++++++++++++++ - kernel/sysctl.c | 12 ++++++++++++ - kernel/user_namespace.c | 7 +++++++ - 4 files changed, 50 insertions(+) - -diff --git a/init/Kconfig b/init/Kconfig -index b4daad2bac23..362f82c5ec07 100644 ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -1118,6 +1118,22 @@ config USER_NS - - If unsure, say N. - -+config USER_NS_UNPRIVILEGED -+ bool "Allow unprivileged users to create namespaces" -+ default y -+ depends on USER_NS -+ help -+ When disabled, unprivileged users will not be able to create -+ new namespaces. Allowing users to create their own namespaces -+ has been part of several recent local privilege escalation -+ exploits, so if you need user namespaces but are -+ paranoid^Wsecurity-conscious you want to disable this. -+ -+ This setting can be overridden at runtime via the -+ kernel.unprivileged_userns_clone sysctl. -+ -+ If unsure, say Y. -+ - config PID_NS - bool "PID Namespaces" - default y -diff --git a/kernel/fork.c b/kernel/fork.c -index 6cabc124378c..fda4986da9eb 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -106,6 +106,11 @@ - - #define CREATE_TRACE_POINTS - #include -+#ifdef CONFIG_USER_NS -+extern int unprivileged_userns_clone; -+#else -+#define unprivileged_userns_clone 0 -+#endif - - /* - * Minimum number of threads to boot the kernel -@@ -1779,6 +1784,10 @@ static __latent_entropy struct task_struct *copy_process( - if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) - return ERR_PTR(-EINVAL); - -+ if ((clone_flags & CLONE_NEWUSER) && !unprivileged_userns_clone) -+ if (!capable(CAP_SYS_ADMIN)) -+ return ERR_PTR(-EPERM); -+ - /* - * Thread groups must share signals as well, and detached threads - * can only be started up within the thread group. -@@ -2826,6 +2835,12 @@ int ksys_unshare(unsigned long unshare_flags) - if (unshare_flags & CLONE_NEWNS) - unshare_flags |= CLONE_FS; - -+ if ((unshare_flags & CLONE_NEWUSER) && !unprivileged_userns_clone) { -+ err = -EPERM; -+ if (!capable(CAP_SYS_ADMIN)) -+ goto bad_unshare_out; -+ } -+ - err = check_unshare_flags(unshare_flags); - if (err) - goto bad_unshare_out; -diff --git a/kernel/sysctl.c b/kernel/sysctl.c -index 70665934d53e..9797869ed829 100644 ---- a/kernel/sysctl.c -+++ b/kernel/sysctl.c -@@ -110,6 +110,9 @@ extern int core_uses_pid; - extern char core_pattern[]; - extern unsigned int core_pipe_limit; - #endif -+#ifdef CONFIG_USER_NS -+extern int unprivileged_userns_clone; -+#endif - extern int pid_max; - extern int pid_max_min, pid_max_max; - extern int percpu_pagelist_fraction; -@@ -546,6 +549,15 @@ static struct ctl_table kern_table[] = { - .proc_handler = proc_dointvec, - }, - #endif -+#ifdef CONFIG_USER_NS -+ { -+ .procname = "unprivileged_userns_clone", -+ .data = &unprivileged_userns_clone, -+ .maxlen = sizeof(int), -+ .mode = 0644, -+ .proc_handler = proc_dointvec, -+ }, -+#endif - #ifdef CONFIG_PROC_SYSCTL - { - .procname = "tainted", -diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c -index 8eadadc478f9..c36ecd19562c 100644 ---- a/kernel/user_namespace.c -+++ b/kernel/user_namespace.c -@@ -21,6 +21,13 @@ - #include - #include - -+/* sysctl */ -+#ifdef CONFIG_USER_NS_UNPRIVILEGED -+int unprivileged_userns_clone = 1; -+#else -+int unprivileged_userns_clone; -+#endif -+ - static struct kmem_cache *user_ns_cachep __read_mostly; - static DEFINE_MUTEX(userns_state_mutex); - --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch b/kernels/linux-libre-aarch64/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch deleted file mode 100644 index e9de435fd..000000000 --- a/kernels/linux-libre-aarch64/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 716120e8010a7f400c6bed7384000e95e1465c94 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= -Date: Mon, 26 Aug 2013 19:19:44 +0300 -Subject: [PATCH 1/2] usb serial gadget: no TTY hangup on USB disconnect [WIP] -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We may want to maintain the TTY over USB disconnects. - -This is useful when we have a terminal console to a host which -power-cycles or for other reasons resets the USB host controller. - -Signed-off-by: Kyösti Mälkki ---- - drivers/usb/gadget/function/u_serial.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c -index b369292..d156a28 100644 ---- a/drivers/usb/gadget/function/u_serial.c -+++ b/drivers/usb/gadget/function/u_serial.c -@@ -1258,8 +1258,13 @@ void gserial_disconnect(struct gserial *gser) - gser->ioport = NULL; - if (port->port.count > 0 || port->openclose) { - wake_up_interruptible(&port->drain_wait); -+#if 0 - if (port->port.tty) - tty_hangup(port->port.tty); -+#else -+ if (port->port.tty) -+ stop_tty(port->port.tty); -+#endif - } - spin_unlock_irqrestore(&port->port_lock, flags); - --- -1.8.1.1 - diff --git a/kernels/linux-libre-aarch64/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch b/kernels/linux-libre-aarch64/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch deleted file mode 100644 index 546120041..000000000 --- a/kernels/linux-libre-aarch64/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch +++ /dev/null @@ -1,47 +0,0 @@ -From cb931641740269a78b002b438904292a1110a5a7 Mon Sep 17 00:00:00 2001 -From: Willy Tarreau -Date: Sun, 2 Dec 2012 19:56:58 +0100 -Subject: [PATCH 2/9] ARM: atags/fdt: retrieve MAC addresses from Marvell boot - loader - -The atags are parsed and if a Marvell atag is found, up to 4 MAC -addresses are extracted there and assigned to node aliases eth0..3 -with the name "mac-address". - -This was tested on my Mirabox and the two NICs had their correct -address set. - -Signed-off-by: Willy Tarreau ---- - arch/arm/boot/compressed/atags_to_fdt.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c -index 330cd3c2eae5..82f3802ff695 100644 ---- a/arch/arm/boot/compressed/atags_to_fdt.c -+++ b/arch/arm/boot/compressed/atags_to_fdt.c -@@ -19,7 +19,7 @@ static int node_offset(void *fdt, const char *node_path) - } - - static int setprop(void *fdt, const char *node_path, const char *property, -- uint32_t *val_array, int size) -+ void *val_array, int size) - { - int offset = node_offset(fdt, node_path); - if (offset < 0) -@@ -203,6 +203,12 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space) - hex_str(serno, atag->u.serialnr.high); - hex_str(serno+8, atag->u.serialnr.low); - setprop_string(fdt, "/", "serial-number", serno); -+ } else if (atag->hdr.tag == ATAG_MV_UBOOT) { -+ /* This ATAG provides up to 4 MAC addresses */ -+ setprop(fdt, "eth0", "mac-address", atag->u.mv_uboot.macAddr[0], 6); -+ setprop(fdt, "eth1", "mac-address", atag->u.mv_uboot.macAddr[1], 6); -+ setprop(fdt, "eth2", "mac-address", atag->u.mv_uboot.macAddr[2], 6); -+ setprop(fdt, "eth3", "mac-address", atag->u.mv_uboot.macAddr[3], 6); - } - } - --- -2.23.0 - diff --git a/kernels/linux-libre-aarch64/0002-fix-Atmel-maXTouch-touchscreen-support.patch b/kernels/linux-libre-aarch64/0002-fix-Atmel-maXTouch-touchscreen-support.patch deleted file mode 100644 index 5ad26fc9e..000000000 --- a/kernels/linux-libre-aarch64/0002-fix-Atmel-maXTouch-touchscreen-support.patch +++ /dev/null @@ -1,37 +0,0 @@ -From ab8cc1b2dc1b716d5c08f72dacbe1eded269f304 Mon Sep 17 00:00:00 2001 -From: André Silva -Date: Tue, 22 Mar 2016 17:58:59 -0300 -Subject: [PATCH 2/2] fix Atmel maXTouch touchscreen support - -The Atmel maXTouch touchscreen works with Linux-libre 3.13-gnu, -but not with the current longterm and mainline kernels in -Parabola. - -Now it needs to load nonfree firmware in mxt_initialize(), -which is in drivers/input/touchscreen/atmel_mxt_ts.c, and the -atmel_mxt_ts driver fails to work. - -This driver works if changing reject_firmware_nowait to -request_firmware_nowait in atmel_mxt_ts.c. This line is -requesting the file named MXT_CFG_NAME, and it's a config file, -not the firmware blob. - -Signed-off-by: André Silva -Signed-off-by: mytbk ---- - drivers/input/touchscreen/atmel_mxt_ts.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c -index 726a83e..d818834 100644 ---- a/drivers/input/touchscreen/atmel_mxt_ts.c -+++ b/drivers/input/touchscreen/atmel_mxt_ts.c -@@ -1989,7 +1989,7 @@ static int mxt_initialize(struct mxt_data *data) - if (error) - goto err_free_object_table; - -- error = reject_firmware_nowait(THIS_MODULE, true, MXT_CFG_NAME, -+ error = request_firmware_nowait(THIS_MODULE, true, MXT_CFG_NAME, - &client->dev, GFP_KERNEL, data, - mxt_config_cb); - if (error) { diff --git a/kernels/linux-libre-aarch64/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch b/kernels/linux-libre-aarch64/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch deleted file mode 100644 index cf03b7a6b..000000000 --- a/kernels/linux-libre-aarch64/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 54dd8abeea02e5ea426a83f0a924d874a9c6e617 Mon Sep 17 00:00:00 2001 -From: Tuowen Zhao -Date: Wed, 16 Oct 2019 15:06:28 -0600 -Subject: [PATCH 02/13] lib: devres: add a helper function for ioremap_uc - -Implement a resource managed strongly uncachable ioremap function. - -Cc: # v4.19+ -Tested-by: AceLan Kao -Signed-off-by: Tuowen Zhao -Acked-by: Mika Westerberg -Acked-by: Andy Shevchenko -Acked-by: Luis Chamberlain -Signed-off-by: Lee Jones ---- - include/linux/io.h | 2 ++ - lib/devres.c | 19 +++++++++++++++++++ - 2 files changed, 21 insertions(+) - -diff --git a/include/linux/io.h b/include/linux/io.h -index accac822336a..a59834bc0a11 100644 ---- a/include/linux/io.h -+++ b/include/linux/io.h -@@ -64,6 +64,8 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr) - - void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, - resource_size_t size); -+void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset, -+ resource_size_t size); - void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, - resource_size_t size); - void __iomem *devm_ioremap_wc(struct device *dev, resource_size_t offset, -diff --git a/lib/devres.c b/lib/devres.c -index 6a0e9bd6524a..17624d35e82d 100644 ---- a/lib/devres.c -+++ b/lib/devres.c -@@ -9,6 +9,7 @@ - enum devm_ioremap_type { - DEVM_IOREMAP = 0, - DEVM_IOREMAP_NC, -+ DEVM_IOREMAP_UC, - DEVM_IOREMAP_WC, - }; - -@@ -39,6 +40,9 @@ static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset, - case DEVM_IOREMAP_NC: - addr = ioremap_nocache(offset, size); - break; -+ case DEVM_IOREMAP_UC: -+ addr = ioremap_uc(offset, size); -+ break; - case DEVM_IOREMAP_WC: - addr = ioremap_wc(offset, size); - break; -@@ -68,6 +72,21 @@ void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, - } - EXPORT_SYMBOL(devm_ioremap); - -+/** -+ * devm_ioremap_uc - Managed ioremap_uc() -+ * @dev: Generic device to remap IO address for -+ * @offset: Resource address to map -+ * @size: Size of map -+ * -+ * Managed ioremap_uc(). Map is automatically unmapped on driver detach. -+ */ -+void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset, -+ resource_size_t size) -+{ -+ return __devm_ioremap(dev, offset, size, DEVM_IOREMAP_UC); -+} -+EXPORT_SYMBOL_GPL(devm_ioremap_uc); -+ - /** - * devm_ioremap_nocache - Managed ioremap_nocache() - * @dev: Generic device to remap IO address for --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0003-SMILE-Plug-device-tree-file.patch b/kernels/linux-libre-aarch64/0003-SMILE-Plug-device-tree-file.patch deleted file mode 100644 index b07e149b7..000000000 --- a/kernels/linux-libre-aarch64/0003-SMILE-Plug-device-tree-file.patch +++ /dev/null @@ -1,209 +0,0 @@ -From 8dc29eb34efbef2aa3ce6e499cea11765286ffbd Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Fri, 5 Sep 2014 15:41:19 -0600 -Subject: [PATCH 3/9] SMILE Plug device tree file - -This adds a dts file for the SMILE Plug, which only differs from the Mirabox -dts with the LED definitions. - -Signed-off-by: Kevin Mihelich ---- - arch/arm/boot/dts/Makefile | 1 + - arch/arm/boot/dts/armada-370-smileplug.dts | 173 +++++++++++++++++++++ - 2 files changed, 174 insertions(+) - create mode 100644 arch/arm/boot/dts/armada-370-smileplug.dts - -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index b21b3a64641a..a0f92b9dbd7d 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -1216,6 +1216,7 @@ dtb-$(CONFIG_MACH_ARMADA_370) += \ - armada-370-db.dtb \ - armada-370-dlink-dns327l.dtb \ - armada-370-mirabox.dtb \ -+ armada-370-smileplug.dtb \ - armada-370-netgear-rn102.dtb \ - armada-370-netgear-rn104.dtb \ - armada-370-rd.dtb \ -diff --git a/arch/arm/boot/dts/armada-370-smileplug.dts b/arch/arm/boot/dts/armada-370-smileplug.dts -new file mode 100644 -index 000000000000..d01308ab848b ---- /dev/null -+++ b/arch/arm/boot/dts/armada-370-smileplug.dts -@@ -0,0 +1,173 @@ -+/* -+ * Device Tree file for Marvell SMILE Plug -+ * -+ * Kevin Mihelich -+ * Gregory CLEMENT -+ * -+ * This file is licensed under the terms of the GNU General Public -+ * License version 2. This program is licensed "as is" without any -+ * warranty of any kind, whether express or implied. -+ */ -+ -+/dts-v1/; -+#include -+#include "armada-370.dtsi" -+ -+/ { -+ model = "Marvell SMILE Plug"; -+ compatible = "marvell,smileplug", "marvell,armada370", "marvell,armada-370-xp"; -+ -+ chosen { -+ bootargs = "console=ttyS0,115200 earlyprintk"; -+ }; -+ -+ memory { -+ device_type = "memory"; -+ reg = <0x00000000 0x20000000>; /* 512 MB */ -+ }; -+ -+ soc { -+ ranges = ; -+ -+ pcie-controller { -+ status = "okay"; -+ -+ /* Internal mini-PCIe connector */ -+ pcie@1,0 { -+ /* Port 0, Lane 0 */ -+ status = "okay"; -+ }; -+ -+ /* Connected on the PCB to a USB 3.0 XHCI controller */ -+ pcie@2,0 { -+ /* Port 1, Lane 0 */ -+ status = "okay"; -+ }; -+ }; -+ -+ internal-regs { -+ serial@12000 { -+ status = "okay"; -+ }; -+ timer@20300 { -+ clock-frequency = <600000000>; -+ status = "okay"; -+ }; -+ -+ gpio_leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&smile_led_pins>; -+ -+ red_eyes_led { -+ label = "smileplug:red:eyes"; -+ gpios = <&gpio1 31 0>; -+ default-state = "off"; -+ }; -+ -+ green_eyes_led { -+ label = "smileplug:green:eyes"; -+ gpios = <&gpio2 0 0>; -+ linux,default-trigger = "default-on"; -+ }; -+ -+ red_smile_led { -+ label = "smileplug:red:smile"; -+ gpios = <&gpio1 15 0>; -+ default-state = "off"; -+ }; -+ -+ green_smile_led { -+ label = "smileplug:green:smile"; -+ gpios = <&gpio1 27 0>; -+ linux,default-trigger = "default-on"; -+ }; -+ }; -+ -+ mdio { -+ pinctrl-0 = <&mdio_pins>; -+ pinctrl-names = "default"; -+ phy0: ethernet-phy@0 { -+ reg = <0>; -+ }; -+ -+ phy1: ethernet-phy@1 { -+ reg = <1>; -+ }; -+ }; -+ ethernet@70000 { -+ pinctrl-0 = <&ge0_rgmii_pins>; -+ pinctrl-names = "default"; -+ status = "okay"; -+ phy = <&phy0>; -+ phy-mode = "rgmii-id"; -+ }; -+ ethernet@74000 { -+ pinctrl-0 = <&ge1_rgmii_pins>; -+ pinctrl-names = "default"; -+ status = "okay"; -+ phy = <&phy1>; -+ phy-mode = "rgmii-id"; -+ }; -+ -+ mvsdio@d4000 { -+ pinctrl-0 = <&sdio_pins3>; -+ pinctrl-names = "default"; -+ status = "okay"; -+ /* -+ * No CD or WP GPIOs: SDIO interface used for -+ * Wifi/Bluetooth chip -+ */ -+ broken-cd; -+ }; -+ -+ usb@50000 { -+ status = "okay"; -+ }; -+ -+ usb@51000 { -+ status = "okay"; -+ }; -+ -+ i2c@11000 { -+ status = "okay"; -+ clock-frequency = <100000>; -+ pca9505: pca9505@25 { -+ compatible = "nxp,pca9505"; -+ gpio-controller; -+ #gpio-cells = <2>; -+ reg = <0x25>; -+ }; -+ }; -+ -+ nand@d0000 { -+ status = "okay"; -+ num-cs = <1>; -+ marvell,nand-keep-config; -+ marvell,nand-enable-arbiter; -+ nand-on-flash-bbt; -+ -+ partition@0 { -+ label = "U-Boot"; -+ reg = <0 0x400000>; -+ }; -+ partition@400000 { -+ label = "Linux"; -+ reg = <0x400000 0x400000>; -+ }; -+ partition@800000 { -+ label = "Filesystem"; -+ reg = <0x800000 0x3f800000>; -+ }; -+ }; -+ }; -+ }; -+}; -+ -+&pinctrl { -+ smile_led_pins: smile-led-pins { -+ marvell,pins = "mpp63", "mpp64", "mpp47", "mpp59"; -+ marvell,function = "gpio"; -+ }; -+}; --- -2.23.0 - diff --git a/kernels/linux-libre-aarch64/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch b/kernels/linux-libre-aarch64/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch deleted file mode 100644 index ed715ad45..000000000 --- a/kernels/linux-libre-aarch64/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 044bbe9ec44257ffb87b96b291636f5a854c3d14 Mon Sep 17 00:00:00 2001 -From: Tuowen Zhao -Date: Wed, 16 Oct 2019 15:06:29 -0600 -Subject: [PATCH 03/13] mfd: intel-lpss: Use devm_ioremap_uc for MMIO - -Some BIOS erroneously specifies write-combining BAR for intel-lpss-pci -in MTRR. This will cause the system to hang during boot. If possible, -this bug could be corrected with a firmware update. - -This patch use devm_ioremap_uc to overwrite/ignore the MTRR settings -by forcing the use of strongly uncachable pages for intel-lpss. - -The BIOS bug is present on Dell XPS 13 7390 2-in-1: - -[ 0.001734] 5 base 4000000000 mask 6000000000 write-combining - -4000000000-7fffffffff : PCI Bus 0000:00 - 4000000000-400fffffff : 0000:00:02.0 (i915) - 4010000000-4010000fff : 0000:00:15.0 (intel-lpss-pci) - -Link: https://bugzilla.kernel.org/show_bug.cgi?id=203485 -Cc: # v4.19+ -Tested-by: AceLan Kao -Signed-off-by: Tuowen Zhao -Acked-by: Mika Westerberg -Acked-by: Andy Shevchenko -Tested-by: Roman Gilg -Signed-off-by: Lee Jones ---- - drivers/mfd/intel-lpss.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c -index bfe4ff337581..b0f0781a6b9c 100644 ---- a/drivers/mfd/intel-lpss.c -+++ b/drivers/mfd/intel-lpss.c -@@ -384,7 +384,7 @@ int intel_lpss_probe(struct device *dev, - if (!lpss) - return -ENOMEM; - -- lpss->priv = devm_ioremap(dev, info->mem->start + LPSS_PRIV_OFFSET, -+ lpss->priv = devm_ioremap_uc(dev, info->mem->start + LPSS_PRIV_OFFSET, - LPSS_PRIV_SIZE); - if (!lpss->priv) - return -ENOMEM; --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch b/kernels/linux-libre-aarch64/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch deleted file mode 100644 index 24a7c3d84..000000000 --- a/kernels/linux-libre-aarch64/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 0407fd310903c18882a7e0463930a71a46b61027 Mon Sep 17 00:00:00 2001 -From: Mika Westerberg -Date: Tue, 29 Oct 2019 20:00:21 +0300 -Subject: [PATCH 04/13] PCI: pciehp: Do not disable interrupt twice on suspend - -We try to keep PCIe hotplug ports runtime suspended when entering system -suspend. Because the PCIe portdrv sets the DPM_FLAG_NEVER_SKIP flag, the PM -core always calls system suspend/resume hooks even if the device is left -runtime suspended. Since PCIe hotplug driver re-used the same function for -both runtime suspend and system suspend, it ended up disabling hotplug -interrupt twice and the second time following was printed: - - pciehp 0000:03:01.0:pcie204: pcie_do_write_cmd: no response from device - -Prevent this from happening by checking whether the device is already -runtime suspended when the system suspend hook is called. - -Fixes: 9c62f0bfb832 ("PCI: pciehp: Implement runtime PM callbacks") -Link: https://lore.kernel.org/r/20191029170022.57528-1-mika.westerberg@linux.intel.com -Reported-by: Kai-Heng Feng -Tested-by: Kai-Heng Feng -Signed-off-by: Mika Westerberg -Signed-off-by: Bjorn Helgaas -Reviewed-by: Rafael J. Wysocki ---- - drivers/pci/hotplug/pciehp_core.c | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c -index b3122c151b80..56daad828c9e 100644 ---- a/drivers/pci/hotplug/pciehp_core.c -+++ b/drivers/pci/hotplug/pciehp_core.c -@@ -253,7 +253,7 @@ static bool pme_is_native(struct pcie_device *dev) - return pcie_ports_native || host->native_pme; - } - --static int pciehp_suspend(struct pcie_device *dev) -+static void pciehp_disable_interrupt(struct pcie_device *dev) - { - /* - * Disable hotplug interrupt so that it does not trigger -@@ -261,7 +261,19 @@ static int pciehp_suspend(struct pcie_device *dev) - */ - if (pme_is_native(dev)) - pcie_disable_interrupt(get_service_data(dev)); -+} - -+#ifdef CONFIG_PM_SLEEP -+static int pciehp_suspend(struct pcie_device *dev) -+{ -+ /* -+ * If the port is already runtime suspended we can keep it that -+ * way. -+ */ -+ if (dev_pm_smart_suspend_and_suspended(&dev->port->dev)) -+ return 0; -+ -+ pciehp_disable_interrupt(dev); - return 0; - } - -@@ -279,6 +291,7 @@ static int pciehp_resume_noirq(struct pcie_device *dev) - - return 0; - } -+#endif - - static int pciehp_resume(struct pcie_device *dev) - { -@@ -292,6 +305,12 @@ static int pciehp_resume(struct pcie_device *dev) - return 0; - } - -+static int pciehp_runtime_suspend(struct pcie_device *dev) -+{ -+ pciehp_disable_interrupt(dev); -+ return 0; -+} -+ - static int pciehp_runtime_resume(struct pcie_device *dev) - { - struct controller *ctrl = get_service_data(dev); -@@ -318,10 +337,12 @@ static struct pcie_port_service_driver hpdriver_portdrv = { - .remove = pciehp_remove, - - #ifdef CONFIG_PM -+#ifdef CONFIG_PM_SLEEP - .suspend = pciehp_suspend, - .resume_noirq = pciehp_resume_noirq, - .resume = pciehp_resume, -- .runtime_suspend = pciehp_suspend, -+#endif -+ .runtime_suspend = pciehp_runtime_suspend, - .runtime_resume = pciehp_runtime_resume, - #endif /* PM */ - }; --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0004-fix-mvsdio-eMMC-timing.patch b/kernels/linux-libre-aarch64/0004-fix-mvsdio-eMMC-timing.patch deleted file mode 100644 index 791a546d6..000000000 --- a/kernels/linux-libre-aarch64/0004-fix-mvsdio-eMMC-timing.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 579d132a05177e4b85d3ff2321762948fd78b420 Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Fri, 5 Sep 2014 15:43:56 -0600 -Subject: [PATCH 4/9] fix mvsdio eMMC timing - -These changes from Globalscale change the MMC timing to allow the eMMC versions -of the Mirabox and SMILE Plug to work. - -Signed-off-by: Kevin Mihelich ---- - drivers/mmc/host/mvsdio.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c -index 74a0a7fbbf7f..92eadb116762 100644 ---- a/drivers/mmc/host/mvsdio.c -+++ b/drivers/mmc/host/mvsdio.c -@@ -90,7 +90,7 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data) - tmout_index = fls(tmout - 1) - 12; - if (tmout_index < 0) - tmout_index = 0; -- if (tmout_index > MVSD_HOST_CTRL_TMOUT_MAX) -+// if (tmout_index > MVSD_HOST_CTRL_TMOUT_MAX) //by steven, try to setup the timeout to maximum value - tmout_index = MVSD_HOST_CTRL_TMOUT_MAX; - - dev_dbg(host->dev, "data %s at 0x%08x: blocks=%d blksz=%d tmout=%u (%d)\n", -@@ -613,6 +613,8 @@ static void mvsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) - u32 m = DIV_ROUND_UP(host->base_clock, ios->clock) - 1; - if (m > MVSD_BASE_DIV_MAX) - m = MVSD_BASE_DIV_MAX; -+ if(ios->clock==50000000 ) //by steven -+ m=1; - mvsd_write(MVSD_CLK_DIV, m); - host->clock = ios->clock; - host->ns_per_clk = 1000000000 / (host->base_clock / (m+1)); --- -2.23.0 - diff --git a/kernels/linux-libre-aarch64/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch b/kernels/linux-libre-aarch64/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch deleted file mode 100644 index 7d05b2578..000000000 --- a/kernels/linux-libre-aarch64/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch +++ /dev/null @@ -1,272 +0,0 @@ -From b9bebf4cde0cf46438b2a7ab1652172e8e16c33e Mon Sep 17 00:00:00 2001 -From: Mika Westerberg -Date: Tue, 29 Oct 2019 20:00:22 +0300 -Subject: [PATCH 05/13] PCI: pciehp: Prevent deadlock on disconnect - -This addresses deadlocks in these common cases in hierarchies containing -two switches: - - - All involved ports are runtime suspended and they are unplugged. This - can happen easily if the drivers involved automatically enable runtime - PM (xHCI for example does that). - - - System is suspended (e.g., closing the lid on a laptop) with a dock + - something else connected, and the dock is unplugged while suspended. - -These cases lead to the following deadlock: - - INFO: task irq/126-pciehp:198 blocked for more than 120 seconds. - irq/126-pciehp D 0 198 2 0x80000000 - Call Trace: - schedule+0x2c/0x80 - schedule_timeout+0x246/0x350 - wait_for_completion+0xb7/0x140 - kthread_stop+0x49/0x110 - free_irq+0x32/0x70 - pcie_shutdown_notification+0x2f/0x50 - pciehp_remove+0x27/0x50 - pcie_port_remove_service+0x36/0x50 - device_release_driver+0x12/0x20 - bus_remove_device+0xec/0x160 - device_del+0x13b/0x350 - device_unregister+0x1a/0x60 - remove_iter+0x1e/0x30 - device_for_each_child+0x56/0x90 - pcie_port_device_remove+0x22/0x40 - pcie_portdrv_remove+0x20/0x60 - pci_device_remove+0x3e/0xc0 - device_release_driver_internal+0x18c/0x250 - device_release_driver+0x12/0x20 - pci_stop_bus_device+0x6f/0x90 - pci_stop_bus_device+0x31/0x90 - pci_stop_and_remove_bus_device+0x12/0x20 - pciehp_unconfigure_device+0x88/0x140 - pciehp_disable_slot+0x6a/0x110 - pciehp_handle_presence_or_link_change+0x263/0x400 - pciehp_ist+0x1c9/0x1d0 - irq_thread_fn+0x24/0x60 - irq_thread+0xeb/0x190 - kthread+0x120/0x140 - - INFO: task irq/190-pciehp:2288 blocked for more than 120 seconds. - irq/190-pciehp D 0 2288 2 0x80000000 - Call Trace: - __schedule+0x2a2/0x880 - schedule+0x2c/0x80 - schedule_preempt_disabled+0xe/0x10 - mutex_lock+0x2c/0x30 - pci_lock_rescan_remove+0x15/0x20 - pciehp_unconfigure_device+0x4d/0x140 - pciehp_disable_slot+0x6a/0x110 - pciehp_handle_presence_or_link_change+0x263/0x400 - pciehp_ist+0x1c9/0x1d0 - irq_thread_fn+0x24/0x60 - irq_thread+0xeb/0x190 - kthread+0x120/0x140 - -What happens here is that the whole hierarchy is runtime resumed and the -parent PCIe downstream port, which got the hot-remove event, starts -removing devices below it, taking pci_lock_rescan_remove() lock. When the -child PCIe port is runtime resumed it calls pciehp_check_presence() which -ends up calling pciehp_card_present() and pciehp_check_link_active(). Both -of these use pcie_capability_read_word(), which notices that the underlying -device is already gone and returns PCIBIOS_DEVICE_NOT_FOUND with the -capability value set to 0. When pciehp gets this value it thinks that its -child device is also hot-removed and schedules its IRQ thread to handle the -event. - -The deadlock happens when the child's IRQ thread runs and tries to acquire -pci_lock_rescan_remove() which is already taken by the parent and the -parent waits for the child's IRQ thread to finish. - -Prevent this from happening by checking the return value of -pcie_capability_read_word() and if it is PCIBIOS_DEVICE_NOT_FOUND stop -performing any hot-removal activities. - -[bhelgaas: add common scenarios to commit log] -Link: https://lore.kernel.org/r/20191029170022.57528-2-mika.westerberg@linux.intel.com -Tested-by: Kai-Heng Feng -Signed-off-by: Mika Westerberg -Signed-off-by: Bjorn Helgaas ---- - drivers/pci/hotplug/pciehp.h | 6 ++-- - drivers/pci/hotplug/pciehp_core.c | 11 ++++-- - drivers/pci/hotplug/pciehp_ctrl.c | 4 +-- - drivers/pci/hotplug/pciehp_hpc.c | 59 +++++++++++++++++++++++++------ - 4 files changed, 61 insertions(+), 19 deletions(-) - -diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h -index 882ce82c4699..aa61d4c219d7 100644 ---- a/drivers/pci/hotplug/pciehp.h -+++ b/drivers/pci/hotplug/pciehp.h -@@ -174,10 +174,10 @@ void pciehp_set_indicators(struct controller *ctrl, int pwr, int attn); - - void pciehp_get_latch_status(struct controller *ctrl, u8 *status); - int pciehp_query_power_fault(struct controller *ctrl); --bool pciehp_card_present(struct controller *ctrl); --bool pciehp_card_present_or_link_active(struct controller *ctrl); -+int pciehp_card_present(struct controller *ctrl); -+int pciehp_card_present_or_link_active(struct controller *ctrl); - int pciehp_check_link_status(struct controller *ctrl); --bool pciehp_check_link_active(struct controller *ctrl); -+int pciehp_check_link_active(struct controller *ctrl); - void pciehp_release_ctrl(struct controller *ctrl); - - int pciehp_sysfs_enable_slot(struct hotplug_slot *hotplug_slot); -diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c -index 56daad828c9e..312cc45c44c7 100644 ---- a/drivers/pci/hotplug/pciehp_core.c -+++ b/drivers/pci/hotplug/pciehp_core.c -@@ -139,10 +139,15 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value) - { - struct controller *ctrl = to_ctrl(hotplug_slot); - struct pci_dev *pdev = ctrl->pcie->port; -+ int ret; - - pci_config_pm_runtime_get(pdev); -- *value = pciehp_card_present_or_link_active(ctrl); -+ ret = pciehp_card_present_or_link_active(ctrl); - pci_config_pm_runtime_put(pdev); -+ if (ret < 0) -+ return ret; -+ -+ *value = ret; - return 0; - } - -@@ -158,13 +163,13 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value) - */ - static void pciehp_check_presence(struct controller *ctrl) - { -- bool occupied; -+ int occupied; - - down_read(&ctrl->reset_lock); - mutex_lock(&ctrl->state_lock); - - occupied = pciehp_card_present_or_link_active(ctrl); -- if ((occupied && (ctrl->state == OFF_STATE || -+ if ((occupied > 0 && (ctrl->state == OFF_STATE || - ctrl->state == BLINKINGON_STATE)) || - (!occupied && (ctrl->state == ON_STATE || - ctrl->state == BLINKINGOFF_STATE))) -diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c -index dd8e4a5fb282..6503d15effbb 100644 ---- a/drivers/pci/hotplug/pciehp_ctrl.c -+++ b/drivers/pci/hotplug/pciehp_ctrl.c -@@ -226,7 +226,7 @@ void pciehp_handle_disable_request(struct controller *ctrl) - - void pciehp_handle_presence_or_link_change(struct controller *ctrl, u32 events) - { -- bool present, link_active; -+ int present, link_active; - - /* - * If the slot is on and presence or link has changed, turn it off. -@@ -257,7 +257,7 @@ void pciehp_handle_presence_or_link_change(struct controller *ctrl, u32 events) - mutex_lock(&ctrl->state_lock); - present = pciehp_card_present(ctrl); - link_active = pciehp_check_link_active(ctrl); -- if (!present && !link_active) { -+ if (present <= 0 && link_active <= 0) { - mutex_unlock(&ctrl->state_lock); - return; - } -diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c -index 86d97f3112f0..a2a263764ef8 100644 ---- a/drivers/pci/hotplug/pciehp_hpc.c -+++ b/drivers/pci/hotplug/pciehp_hpc.c -@@ -201,17 +201,29 @@ static void pcie_write_cmd_nowait(struct controller *ctrl, u16 cmd, u16 mask) - pcie_do_write_cmd(ctrl, cmd, mask, false); - } - --bool pciehp_check_link_active(struct controller *ctrl) -+/** -+ * pciehp_check_link_active() - Is the link active -+ * @ctrl: PCIe hotplug controller -+ * -+ * Check whether the downstream link is currently active. Note it is -+ * possible that the card is removed immediately after this so the -+ * caller may need to take it into account. -+ * -+ * If the hotplug controller itself is not available anymore returns -+ * %-ENODEV. -+ */ -+int pciehp_check_link_active(struct controller *ctrl) - { - struct pci_dev *pdev = ctrl_dev(ctrl); - u16 lnk_status; -- bool ret; -+ int ret; - -- pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnk_status); -- ret = !!(lnk_status & PCI_EXP_LNKSTA_DLLLA); -+ ret = pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnk_status); -+ if (ret == PCIBIOS_DEVICE_NOT_FOUND || lnk_status == (u16)~0) -+ return -ENODEV; - -- if (ret) -- ctrl_dbg(ctrl, "%s: lnk_status = %x\n", __func__, lnk_status); -+ ret = !!(lnk_status & PCI_EXP_LNKSTA_DLLLA); -+ ctrl_dbg(ctrl, "%s: lnk_status = %x\n", __func__, lnk_status); - - return ret; - } -@@ -373,13 +385,29 @@ void pciehp_get_latch_status(struct controller *ctrl, u8 *status) - *status = !!(slot_status & PCI_EXP_SLTSTA_MRLSS); - } - --bool pciehp_card_present(struct controller *ctrl) -+/** -+ * pciehp_card_present() - Is the card present -+ * @ctrl: PCIe hotplug controller -+ * -+ * Function checks whether the card is currently present in the slot and -+ * in that case returns true. Note it is possible that the card is -+ * removed immediately after the check so the caller may need to take -+ * this into account. -+ * -+ * It the hotplug controller itself is not available anymore returns -+ * %-ENODEV. -+ */ -+int pciehp_card_present(struct controller *ctrl) - { - struct pci_dev *pdev = ctrl_dev(ctrl); - u16 slot_status; -+ int ret; - -- pcie_capability_read_word(pdev, PCI_EXP_SLTSTA, &slot_status); -- return slot_status & PCI_EXP_SLTSTA_PDS; -+ ret = pcie_capability_read_word(pdev, PCI_EXP_SLTSTA, &slot_status); -+ if (ret == PCIBIOS_DEVICE_NOT_FOUND || slot_status == (u16)~0) -+ return -ENODEV; -+ -+ return !!(slot_status & PCI_EXP_SLTSTA_PDS); - } - - /** -@@ -390,10 +418,19 @@ bool pciehp_card_present(struct controller *ctrl) - * Presence Detect State bit, this helper also returns true if the Link Active - * bit is set. This is a concession to broken hotplug ports which hardwire - * Presence Detect State to zero, such as Wilocity's [1ae9:0200]. -+ * -+ * Returns: %1 if the slot is occupied and %0 if it is not. If the hotplug -+ * port is not present anymore returns %-ENODEV. - */ --bool pciehp_card_present_or_link_active(struct controller *ctrl) -+int pciehp_card_present_or_link_active(struct controller *ctrl) - { -- return pciehp_card_present(ctrl) || pciehp_check_link_active(ctrl); -+ int ret; -+ -+ ret = pciehp_card_present(ctrl); -+ if (ret) -+ return ret; -+ -+ return pciehp_check_link_active(ctrl); - } - - int pciehp_query_power_fault(struct controller *ctrl) --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch b/kernels/linux-libre-aarch64/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch deleted file mode 100644 index e95960163..000000000 --- a/kernels/linux-libre-aarch64/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 585c73f82751043ebcf1e097a29bb9c6d2c3fbd1 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 18 Feb 2014 01:43:50 -0300 -Subject: [PATCH 5/9] net/smsc95xx: Allow mac address to be set as a parameter - ---- - drivers/net/usb/smsc95xx.c | 56 ++++++++++++++++++++++++++++++++++++++ - 1 file changed, 56 insertions(+) - -diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index 355be77f4241..c94a7193e0b9 100644 ---- a/drivers/net/usb/smsc95xx.c -+++ b/drivers/net/usb/smsc95xx.c -@@ -48,6 +48,7 @@ - #define SUSPEND_SUSPEND3 (0x08) - #define SUSPEND_ALLMODES (SUSPEND_SUSPEND0 | SUSPEND_SUSPEND1 | \ - SUSPEND_SUSPEND2 | SUSPEND_SUSPEND3) -+#define MAC_ADDR_LEN (6) - - #define CARRIER_CHECK_DELAY (2 * HZ) - -@@ -70,6 +71,10 @@ static bool turbo_mode = true; - module_param(turbo_mode, bool, 0644); - MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction"); - -+static char *macaddr = ":"; -+module_param(macaddr, charp, 0); -+MODULE_PARM_DESC(macaddr, "MAC address"); -+ - static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index, - u32 *data, int in_pm) - { -@@ -899,8 +904,59 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) - return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); - } - -+/* Check the macaddr module parameter for a MAC address */ -+static int smsc95xx_is_macaddr_param(struct usbnet *dev, u8 *dev_mac) -+{ -+ int i, j, got_num, num; -+ u8 mtbl[MAC_ADDR_LEN]; -+ -+ if (macaddr[0] == ':') -+ return 0; -+ -+ i = 0; -+ j = 0; -+ num = 0; -+ got_num = 0; -+ while (j < MAC_ADDR_LEN) { -+ if (macaddr[i] && macaddr[i] != ':') { -+ got_num++; -+ if ('0' <= macaddr[i] && macaddr[i] <= '9') -+ num = num * 16 + macaddr[i] - '0'; -+ else if ('A' <= macaddr[i] && macaddr[i] <= 'F') -+ num = num * 16 + 10 + macaddr[i] - 'A'; -+ else if ('a' <= macaddr[i] && macaddr[i] <= 'f') -+ num = num * 16 + 10 + macaddr[i] - 'a'; -+ else -+ break; -+ i++; -+ } else if (got_num == 2) { -+ mtbl[j++] = (u8) num; -+ num = 0; -+ got_num = 0; -+ i++; -+ } else { -+ break; -+ } -+ } -+ -+ if (j == MAC_ADDR_LEN) { -+ netif_dbg(dev, ifup, dev->net, "Overriding MAC address with: " -+ "%02x:%02x:%02x:%02x:%02x:%02x\n", mtbl[0], mtbl[1], mtbl[2], -+ mtbl[3], mtbl[4], mtbl[5]); -+ for (i = 0; i < MAC_ADDR_LEN; i++) -+ dev_mac[i] = mtbl[i]; -+ return 1; -+ } else { -+ return 0; -+ } -+} -+ - static void smsc95xx_init_mac_address(struct usbnet *dev) - { -+ /* Check module parameters */ -+ if (smsc95xx_is_macaddr_param(dev, dev->net->dev_addr)) -+ return; -+ - const u8 *mac_addr; - - /* maybe the boot loader passed the MAC address in devicetree */ --- -2.23.0 - diff --git a/kernels/linux-libre-aarch64/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch b/kernels/linux-libre-aarch64/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch deleted file mode 100644 index 7b749ce70..000000000 --- a/kernels/linux-libre-aarch64/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch +++ /dev/null @@ -1,78 +0,0 @@ -From f74b67cce5f0c5c37b0c5cb0020a818f0594a743 Mon Sep 17 00:00:00 2001 -From: "Rafael J. Wysocki" -Date: Thu, 28 Nov 2019 23:50:40 +0100 -Subject: [PATCH 06/13] ACPI: PM: s2idle: Rework ACPI events synchronization - -Note that the EC GPE processing need not be synchronized in -acpi_s2idle_wake() after invoking acpi_ec_dispatch_gpe(), because -that function checks the GPE status and dispatches its handler if -need be and the SCI action handler is not going to run anyway at -that point. - -Moreover, it is better to drain all of the pending ACPI events -before restoring the working-state configuration of GPEs in -acpi_s2idle_restore(), because those events are likely to be related -to system wakeup, in which case they will not be relevant going -forward. - -Rework the code to take these observations into account. - -Signed-off-by: Rafael J. Wysocki ---- - drivers/acpi/sleep.c | 26 +++++++++++++++++++------- - 1 file changed, 19 insertions(+), 7 deletions(-) - -diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c -index 2af937a8b1c5..6747a279621b 100644 ---- a/drivers/acpi/sleep.c -+++ b/drivers/acpi/sleep.c -@@ -977,6 +977,16 @@ static int acpi_s2idle_prepare_late(void) - return 0; - } - -+static void acpi_s2idle_sync(void) -+{ -+ /* -+ * The EC driver uses the system workqueue and an additional special -+ * one, so those need to be flushed too. -+ */ -+ acpi_ec_flush_work(); -+ acpi_os_wait_events_complete(); /* synchronize Notify handling */ -+} -+ - static void acpi_s2idle_wake(void) - { - /* -@@ -1001,13 +1011,8 @@ static void acpi_s2idle_wake(void) - * should be missed by canceling the wakeup here. - */ - pm_system_cancel_wakeup(); -- /* -- * The EC driver uses the system workqueue and an additional -- * special one, so those need to be flushed too. -- */ -- acpi_os_wait_events_complete(); /* synchronize EC GPE processing */ -- acpi_ec_flush_work(); -- acpi_os_wait_events_complete(); /* synchronize Notify handling */ -+ -+ acpi_s2idle_sync(); - - rearm_wake_irq(acpi_sci_irq); - } -@@ -1024,6 +1029,13 @@ static void acpi_s2idle_restore_early(void) - - static void acpi_s2idle_restore(void) - { -+ /* -+ * Drain pending events before restoring the working-state configuration -+ * of GPEs. -+ */ -+ acpi_os_wait_events_complete(); /* synchronize GPE processing */ -+ acpi_s2idle_sync(); -+ - s2idle_wakeup = false; - - acpi_enable_all_runtime_gpes(); --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0006-set-default-cubietruck-led-triggers.patch b/kernels/linux-libre-aarch64/0006-set-default-cubietruck-led-triggers.patch deleted file mode 100644 index efbbb49c4..000000000 --- a/kernels/linux-libre-aarch64/0006-set-default-cubietruck-led-triggers.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 8fb925eac047386a298303e501042a0fd30e9ef9 Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Sat, 14 Feb 2015 12:32:27 +0100 -Subject: [PATCH 6/9] set default cubietruck led triggers - -Signed-off-by: Kevin Mihelich ---- - arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts -index 8c8dee6ea461..4f52a11b913e 100644 ---- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts -+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts -@@ -78,6 +78,7 @@ - blue { - label = "cubietruck:blue:usr"; - gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "heartbeat"; - }; - - orange { -@@ -93,6 +94,7 @@ - green { - label = "cubietruck:green:usr"; - gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "mmc0"; - }; - }; - --- -2.23.0 - diff --git a/kernels/linux-libre-aarch64/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch b/kernels/linux-libre-aarch64/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch deleted file mode 100644 index 40413f479..000000000 --- a/kernels/linux-libre-aarch64/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 054ac5f337ad4f79b22c9b191dc47f001722f0d6 Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Thu, 11 Aug 2016 00:42:37 -0600 -Subject: [PATCH 7/9] exynos4412-odroid: set higher minimum buck2 regulator - voltage - -Set a higher minimum voltage to help reboot issue. -http://www.spinics.net/lists/linux-samsung-soc/msg54434.html - -Signed-off-by: Kevin Mihelich ---- - arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi -index ea55f377d17c..a7bfc58bbc79 100644 ---- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi -+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi -@@ -430,7 +430,7 @@ - - buck2_reg: BUCK2 { - regulator-name = "vdd_arm"; -- regulator-min-microvolt = <900000>; -+ regulator-min-microvolt = <1100000>; - regulator-max-microvolt = <1350000>; - regulator-always-on; - regulator-boot-on; --- -2.23.0 - diff --git a/kernels/linux-libre-aarch64/0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch b/kernels/linux-libre-aarch64/0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch deleted file mode 100644 index 3cab84dee..000000000 --- a/kernels/linux-libre-aarch64/0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 265dae4f5dac25c15272befa5eefb9b10906435f Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 24 Dec 2019 05:18:47 +0100 -Subject: [PATCH 07/13] iwlwifi: pcie: restore support for Killer Qu C0 NICs - -Commit 809805a820c6 refactored the cfg mangling. Unfortunately, in this -process the lines which picked the right cfg for Killer Qu C0 NICs after -C0 detection were lost. These lines were added by commit b9500577d361. - -I suspect this is more of the "merge damage" which commit 7cded5658329 -talks about. - -Fixes: 809805a820c6 ("iwlwifi: pcie: move some cfg mangling from trans_pcie_alloc to probe") -Signed-off-by: Jan Alexander Steffens (heftig) ---- - drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c -index b0b7eca1754e..de62a6dc4e73 100644 ---- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c -+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c -@@ -1107,6 +1107,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) - cfg = &iwl9560_2ac_cfg_qu_c0_jf_b0; - else if (cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0) - cfg = &iwl9560_2ac_160_cfg_qu_c0_jf_b0; -+ else if (cfg == &killer1650s_2ax_cfg_qu_b0_hr_b0) -+ cfg = &killer1650s_2ax_cfg_qu_c0_hr_b0; -+ else if (cfg == &killer1650i_2ax_cfg_qu_b0_hr_b0) -+ cfg = &killer1650i_2ax_cfg_qu_c0_hr_b0; - } - - /* same thing for QuZ... */ --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0008-ARM-dove-enable-ethernet-on-D3Plug.patch b/kernels/linux-libre-aarch64/0008-ARM-dove-enable-ethernet-on-D3Plug.patch deleted file mode 100644 index b1687bf5c..000000000 --- a/kernels/linux-libre-aarch64/0008-ARM-dove-enable-ethernet-on-D3Plug.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8b696580b73c7f6e7f3e9635bd2ad1c5c59e9082 Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Sun, 7 May 2017 13:32:25 -0600 -Subject: [PATCH 8/9] ARM: dove: enable ethernet on D3Plug - -Signed-off-by: Kevin Mihelich ---- - arch/arm/boot/dts/dove-d3plug.dts | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/arch/arm/boot/dts/dove-d3plug.dts b/arch/arm/boot/dts/dove-d3plug.dts -index 826026c28f90..a4c9963e1261 100644 ---- a/arch/arm/boot/dts/dove-d3plug.dts -+++ b/arch/arm/boot/dts/dove-d3plug.dts -@@ -61,6 +61,13 @@ - &uart0 { status = "okay"; }; - &sata0 { status = "okay"; }; - &i2c0 { status = "okay"; }; -+&mdio { status = "okay"; }; -+ð { status = "okay"; }; -+ -+ðphy { -+ compatible = "marvell,88e1310"; -+ reg = <1>; -+}; - - /* Samsung M8G2F eMMC */ - &sdio0 { --- -2.23.0 - diff --git a/kernels/linux-libre-aarch64/0008-x86-intel-Disable-HPET-on-Intel-Ice-Lake-platforms.patch b/kernels/linux-libre-aarch64/0008-x86-intel-Disable-HPET-on-Intel-Ice-Lake-platforms.patch deleted file mode 100644 index f07c5886b..000000000 --- a/kernels/linux-libre-aarch64/0008-x86-intel-Disable-HPET-on-Intel-Ice-Lake-platforms.patch +++ /dev/null @@ -1,38 +0,0 @@ -From ddb94a8dbd9144d7b85f553cb4a85db2ba62374d Mon Sep 17 00:00:00 2001 -From: Kai-Heng Feng -Date: Fri, 29 Nov 2019 14:23:03 +0800 -Subject: [PATCH 08/13] x86/intel: Disable HPET on Intel Ice Lake platforms - -Like CFL and CFL-H, ICL SoC has skewed HPET timer once it hits PC10. -So let's disable HPET on ICL. - -Signed-off-by: Kai-Heng Feng -Cc: Linus Torvalds -Cc: Peter Zijlstra -Cc: Thomas Gleixner -Cc: bp@alien8.de -Cc: feng.tang@intel.com -Cc: harry.pan@intel.com -Cc: hpa@zytor.com -Link: https://lkml.kernel.org/r/20191129062303.18982-2-kai.heng.feng@canonical.com -Signed-off-by: Ingo Molnar ---- - arch/x86/kernel/early-quirks.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c -index 606711f5ebf8..2f9ec14be3b1 100644 ---- a/arch/x86/kernel/early-quirks.c -+++ b/arch/x86/kernel/early-quirks.c -@@ -714,6 +714,8 @@ static struct chipset early_qrk[] __initdata = { - PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet}, - { PCI_VENDOR_ID_INTEL, 0x3ec4, - PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet}, -+ { PCI_VENDOR_ID_INTEL, 0x8a12, -+ PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet}, - { PCI_VENDOR_ID_BROADCOM, 0x4331, - PCI_CLASS_NETWORK_OTHER, PCI_ANY_ID, 0, apple_airport_reset}, - {} --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0009-USB-Armory-MkII-support.patch b/kernels/linux-libre-aarch64/0009-USB-Armory-MkII-support.patch deleted file mode 100644 index 4c8f8fed3..000000000 --- a/kernels/linux-libre-aarch64/0009-USB-Armory-MkII-support.patch +++ /dev/null @@ -1,555 +0,0 @@ -From 55e7015aa06dd943b55a0101beddae1c811a2be5 Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Sun, 11 Aug 2019 12:34:17 -0600 -Subject: [PATCH 9/9] USB Armory MkII support - ---- - arch/arm/boot/dts/Makefile | 2 + - arch/arm/boot/dts/imx6ul-usbarmory.dts | 255 +++++++++++++++++++++++ - arch/arm/boot/dts/imx6ull-usbarmory.dts | 256 ++++++++++++++++++++++++ - 3 files changed, 513 insertions(+) - create mode 100644 arch/arm/boot/dts/imx6ul-usbarmory.dts - create mode 100644 arch/arm/boot/dts/imx6ull-usbarmory.dts - -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index a0f92b9dbd7d..5d6e9f76f6db 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -580,9 +580,11 @@ dtb-$(CONFIG_SOC_IMX6UL) += \ - imx6ul-tx6ul-0010.dtb \ - imx6ul-tx6ul-0011.dtb \ - imx6ul-tx6ul-mainboard.dtb \ -+ imx6ul-usbarmory.dtb \ - imx6ull-14x14-evk.dtb \ - imx6ull-colibri-eval-v3.dtb \ - imx6ull-colibri-wifi-eval-v3.dtb \ -+ imx6ull-usbarmory.dtb \ - imx6ull-phytec-segin-ff-rdk-nand.dtb \ - imx6ull-phytec-segin-ff-rdk-emmc.dtb \ - imx6ull-phytec-segin-lc-rdk-nand.dtb \ -diff --git a/arch/arm/boot/dts/imx6ul-usbarmory.dts b/arch/arm/boot/dts/imx6ul-usbarmory.dts -new file mode 100644 -index 000000000000..3936ef8a64f1 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6ul-usbarmory.dts -@@ -0,0 +1,255 @@ -+/* -+ * USB armory Mk II device tree file -+ * https://inversepath.com/usbarmory -+ * -+ * Copyright (C) 2019, F-Secure Corporation -+ * Andrej Rosano -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+ -+#include "imx6ul.dtsi" -+ -+/ { -+ model = "F-Secure USB armory Mk II"; -+ compatible = "inversepath,imx6ul-usbarmory-mkII", "fsl,imx6ul"; -+ -+ chosen { -+ stdout-path = &uart2; -+ }; -+ -+ memory { -+ reg = <0x80000000 0x20000000>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_led>; -+ -+ led-white { -+ label = "LED_WHITE"; -+ gpios = <&gpio4 21 GPIO_ACTIVE_LOW>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ -+ led-blue { -+ label = "LED_BLUE"; -+ gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+ -+ regulators { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ reg_sd1_vmmc: sd1_regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "VSD_3V3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ }; -+ }; -+}; -+ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_bluetooth>; -+ uart-has-rtscts; -+ status = "okay"; -+}; -+ -+&uart2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart2>; -+ status = "okay"; -+}; -+ -+&usdhc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc1>; -+ no-1-8-v; -+ keep-power-in-suspend; -+ wakeup-source; -+ status = "okay"; -+}; -+ -+&usdhc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc2>; -+ non-removable; -+ status = "okay"; -+}; -+ -+&i2c1 { -+ pinctrl-0 = <&pinctrl_i2c1>; -+ status = "okay"; -+}; -+ -+&iomuxc { -+ pinctrl_uart2: uart2grp { -+ fsl,pins = < -+ MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1 -+ MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1 -+ >; -+ }; -+ -+ pinctrl_bluetooth: uart1grp { -+ fsl,pins = < -+ MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b0 /* BT_UART_TX */ -+ MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b0 /* BT_UART_RX */ -+ MX6UL_PAD_UART1_CTS_B__UART1_DCE_CTS 0x1b0b0 /* BT_UART_CTS */ -+ MX6UL_PAD_GPIO1_IO07__UART1_DCE_RTS 0x130b0 /* BT_UART_RTS */ -+ MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24 0x1f020 /* BT_UART_DSR */ -+ MX6UL_PAD_UART3_RX_DATA__GPIO1_IO25 0x10020 /* BT_UART_DTR */ -+ MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0x1f020 /* BT_SWDCLK */ -+ MX6UL_PAD_GPIO1_IO05__GPIO1_IO05 0x1f020 /* BT_SWDIO */ -+ MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x1f020 /* BT_RESET */ -+ MX6UL_PAD_UART3_RTS_B__GPIO1_IO27 0x1f020 /* BT_SWITCH_1 */ -+ MX6UL_PAD_UART3_CTS_B__GPIO1_IO26 0x1f020 /* BT_SWITCH_2 */ -+ >; -+ }; -+ -+ pinctrl_i2c1: i2c1grp { -+ fsl,pins = < -+ MX6UL_PAD_GPIO1_IO02__I2C1_SCL 0x4001b8b0 -+ MX6UL_PAD_GPIO1_IO03__I2C1_SDA 0x4001b8b0 -+ >; -+ }; -+ -+ pinctrl_led: ledgrp { -+ fsl,pins = < -+ MX6UL_PAD_CSI_DATA06__GPIO4_IO27 0x1f020 -+ MX6UL_PAD_CSI_DATA07__GPIO4_IO28 0x1f020 -+ >; -+ }; -+ -+ pinctrl_usdhc1: usdhc1grp { -+ fsl,pins = < -+ MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x1f019 -+ MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x1f019 -+ MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x1f019 -+ MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x1f019 -+ MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x1f019 -+ MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x1f019 -+ >; -+ }; -+ -+ pinctrl_usdhc2: usdhc2grp { -+ fsl,pins = < -+ MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x10071 -+ MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x17059 -+ MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059 -+ MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059 -+ MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059 -+ MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059 -+ MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x17059 -+ MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x17059 -+ MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x17059 -+ MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x17059 -+ >; -+ }; -+}; -+ -+&aips2 { -+ crypto: caam@2140000 { -+ compatible = "fsl,imx6ul-caam", "fsl,sec-v4.0"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ reg = <0x2140000 0x3c000>; -+ ranges = <0 0x2140000 0x3c000>; -+ interrupts = ; -+ clocks = <&clks IMX6UL_CLK_CAAM_IPG>, <&clks IMX6UL_CLK_CAAM_ACLK>, -+ <&clks IMX6UL_CLK_CAAM_MEM>; -+ clock-names = "ipg", "aclk", "mem"; -+ -+ sec_jr0: jr0@1000 { -+ compatible = "fsl,sec-v4.0-job-ring"; -+ reg = <0x1000 0x1000>; -+ interrupts = ; -+ }; -+ -+ sec_jr1: jr1@2000 { -+ compatible = "fsl,sec-v4.0-job-ring"; -+ reg = <0x2000 0x1000>; -+ interrupts = ; -+ }; -+ sec_jr2: jr2@3000 { -+ compatible = "fsl,sec-v4.0-job-ring"; -+ reg = <0x3000 0x1000>; -+ interrupts = ; -+ }; -+ }; -+}; -+ -+/ { -+ soc { -+ caam_sm: caam-sm@00100000 { -+ compatible = "fsl,imx7d-caam-sm", "fsl,imx6q-caam-sm"; -+ reg = <0x00100000 0x3fff>; -+ }; -+ -+ irq_sec_vio: caam_secvio { -+ compatible = "fsl,imx7d-caam-secvio", "fsl,imx6q-caam-secvio"; -+ interrupts = ; -+ }; -+ }; -+ -+ caam_keyblob: caam-keyblob { -+ compatible = "fsl,sec-v4.0-keyblob"; -+ status = "okay"; -+ }; -+}; -+ -+&usbotg1 { -+ dr_mode = "otg"; -+ disable-over-current; -+ tpl-support; -+ status = "okay"; -+}; -+ -+&usbotg2 { -+ dr_mode = "host"; -+ disable-over-current; -+ tpl-support; -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/imx6ull-usbarmory.dts b/arch/arm/boot/dts/imx6ull-usbarmory.dts -new file mode 100644 -index 000000000000..85cf30bff527 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6ull-usbarmory.dts -@@ -0,0 +1,256 @@ -+/* -+ * USB armory Mk II device tree file -+ * https://inversepath.com/usbarmory -+ * -+ * Copyright (C) 2019, F-Secure Corporation -+ * Andrej Rosano -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+ -+#include "imx6ul.dtsi" -+ -+/ { -+ model = "F-Secure USB armory Mk II"; -+ compatible = "inversepath,imx6ull-usbarmory-mkII", "fsl,imx6ull"; -+ -+ chosen { -+ stdout-path = &uart2; -+ }; -+ -+ memory { -+ reg = <0x80000000 0x20000000>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_led>; -+ -+ led-white { -+ label = "LED_WHITE"; -+ gpios = <&gpio4 21 GPIO_ACTIVE_LOW>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ -+ led-blue { -+ label = "LED_BLUE"; -+ gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+ -+ regulators { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ reg_sd1_vmmc: sd1_regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "VSD_3V3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ }; -+ }; -+}; -+ -+/* Delete CAAM node in AIPS-2 (i.MX6UL specific) */ -+/delete-node/ &crypto; -+ -+&cpu0 { -+ operating-points = < -+ /* kHz uV */ -+ 900000 1275000 -+ 792000 1225000 -+ 528000 1175000 -+ 396000 1025000 -+ 198000 950000 -+ >; -+ fsl,soc-operating-points = < -+ /* KHz uV */ -+ 900000 1250000 -+ 792000 1175000 -+ 528000 1175000 -+ 396000 1175000 -+ 198000 1175000 -+ >; -+}; -+ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_bluetooth>; -+ uart-has-rtscts; -+ status = "okay"; -+}; -+ -+&uart2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart2>; -+ status = "okay"; -+}; -+ -+&usdhc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc1>; -+ no-1-8-v; -+ keep-power-in-suspend; -+ wakeup-source; -+ status = "okay"; -+}; -+ -+&usdhc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc2>; -+ non-removable; -+ status = "okay"; -+}; -+ -+&i2c1 { -+ pinctrl-0 = <&pinctrl_i2c1>; -+ status = "okay"; -+}; -+ -+&iomuxc { -+ pinctrl_uart2: uart2grp { -+ fsl,pins = < -+ MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1 -+ MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1 -+ >; -+ }; -+ -+ pinctrl_bluetooth: uart1grp { -+ fsl,pins = < -+ MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b0 /* BT_UART_TX */ -+ MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b0 /* BT_UART_RX */ -+ MX6UL_PAD_UART1_CTS_B__UART1_DCE_CTS 0x1b0b0 /* BT_UART_CTS */ -+ MX6UL_PAD_GPIO1_IO07__UART1_DCE_RTS 0x130b0 /* BT_UART_RTS */ -+ MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24 0x1f020 /* BT_UART_DSR */ -+ MX6UL_PAD_UART3_RX_DATA__GPIO1_IO25 0x10020 /* BT_UART_DTR */ -+ MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0x1f020 /* BT_SWDCLK */ -+ MX6UL_PAD_GPIO1_IO05__GPIO1_IO05 0x1f020 /* BT_SWDIO */ -+ MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x1f020 /* BT_RESET */ -+ MX6UL_PAD_UART3_RTS_B__GPIO1_IO27 0x1f020 /* BT_SWITCH_1 */ -+ MX6UL_PAD_UART3_CTS_B__GPIO1_IO26 0x1f020 /* BT_SWITCH_2 */ -+ >; -+ }; -+ -+ pinctrl_i2c1: i2c1grp { -+ fsl,pins = < -+ MX6UL_PAD_GPIO1_IO02__I2C1_SCL 0x4001b8b0 -+ MX6UL_PAD_GPIO1_IO03__I2C1_SDA 0x4001b8b0 -+ >; -+ }; -+ -+ pinctrl_led: ledgrp { -+ fsl,pins = < -+ MX6UL_PAD_CSI_DATA06__GPIO4_IO27 0x1f020 -+ MX6UL_PAD_CSI_DATA07__GPIO4_IO28 0x1f020 -+ >; -+ }; -+ -+ pinctrl_usdhc1: usdhc1grp { -+ fsl,pins = < -+ MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x1f019 -+ MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x1f019 -+ MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x1f019 -+ MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x1f019 -+ MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x1f019 -+ MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x1f019 -+ >; -+ }; -+ -+ pinctrl_usdhc2: usdhc2grp { -+ fsl,pins = < -+ MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x10071 -+ MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x17059 -+ MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059 -+ MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059 -+ MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059 -+ MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059 -+ MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x17059 -+ MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x17059 -+ MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x17059 -+ MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x17059 -+ >; -+ }; -+}; -+ -+/ { -+ soc { -+ aips3: aips-bus@02200000 { -+ compatible = "fsl,aips-bus", "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ reg = <0x02200000 0x100000>; -+ ranges; -+ -+ dcp: dcp@02280000 { -+ compatible = "fsl,imx6ull-dcp", "fsl,imx6sl-dcp", "fsl,imx28-dcp"; -+ reg = <0x02280000 0x4000>; -+ interrupts = , -+ , -+ ; -+ clocks = <&clks IMX6ULL_CLK_DCP_CLK>; -+ clock-names = "dcp"; -+ }; -+ -+ rngb: rngb@02284000 { -+ compatible = "fsl,imx6sl-rng", "fsl,imx25-rngb", "fsl,imx-rng", "imx-rng"; -+ reg = <0x02284000 0x4000>; -+ interrupts = ; -+ clocks = <&clks IMX6UL_CLK_DUMMY>; -+ }; -+ }; -+ }; -+}; -+ -+&usbotg1 { -+ dr_mode = "peripheral"; -+ disable-over-current; -+ tpl-support; -+ status = "okay"; -+}; -+ -+&usbotg2 { -+ dr_mode = "host"; -+ disable-over-current; -+ tpl-support; -+ status = "okay"; -+}; --- -2.23.0 - diff --git a/kernels/linux-libre-aarch64/0009-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch b/kernels/linux-libre-aarch64/0009-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch deleted file mode 100644 index c876a8628..000000000 --- a/kernels/linux-libre-aarch64/0009-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch +++ /dev/null @@ -1,87 +0,0 @@ -From e0d783c7ee43a39dadeb96ac669c45f3a3192d96 Mon Sep 17 00:00:00 2001 -From: Kai Vehmanen -Date: Fri, 20 Sep 2019 11:39:18 +0300 -Subject: [PATCH 09/13] drm/i915: save AUD_FREQ_CNTRL state at audio domain - suspend - -When audio power domain is suspended, the display driver must -save state of AUD_FREQ_CNTRL on Tiger Lake and Ice Lake -systems. The initial value of the register is set by BIOS and -is read by driver during the audio component init sequence. - -Cc: Jani Nikula -Cc: Imre Deak -Signed-off-by: Kai Vehmanen -Signed-off-by: Jani Nikula -Link: https://patchwork.freedesktop.org/patch/msgid/20190920083918.27057-1-kai.vehmanen@linux.intel.com ---- - drivers/gpu/drm/i915/display/intel_audio.c | 17 +++++++++++++++-- - drivers/gpu/drm/i915/i915_drv.h | 1 + - drivers/gpu/drm/i915/i915_reg.h | 2 ++ - 3 files changed, 18 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c -index ddcccf4408c3..439bc0a93410 100644 ---- a/drivers/gpu/drm/i915/display/intel_audio.c -+++ b/drivers/gpu/drm/i915/display/intel_audio.c -@@ -850,10 +850,17 @@ static unsigned long i915_audio_component_get_power(struct device *kdev) - - ret = intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO); - -- /* Force CDCLK to 2*BCLK as long as we need audio to be powered. */ -- if (dev_priv->audio_power_refcount++ == 0) -+ if (dev_priv->audio_power_refcount++ == 0) { -+ if (IS_TIGERLAKE(dev_priv) || IS_ICELAKE(dev_priv)) { -+ I915_WRITE(AUD_FREQ_CNTRL, dev_priv->audio_freq_cntrl); -+ DRM_DEBUG_KMS("restored AUD_FREQ_CNTRL to 0x%x\n", -+ dev_priv->audio_freq_cntrl); -+ } -+ -+ /* Force CDCLK to 2*BCLK as long as we need audio powered. */ - if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) - glk_force_audio_cdclk(dev_priv, true); -+ } - - return ret; - } -@@ -1114,6 +1121,12 @@ static void i915_audio_component_init(struct drm_i915_private *dev_priv) - return; - } - -+ if (IS_TIGERLAKE(dev_priv) || IS_ICELAKE(dev_priv)) { -+ dev_priv->audio_freq_cntrl = I915_READ(AUD_FREQ_CNTRL); -+ DRM_DEBUG_KMS("init value of AUD_FREQ_CNTRL of 0x%x\n", -+ dev_priv->audio_freq_cntrl); -+ } -+ - dev_priv->audio_component_registered = true; - } - -diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h -index 89b6112bd66b..043ce1b47aeb 100644 ---- a/drivers/gpu/drm/i915/i915_drv.h -+++ b/drivers/gpu/drm/i915/i915_drv.h -@@ -1530,6 +1530,7 @@ struct drm_i915_private { - */ - struct mutex av_mutex; - int audio_power_refcount; -+ u32 audio_freq_cntrl; - - struct { - struct mutex mutex; -diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h -index f8ee9aba3955..e1fe356463ec 100644 ---- a/drivers/gpu/drm/i915/i915_reg.h -+++ b/drivers/gpu/drm/i915/i915_reg.h -@@ -9104,6 +9104,8 @@ enum { - #define HSW_AUD_CHICKENBIT _MMIO(0x65f10) - #define SKL_AUD_CODEC_WAKE_SIGNAL (1 << 15) - -+#define AUD_FREQ_CNTRL _MMIO(0x65900) -+ - /* - * HSW - ICL power wells - * --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0010-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch b/kernels/linux-libre-aarch64/0010-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch deleted file mode 100644 index 952bb8d55..000000000 --- a/kernels/linux-libre-aarch64/0010-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 3a8fe5edd1f716667d7f1ebd4f06bc808bf89a6d Mon Sep 17 00:00:00 2001 -From: Kai Vehmanen -Date: Thu, 3 Oct 2019 11:55:30 +0300 -Subject: [PATCH 10/13] drm/i915: Fix audio power up sequence for gen10+ - display - -On platfroms with gen10+ display, driver must set the enable bit of -AUDIO_PIN_BUF_CTL register before transactions with the HDA controller -can proceed. Add setting this bit to the audio power up sequence. - -Failing to do this resulted in errors during display audio codec probe, -and failures during resume from suspend. - -Note: We may also need to disable the bit afterwards, but there are -still unresolved issues with that. - -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111214 -Signed-off-by: Kai Vehmanen -Signed-off-by: Jani Nikula -Link: https://patchwork.freedesktop.org/patch/msgid/20191003085531.30990-1-kai.vehmanen@linux.intel.com ---- - drivers/gpu/drm/i915/display/intel_audio.c | 5 +++++ - drivers/gpu/drm/i915/i915_reg.h | 2 ++ - 2 files changed, 7 insertions(+) - -diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c -index 439bc0a93410..440b33762fef 100644 ---- a/drivers/gpu/drm/i915/display/intel_audio.c -+++ b/drivers/gpu/drm/i915/display/intel_audio.c -@@ -860,6 +860,11 @@ static unsigned long i915_audio_component_get_power(struct device *kdev) - /* Force CDCLK to 2*BCLK as long as we need audio powered. */ - if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) - glk_force_audio_cdclk(dev_priv, true); -+ -+ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) -+ I915_WRITE(AUD_PIN_BUF_CTL, -+ (I915_READ(AUD_PIN_BUF_CTL) | -+ AUD_PIN_BUF_ENABLE)); - } - - return ret; -diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h -index e1fe356463ec..ccfea9c2b8bf 100644 ---- a/drivers/gpu/drm/i915/i915_reg.h -+++ b/drivers/gpu/drm/i915/i915_reg.h -@@ -9105,6 +9105,8 @@ enum { - #define SKL_AUD_CODEC_WAKE_SIGNAL (1 << 15) - - #define AUD_FREQ_CNTRL _MMIO(0x65900) -+#define AUD_PIN_BUF_CTL _MMIO(0x48414) -+#define AUD_PIN_BUF_ENABLE REG_BIT(31) - - /* - * HSW - ICL power wells --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0011-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch b/kernels/linux-libre-aarch64/0011-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch deleted file mode 100644 index c1bc3c6e2..000000000 --- a/kernels/linux-libre-aarch64/0011-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 66b90ad22d857944d9b8452f064ae48565a40063 Mon Sep 17 00:00:00 2001 -From: Kai Vehmanen -Date: Thu, 3 Oct 2019 11:55:31 +0300 -Subject: [PATCH 11/13] drm/i915: extend audio CDCLK>=2*BCLK constraint to more - platforms - -The CDCLK>=2*BCLK constraint applies to all generations since gen10. -Extend the constraint logic in audio get/put_power(). - -Signed-off-by: Kai Vehmanen -Signed-off-by: Jani Nikula -Link: https://patchwork.freedesktop.org/patch/msgid/20191003085531.30990-2-kai.vehmanen@linux.intel.com ---- - drivers/gpu/drm/i915/display/intel_audio.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c -index 440b33762fef..05ef43b13d1c 100644 ---- a/drivers/gpu/drm/i915/display/intel_audio.c -+++ b/drivers/gpu/drm/i915/display/intel_audio.c -@@ -858,7 +858,7 @@ static unsigned long i915_audio_component_get_power(struct device *kdev) - } - - /* Force CDCLK to 2*BCLK as long as we need audio powered. */ -- if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) -+ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) - glk_force_audio_cdclk(dev_priv, true); - - if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) -@@ -877,7 +877,7 @@ static void i915_audio_component_put_power(struct device *kdev, - - /* Stop forcing CDCLK to 2*BCLK if no need for audio to be powered. */ - if (--dev_priv->audio_power_refcount == 0) -- if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) -+ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) - glk_force_audio_cdclk(dev_priv, false); - - intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO, cookie); --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0012-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch b/kernels/linux-libre-aarch64/0012-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch deleted file mode 100644 index 7609d0b5f..000000000 --- a/kernels/linux-libre-aarch64/0012-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch +++ /dev/null @@ -1,129 +0,0 @@ -From e33c3b5720592db7cbaa544b8c05414a17d35afd Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Mon, 30 Dec 2019 11:15:30 +0000 -Subject: [PATCH 12/13] drm/i915/gt: Detect if we miss WaIdleLiteRestore - -In order to avoid confusing the HW, we must never submit an empty ring -during lite-restore, that is we should always advance the RING_TAIL -before submitting to stay ahead of the RING_HEAD. - -Normally this is prevented by keeping a couple of spare NOPs in the -request->wa_tail so that on resubmission we can advance the tail. This -relies on the request only being resubmitted once, which is the normal -condition as it is seen once for ELSP[1] and then later in ELSP[0]. On -preemption, the requests are unwound and the tail reset back to the -normal end point (as we know the request is incomplete and therefore its -RING_HEAD is even earlier). - -However, if this w/a should fail we would try and resubmit the request -with the RING_TAIL already set to the location of this request's wa_tail -potentially causing a GPU hang. We can spot when we do try and -incorrectly resubmit without advancing the RING_TAIL and spare any -embarrassment by forcing the context restore. - -In the case of preempt-to-busy, we leave the requests running on the HW -while we unwind. As the ring is still live, we cannot rewind our -rq->tail without forcing a reload so leave it set to rq->wa_tail and -only force a reload if we resubmit after a lite-restore. (Normally, the -forced reload will be a part of the preemption event.) - -Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy") -Closes: https://gitlab.freedesktop.org/drm/intel/issues/673 -Signed-off-by: Chris Wilson -Cc: Mika Kuoppala -Cc: Tvrtko Ursulin -Reviewed-by: Tvrtko Ursulin -Cc: stable@vger.kernel.org -Link: https://patchwork.freedesktop.org/patch/msgid/20191209023215.3519970-1-chris@chris-wilson.co.uk -(cherry picked from commit 82c69bf58650e644c61aa2bf5100b63a1070fd2f) ---- - drivers/gpu/drm/i915/gt/intel_lrc.c | 42 ++++++++++++++--------------- - 1 file changed, 20 insertions(+), 22 deletions(-) - -diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c -index 06a506c29463..6600b2e08fe3 100644 ---- a/drivers/gpu/drm/i915/gt/intel_lrc.c -+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c -@@ -471,12 +471,6 @@ lrc_descriptor(struct intel_context *ce, struct intel_engine_cs *engine) - return desc; - } - --static void unwind_wa_tail(struct i915_request *rq) --{ -- rq->tail = intel_ring_wrap(rq->ring, rq->wa_tail - WA_TAIL_BYTES); -- assert_ring_tail_valid(rq->ring, rq->tail); --} -- - static struct i915_request * - __unwind_incomplete_requests(struct intel_engine_cs *engine) - { -@@ -495,7 +489,6 @@ __unwind_incomplete_requests(struct intel_engine_cs *engine) - continue; /* XXX */ - - __i915_request_unsubmit(rq); -- unwind_wa_tail(rq); - - /* - * Push the request back into the queue for later resubmission. -@@ -649,13 +642,29 @@ execlists_schedule_out(struct i915_request *rq) - i915_request_put(rq); - } - --static u64 execlists_update_context(const struct i915_request *rq) -+static u64 execlists_update_context(struct i915_request *rq) - { - struct intel_context *ce = rq->hw_context; -- u64 desc; -+ u64 desc = ce->lrc_desc; -+ u32 tail; - -- ce->lrc_reg_state[CTX_RING_TAIL + 1] = -- intel_ring_set_tail(rq->ring, rq->tail); -+ /* -+ * WaIdleLiteRestore:bdw,skl -+ * -+ * We should never submit the context with the same RING_TAIL twice -+ * just in case we submit an empty ring, which confuses the HW. -+ * -+ * We append a couple of NOOPs (gen8_emit_wa_tail) after the end of -+ * the normal request to be able to always advance the RING_TAIL on -+ * subsequent resubmissions (for lite restore). Should that fail us, -+ * and we try and submit the same tail again, force the context -+ * reload. -+ */ -+ tail = intel_ring_set_tail(rq->ring, rq->tail); -+ if (unlikely(ce->lrc_reg_state[CTX_RING_TAIL + 1] == tail)) -+ desc |= CTX_DESC_FORCE_RESTORE; -+ ce->lrc_reg_state[CTX_RING_TAIL + 1] = tail; -+ rq->tail = rq->wa_tail; - - /* - * Make sure the context image is complete before we submit it to HW. -@@ -674,7 +683,6 @@ static u64 execlists_update_context(const struct i915_request *rq) - */ - mb(); - -- desc = ce->lrc_desc; - ce->lrc_desc &= ~CTX_DESC_FORCE_RESTORE; - - return desc; -@@ -1149,16 +1157,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine) - if (!list_is_last(&last->sched.link, - &engine->active.requests)) - return; -- -- /* -- * WaIdleLiteRestore:bdw,skl -- * Apply the wa NOOPs to prevent -- * ring:HEAD == rq:TAIL as we resubmit the -- * request. See gen8_emit_fini_breadcrumb() for -- * where we prepare the padding after the -- * end of the request. -- */ -- last->tail = last->wa_tail; - } - } - --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/0013-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch b/kernels/linux-libre-aarch64/0013-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch deleted file mode 100644 index ca540525b..000000000 --- a/kernels/linux-libre-aarch64/0013-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch +++ /dev/null @@ -1,35 +0,0 @@ -From adb810e1819b859aec1f8eb4c5611bc6ebe82137 Mon Sep 17 00:00:00 2001 -From: Boyan Ding -Date: Wed, 1 Jan 2020 11:44:49 -0800 -Subject: [PATCH 13/13] pinctrl: sunrisepoint: Add missing Interrupt Status - register offset - -Commit 179e5a6114cc ("pinctrl: intel: Remove default Interrupt Status -offset") removes default interrupt status offset of GPIO controllers, -with previous commits explicitly providing the previously default -offsets. However, the is_offset value in SPTH_COMMUNITY is missing, -preventing related irq from being properly detected and handled. - -Fixes: f702e0b93cdb ("pinctrl: sunrisepoint: Provide Interrupt Status register offset") -Link: https://bugzilla.kernel.org/show_bug.cgi?id=205745 -Cc: stable@vger.kernel.org -Signed-off-by: Boyan Ding ---- - drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c -index 44d7f50bbc82..d936e7aa74c4 100644 ---- a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c -+++ b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c -@@ -49,6 +49,7 @@ - .padown_offset = SPT_PAD_OWN, \ - .padcfglock_offset = SPT_PADCFGLOCK, \ - .hostown_offset = SPT_HOSTSW_OWN, \ -+ .is_offset = SPT_GPI_IS, \ - .ie_offset = SPT_GPI_IE, \ - .pin_base = (s), \ - .npins = ((e) - (s) + 1), \ --- -2.24.1 - diff --git a/kernels/linux-libre-aarch64/PKGBUILD b/kernels/linux-libre-aarch64/PKGBUILD deleted file mode 100644 index 73ccf627c..000000000 --- a/kernels/linux-libre-aarch64/PKGBUILD +++ /dev/null @@ -1,380 +0,0 @@ -# Maintainer: Denis 'GNUtoo' Carikli -# Feel free to push modifications or take over maintainership - -# Based on the linux-libre package - -_replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix -_replacesoldkernels=() # '%' gets replaced with kernel suffix -_replacesoldmodules=() # '%' gets replaced with kernel suffix - -pkgbase=linux-libre-aarch64 -pkgver=5.4.8 -pkgrel=3 -pkgdesc='Linux-libre-aarch64' -rcnver=5.4.5 -rcnrel=armv7-x13 -url='https://linux-libre.fsfla.org/' -arch=(armv7h) -license=(GPL2) -makedepends=( - bc kmod libelf - xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick -) -makedepends_armv7h=(uboot-tools vboot-utils dtc) # required by linux-libre-chromebook -makedepends+=('aarch64-linux-gnu-gcc-initial') -options=('!strip') -_srcname=linux-5.4 -source=( - "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu/linux-libre-${_srcname##*-}-gnu.tar.xz"{,.sign} - "https://linux-libre.fsfla.org/pub/linux-libre/releases/$pkgver-gnu/patch-${_srcname##*-}-gnu-$pkgver-gnu.xz"{,.sign} - "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig} - config.i686 config.x86_64 config.armv7h # the main kernel config files - linux-armv7h.preset # armv7h preset file for mkinitcpio ramdisk - "kernel"{.its,.keyblock,_data_key.vbprivk} # files for signing Chromebooks kernels - - # maintain the TTY over USB disconnects - # http://www.coreboot.org/EHCI_Gadget_Debug - 0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch - # fix Atmel maXTouch touchscreen support - # https://labs.parabola.nu/issues/877 - # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html - 0002-fix-Atmel-maXTouch-touchscreen-support.patch - # extracted patches from Arch Linux kernel sources - 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch - 0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch - 0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch - 0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch - 0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch - 0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch - 0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch - 0008-x86-intel-Disable-HPET-on-Intel-Ice-Lake-platforms.patch - 0009-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch - 0010-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch - 0011-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch - 0012-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch - 0013-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch -) -source_armv7h=( - # RCN patch (CM3 firmware deblobbed and bloatware removed) - "https://repo.parabola.nu/other/rcn-libre/patches/$rcnver/rcn-libre-$rcnver-$rcnrel.patch"{,.sig} - # Arch Linux ARM patches - 0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch - 0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch - 0003-SMILE-Plug-device-tree-file.patch - 0004-fix-mvsdio-eMMC-timing.patch - 0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch - 0006-set-default-cubietruck-led-triggers.patch - 0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch - 0008-ARM-dove-enable-ethernet-on-D3Plug.patch - 0009-USB-Armory-MkII-support.patch -) -validpgpkeys=( - '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva - '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. -) -sha512sums=('0d0915133864eb031adfc6700066147dcf3e768a50a31c39754950c95ef4fd322dc701cd50af49c403ef0325adfcb07e354d5e46c1be3dcdd719a7a55c963f37' - 'SKIP' - '6cf4a01741eec4763e6bbb9762aafad815716f61d43b522da294cf8b2d2a1fc5228fffd710aa5e19aa4ffaa8e59b4ea37cfb987cb49d2cff064b8899b0558fba' - 'SKIP' - '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' - 'SKIP' - '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78' - 'SKIP' - '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' - 'SKIP' - '4f0c8068f2532a60f3368ecc2147f6c33b19f934540655390751629b0981b1bf208f2ec563f5fcfbcf3537140bafd9ed0993cdc8f5b0b71914939d601afc4c29' - 'a923bb36ff24d3f2326b0b6bccb8cdfe2ed2ab2acdae17dfcaf9beb269995a52bfba751ad7e616544ef4b98dd9487a66fe04dae2ec2e7d724f8ac47382ee71bd' - 'b0dbc53ec688eae4ea92181fb7658361c2647b8f6271f145e35b36a93e5170ddc285ebd78c1218e239b4f551b8a4c75b6a9a8beff7367250b302d5900ad0cff5' - 'f01e7925b262d2874a8a991b1f27d057356a2a384d2012b61be5a631d4e4d7cf87461c8fb9e7f183831f5a829ad204897f1f0545a52df6288a0e04a5c2e31b96' - '167bc73c6c1c63931806238905dc44c7d87c5a5c0f6293159f2133dfe717fb44081018d810675716d1605ec7dff5e8333b87b19e09e2de21d0448e447437873b' - 'bb6718984a7357c9b00c37e4788480e5b8b75018c172ecc1441bc3fc5d2d42444eb5d8c7f9d2e3a7d6fed6d03acb565e3c0559486e494c40a7fe6bd0570c9ede' - '143dea30c6da00e504c99984a98a0eb2411f558fcdd9dfa7f607d6c14e9e7dffff9cb00121d9317044b07e3e210808286598c785ee854084b993ec9cb14d8232' - '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' - 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - '19084ed74a127eaed636309d142fbac122a6593b2f10f42c70ef79663e318edd7d433fd268a88c036ce38545f7d2fb14a94fb903040ecbf16287b28073a59d32' - '1c5e6e98dbfc2ec9512967aa9c746d7396df0dcc3b8dff38106a6097528b4bfdb60dd9aee7cd189fb710780fb3593dc173e4c348076dd1ae25c7870d41d53286' - 'dbd1a0dff6ac0f481b4879b44aef5cf6ca9d37383c95ec664094138261bcaab689b873f688f77a6df4f11145a4fb27a4b0676fae5eae16e0f3cbe1392acf1266' - '51b47890987eca1def8019464eb41d3c32038fc4158f6a8e4f06adc2cb6567599fadd1835cb35d5edc7b144749ccafed0ad4f8ce4996edf2cf60fa5a46725f20' - 'a79a8900aae9ee2587cc7989b7e77215c63c0fc3bc75eb5ab0b50d378f6bb4072d46821514a97f81bd79498c6fb6ce97183110ccf7baa9b8434e560857f61611' - 'c94cfe2b0c9e02c020955f0315b6b61be51125f612ce50dff15d8a3bd8de2976a98df56283d0198f977570974c12b15219c457d2682927f8a0fd9344b3e324b6' - '629012611c1100cc832121c1d53da9a414abfe638a8273488ca319229a66a706ad15d88cdfe3b1769a6176ba7df24fe585f794a502e20e9134730fcfe0341dc3' - '809461f3c3e3ec6019b0cde26cf69dfb8f171c49cf8a95c59d4bc84cc331aad0c7f5c313844fb7c655cc54381d2737fb9cbedd4cd047c68b0bd217c480d6f7b0' - '2165f7e671c61d43b7bb89c3edcf3cd4bf16a4e57eccd44f18eabeadeae250ed57fe0fd20efc101e11d49444edb3956db05f6fe7038b0ce1c3cca37f96795e1c' - 'ff457ff06c3ea8e2a67346eb728540985f8a0dc172e818d381e88a97917b9c34d5b7938e49b08ce76692123c623f941714b31bd07c1b65e60beaa7e2b7ae5af9' - '277a8f3e9b0b015690ac82ef4e9c531d8e1a1ef2cb173ec73f807c649844623d1505f7f82d6b97134d1398e4a197586126d3df6c4925f40aaed7a60ed10c7986' - '3499d257cce45e9abc6ae040bb8f38c76dce6f23c1986c4b753a44f32528671d7d24ddd230ab639eb23f9081624f986697c604e1bdb12a0e4b91ea60ce91ea01' - 'b17d58ea538af2f250dd3587323cb36e96fbd8c0d406792e5b7dc828c6bce25fdf5834185cb42e327450b74cd0821260d1f53a84057a3d72b004394d9393e19d') -sha512sums_armv7h=('bc449032f904b5ef5c4506124871230587dd72849f7fed1d7e9f6ab6f530c24415dfa0f29b27fa98191a671c9646b6066fbf163b5533774307dc68f610e3958f' - 'SKIP' - 'b576a9c40ba59485c350f71b9234d9e71f245e25b26382bd2f67019f3309c3b5705a6020eae0a9dfccacc763fb2056a5937c0a8ff4e64f99ba1d60f0b2acb03f' - '85a13a274d4cbaca3ddbe8eaf883f1a1184765f8d09d6d40bb32defbe0876cb0153513e8db8671d7fc053e383ced793b74245ff29364a760e1a52bb36ebc8e85' - 'f9ce0bb4f06be6f742d8a31384e90fdab1a4686f14d5a8845e0c341dcfa62ae59db933237174223de9b32f9d91f99125c20ede7dff664755f1d42ea0cecdefdb' - 'b32623904f984118ebdd8ec31816885d73776ed80a68fa23925e67451f28a8f080dd8545307bb2f857435894adfa8b3db7c8a99aa02b8b3f2b5f8e3223d98a47' - 'd114f1e69504413e81dd67684f5b1ce69aa09d5bc768c7eee96a7d6b7ec47b32cd8f02593c878b0e9091475467de36a3d7c478e34a39148fa849548f53637b84' - 'bc0c6b1726679498393be8d4c417c62e1f356fe5c617c71ff23532652fdd5f314e5bfc6172eaca79cd4806b81031bf2f879d7d1a6050ad4c616c04e6bdf93c2a' - 'b13bea6412580325dba0d02cf0dc712e860f659569ffcb968aa4836fdb2882448cfee4659a675a70affccae02c8d2589d80b7239eef5ae7b615162aeaa76f3bb' - 'cff59f974651614587313674455a968ae5390a5ca825d204f0e2f8de2b422d577b007f5297a398e2afeb33ed0d324d34ad58ff4cd56e645bd4ca9a6bdc1354c5' - '54adbec4b6b85cda901df7d2b3eb1f517f10d3528326e60c7afa4b49ccc7cfb43b0d1f574ceb5d7d03c94a0fbcc97c0ef785258292dd26ed46728355da27332c') -# While it is less elegant, it enables less work to do when migrating to -# newer kernels, as we can reuse the work done by Parabola, Arch Linux, and -# Arch Linux ARM. -# To make it more elegant and still easily maintainable, we would need to -# simplify the kenrel PKGBUILD, and upstream the patches, which requires more -# work, and access to the hardware that the patches apply to, to upstream such -# patches. -source+=(config.aarch64) -sha512sums+=('c1cfd8760c24435938d1f44610c97f34725d79ae8b64e7a5477927fb2b811571229814dd7e3def42a224c2c59d5e59a45ea7b94a1e7b80e764a47c4f6a62156c') - -_replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") -_replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") -_replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}") - -case "$CARCH" in - i686|x86_64) KARCH=x86;; - armv7h) KARCH=arm64;; -esac - -export KBUILD_BUILD_HOST=parabola -export KBUILD_BUILD_USER=$pkgbase -export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" - -prepare() { - cd $_srcname - - if [ "${_srcname##*-}" != "$pkgver" ]; then - msg2 "Applying upstream patch..." - patch -Np1 -i ../patch-${_srcname##*-}-gnu-$pkgver-gnu - fi - - msg2 "Adding freedo as boot logo..." - install -m644 -t drivers/video/logo \ - ../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm} - - msg2 "Setting version..." - scripts/setlocalversion --save-scmversion - echo "-$pkgrel" > localversion.10-pkgrel - echo "${pkgbase#linux-libre}" > localversion.20-pkgname - - if [ "$CARCH" = "armv7h" ]; then - local src_armv7h - for src_armv7h in "${source_armv7h[@]}"; do - src_armv7h="${src_armv7h%%::*}" - src_armv7h="${src_armv7h##*/}" - [[ $src_armv7h = *.patch ]] || continue - msg2 "Applying patch $src_armv7h..." - patch -Np1 < "../$src_armv7h" - done - fi - - local src - for src in "${source[@]}"; do - src="${src%%::*}" - src="${src##*/}" - [[ $src = *.patch ]] || continue - msg2 "Applying patch $src..." - patch -Np1 < "../$src" - done - - msg2 "Setting config..." - cp ../config.aarch64 .config - make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- olddefconfig - - make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -s kernelrelease > version - msg2 "Prepared %s version %s" "$pkgbase" "$(; - images { - kernel@1 { - description = "kernel"; - data = /incbin/("arch/arm/boot/zImage"); - type = "kernel_noload"; - arch = "arm"; - os = "linux"; - compression = "none"; - load = <0>; - entry = <0>; - }; - fdt@1 { - description = "exynos5250-snow.dtb"; - data = /incbin/("arch/arm/boot/dts/exynos5250-snow.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - fdt@2 { - description = "exynos5250-snow-rev5.dtb"; - data = /incbin/("arch/arm/boot/dts/exynos5250-snow-rev5.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - fdt@3 { - description = "exynos5250-spring.dtb"; - data = /incbin/("arch/arm/boot/dts/exynos5250-spring.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - fdt@4 { - description = "exynos5800-peach-pi.dtb"; - data = /incbin/("arch/arm/boot/dts/exynos5800-peach-pi.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1{ - algo = "sha1"; - }; - }; - fdt@5 { - description = "exynos5420-peach-pit.dtb"; - data = /incbin/("arch/arm/boot/dts/exynos5420-peach-pit.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - fdt@6 { - description = "rk3288-veyron-brain.dtb"; - data = /incbin/("arch/arm/boot/dts/rk3288-veyron-brain.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - fdt@7 { - description = "rk3288-veyron-jaq.dtb"; - data = /incbin/("arch/arm/boot/dts/rk3288-veyron-jaq.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - fdt@8 { - description = "rk3288-veyron-jerry.dtb"; - data = /incbin/("arch/arm/boot/dts/rk3288-veyron-jerry.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - fdt@9 { - description = "rk3288-veyron-mickey.dtb"; - data = /incbin/("arch/arm/boot/dts/rk3288-veyron-mickey.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - fdt@10 { - description = "rk3288-veyron-minnie.dtb"; - data = /incbin/("arch/arm/boot/dts/rk3288-veyron-minnie.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - fdt@11 { - description = "rk3288-veyron-pinky.dtb"; - data = /incbin/("arch/arm/boot/dts/rk3288-veyron-pinky.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1{ - algo = "sha1"; - }; - }; - fdt@12 { - description = "rk3288-veyron-speedy.dtb"; - data = /incbin/("arch/arm/boot/dts/rk3288-veyron-speedy.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - fdt@13 { - description = "tegra124-nyan-big.dtb"; - data = /incbin/("arch/arm/boot/dts/tegra124-nyan-big.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - fdt@14 { - description = "tegra124-nyan-blaze.dtb"; - data = /incbin/("arch/arm/boot/dts/tegra124-nyan-blaze.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha1"; - }; - }; - }; - configurations { - default = "conf@1"; - conf@1 { - kernel = "kernel@1"; - fdt = "fdt@1"; - }; - conf@2 { - kernel = "kernel@1"; - fdt = "fdt@2"; - }; - conf@3 { - kernel = "kernel@1"; - fdt = "fdt@3"; - }; - conf@4 { - kernel = "kernel@1"; - fdt = "fdt@4"; - }; - conf@5 { - kernel = "kernel@1"; - fdt = "fdt@5"; - }; - conf@6 { - kernel = "kernel@1"; - fdt = "fdt@6"; - }; - conf@7 { - kernel = "kernel@1"; - fdt = "fdt@7"; - }; - conf@8 { - kernel = "kernel@1"; - fdt = "fdt@8"; - }; - conf@9 { - kernel = "kernel@1"; - fdt = "fdt@9"; - }; - conf@10 { - kernel = "kernel@1"; - fdt = "fdt@10"; - }; - conf@11 { - kernel = "kernel@1"; - fdt = "fdt@11"; - }; - conf@12 { - kernel = "kernel@1"; - fdt = "fdt@12"; - }; - conf@13 { - kernel = "kernel@1"; - fdt = "fdt@13"; - }; - conf@14 { - kernel = "kernel@1"; - fdt = "fdt@14"; - }; - }; -}; diff --git a/kernels/linux-libre-aarch64/kernel.keyblock b/kernels/linux-libre-aarch64/kernel.keyblock deleted file mode 100644 index 9740be4e6..000000000 Binary files a/kernels/linux-libre-aarch64/kernel.keyblock and /dev/null differ diff --git a/kernels/linux-libre-aarch64/kernel_data_key.vbprivk b/kernels/linux-libre-aarch64/kernel_data_key.vbprivk deleted file mode 100644 index 8d392fb29..000000000 Binary files a/kernels/linux-libre-aarch64/kernel_data_key.vbprivk and /dev/null differ diff --git a/kernels/linux-libre-aarch64/linux-armv7h.preset b/kernels/linux-libre-aarch64/linux-armv7h.preset deleted file mode 100644 index ca3832faa..000000000 --- a/kernels/linux-libre-aarch64/linux-armv7h.preset +++ /dev/null @@ -1,10 +0,0 @@ -# mkinitcpio preset file for the '%PKGBASE%' package - -ALL_config="/etc/mkinitcpio.conf" -ALL_kver="%KERNVER%" - -PRESETS=('default') - -#default_config="/etc/mkinitcpio.conf" -default_image="/boot/initramfs-%PKGBASE%.img" -#default_options="" diff --git a/kernels/linux-libre-aarch64/linux-chromebook.install b/kernels/linux-libre-aarch64/linux-chromebook.install deleted file mode 100644 index 02e08464d..000000000 --- a/kernels/linux-libre-aarch64/linux-chromebook.install +++ /dev/null @@ -1,25 +0,0 @@ -flash_kernel() { - major=$(mountpoint -d / | cut -f 1 -d ':') - minor=$(mountpoint -d / | cut -f 2 -d ':') - device=$(cat /proc/partitions | awk {'if ($1 == "'${major}'" && $2 == "'${minor}'") print $4 '}) - device="/dev/${device/%2/1}" - - echo "A new kernel version needs to be flashed onto ${device}." - echo "Do you want to do this now? [y|N]" - read -r shouldwe - if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then - dd if=/boot/vmlinux.kpart of=${device} - sync - else - echo "You can do this later by running:" - echo "# dd if=/boot/vmlinux.kpart of=${device}" - fi -} - -post_install () { - flash_kernel -} - -post_upgrade() { - flash_kernel -} -- cgit v1.2.3