From 001ff9e67cd9f81195b1d6ff71082ede2365421d Mon Sep 17 00:00:00 2001 From: David P Date: Mon, 3 Feb 2020 16:17:01 -0300 Subject: remove [libre-testing] chromebook kernels libre/linux-libre-chromebook is confirmed to work, otherwise I'll build an special CrOS kernel in [libre] Signed-off-by: David P --- ...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 - .../0009-USB-Armory-MkII-support.patch | 555 -- ...15-gt-Detect-if-we-miss-WaIdleLiteRestore.patch | 129 - ...risepoint-Add-missing-Interrupt-Status-re.patch | 35 - ...-iwlwifi-mvm-fix-scan-config-command-size.patch | 48 - ...ert-e1000e-Make-watchdog-use-delayed-work.patch | 174 - libre-testing/linux-libre-cros/PKGBUILD | 328 - libre-testing/linux-libre-cros/config | 9631 -------------------- libre-testing/linux-libre-cros/kernel.its | 217 - libre-testing/linux-libre-cros/kernel.keyblock | Bin 1208 -> 0 bytes .../linux-libre-cros/kernel_data_key.vbprivk | Bin 1199 -> 0 bytes .../linux-libre-cros/linux-libre-cros.install | 26 - libre-testing/linux-libre-cros/linux.preset | 10 - ...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 - .../0003-SMILE-Plug-device-tree-file.patch | 209 - .../0004-fix-mvsdio-eMMC-timing.patch | 38 - ...x-Allow-mac-address-to-be-set-as-a-parame.patch | 95 - .../0006-set-default-cubietruck-led-triggers.patch | 33 - ...odroid-set-higher-minimum-buck2-regulator.patch | 30 - .../0008-ARM-dove-enable-ethernet-on-D3Plug.patch | 31 - libre-testing/linux-libre-veyron/PKGBUILD | 304 - libre-testing/linux-libre-veyron/config | 8926 ------------------ libre-testing/linux-libre-veyron/kernel.its | 217 - libre-testing/linux-libre-veyron/kernel.keyblock | Bin 1208 -> 0 bytes .../linux-libre-veyron/kernel_data_key.vbprivk | Bin 1199 -> 0 bytes .../linux-libre-veyron/linux-libre-veyron.install | 26 - libre-testing/linux-libre-veyron/linux.preset | 10 - 46 files changed, 22695 deletions(-) delete mode 100644 libre-testing/linux-libre-cros/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch delete mode 100644 libre-testing/linux-libre-cros/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch delete mode 100644 libre-testing/linux-libre-cros/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch delete mode 100644 libre-testing/linux-libre-cros/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch delete mode 100644 libre-testing/linux-libre-cros/0002-fix-Atmel-maXTouch-touchscreen-support.patch delete mode 100644 libre-testing/linux-libre-cros/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch delete mode 100644 libre-testing/linux-libre-cros/0003-SMILE-Plug-device-tree-file.patch delete mode 100644 libre-testing/linux-libre-cros/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch delete mode 100644 libre-testing/linux-libre-cros/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch delete mode 100644 libre-testing/linux-libre-cros/0004-fix-mvsdio-eMMC-timing.patch delete mode 100644 libre-testing/linux-libre-cros/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch delete mode 100644 libre-testing/linux-libre-cros/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch delete mode 100644 libre-testing/linux-libre-cros/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch delete mode 100644 libre-testing/linux-libre-cros/0006-set-default-cubietruck-led-triggers.patch delete mode 100644 libre-testing/linux-libre-cros/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch delete mode 100644 libre-testing/linux-libre-cros/0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch delete mode 100644 libre-testing/linux-libre-cros/0008-ARM-dove-enable-ethernet-on-D3Plug.patch delete mode 100644 libre-testing/linux-libre-cros/0009-USB-Armory-MkII-support.patch delete mode 100644 libre-testing/linux-libre-cros/0011-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch delete mode 100644 libre-testing/linux-libre-cros/0012-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch delete mode 100644 libre-testing/linux-libre-cros/0013-Revert-iwlwifi-mvm-fix-scan-config-command-size.patch delete mode 100644 libre-testing/linux-libre-cros/0014-e1000e-Revert-e1000e-Make-watchdog-use-delayed-work.patch delete mode 100644 libre-testing/linux-libre-cros/PKGBUILD delete mode 100644 libre-testing/linux-libre-cros/config delete mode 100644 libre-testing/linux-libre-cros/kernel.its delete mode 100644 libre-testing/linux-libre-cros/kernel.keyblock delete mode 100644 libre-testing/linux-libre-cros/kernel_data_key.vbprivk delete mode 100644 libre-testing/linux-libre-cros/linux-libre-cros.install delete mode 100644 libre-testing/linux-libre-cros/linux.preset delete mode 100644 libre-testing/linux-libre-veyron/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch delete mode 100644 libre-testing/linux-libre-veyron/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch delete mode 100644 libre-testing/linux-libre-veyron/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch delete mode 100644 libre-testing/linux-libre-veyron/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch delete mode 100644 libre-testing/linux-libre-veyron/0003-SMILE-Plug-device-tree-file.patch delete mode 100644 libre-testing/linux-libre-veyron/0004-fix-mvsdio-eMMC-timing.patch delete mode 100644 libre-testing/linux-libre-veyron/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch delete mode 100644 libre-testing/linux-libre-veyron/0006-set-default-cubietruck-led-triggers.patch delete mode 100644 libre-testing/linux-libre-veyron/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch delete mode 100644 libre-testing/linux-libre-veyron/0008-ARM-dove-enable-ethernet-on-D3Plug.patch delete mode 100644 libre-testing/linux-libre-veyron/PKGBUILD delete mode 100644 libre-testing/linux-libre-veyron/config delete mode 100644 libre-testing/linux-libre-veyron/kernel.its delete mode 100644 libre-testing/linux-libre-veyron/kernel.keyblock delete mode 100644 libre-testing/linux-libre-veyron/kernel_data_key.vbprivk delete mode 100644 libre-testing/linux-libre-veyron/linux-libre-veyron.install delete mode 100644 libre-testing/linux-libre-veyron/linux.preset (limited to 'libre-testing') diff --git a/libre-testing/linux-libre-cros/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch b/libre-testing/linux-libre-cros/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch deleted file mode 100644 index 074903c47..000000000 --- a/libre-testing/linux-libre-cros/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/libre-testing/linux-libre-cros/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/libre-testing/linux-libre-cros/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch deleted file mode 100644 index ac423cada..000000000 --- a/libre-testing/linux-libre-cros/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ /dev/null @@ -1,132 +0,0 @@ -From aa6f1974af2dfd6aa8acaefd72036a8b451d15d6 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Mon, 16 Sep 2019 04:53:20 +0200 -Subject: [PATCH 01/14] 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.25.0 - diff --git a/libre-testing/linux-libre-cros/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch b/libre-testing/linux-libre-cros/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch deleted file mode 100644 index e9de435fd..000000000 --- a/libre-testing/linux-libre-cros/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/libre-testing/linux-libre-cros/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch b/libre-testing/linux-libre-cros/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch deleted file mode 100644 index 546120041..000000000 --- a/libre-testing/linux-libre-cros/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/libre-testing/linux-libre-cros/0002-fix-Atmel-maXTouch-touchscreen-support.patch b/libre-testing/linux-libre-cros/0002-fix-Atmel-maXTouch-touchscreen-support.patch deleted file mode 100644 index 5ad26fc9e..000000000 --- a/libre-testing/linux-libre-cros/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/libre-testing/linux-libre-cros/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch b/libre-testing/linux-libre-cros/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch deleted file mode 100644 index d3363291e..000000000 --- a/libre-testing/linux-libre-cros/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 7fbd1ff7b5d08260098c55ab116c23727844d522 Mon Sep 17 00:00:00 2001 -From: Tuowen Zhao -Date: Wed, 16 Oct 2019 15:06:28 -0600 -Subject: [PATCH 02/14] 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.25.0 - diff --git a/libre-testing/linux-libre-cros/0003-SMILE-Plug-device-tree-file.patch b/libre-testing/linux-libre-cros/0003-SMILE-Plug-device-tree-file.patch deleted file mode 100644 index b07e149b7..000000000 --- a/libre-testing/linux-libre-cros/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/libre-testing/linux-libre-cros/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch b/libre-testing/linux-libre-cros/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch deleted file mode 100644 index 8041c279d..000000000 --- a/libre-testing/linux-libre-cros/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 80f53f7d91081d11ecfcc19015f93cafec59adc2 Mon Sep 17 00:00:00 2001 -From: Tuowen Zhao -Date: Wed, 16 Oct 2019 15:06:29 -0600 -Subject: [PATCH 03/14] 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.25.0 - diff --git a/libre-testing/linux-libre-cros/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch b/libre-testing/linux-libre-cros/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch deleted file mode 100644 index 25bd79077..000000000 --- a/libre-testing/linux-libre-cros/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 874a41206f38028c52fb7d28d0cfcdee5febb495 Mon Sep 17 00:00:00 2001 -From: Mika Westerberg -Date: Tue, 29 Oct 2019 20:00:21 +0300 -Subject: [PATCH 04/14] 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.25.0 - diff --git a/libre-testing/linux-libre-cros/0004-fix-mvsdio-eMMC-timing.patch b/libre-testing/linux-libre-cros/0004-fix-mvsdio-eMMC-timing.patch deleted file mode 100644 index 791a546d6..000000000 --- a/libre-testing/linux-libre-cros/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/libre-testing/linux-libre-cros/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch b/libre-testing/linux-libre-cros/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch deleted file mode 100644 index d0a364590..000000000 --- a/libre-testing/linux-libre-cros/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch +++ /dev/null @@ -1,272 +0,0 @@ -From a062a328c43d18ce2f183ab3ad69e6da032feeb2 Mon Sep 17 00:00:00 2001 -From: Mika Westerberg -Date: Tue, 29 Oct 2019 20:00:22 +0300 -Subject: [PATCH 05/14] 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.25.0 - diff --git a/libre-testing/linux-libre-cros/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch b/libre-testing/linux-libre-cros/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch deleted file mode 100644 index e95960163..000000000 --- a/libre-testing/linux-libre-cros/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/libre-testing/linux-libre-cros/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch b/libre-testing/linux-libre-cros/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch deleted file mode 100644 index 9fc0360c1..000000000 --- a/libre-testing/linux-libre-cros/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 1706504ce96ddff9f2155467707f4e39e4f9acb1 Mon Sep 17 00:00:00 2001 -From: "Rafael J. Wysocki" -Date: Thu, 28 Nov 2019 23:50:40 +0100 -Subject: [PATCH 06/14] 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.25.0 - diff --git a/libre-testing/linux-libre-cros/0006-set-default-cubietruck-led-triggers.patch b/libre-testing/linux-libre-cros/0006-set-default-cubietruck-led-triggers.patch deleted file mode 100644 index efbbb49c4..000000000 --- a/libre-testing/linux-libre-cros/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/libre-testing/linux-libre-cros/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch b/libre-testing/linux-libre-cros/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch deleted file mode 100644 index 40413f479..000000000 --- a/libre-testing/linux-libre-cros/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/libre-testing/linux-libre-cros/0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch b/libre-testing/linux-libre-cros/0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch deleted file mode 100644 index 8ca15f181..000000000 --- a/libre-testing/linux-libre-cros/0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch +++ /dev/null @@ -1,36 +0,0 @@ -From a8225afcc3df821f990d024090fbd4e9c84900a7 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 24 Dec 2019 05:18:47 +0100 -Subject: [PATCH 07/14] 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.25.0 - diff --git a/libre-testing/linux-libre-cros/0008-ARM-dove-enable-ethernet-on-D3Plug.patch b/libre-testing/linux-libre-cros/0008-ARM-dove-enable-ethernet-on-D3Plug.patch deleted file mode 100644 index b1687bf5c..000000000 --- a/libre-testing/linux-libre-cros/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/libre-testing/linux-libre-cros/0009-USB-Armory-MkII-support.patch b/libre-testing/linux-libre-cros/0009-USB-Armory-MkII-support.patch deleted file mode 100644 index 4c8f8fed3..000000000 --- a/libre-testing/linux-libre-cros/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/libre-testing/linux-libre-cros/0011-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch b/libre-testing/linux-libre-cros/0011-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch deleted file mode 100644 index d96470a37..000000000 --- a/libre-testing/linux-libre-cros/0011-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 2b2a5485e24df06dcac771fbe169e26236d2a75f Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Mon, 30 Dec 2019 11:15:30 +0000 -Subject: [PATCH 11/14] 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 d564bfcab6a3..49ce15553e7b 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. -@@ -650,13 +643,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. -@@ -675,7 +684,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; -@@ -1150,16 +1158,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.25.0 - diff --git a/libre-testing/linux-libre-cros/0012-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch b/libre-testing/linux-libre-cros/0012-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch deleted file mode 100644 index 42e5e03c0..000000000 --- a/libre-testing/linux-libre-cros/0012-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a5f880ae74a3317bc47838db8715c5b0e6fd156c Mon Sep 17 00:00:00 2001 -From: Boyan Ding -Date: Wed, 1 Jan 2020 11:44:49 -0800 -Subject: [PATCH 12/14] 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.25.0 - diff --git a/libre-testing/linux-libre-cros/0013-Revert-iwlwifi-mvm-fix-scan-config-command-size.patch b/libre-testing/linux-libre-cros/0013-Revert-iwlwifi-mvm-fix-scan-config-command-size.patch deleted file mode 100644 index 7e7306c5b..000000000 --- a/libre-testing/linux-libre-cros/0013-Revert-iwlwifi-mvm-fix-scan-config-command-size.patch +++ /dev/null @@ -1,48 +0,0 @@ -From bb8bf48f4e9ab555fe824358d8d01da52f7d8255 Mon Sep 17 00:00:00 2001 -From: Mehmet Akif Tasova -Date: Mon, 30 Dec 2019 15:48:16 +0200 -Subject: [PATCH 13/14] Revert "iwlwifi: mvm: fix scan config command size" - -Since v5.4-rc1 was released, iwlwifi started throwing errors when scan -commands were sent to the firmware with certain devices (depending on -the OTP burned in the device, which contains the list of available -channels). For instance: - -iwlwifi 0000:00:14.3: FW error in SYNC CMD SCAN_CFG_CMD - -This bug was reported in the ArchLinux bug tracker: -https://bugs.archlinux.org/task/64703 - -And also in a specific case in bugzilla, when the lar_disabled option -was set: https://bugzilla.kernel.org/show_bug.cgi?id=205193 - -Revert the commit that introduced this error, by using the number of -channels from the OTP instead of the number of channels that is -specified in the FW TLV that tells us how many channels it supports. - -This reverts commit 06eb547c4ae4382e70d556ba213d13c95ca1801b. - -Cc: stable@vger.kernel.org # v5.4+ -Signed-off-by: Mehmet Akif Tasova -[ Luca: reworded the commit message a bit. ] -Signed-off-by: Luca Coelho ---- - drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c -index fcafa22ec6ce..8aa567d7912c 100644 ---- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c -+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c -@@ -1220,7 +1220,7 @@ static int iwl_mvm_legacy_config_scan(struct iwl_mvm *mvm) - cmd_size = sizeof(struct iwl_scan_config_v2); - else - cmd_size = sizeof(struct iwl_scan_config_v1); -- cmd_size += num_channels; -+ cmd_size += mvm->fw->ucode_capa.n_scan_channels; - - cfg = kzalloc(cmd_size, GFP_KERNEL); - if (!cfg) --- -2.25.0 - diff --git a/libre-testing/linux-libre-cros/0014-e1000e-Revert-e1000e-Make-watchdog-use-delayed-work.patch b/libre-testing/linux-libre-cros/0014-e1000e-Revert-e1000e-Make-watchdog-use-delayed-work.patch deleted file mode 100644 index 3dc88abba..000000000 --- a/libre-testing/linux-libre-cros/0014-e1000e-Revert-e1000e-Make-watchdog-use-delayed-work.patch +++ /dev/null @@ -1,174 +0,0 @@ -From ddd410cff71ff21a64d66039f30e197314e18e23 Mon Sep 17 00:00:00 2001 -From: Jeff Kirsher -Date: Sat, 4 Jan 2020 23:29:22 -0800 -Subject: [PATCH 14/14] e1000e: Revert "e1000e: Make watchdog use delayed work" - -This reverts commit 59653e6497d16f7ac1d9db088f3959f57ee8c3db. - -This is due to this commit causing driver crashes and connections to -reset unexpectedly. - -Signed-off-by: Jeff Kirsher ---- - drivers/net/ethernet/intel/e1000e/e1000.h | 5 +- - drivers/net/ethernet/intel/e1000e/netdev.c | 54 ++++++++++------------ - 2 files changed, 27 insertions(+), 32 deletions(-) - -diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h -index 6c51b1bad8c4..37a2314d3e6b 100644 ---- a/drivers/net/ethernet/intel/e1000e/e1000.h -+++ b/drivers/net/ethernet/intel/e1000e/e1000.h -@@ -185,13 +185,12 @@ struct e1000_phy_regs { - - /* board specific private data structure */ - struct e1000_adapter { -+ struct timer_list watchdog_timer; - struct timer_list phy_info_timer; - struct timer_list blink_timer; - - struct work_struct reset_task; -- struct delayed_work watchdog_task; -- -- struct workqueue_struct *e1000_workqueue; -+ struct work_struct watchdog_task; - - const struct e1000_info *ei; - -diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c -index d7d56e42a6aa..060daf66bf63 100644 ---- a/drivers/net/ethernet/intel/e1000e/netdev.c -+++ b/drivers/net/ethernet/intel/e1000e/netdev.c -@@ -1780,8 +1780,7 @@ static irqreturn_t e1000_intr_msi(int __always_unused irq, void *data) - } - /* guard against interrupt when we're going down */ - if (!test_bit(__E1000_DOWN, &adapter->state)) -- mod_delayed_work(adapter->e1000_workqueue, -- &adapter->watchdog_task, HZ); -+ mod_timer(&adapter->watchdog_timer, jiffies + 1); - } - - /* Reset on uncorrectable ECC error */ -@@ -1861,8 +1860,7 @@ static irqreturn_t e1000_intr(int __always_unused irq, void *data) - } - /* guard against interrupt when we're going down */ - if (!test_bit(__E1000_DOWN, &adapter->state)) -- mod_delayed_work(adapter->e1000_workqueue, -- &adapter->watchdog_task, HZ); -+ mod_timer(&adapter->watchdog_timer, jiffies + 1); - } - - /* Reset on uncorrectable ECC error */ -@@ -1907,8 +1905,7 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data) - hw->mac.get_link_status = true; - /* guard against interrupt when we're going down */ - if (!test_bit(__E1000_DOWN, &adapter->state)) -- mod_delayed_work(adapter->e1000_workqueue, -- &adapter->watchdog_task, HZ); -+ mod_timer(&adapter->watchdog_timer, jiffies + 1); - } - - if (!test_bit(__E1000_DOWN, &adapter->state)) -@@ -4281,6 +4278,7 @@ void e1000e_down(struct e1000_adapter *adapter, bool reset) - - napi_synchronize(&adapter->napi); - -+ del_timer_sync(&adapter->watchdog_timer); - del_timer_sync(&adapter->phy_info_timer); - - spin_lock(&adapter->stats64_lock); -@@ -5152,11 +5150,25 @@ static void e1000e_check_82574_phy_workaround(struct e1000_adapter *adapter) - } - } - -+/** -+ * e1000_watchdog - Timer Call-back -+ * @data: pointer to adapter cast into an unsigned long -+ **/ -+static void e1000_watchdog(struct timer_list *t) -+{ -+ struct e1000_adapter *adapter = from_timer(adapter, t, watchdog_timer); -+ -+ /* Do the rest outside of interrupt context */ -+ schedule_work(&adapter->watchdog_task); -+ -+ /* TODO: make this use queue_delayed_work() */ -+} -+ - static void e1000_watchdog_task(struct work_struct *work) - { - struct e1000_adapter *adapter = container_of(work, - struct e1000_adapter, -- watchdog_task.work); -+ watchdog_task); - struct net_device *netdev = adapter->netdev; - struct e1000_mac_info *mac = &adapter->hw.mac; - struct e1000_phy_info *phy = &adapter->hw.phy; -@@ -5404,9 +5416,8 @@ static void e1000_watchdog_task(struct work_struct *work) - - /* Reset the timer */ - if (!test_bit(__E1000_DOWN, &adapter->state)) -- queue_delayed_work(adapter->e1000_workqueue, -- &adapter->watchdog_task, -- round_jiffies(2 * HZ)); -+ mod_timer(&adapter->watchdog_timer, -+ round_jiffies(jiffies + 2 * HZ)); - } - - #define E1000_TX_FLAGS_CSUM 0x00000001 -@@ -7259,21 +7270,11 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) - goto err_eeprom; - } - -- adapter->e1000_workqueue = alloc_workqueue("%s", WQ_MEM_RECLAIM, 0, -- e1000e_driver_name); -- -- if (!adapter->e1000_workqueue) { -- err = -ENOMEM; -- goto err_workqueue; -- } -- -- INIT_DELAYED_WORK(&adapter->watchdog_task, e1000_watchdog_task); -- queue_delayed_work(adapter->e1000_workqueue, &adapter->watchdog_task, -- 0); -- -+ timer_setup(&adapter->watchdog_timer, e1000_watchdog, 0); - timer_setup(&adapter->phy_info_timer, e1000_update_phy_info, 0); - - INIT_WORK(&adapter->reset_task, e1000_reset_task); -+ INIT_WORK(&adapter->watchdog_task, e1000_watchdog_task); - INIT_WORK(&adapter->downshift_task, e1000e_downshift_workaround); - INIT_WORK(&adapter->update_phy_task, e1000e_update_phy_task); - INIT_WORK(&adapter->print_hang_task, e1000_print_hw_hang); -@@ -7367,9 +7368,6 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) - return 0; - - err_register: -- flush_workqueue(adapter->e1000_workqueue); -- destroy_workqueue(adapter->e1000_workqueue); --err_workqueue: - if (!(adapter->flags & FLAG_HAS_AMT)) - e1000e_release_hw_control(adapter); - err_eeprom: -@@ -7416,17 +7414,15 @@ static void e1000_remove(struct pci_dev *pdev) - */ - if (!down) - set_bit(__E1000_DOWN, &adapter->state); -+ del_timer_sync(&adapter->watchdog_timer); - del_timer_sync(&adapter->phy_info_timer); - - cancel_work_sync(&adapter->reset_task); -+ cancel_work_sync(&adapter->watchdog_task); - cancel_work_sync(&adapter->downshift_task); - cancel_work_sync(&adapter->update_phy_task); - cancel_work_sync(&adapter->print_hang_task); - -- cancel_delayed_work(&adapter->watchdog_task); -- flush_workqueue(adapter->e1000_workqueue); -- destroy_workqueue(adapter->e1000_workqueue); -- - if (adapter->flags & FLAG_HAS_HW_TIMESTAMP) { - cancel_work_sync(&adapter->tx_hwtstamp_work); - if (adapter->tx_hwtstamp_skb) { --- -2.25.0 - diff --git a/libre-testing/linux-libre-cros/PKGBUILD b/libre-testing/linux-libre-cros/PKGBUILD deleted file mode 100644 index 94f8fab8f..000000000 --- a/libre-testing/linux-libre-cros/PKGBUILD +++ /dev/null @@ -1,328 +0,0 @@ -# Maintainer: David P. - -_replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix -_replacesoldkernels=() # '%' gets replaced with kernel suffix -_replacesoldmodules=() # '%' gets replaced with kernel suffix - -pkgbase=linux-libre-cros -pkgver=5.4.11 -pkgrel=1 -pkgdesc='Linux-libre (Veyron Chromebooks)' -_srctag=v$pkgver-gnu -url="https://git.parabola.nu/~megver83/cros-kernel.git/log/?h=$_srctag" -arch=(armv7h) -license=(GPL2) -makedepends=( - bc kmod libelf - xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick - git - uboot-tools vboot-utils dtc -) -options=('!strip') -_srcname=cros-kernel -source=( - "git+https://git.parabola.nu/~megver83/cros-kernel.git?signed#tag=$_srctag" - "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig} - config # the main kernel config files - linux.preset # 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-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch - #0009-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch - #0010-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch - 0011-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch - 0012-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch - 0013-Revert-iwlwifi-mvm-fix-scan-config-command-size.patch - 0014-e1000e-Revert-e1000e-Make-watchdog-use-delayed-work.patch - - # 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=( - '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. -) -sha512sums=('SKIP' - '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' - 'SKIP' - '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78' - 'SKIP' - '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' - 'SKIP' - '23d68ec52bf124d336c3357afd3405ae5904d0b3d48bdc10cbe0948dc8c1cd9152653cbc2ebe8c4d0240498e85f5ccd966878aa3a17c5fadf74dbde742df348d' - 'f01e7925b262d2874a8a991b1f27d057356a2a384d2012b61be5a631d4e4d7cf87461c8fb9e7f183831f5a829ad204897f1f0545a52df6288a0e04a5c2e31b96' - '167bc73c6c1c63931806238905dc44c7d87c5a5c0f6293159f2133dfe717fb44081018d810675716d1605ec7dff5e8333b87b19e09e2de21d0448e447437873b' - 'bb6718984a7357c9b00c37e4788480e5b8b75018c172ecc1441bc3fc5d2d42444eb5d8c7f9d2e3a7d6fed6d03acb565e3c0559486e494c40a7fe6bd0570c9ede' - '143dea30c6da00e504c99984a98a0eb2411f558fcdd9dfa7f607d6c14e9e7dffff9cb00121d9317044b07e3e210808286598c785ee854084b993ec9cb14d8232' - '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' - 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - '8ec487a1f8444f0ad1cc41e90fb96ba5b9755a04ad488a83ff16c85ccf0f69441b8eff6f5cea9a31cca6de3dfb2524fa2eb7ac73529a512d5ed492a8fd7d18dc' - 'cf69e14fa7e4755cba74592b3be886d253ea92f120052f46df843fe013954ba41dbe1e9eef13335ca6e12b03072f610692c8304141965650cfab40a69fbeb835' - 'c0ed4c20b9b6e705ce819fb766db53bff691495b53e2050a8dc110d361d7e55ec1e260fbd4a2c0076f097aa02b5ea3e0fcbe97b890253248d8b094a10981c4b3' - 'bc68605e05dc39b6553f721752b8acc604f286adb41f2b50518ffc98e33ac70d69ff08a5db037782da8791acd402b79636b8d7de4777e80fecbdc5cfa07d00cb' - '2ce5ecf3e6a0ba6c3d0adf81c7a80ed6a6918ebb88f41a962e158c5d19d9e5ddc7cbbe2ee0723db4442cc1dfd21e43d0169a97bebe200a4fc3860b2ecf9a848d' - '381b862dd5f389b374066d441da5b997de6cff591cab385cf71bf2ec620f113c649a3b35dba17f2e5b0a2123c89d63c6e009f32f0b59a532d73df05f4be77251' - 'fef25b81b1363fe287e33623f29e965e496a3be6ebf82a55b06211a5a81f7d361f47cda0f104f67bc009714de342bee1459b254cfd66ed804f72cc1a01a3a1af' - '8ddbe5e42882743090e03a1ee078944a371354e62229e06efd44dff8855fbbe0545677609f4fb95b7252e601664464cb8c290cf31d24876329f714d9371f1b3c' - 'bd41ec9d26c2df10659fd5222bd48987e3012d1546a3d5b0722be6e390ada1bd4a65d5f0747931c16bd27a832ec3b41e0a930fc62fee9a4a38e965744b4f6979' - '71f23dd88eb84363c6240fea28dc6044ba51fb0ba0f4c54820aba65b3341c3ecd74306919576514d68ad22e89e50cdd59ab7bc924703293696f7356f7cb95375' - 'dd05c54c1ac94402c248a1d54a36b781c6e230e0fcddba9cabcbda4910a784a21d5b8e716eae6339841ff1195ccc2a3df1e748fd4f933403ae067029290e98f0' - 'b576a9c40ba59485c350f71b9234d9e71f245e25b26382bd2f67019f3309c3b5705a6020eae0a9dfccacc763fb2056a5937c0a8ff4e64f99ba1d60f0b2acb03f' - '85a13a274d4cbaca3ddbe8eaf883f1a1184765f8d09d6d40bb32defbe0876cb0153513e8db8671d7fc053e383ced793b74245ff29364a760e1a52bb36ebc8e85' - 'f9ce0bb4f06be6f742d8a31384e90fdab1a4686f14d5a8845e0c341dcfa62ae59db933237174223de9b32f9d91f99125c20ede7dff664755f1d42ea0cecdefdb' - 'b32623904f984118ebdd8ec31816885d73776ed80a68fa23925e67451f28a8f080dd8545307bb2f857435894adfa8b3db7c8a99aa02b8b3f2b5f8e3223d98a47' - 'd114f1e69504413e81dd67684f5b1ce69aa09d5bc768c7eee96a7d6b7ec47b32cd8f02593c878b0e9091475467de36a3d7c478e34a39148fa849548f53637b84' - 'bc0c6b1726679498393be8d4c417c62e1f356fe5c617c71ff23532652fdd5f314e5bfc6172eaca79cd4806b81031bf2f879d7d1a6050ad4c616c04e6bdf93c2a' - 'b13bea6412580325dba0d02cf0dc712e860f659569ffcb968aa4836fdb2882448cfee4659a675a70affccae02c8d2589d80b7239eef5ae7b615162aeaa76f3bb' - 'cff59f974651614587313674455a968ae5390a5ca825d204f0e2f8de2b422d577b007f5297a398e2afeb33ed0d324d34ad58ff4cd56e645bd4ca9a6bdc1354c5' - '54adbec4b6b85cda901df7d2b3eb1f517f10d3528326e60c7afa4b49ccc7cfb43b0d1f574ceb5d7d03c94a0fbcc97c0ef785258292dd26ed46728355da27332c') - -_replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") -_replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") -_replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}") - -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 - - 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 - - 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 .config - make olddefconfig - - make -s kernelrelease > version - msg2 "Prepared %s version %s" "$pkgbase" "$( cmdline - - msg2 "Creating kernel sign..." - vbutil_kernel \ - --pack vmlinux.kpart \ - --version 1 \ - --vmlinuz kernel.signed \ - --arch arm \ - --keyblock ../kernel.keyblock \ - --signprivate ../kernel_data_key.vbprivk \ - --config cmdline \ - --bootloader bootloader.bin - - msg2 "Installing kernel sign..." - cp vmlinux.kpart "$pkgdir/boot" - - msg2 "Fixing permissions..." - chmod -Rc u=rwX,go=rX "$pkgdir" -} - -_package-headers() { - pkgdesc="Header files and scripts for building modules for $pkgdesc kernel" - provides=("${_replacesarchkernel[@]/%/-headers=$pkgver}") - conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") - replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") - - cd $_srcname - local builddir="$pkgdir/usr/lib/modules/$(; - 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/libre-testing/linux-libre-cros/kernel.keyblock b/libre-testing/linux-libre-cros/kernel.keyblock deleted file mode 100644 index 9740be4e6..000000000 Binary files a/libre-testing/linux-libre-cros/kernel.keyblock and /dev/null differ diff --git a/libre-testing/linux-libre-cros/kernel_data_key.vbprivk b/libre-testing/linux-libre-cros/kernel_data_key.vbprivk deleted file mode 100644 index 8d392fb29..000000000 Binary files a/libre-testing/linux-libre-cros/kernel_data_key.vbprivk and /dev/null differ diff --git a/libre-testing/linux-libre-cros/linux-libre-cros.install b/libre-testing/linux-libre-cros/linux-libre-cros.install deleted file mode 100644 index 05264329e..000000000 --- a/libre-testing/linux-libre-cros/linux-libre-cros.install +++ /dev/null @@ -1,26 +0,0 @@ -post_install () { - if mountpoint -q /boot; then - major=$(mountpoint -d /boot | cut -f 1 -d ':') - minor=$(mountpoint -d /boot | cut -f 2 -d ':') - else - major=$(mountpoint -d / | cut -f 1 -d ':') - minor=$(mountpoint -d / | cut -f 2 -d ':') - fi - device=$(awk {'if ($1 == "'$major'" && $2 == "'$minor'") print $4 '} /proc/partitions) - 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_upgrade() { - post_install -} diff --git a/libre-testing/linux-libre-cros/linux.preset b/libre-testing/linux-libre-cros/linux.preset deleted file mode 100644 index ca3832faa..000000000 --- a/libre-testing/linux-libre-cros/linux.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/libre-testing/linux-libre-veyron/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch b/libre-testing/linux-libre-veyron/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch deleted file mode 100644 index 35b77d3ec..000000000 --- a/libre-testing/linux-libre-veyron/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 311f37a47e903b459dabc396494ac1621fb2d78b 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 6b335a9ff8c8..614150b53643 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.19.0 - diff --git a/libre-testing/linux-libre-veyron/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/libre-testing/linux-libre-veyron/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch deleted file mode 100644 index f93022e50..000000000 --- a/libre-testing/linux-libre-veyron/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 6136ffb3d88e9f044260f8288d2d0a1edd64379e Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Mon, 16 Sep 2019 04:53:20 +0200 -Subject: [PATCH] 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 bd7d650d4a99..658f9c052151 100644 ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -1091,6 +1091,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 541fd805fb88..ffd57c812153 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 -@@ -1788,6 +1793,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. -@@ -2819,6 +2828,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 078950d9605b..baead3605bbe 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; -@@ -545,6 +548,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.23.0 - diff --git a/libre-testing/linux-libre-veyron/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch b/libre-testing/linux-libre-veyron/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch deleted file mode 100644 index e9de435fd..000000000 --- a/libre-testing/linux-libre-veyron/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/libre-testing/linux-libre-veyron/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch b/libre-testing/linux-libre-veyron/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch deleted file mode 100644 index 9ab38253d..000000000 --- a/libre-testing/linux-libre-veyron/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 978d7f01eacdb7af7d87dc4c6811b9ff7f19f5cd 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 41fa7316c52b..807ed160a4b9 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) -@@ -180,6 +180,12 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space) - initrd_start); - setprop_cell(fdt, "/chosen", "linux,initrd-end", - initrd_start + initrd_size); -+ } 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.19.0 - diff --git a/libre-testing/linux-libre-veyron/0003-SMILE-Plug-device-tree-file.patch b/libre-testing/linux-libre-veyron/0003-SMILE-Plug-device-tree-file.patch deleted file mode 100644 index 02eca7c31..000000000 --- a/libre-testing/linux-libre-veyron/0003-SMILE-Plug-device-tree-file.patch +++ /dev/null @@ -1,209 +0,0 @@ -From 96a2824045c5dff3c3ccb5e01813f5ec6372bde0 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 b5bd3de87c33..547603bafae1 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -1138,6 +1138,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.19.0 - diff --git a/libre-testing/linux-libre-veyron/0004-fix-mvsdio-eMMC-timing.patch b/libre-testing/linux-libre-veyron/0004-fix-mvsdio-eMMC-timing.patch deleted file mode 100644 index 19ef6c0ac..000000000 --- a/libre-testing/linux-libre-veyron/0004-fix-mvsdio-eMMC-timing.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 43be8213a90dae909f838dedbc5e8a1e82b9572d 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 e22bbff89c8d..6b30c850ce07 100644 ---- a/drivers/mmc/host/mvsdio.c -+++ b/drivers/mmc/host/mvsdio.c -@@ -93,7 +93,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", -@@ -616,6 +616,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.19.0 - diff --git a/libre-testing/linux-libre-veyron/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch b/libre-testing/linux-libre-veyron/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch deleted file mode 100644 index 18e2a7875..000000000 --- a/libre-testing/linux-libre-veyron/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 6e0372c8fec9db69e88a19c3a70a4c3a730fd743 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 262e7a3c23cb..c2b3c5b6e1f3 100644 ---- a/drivers/net/usb/smsc95xx.c -+++ b/drivers/net/usb/smsc95xx.c -@@ -60,6 +60,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) - -@@ -82,6 +83,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) - { -@@ -913,8 +918,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.19.0 - diff --git a/libre-testing/linux-libre-veyron/0006-set-default-cubietruck-led-triggers.patch b/libre-testing/linux-libre-veyron/0006-set-default-cubietruck-led-triggers.patch deleted file mode 100644 index 4bed39a6b..000000000 --- a/libre-testing/linux-libre-veyron/0006-set-default-cubietruck-led-triggers.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b22d8cc1d2763b4abbc6587dff148be3be683ac0 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 5649161de1d7..2be64a886555 100644 ---- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts -+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts -@@ -80,6 +80,7 @@ - blue { - label = "cubietruck:blue:usr"; - gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "heartbeat"; - }; - - orange { -@@ -95,6 +96,7 @@ - green { - label = "cubietruck:green:usr"; - gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "mmc0"; - }; - }; - --- -2.19.0 - diff --git a/libre-testing/linux-libre-veyron/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch b/libre-testing/linux-libre-veyron/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch deleted file mode 100644 index 5b5d345e7..000000000 --- a/libre-testing/linux-libre-veyron/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch +++ /dev/null @@ -1,30 +0,0 @@ -From eaea91920f1836c32a5cdb09eb7054af16b88a27 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 a09e46c9dbc0..d8117a820812 100644 ---- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi -+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi -@@ -423,7 +423,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.19.0 - diff --git a/libre-testing/linux-libre-veyron/0008-ARM-dove-enable-ethernet-on-D3Plug.patch b/libre-testing/linux-libre-veyron/0008-ARM-dove-enable-ethernet-on-D3Plug.patch deleted file mode 100644 index 6e2d97eab..000000000 --- a/libre-testing/linux-libre-veyron/0008-ARM-dove-enable-ethernet-on-D3Plug.patch +++ /dev/null @@ -1,31 +0,0 @@ -From a3aab9208da801924ba6211998b31571ed564fcd 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.19.0 - diff --git a/libre-testing/linux-libre-veyron/PKGBUILD b/libre-testing/linux-libre-veyron/PKGBUILD deleted file mode 100644 index 4ee5e99f6..000000000 --- a/libre-testing/linux-libre-veyron/PKGBUILD +++ /dev/null @@ -1,304 +0,0 @@ -# Maintainer: David P. - -_replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix -_replacesoldkernels=() # '%' gets replaced with kernel suffix -_replacesoldmodules=() # '%' gets replaced with kernel suffix - -pkgbase=linux-libre-veyron -pkgver=4.19.94 -pkgrel=1 -pkgdesc='Veyron Chromebooks Linux-libre' -_srctag=v$pkgver-gnu -url="https://git.parabola.nu/~megver83/cros-kernel.git/log/?h=$_srctag" -arch=(armv7h) -license=(GPL2) -makedepends=( - bc kmod libelf - xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick - git - uboot-tools vboot-utils dtc -) -options=('!strip') -_srcname=cros-kernel -source=( - "git+https://git.parabola.nu/~megver83/cros-kernel.git?signed#tag=$_srctag" - "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig} - config # the main kernel config file - linux.preset # armv7h preset file for mkinitcpio ramdisk - "kernel"{.its,.keyblock,_data_key.vbprivk} # files for signing veyron 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 - # linux-lts patches - 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch - - # 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 - - # tmp - 'fix.patch::https://git.parabola.nu/~megver83/cros-kernel.git/patch/?id=133e2f5dac79e64119867e32af7db9997e112133' -) -validpgpkeys=( - '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. -) -sha512sums=('SKIP' - '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' - 'SKIP' - '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78' - 'SKIP' - '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' - 'SKIP' - '472da4c5339824bdd7172e90b474e5092fd91f1b2c3a03b050832372ef496c849f1baa61ce06e7d79b4fec247acac4933086a25b9215b97488e180daf16c41ef' - 'f01e7925b262d2874a8a991b1f27d057356a2a384d2012b61be5a631d4e4d7cf87461c8fb9e7f183831f5a829ad204897f1f0545a52df6288a0e04a5c2e31b96' - '167bc73c6c1c63931806238905dc44c7d87c5a5c0f6293159f2133dfe717fb44081018d810675716d1605ec7dff5e8333b87b19e09e2de21d0448e447437873b' - 'bb6718984a7357c9b00c37e4788480e5b8b75018c172ecc1441bc3fc5d2d42444eb5d8c7f9d2e3a7d6fed6d03acb565e3c0559486e494c40a7fe6bd0570c9ede' - '143dea30c6da00e504c99984a98a0eb2411f558fcdd9dfa7f607d6c14e9e7dffff9cb00121d9317044b07e3e210808286598c785ee854084b993ec9cb14d8232' - '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' - '5f196378d50dd737d727e424d8f31b7fa8a6b92ba88f0a1467ef79bc37a097160da1fc1fd5cfb4b8983f36f2afdf27eb229ec61b35a15ac2343d660eb416a230' - '60aa432465eb3ac10f565799d3dfecea21aaf08e83909c1161d9359e932626edbd1353e712d616c3d785c65a0f699e9c45df35bd9e86365c25399c6b2d45b9e4' - '86809feb5ae2759b449ec0cb7a6b3fb457874ed82a72dfda00607e8819c804a0714b5d6a17cbbba44996a36872224af42d1b85f1b3932f43bccb419041d25dc7' - '746acff348d62b3ed4e62cd9976ddf0af47f87bd3cffda90cbb00a6b57d589ccb681fcd9541ee5bdd179d95dad71d57c77cb1a60faee1c6cef518e4055c3456f' - 'c945e871fa456b521ced77cae9081bcdc47d836ecdabe6766e373681fe11fda3e5a7a3c16f70c586be64a1eb5c9136c43b0a44df897298940fd8703b50b0a543' - '054e98a2d1ea83cece1fe55ae087b282f25593022f252c74612d4aeb2a547f84ea626e3d982098ca798271af55f3b733ac2aea2fc0d9cad031802d2901dfe4ca' - '4433f9e780a72347313916c8a9cbcbce3a8c40e1b299e887dc748d257879fb5fab8f1683936339f73a4d4b4ef668b1ed6cc0d9a19ed4bd99039a1613ac08610e' - 'd1361d23ae79599e3fa94cba206bd40764f9eee0c584e639af13828dabb7f0dfa361792c098b5afae0bb350407b2dc47a1d67580daeade7a4f3e3e55e42c8470' - 'c1653f91067d31801a23450175e47968add147477caf20aec6092831739641312f4ad995af43c7e55545007279016b5f62a0720d31e4591b4421a65b8bd5b398' - '467af0fa091752473da7a531e2cd2410fec96c00829c1297eca5a37c1300cf068160066319ada182e40ac14d440973ee7e425c6efa476cd097218538c094409b') - -_replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") -_replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") -_replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}") - -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 - - 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 - - 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 .config - make olddefconfig - - make -s kernelrelease > version - msg2 "Prepared %s version %s" "$pkgbase" "$( cmdline - - msg2 "Creating kernel sign..." - vbutil_kernel \ - --pack vmlinux.kpart \ - --version 1 \ - --vmlinuz kernel.signed \ - --arch arm \ - --keyblock ../kernel.keyblock \ - --signprivate ../kernel_data_key.vbprivk \ - --config cmdline \ - --bootloader bootloader.bin - - msg2 "Installing kernel sign..." - cp vmlinux.kpart "$pkgdir/boot" - - msg2 "Fixing permissions..." - chmod -Rc u=rwX,go=rX "$pkgdir" -} - -_package-headers() { - pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel" - provides=("${_replacesarchkernel[@]/%/-headers=$pkgver}") - conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") - replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") - - cd $_srcname - local builddir="$pkgdir/usr/lib/modules/$(; - 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/libre-testing/linux-libre-veyron/kernel.keyblock b/libre-testing/linux-libre-veyron/kernel.keyblock deleted file mode 100644 index 9740be4e6..000000000 Binary files a/libre-testing/linux-libre-veyron/kernel.keyblock and /dev/null differ diff --git a/libre-testing/linux-libre-veyron/kernel_data_key.vbprivk b/libre-testing/linux-libre-veyron/kernel_data_key.vbprivk deleted file mode 100644 index 8d392fb29..000000000 Binary files a/libre-testing/linux-libre-veyron/kernel_data_key.vbprivk and /dev/null differ diff --git a/libre-testing/linux-libre-veyron/linux-libre-veyron.install b/libre-testing/linux-libre-veyron/linux-libre-veyron.install deleted file mode 100644 index 427db6f03..000000000 --- a/libre-testing/linux-libre-veyron/linux-libre-veyron.install +++ /dev/null @@ -1,26 +0,0 @@ -post_install() { - if mountpoint -q /boot; then - major=$(mountpoint -d /boot | cut -f 1 -d ':') - minor=$(mountpoint -d /boot | cut -f 2 -d ':') - else - major=$(mountpoint -d / | cut -f 1 -d ':') - minor=$(mountpoint -d / | cut -f 2 -d ':') - fi - device=$(awk {'if ($1 == "'$major'" && $2 == "'$minor'") print $4 '} /proc/partitions) - 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_upgrade() { - post_install -} diff --git a/libre-testing/linux-libre-veyron/linux.preset b/libre-testing/linux-libre-veyron/linux.preset deleted file mode 100644 index ca3832faa..000000000 --- a/libre-testing/linux-libre-veyron/linux.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="" -- cgit v1.2.3