From 9c272dd3e42a51c1343ed4fad54ac38bb97349dd Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 28 Nov 2019 11:17:20 -0800 Subject: [PATCH 01/12] ucert: update to latest git HEAD e4bd927 cast ucert_argv to proper type when passing to execv Fixes warnings: warning: passing argument 2 of 'execv' from incompatible pointer type [-Wincompatible-pointer-types] 254 | execv(usign_argv[0], usign_argv) Signed-off-by: Daniel Golle --- package/system/ucert/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/ucert/Makefile b/package/system/ucert/Makefile index 6c1db9390d..3e8935c9a0 100644 --- a/package/system/ucert/Makefile +++ b/package/system/ucert/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ucert.git -PKG_SOURCE_DATE:=2018-09-18 -PKG_SOURCE_VERSION:=e1c722b1b6cbf2527b3178342464e56b97825874 -PKG_MIRROR_HASH:=36dcca7c2d649a6c34a8daaaef4698fbeb808fd6580c6bfb1ca35f4f06825d17 +PKG_SOURCE_DATE:=2019-11-29 +PKG_SOURCE_VERSION:=e4bd927cc7c756de5f3005824b63a7a6d827e1ee +PKG_MIRROR_HASH:=cc6853e861110dd89cc8bd909c5f02150c2c3f9a77de66017393515644a7ac36 CMAKE_INSTALL:=1 PKG_CHECK_FORMAT_SECURITY:=1 From 414b7c107aaa0e037b3f352e0650bbc429db41a7 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 25 Nov 2019 11:29:17 +0100 Subject: [PATCH 02/12] kernel: bump 4.14 to 4.14.156 Refreshed all patches. Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte --- include/kernel-version.mk | 4 ++-- .../cns3xxx/patches-4.14/070-i2c_support.patch | 2 +- ...-pinctrl-gemini-Add-missing-functions.patch | 2 +- ...-pinctrl-gemini-Use-generic-DT-parser.patch | 2 +- ...ini-Implement-clock-skew-delay-config.patch | 6 +++--- .../0007-pinctrl-gemini-Fix-GMAC-groups.patch | 16 ++++++++-------- ...rl-gemini-Add-two-missing-GPIO-groups.patch | 2 +- ...nctrl-gemini-Fix-usage-of-3512-groups.patch | 2 +- ...gemini-Support-drive-strength-setting.patch | 18 +++++++++--------- ...bles-remove-multihook-chains-and-fami.patch | 6 +++--- ...bles-add-single-table-list-for-all-fa.patch | 10 +++++----- ...d-generic-parsing-of-linux-part-probe.patch | 4 ++-- ...low-to-set-regulator-without-opp_list.patch | 2 +- ...ort-adjusting-OPP-voltages-at-runtime.patch | 2 +- ...lper-to-get-an-opp-regulator-for-devi.patch | 2 +- ...he-voltage-tolerance-when-adjusting-t.patch | 4 ++-- .../807-usb-support-layerscape.patch | 4 ++-- .../810-kvm-support-layerscape.patch | 14 +++++++------- .../813-ifc-nor-nand-support-layerscape.patch | 2 +- .../816-pcie-support-layerscape.patch | 12 ++++++------ ...xup-test-building-of-MediaTek-clock-d.patch | 4 ++-- .../oxnas/patches-4.14/500-oxnas-sata.patch | 2 +- .../0044-i2c-MIPS-adds-ralink-I2C-driver.patch | 2 +- .../0045-i2c-add-mt7621-driver.patch | 2 +- 24 files changed, 63 insertions(+), 63 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index e8be42afc4..90a548fa4b 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -7,11 +7,11 @@ ifdef CONFIG_TESTING_KERNEL endif LINUX_VERSION-4.9 = .202 -LINUX_VERSION-4.14 = .155 +LINUX_VERSION-4.14 = .156 LINUX_VERSION-4.19 = .85 LINUX_KERNEL_HASH-4.9.202 = 8108ec1cd10fc40821c84e9f087dba10b1767aad66596f4a36925faef55e4ebf -LINUX_KERNEL_HASH-4.14.155 = 77d61979556b81c95b81452fa10e1fe9368cbe2f9f80a13e4669b0464722e481 +LINUX_KERNEL_HASH-4.14.156 = f8889feb0cbd7df36ff35bd4c72c1e2010567621bfcb218fcfa501bc5c7787c0 LINUX_KERNEL_HASH-4.19.85 = 7bf435970aeeafd46263f49730087a61c4858d8b8fc5a4002ceac971b45f4fb7 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/cns3xxx/patches-4.14/070-i2c_support.patch b/target/linux/cns3xxx/patches-4.14/070-i2c_support.patch index bacec36085..53a6f7ff5e 100644 --- a/target/linux/cns3xxx/patches-4.14/070-i2c_support.patch +++ b/target/linux/cns3xxx/patches-4.14/070-i2c_support.patch @@ -1,6 +1,6 @@ --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -473,6 +473,18 @@ config I2C_CBUS_GPIO +@@ -474,6 +474,18 @@ config I2C_CBUS_GPIO This driver can also be built as a module. If so, the module will be called i2c-cbus-gpio. diff --git a/target/linux/gemini/patches-4.14/0002-pinctrl-gemini-Add-missing-functions.patch b/target/linux/gemini/patches-4.14/0002-pinctrl-gemini-Add-missing-functions.patch index 604fee469c..d4e93f88b2 100644 --- a/target/linux/gemini/patches-4.14/0002-pinctrl-gemini-Add-missing-functions.patch +++ b/target/linux/gemini/patches-4.14/0002-pinctrl-gemini-Add-missing-functions.patch @@ -14,7 +14,7 @@ Signed-off-by: Linus Walleij --- a/drivers/pinctrl/pinctrl-gemini.c +++ b/drivers/pinctrl/pinctrl-gemini.c -@@ -2074,6 +2074,16 @@ static const struct gemini_pmx_func gemi +@@ -2102,6 +2102,16 @@ static const struct gemini_pmx_func gemi .num_groups = ARRAY_SIZE(satagrps), }, { diff --git a/target/linux/gemini/patches-4.14/0005-pinctrl-gemini-Use-generic-DT-parser.patch b/target/linux/gemini/patches-4.14/0005-pinctrl-gemini-Use-generic-DT-parser.patch index 5b0bba1cd4..f9debdd900 100644 --- a/target/linux/gemini/patches-4.14/0005-pinctrl-gemini-Use-generic-DT-parser.patch +++ b/target/linux/gemini/patches-4.14/0005-pinctrl-gemini-Use-generic-DT-parser.patch @@ -34,7 +34,7 @@ Signed-off-by: Linus Walleij #include #include #include -@@ -1918,73 +1920,13 @@ static void gemini_pin_dbg_show(struct p +@@ -1946,73 +1948,13 @@ static void gemini_pin_dbg_show(struct p seq_printf(s, " " DRIVER_NAME); } diff --git a/target/linux/gemini/patches-4.14/0006-pinctrl-gemini-Implement-clock-skew-delay-config.patch b/target/linux/gemini/patches-4.14/0006-pinctrl-gemini-Implement-clock-skew-delay-config.patch index 4bff3bce9c..87a051e1b2 100644 --- a/target/linux/gemini/patches-4.14/0006-pinctrl-gemini-Implement-clock-skew-delay-config.patch +++ b/target/linux/gemini/patches-4.14/0006-pinctrl-gemini-Implement-clock-skew-delay-config.patch @@ -97,7 +97,7 @@ Signed-off-by: Linus Walleij #define GLOBAL_MISC_CTRL 0x30 #define TVC_CLK_PAD_ENABLE BIT(20) #define PCI_CLK_PAD_ENABLE BIT(17) -@@ -1925,7 +1946,7 @@ static const struct pinctrl_ops gemini_p +@@ -1953,7 +1974,7 @@ static const struct pinctrl_ops gemini_p .get_group_name = gemini_get_group_name, .get_group_pins = gemini_get_group_pins, .pin_dbg_show = gemini_pin_dbg_show, @@ -106,7 +106,7 @@ Signed-off-by: Linus Walleij .dt_free_map = pinconf_generic_dt_free_map, }; -@@ -2203,10 +2224,155 @@ static const struct pinmux_ops gemini_pm +@@ -2232,10 +2253,155 @@ static const struct pinmux_ops gemini_pm .set_mux = gemini_pmx_set_mux, }; @@ -262,7 +262,7 @@ Signed-off-by: Linus Walleij .owner = THIS_MODULE, }; -@@ -2249,11 +2415,15 @@ static int gemini_pmx_probe(struct platf +@@ -2278,11 +2444,15 @@ static int gemini_pmx_probe(struct platf val &= 0xffff; if (val == 0x3512) { pmx->is_3512 = true; diff --git a/target/linux/gemini/patches-4.14/0007-pinctrl-gemini-Fix-GMAC-groups.patch b/target/linux/gemini/patches-4.14/0007-pinctrl-gemini-Fix-GMAC-groups.patch index 902168ba62..4a4dae34ca 100644 --- a/target/linux/gemini/patches-4.14/0007-pinctrl-gemini-Fix-GMAC-groups.patch +++ b/target/linux/gemini/patches-4.14/0007-pinctrl-gemini-Fix-GMAC-groups.patch @@ -55,7 +55,7 @@ Signed-off-by: Linus Walleij }; static const unsigned int pci_3512_pins[] = { -@@ -668,10 +678,10 @@ static const unsigned int gpio1c_3512_pi +@@ -671,10 +681,10 @@ static const unsigned int gpio1c_3512_pi /* The GPIO1D (28-31) pins overlap with LCD and TVC */ static const unsigned int gpio1d_3512_pins[] = { 246, 319, 301, 283 }; @@ -68,7 +68,7 @@ Signed-off-by: Linus Walleij static const unsigned int gpio2b_3512_pins[] = { 262, 244, 317, 299 }; /* The GPIO2C (8-31) pins overlap with PCI */ -@@ -738,9 +748,16 @@ static const struct gemini_pin_group gem +@@ -741,9 +751,16 @@ static const struct gemini_pin_group gem .num_pins = ARRAY_SIZE(usb_3512_pins), }, { @@ -88,7 +88,7 @@ Signed-off-by: Linus Walleij }, { .name = "pcigrp", -@@ -954,14 +971,15 @@ static const struct gemini_pin_group gem +@@ -963,14 +980,15 @@ static const struct gemini_pin_group gem .name = "gpio2agrp", .pins = gpio2a_3512_pins, .num_pins = ARRAY_SIZE(gpio2a_3512_pins), @@ -107,7 +107,7 @@ Signed-off-by: Linus Walleij }, { .name = "gpio2cgrp", -@@ -1441,9 +1459,12 @@ static const unsigned int usb_3516_pins[ +@@ -1450,9 +1468,12 @@ static const unsigned int usb_3516_pins[ }; /* GMII, ethernet pins */ @@ -123,7 +123,7 @@ Signed-off-by: Linus Walleij }; static const unsigned int pci_3516_pins[] = { -@@ -1585,10 +1606,10 @@ static const unsigned int gpio1c_3516_pi +@@ -1600,10 +1621,10 @@ static const unsigned int gpio1c_3516_pi /* The GPIO1D (28-31) pins overlap with TVC */ static const unsigned int gpio1d_3516_pins[] = { 353, 311, 394, 374 }; @@ -136,7 +136,7 @@ Signed-off-by: Linus Walleij static const unsigned int gpio2b_3516_pins[] = { 391, 351, 310, 371 }; /* The GPIO2C (8-31) pins overlap with PCI */ -@@ -1660,9 +1681,16 @@ static const struct gemini_pin_group gem +@@ -1675,9 +1696,16 @@ static const struct gemini_pin_group gem .num_pins = ARRAY_SIZE(usb_3516_pins), }, { @@ -156,7 +156,7 @@ Signed-off-by: Linus Walleij }, { .name = "pcigrp", -@@ -1861,14 +1889,15 @@ static const struct gemini_pin_group gem +@@ -1889,14 +1917,15 @@ static const struct gemini_pin_group gem .name = "gpio2agrp", .pins = gpio2a_3516_pins, .num_pins = ARRAY_SIZE(gpio2a_3516_pins), @@ -175,7 +175,7 @@ Signed-off-by: Linus Walleij }, { .name = "gpio2cgrp", -@@ -1971,7 +2000,7 @@ static const char * const icegrps[] = { +@@ -1999,7 +2028,7 @@ static const char * const icegrps[] = { static const char * const idegrps[] = { "idegrp" }; static const char * const satagrps[] = { "satagrp" }; static const char * const usbgrps[] = { "usbgrp" }; diff --git a/target/linux/gemini/patches-4.14/0009-pinctrl-gemini-Add-two-missing-GPIO-groups.patch b/target/linux/gemini/patches-4.14/0009-pinctrl-gemini-Add-two-missing-GPIO-groups.patch index 46fc102c1d..dfb93f6ade 100644 --- a/target/linux/gemini/patches-4.14/0009-pinctrl-gemini-Add-two-missing-GPIO-groups.patch +++ b/target/linux/gemini/patches-4.14/0009-pinctrl-gemini-Add-two-missing-GPIO-groups.patch @@ -13,7 +13,7 @@ Signed-off-by: Linus Walleij --- a/drivers/pinctrl/pinctrl-gemini.c +++ b/drivers/pinctrl/pinctrl-gemini.c -@@ -2015,7 +2015,8 @@ static const char * const sflashgrps[] = +@@ -2043,7 +2043,8 @@ static const char * const sflashgrps[] = static const char * const gpio0grps[] = { "gpio0agrp", "gpio0bgrp", "gpio0cgrp", "gpio0dgrp", "gpio0egrp", "gpio0fgrp", "gpio0ggrp", "gpio0hgrp", "gpio0igrp", diff --git a/target/linux/gemini/patches-4.14/0010-pinctrl-gemini-Fix-usage-of-3512-groups.patch b/target/linux/gemini/patches-4.14/0010-pinctrl-gemini-Fix-usage-of-3512-groups.patch index 1cab269a64..f01edb9bff 100644 --- a/target/linux/gemini/patches-4.14/0010-pinctrl-gemini-Fix-usage-of-3512-groups.patch +++ b/target/linux/gemini/patches-4.14/0010-pinctrl-gemini-Fix-usage-of-3512-groups.patch @@ -14,7 +14,7 @@ Signed-off-by: Linus Walleij --- a/drivers/pinctrl/pinctrl-gemini.c +++ b/drivers/pinctrl/pinctrl-gemini.c -@@ -2323,7 +2323,7 @@ static const struct gemini_pin_conf *gem +@@ -2352,7 +2352,7 @@ static const struct gemini_pin_conf *gem int i; for (i = 0; i < pmx->nconfs; i++) { diff --git a/target/linux/gemini/patches-4.14/0011-pinctrl-gemini-Support-drive-strength-setting.patch b/target/linux/gemini/patches-4.14/0011-pinctrl-gemini-Support-drive-strength-setting.patch index 5fefece493..e6d153403e 100644 --- a/target/linux/gemini/patches-4.14/0011-pinctrl-gemini-Support-drive-strength-setting.patch +++ b/target/linux/gemini/patches-4.14/0011-pinctrl-gemini-Support-drive-strength-setting.patch @@ -54,7 +54,7 @@ Signed-off-by: Linus Walleij #define GLOBAL_GMAC_CTRL_SKEW 0x1c #define GLOBAL_GMAC0_DATA_SKEW 0x20 #define GLOBAL_GMAC1_DATA_SKEW 0x24 -@@ -738,6 +743,7 @@ static const struct gemini_pin_group gem +@@ -741,6 +746,7 @@ static const struct gemini_pin_group gem /* Conflict with all flash usage */ .value = IDE_PADS_ENABLE | NAND_PADS_DISABLE | PFLASH_PADS_DISABLE | SFLASH_PADS_DISABLE, @@ -62,7 +62,7 @@ Signed-off-by: Linus Walleij }, { .name = "satagrp", -@@ -753,6 +759,7 @@ static const struct gemini_pin_group gem +@@ -756,6 +762,7 @@ static const struct gemini_pin_group gem .name = "gmii_gmac0_grp", .pins = gmii_gmac0_3512_pins, .num_pins = ARRAY_SIZE(gmii_gmac0_3512_pins), @@ -70,7 +70,7 @@ Signed-off-by: Linus Walleij }, { .name = "gmii_gmac1_grp", -@@ -760,6 +767,7 @@ static const struct gemini_pin_group gem +@@ -763,6 +770,7 @@ static const struct gemini_pin_group gem .num_pins = ARRAY_SIZE(gmii_gmac1_3512_pins), /* Bring out RGMII on the GMAC1 pins */ .value = GEMINI_GMAC_IOSEL_GMAC0_GMAC1_RGMII, @@ -78,7 +78,7 @@ Signed-off-by: Linus Walleij }, { .name = "pcigrp", -@@ -767,6 +775,7 @@ static const struct gemini_pin_group gem +@@ -770,6 +778,7 @@ static const struct gemini_pin_group gem .num_pins = ARRAY_SIZE(pci_3512_pins), /* Conflict only with GPIO2 */ .value = PCI_PADS_ENABLE | PCI_CLK_PAD_ENABLE, @@ -86,7 +86,7 @@ Signed-off-by: Linus Walleij }, { .name = "lpcgrp", -@@ -1671,6 +1680,7 @@ static const struct gemini_pin_group gem +@@ -1686,6 +1695,7 @@ static const struct gemini_pin_group gem /* Conflict with all flash usage */ .value = IDE_PADS_ENABLE | NAND_PADS_DISABLE | PFLASH_PADS_DISABLE | SFLASH_PADS_DISABLE, @@ -94,7 +94,7 @@ Signed-off-by: Linus Walleij }, { .name = "satagrp", -@@ -1686,6 +1696,7 @@ static const struct gemini_pin_group gem +@@ -1701,6 +1711,7 @@ static const struct gemini_pin_group gem .name = "gmii_gmac0_grp", .pins = gmii_gmac0_3516_pins, .num_pins = ARRAY_SIZE(gmii_gmac0_3516_pins), @@ -102,7 +102,7 @@ Signed-off-by: Linus Walleij }, { .name = "gmii_gmac1_grp", -@@ -1693,6 +1704,7 @@ static const struct gemini_pin_group gem +@@ -1708,6 +1719,7 @@ static const struct gemini_pin_group gem .num_pins = ARRAY_SIZE(gmii_gmac1_3516_pins), /* Bring out RGMII on the GMAC1 pins */ .value = GEMINI_GMAC_IOSEL_GMAC0_GMAC1_RGMII, @@ -110,7 +110,7 @@ Signed-off-by: Linus Walleij }, { .name = "pcigrp", -@@ -1700,6 +1712,7 @@ static const struct gemini_pin_group gem +@@ -1715,6 +1727,7 @@ static const struct gemini_pin_group gem .num_pins = ARRAY_SIZE(pci_3516_pins), /* Conflict only with GPIO2 */ .value = PCI_PADS_ENABLE | PCI_CLK_PAD_ENABLE, @@ -118,7 +118,7 @@ Signed-off-by: Linus Walleij }, { .name = "lpcgrp", -@@ -2394,9 +2407,77 @@ static int gemini_pinconf_set(struct pin +@@ -2423,9 +2436,77 @@ static int gemini_pinconf_set(struct pin return ret; } diff --git a/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch b/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch index ed33b2fc5f..a2388a1b9b 100644 --- a/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch +++ b/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch @@ -361,7 +361,7 @@ Signed-off-by: Pablo Neira Ayuso par->hook_mask = 1 << ops->hooknum; } else { -@@ -318,7 +318,7 @@ static int nft_target_validate(const str +@@ -337,7 +337,7 @@ static int nft_target_validate(const str if (nft_is_base_chain(ctx->chain)) { const struct nft_base_chain *basechain = nft_base_chain(ctx->chain); @@ -370,7 +370,7 @@ Signed-off-by: Pablo Neira Ayuso hook_mask = 1 << ops->hooknum; if (target->hooks && !(hook_mask & target->hooks)) -@@ -415,7 +415,7 @@ nft_match_set_mtchk_param(struct xt_mtch +@@ -434,7 +434,7 @@ nft_match_set_mtchk_param(struct xt_mtch if (nft_is_base_chain(ctx->chain)) { const struct nft_base_chain *basechain = nft_base_chain(ctx->chain); @@ -379,7 +379,7 @@ Signed-off-by: Pablo Neira Ayuso par->hook_mask = 1 << ops->hooknum; } else { -@@ -566,7 +566,7 @@ static int nft_match_validate(const stru +@@ -586,7 +586,7 @@ static int nft_match_validate(const stru if (nft_is_base_chain(ctx->chain)) { const struct nft_base_chain *basechain = nft_base_chain(ctx->chain); diff --git a/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch b/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch index a577e621bd..9108a5e4dc 100644 --- a/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch +++ b/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch @@ -1237,7 +1237,7 @@ Signed-off-by: Pablo Neira Ayuso if (par.target->destroy != NULL) par.target->destroy(&par); -@@ -390,7 +390,7 @@ nft_match_set_mtchk_param(struct xt_mtch +@@ -409,7 +409,7 @@ nft_match_set_mtchk_param(struct xt_mtch { par->net = ctx->net; par->table = ctx->table->name; @@ -1246,7 +1246,7 @@ Signed-off-by: Pablo Neira Ayuso case AF_INET: entry->e4.ip.proto = proto; entry->e4.ip.invflags = inv ? IPT_INV_PROTO : 0; -@@ -421,7 +421,7 @@ nft_match_set_mtchk_param(struct xt_mtch +@@ -440,7 +440,7 @@ nft_match_set_mtchk_param(struct xt_mtch } else { par->hook_mask = 0; } @@ -1255,7 +1255,7 @@ Signed-off-by: Pablo Neira Ayuso par->nft_compat = true; } -@@ -504,7 +504,7 @@ __nft_match_destroy(const struct nft_ctx +@@ -523,7 +523,7 @@ __nft_match_destroy(const struct nft_ctx par.net = ctx->net; par.match = match; par.matchinfo = info; @@ -1264,7 +1264,7 @@ Signed-off-by: Pablo Neira Ayuso if (par.match->destroy != NULL) par.match->destroy(&par); -@@ -734,7 +734,7 @@ nft_match_select_ops(const struct nft_ct +@@ -754,7 +754,7 @@ nft_match_select_ops(const struct nft_ct mt_name = nla_data(tb[NFTA_MATCH_NAME]); rev = ntohl(nla_get_be32(tb[NFTA_MATCH_REV])); @@ -1273,7 +1273,7 @@ Signed-off-by: Pablo Neira Ayuso /* Re-use the existing match if it's already loaded. */ list_for_each_entry(nft_match, &nft_match_list, head) { -@@ -825,7 +825,7 @@ nft_target_select_ops(const struct nft_c +@@ -845,7 +845,7 @@ nft_target_select_ops(const struct nft_c tg_name = nla_data(tb[NFTA_TARGET_NAME]); rev = ntohl(nla_get_be32(tb[NFTA_TARGET_REV])); diff --git a/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch b/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch index 9625a51129..5e70756c4e 100644 --- a/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch +++ b/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch @@ -46,7 +46,7 @@ Signed-off-by: Hauke Mehrtens errors per {size} bytes". --- a/drivers/mtd/maps/physmap_of_core.c +++ b/drivers/mtd/maps/physmap_of_core.c -@@ -114,37 +114,9 @@ static struct mtd_info *obsolete_probe(s +@@ -105,37 +105,9 @@ static struct mtd_info *obsolete_probe(s static const char * const part_probe_types_def[] = { "cmdlinepart", "RedBoot", "ofpart", "ofoldpart", NULL }; @@ -84,7 +84,7 @@ Signed-off-by: Hauke Mehrtens const struct of_device_id *match; struct device_node *dp = dev->dev.of_node; struct resource res; -@@ -310,14 +282,8 @@ static int of_flash_probe(struct platfor +@@ -293,14 +265,8 @@ static int of_flash_probe(struct platfor info->cmtd->dev.parent = &dev->dev; mtd_set_of_node(info->cmtd, dp); diff --git a/target/linux/ipq806x/patches-4.14/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch b/target/linux/ipq806x/patches-4.14/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch index cca2fcaa4f..7c78d444f8 100644 --- a/target/linux/ipq806x/patches-4.14/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch +++ b/target/linux/ipq806x/patches-4.14/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch @@ -10,7 +10,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c -@@ -1292,11 +1292,13 @@ struct opp_table *dev_pm_opp_set_regulat +@@ -1280,11 +1280,13 @@ struct opp_table *dev_pm_opp_set_regulat if (!opp_table) return ERR_PTR(-ENOMEM); diff --git a/target/linux/ipq806x/patches-4.14/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch b/target/linux/ipq806x/patches-4.14/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch index 9f7c8185e9..ef48e9f01b 100644 --- a/target/linux/ipq806x/patches-4.14/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch +++ b/target/linux/ipq806x/patches-4.14/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch @@ -27,7 +27,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c -@@ -1620,6 +1620,83 @@ put_table: +@@ -1608,6 +1608,83 @@ put_table: } /** diff --git a/target/linux/ipq806x/patches-4.14/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch b/target/linux/ipq806x/patches-4.14/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch index 7819dc0dd8..22ae309801 100644 --- a/target/linux/ipq806x/patches-4.14/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch +++ b/target/linux/ipq806x/patches-4.14/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch @@ -12,7 +12,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c -@@ -131,6 +131,27 @@ unsigned long dev_pm_opp_get_freq(struct +@@ -126,6 +126,27 @@ unsigned long dev_pm_opp_get_freq(struct } EXPORT_SYMBOL_GPL(dev_pm_opp_get_freq); diff --git a/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch b/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch index 3105b4ea1b..7cde22be0b 100644 --- a/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch +++ b/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch @@ -17,7 +17,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c -@@ -1664,6 +1664,7 @@ int dev_pm_opp_adjust_voltage(struct dev +@@ -1652,6 +1652,7 @@ int dev_pm_opp_adjust_voltage(struct dev struct opp_table *opp_table; struct dev_pm_opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV); int r = 0; @@ -25,7 +25,7 @@ Signed-off-by: Georgi Djakov /* keep the node allocated */ new_opp = kmalloc(sizeof(*new_opp), GFP_KERNEL); -@@ -1700,6 +1701,10 @@ int dev_pm_opp_adjust_voltage(struct dev +@@ -1688,6 +1689,10 @@ int dev_pm_opp_adjust_voltage(struct dev /* plug in new node */ new_opp->supplies[0].u_volt = u_volt; diff --git a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch index 34a86b56bb..ab43bc49fc 100644 --- a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch @@ -528,7 +528,7 @@ Signed-off-by: Zhao Chenhui reg &= ~DWC3_DCTL_INITU2ENA; --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3211,6 +3211,7 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3220,6 +3220,7 @@ int dwc3_gadget_init(struct dwc3 *dwc) { int ret; int irq; @@ -536,7 +536,7 @@ Signed-off-by: Zhao Chenhui irq = dwc3_gadget_get_irq(dwc); if (irq < 0) { -@@ -3290,6 +3291,12 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3299,6 +3300,12 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc3_gadget_set_speed(&dwc->gadget, dwc->maximum_speed); diff --git a/target/linux/layerscape/patches-4.14/810-kvm-support-layerscape.patch b/target/linux/layerscape/patches-4.14/810-kvm-support-layerscape.patch index 502a99fa87..470aa683fa 100644 --- a/target/linux/layerscape/patches-4.14/810-kvm-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/810-kvm-support-layerscape.patch @@ -74,7 +74,7 @@ Signed-off-by: Signed-off-by: Biwen Li kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_DECREMENTER); --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c -@@ -1027,9 +1027,11 @@ static int stage2_pmdp_test_and_clear_yo +@@ -1028,9 +1028,11 @@ static int stage2_pmdp_test_and_clear_yo * @guest_ipa: The IPA at which to insert the mapping * @pa: The physical address of the device * @size: The size of the mapping @@ -87,7 +87,7 @@ Signed-off-by: Signed-off-by: Biwen Li { phys_addr_t addr, end; int ret = 0; -@@ -1040,7 +1042,7 @@ int kvm_phys_addr_ioremap(struct kvm *kv +@@ -1041,7 +1043,7 @@ int kvm_phys_addr_ioremap(struct kvm *kv pfn = __phys_to_pfn(pa); for (addr = guest_ipa; addr < end; addr += PAGE_SIZE) { @@ -96,7 +96,7 @@ Signed-off-by: Signed-off-by: Biwen Li if (writable) pte = kvm_s2pte_mkwrite(pte); -@@ -1064,6 +1066,30 @@ out: +@@ -1065,6 +1067,30 @@ out: return ret; } @@ -127,7 +127,7 @@ Signed-off-by: Signed-off-by: Biwen Li static bool transparent_hugepage_adjust(kvm_pfn_t *pfnp, phys_addr_t *ipap) { kvm_pfn_t pfn = *pfnp; -@@ -1340,6 +1366,18 @@ static int user_mem_abort(struct kvm_vcp +@@ -1341,6 +1367,18 @@ static int user_mem_abort(struct kvm_vcp hugetlb = true; gfn = (fault_ipa & PMD_MASK) >> PAGE_SHIFT; } else { @@ -146,7 +146,7 @@ Signed-off-by: Signed-off-by: Biwen Li /* * Pages belonging to memslots that don't have the same * alignment for userspace and IPA cannot be mapped using -@@ -1381,6 +1419,11 @@ static int user_mem_abort(struct kvm_vcp +@@ -1382,6 +1420,11 @@ static int user_mem_abort(struct kvm_vcp if (is_error_noslot_pfn(pfn)) return -EFAULT; @@ -158,7 +158,7 @@ Signed-off-by: Signed-off-by: Biwen Li if (kvm_is_device_pfn(pfn)) { mem_type = PAGE_S2_DEVICE; flags |= KVM_S2PTE_FLAG_IS_IOMAP; -@@ -1917,6 +1960,9 @@ int kvm_arch_prepare_memory_region(struc +@@ -1918,6 +1961,9 @@ int kvm_arch_prepare_memory_region(struc gpa_t gpa = mem->guest_phys_addr + (vm_start - mem->userspace_addr); phys_addr_t pa; @@ -168,7 +168,7 @@ Signed-off-by: Signed-off-by: Biwen Li pa = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT; pa += vm_start - vma->vm_start; -@@ -1927,9 +1973,13 @@ int kvm_arch_prepare_memory_region(struc +@@ -1928,9 +1974,13 @@ int kvm_arch_prepare_memory_region(struc goto out; } diff --git a/target/linux/layerscape/patches-4.14/813-ifc-nor-nand-support-layerscape.patch b/target/linux/layerscape/patches-4.14/813-ifc-nor-nand-support-layerscape.patch index dd024305cd..8e9cd1d4a1 100644 --- a/target/linux/layerscape/patches-4.14/813-ifc-nor-nand-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/813-ifc-nor-nand-support-layerscape.patch @@ -321,7 +321,7 @@ Signed-off-by: Biwen Li #include #include #include -@@ -205,6 +206,9 @@ static int of_flash_probe(struct platfor +@@ -197,6 +198,9 @@ static int of_flash_probe(struct platfor info->list[i].map.bankwidth = be32_to_cpup(width); info->list[i].map.device_node = dp; diff --git a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch index 781333356a..f3f09989a7 100644 --- a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch @@ -5841,7 +5841,7 @@ Signed-off-by: Yangbo Lu #endif /* __UAPI_LINUX_PCITEST_H */ --- a/tools/pci/pcitest.c +++ b/tools/pci/pcitest.c -@@ -31,12 +31,17 @@ +@@ -30,12 +30,17 @@ #define BILLION 1E9 static char *result[] = { "NOT OKAY", "OKAY" }; @@ -5859,7 +5859,7 @@ Signed-off-by: Yangbo Lu bool read; bool write; bool copy; -@@ -65,6 +70,24 @@ static int run_test(struct pci_test *tes +@@ -62,6 +67,24 @@ static int run_test(struct pci_test *tes fprintf(stdout, "%s\n", result[ret]); } @@ -5884,7 +5884,7 @@ Signed-off-by: Yangbo Lu if (test->legacyirq) { ret = ioctl(fd, PCITEST_LEGACY_IRQ, 0); fprintf(stdout, "LEGACY IRQ:\t"); -@@ -83,6 +106,15 @@ static int run_test(struct pci_test *tes +@@ -80,6 +103,15 @@ static int run_test(struct pci_test *tes fprintf(stdout, "%s\n", result[ret]); } @@ -5900,7 +5900,7 @@ Signed-off-by: Yangbo Lu if (test->write) { ret = ioctl(fd, PCITEST_WRITE, test->size); fprintf(stdout, "WRITE (%7ld bytes):\t\t", test->size); -@@ -133,7 +165,7 @@ int main(int argc, char **argv) +@@ -130,7 +162,7 @@ int main(int argc, char **argv) /* set default endpoint device */ test->device = "/dev/pci-endpoint-test.0"; @@ -5909,7 +5909,7 @@ Signed-off-by: Yangbo Lu switch (c) { case 'D': test->device = optarg; -@@ -151,6 +183,20 @@ int main(int argc, char **argv) +@@ -148,6 +180,20 @@ int main(int argc, char **argv) if (test->msinum < 1 || test->msinum > 32) goto usage; continue; @@ -5930,7 +5930,7 @@ Signed-off-by: Yangbo Lu case 'r': test->read = true; continue; -@@ -173,6 +219,9 @@ usage: +@@ -170,6 +216,9 @@ usage: "\t-D PCI endpoint test device {default: /dev/pci-endpoint-test.0}\n" "\t-b BAR test (bar number between 0..5)\n" "\t-m MSI test (msi number between 1..32)\n" diff --git a/target/linux/mediatek/patches-4.14/0173-clk-mediatek-fixup-test-building-of-MediaTek-clock-d.patch b/target/linux/mediatek/patches-4.14/0173-clk-mediatek-fixup-test-building-of-MediaTek-clock-d.patch index f8a755003a..259a93cf2f 100644 --- a/target/linux/mediatek/patches-4.14/0173-clk-mediatek-fixup-test-building-of-MediaTek-clock-d.patch +++ b/target/linux/mediatek/patches-4.14/0173-clk-mediatek-fixup-test-building-of-MediaTek-clock-d.patch @@ -16,8 +16,8 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile -@@ -67,7 +67,7 @@ obj-$(CONFIG_ARCH_MXC) += imx/ - obj-$(CONFIG_MACH_INGENIC) += ingenic/ +@@ -68,7 +68,7 @@ obj-$(CONFIG_MACH_INGENIC) += ingenic/ + obj-$(CONFIG_ARCH_K3) += keystone/ obj-$(CONFIG_ARCH_KEYSTONE) += keystone/ obj-$(CONFIG_MACH_LOONGSON32) += loongson1/ -obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/ diff --git a/target/linux/oxnas/patches-4.14/500-oxnas-sata.patch b/target/linux/oxnas/patches-4.14/500-oxnas-sata.patch index 5fe0746086..0699e158a7 100644 --- a/target/linux/oxnas/patches-4.14/500-oxnas-sata.patch +++ b/target/linux/oxnas/patches-4.14/500-oxnas-sata.patch @@ -1,6 +1,6 @@ --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig -@@ -492,6 +492,13 @@ config SATA_VITESSE +@@ -493,6 +493,13 @@ config SATA_VITESSE If unsure, say N. diff --git a/target/linux/ramips/patches-4.14/0044-i2c-MIPS-adds-ralink-I2C-driver.patch b/target/linux/ramips/patches-4.14/0044-i2c-MIPS-adds-ralink-I2C-driver.patch index 471c8f40e0..4905aba046 100644 --- a/target/linux/ramips/patches-4.14/0044-i2c-MIPS-adds-ralink-I2C-driver.patch +++ b/target/linux/ramips/patches-4.14/0044-i2c-MIPS-adds-ralink-I2C-driver.patch @@ -45,7 +45,7 @@ Signed-off-by: John Crispin +}; --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -863,6 +863,11 @@ config I2C_RK3X +@@ -864,6 +864,11 @@ config I2C_RK3X This driver can also be built as a module. If so, the module will be called i2c-rk3x. diff --git a/target/linux/ramips/patches-4.14/0045-i2c-add-mt7621-driver.patch b/target/linux/ramips/patches-4.14/0045-i2c-add-mt7621-driver.patch index 9cd8c4b5cf..a848085520 100644 --- a/target/linux/ramips/patches-4.14/0045-i2c-add-mt7621-driver.patch +++ b/target/linux/ramips/patches-4.14/0045-i2c-add-mt7621-driver.patch @@ -13,7 +13,7 @@ Signed-off-by: John Crispin --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -868,6 +868,11 @@ config I2C_RALINK +@@ -869,6 +869,11 @@ config I2C_RALINK depends on RALINK && !SOC_MT7621 select OF_I2C From f19e471f3206d0b5885490e52972085d2da2a10b Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 25 Nov 2019 11:32:08 +0100 Subject: [PATCH 03/12] kernel: bump 4.19 to 4.19.86 Refreshed all patches. Altered patches: - 950-0064-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch - 0005-mtd-physmap_of-Move-custom-initialization.patch Remove upstreamed: - 0001-pinctrl-gemini-Mask-and-set-properly.patch - 0002-pinctrl-gemini-Fix-up-TVC-clock-group.patch Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte --- include/kernel-version.mk | 4 +- .../910-unaligned_access_hacks.patch | 8 +- .../950-0041-bcm2708-framebuffer-driver.patch | 2 +- ...d-Raspberry-Pi-Sense-HAT-core-driver.patch | 9 +- .../patches-4.19/070-i2c_support.patch | 2 +- .../patches-4.19/210-dwc2_defaults.patch | 4 +- ...pinctrl-gemini-Mask-and-set-properly.patch | 31 ---- ...inctrl-gemini-Fix-up-TVC-clock-group.patch | 141 ------------------ ...hysmap_of-Move-custom-initialization.patch | 34 ++--- ...arameters-depend-on-HW-configuration.patch | 6 +- .../661-use_fq_codel_by_default.patch | 2 +- .../hack-4.19/662-remove_pfifo_fast.patch | 2 +- .../pending-4.19/220-optimize_inlining.patch | 2 +- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 10 +- ...25p80-allow-loading-mtd-name-from-OF.patch | 4 +- ...PS-lantiq-add-FALC-ON-i2c-bus-master.patch | 2 +- ...e-lantiq-settings-match-vendor-drive.patch | 8 +- 17 files changed, 46 insertions(+), 225 deletions(-) delete mode 100644 target/linux/gemini/patches-4.19/0001-pinctrl-gemini-Mask-and-set-properly.patch delete mode 100644 target/linux/gemini/patches-4.19/0002-pinctrl-gemini-Fix-up-TVC-clock-group.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 90a548fa4b..d939b09fb5 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -8,11 +8,11 @@ endif LINUX_VERSION-4.9 = .202 LINUX_VERSION-4.14 = .156 -LINUX_VERSION-4.19 = .85 +LINUX_VERSION-4.19 = .86 LINUX_KERNEL_HASH-4.9.202 = 8108ec1cd10fc40821c84e9f087dba10b1767aad66596f4a36925faef55e4ebf LINUX_KERNEL_HASH-4.14.156 = f8889feb0cbd7df36ff35bd4c72c1e2010567621bfcb218fcfa501bc5c7787c0 -LINUX_KERNEL_HASH-4.19.85 = 7bf435970aeeafd46263f49730087a61c4858d8b8fc5a4002ceac971b45f4fb7 +LINUX_KERNEL_HASH-4.19.86 = bf2cbba319d43d1bd9e876ac0b55ab83118d1a1e61cce3c929d5371f7567bff6 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch index 43c4932f1f..ad7b12d650 100644 --- a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch @@ -327,7 +327,7 @@ return neigh_create(&arp_tbl, pkey, dev); --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c -@@ -461,48 +461,53 @@ static void tcp_options_write(__be32 *pt +@@ -444,48 +444,53 @@ static void tcp_options_write(__be32 *pt u16 options = opts->options; /* mungable copy */ if (unlikely(OPTION_MD5 & options)) { @@ -404,7 +404,7 @@ } if (unlikely(opts->num_sack_blocks)) { -@@ -510,16 +515,17 @@ static void tcp_options_write(__be32 *pt +@@ -493,16 +498,17 @@ static void tcp_options_write(__be32 *pt tp->duplicate_sack : tp->selective_acks; int this_sack; @@ -428,7 +428,7 @@ } tp->rx_opt.dsack = 0; -@@ -532,13 +538,14 @@ static void tcp_options_write(__be32 *pt +@@ -515,13 +521,14 @@ static void tcp_options_write(__be32 *pt if (foc->exp) { len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len; @@ -728,7 +728,7 @@ EXPORT_SYMBOL(xfrm_parse_spi); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -3912,14 +3912,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -3891,14 +3891,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/brcm2708/patches-4.19/950-0041-bcm2708-framebuffer-driver.patch b/target/linux/brcm2708/patches-4.19/950-0041-bcm2708-framebuffer-driver.patch index c019bc8271..7135ff3fcf 100644 --- a/target/linux/brcm2708/patches-4.19/950-0041-bcm2708-framebuffer-driver.patch +++ b/target/linux/brcm2708/patches-4.19/950-0041-bcm2708-framebuffer-driver.patch @@ -93,7 +93,7 @@ Signed-off-by: James Hughes --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig -@@ -236,6 +236,20 @@ config FB_TILEBLITTING +@@ -242,6 +242,20 @@ config FB_TILEBLITTING comment "Frame buffer hardware drivers" depends on FB diff --git a/target/linux/brcm2708/patches-4.19/950-0064-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch b/target/linux/brcm2708/patches-4.19/950-0064-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch index 00228d6434..1a8ab6c44e 100644 --- a/target/linux/brcm2708/patches-4.19/950-0064-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch +++ b/target/linux/brcm2708/patches-4.19/950-0064-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch @@ -390,11 +390,10 @@ Subject: [PATCH 064/806] mfd: Add Raspberry Pi Sense HAT core driver + --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig -@@ -2355,3 +2355,16 @@ config FB_SM712 - This driver is also available as a module. The module will be +@@ -2350,6 +2350,19 @@ config FB_SM712 called sm712fb. If you want to compile it as a module, say M here and read . -+ + +config FB_RPISENSE + tristate "Raspberry Pi Sense HAT framebuffer" + depends on FB @@ -407,6 +406,10 @@ Subject: [PATCH 064/806] mfd: Add Raspberry Pi Sense HAT core driver + + help + This is the framebuffer driver for the Raspberry Pi Sense HAT ++ + source "drivers/video/fbdev/omap/Kconfig" + source "drivers/video/fbdev/omap2/Kconfig" + source "drivers/video/fbdev/mmp/Kconfig" --- a/drivers/video/fbdev/Makefile +++ b/drivers/video/fbdev/Makefile @@ -138,6 +138,7 @@ obj-$(CONFIG_FB_DA8XX) += da8xx-fb.o diff --git a/target/linux/cns3xxx/patches-4.19/070-i2c_support.patch b/target/linux/cns3xxx/patches-4.19/070-i2c_support.patch index 9bfb8444e6..95768f64a8 100644 --- a/target/linux/cns3xxx/patches-4.19/070-i2c_support.patch +++ b/target/linux/cns3xxx/patches-4.19/070-i2c_support.patch @@ -1,6 +1,6 @@ --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -459,6 +459,18 @@ config I2C_CBUS_GPIO +@@ -460,6 +460,18 @@ config I2C_CBUS_GPIO This driver can also be built as a module. If so, the module will be called i2c-cbus-gpio. diff --git a/target/linux/cns3xxx/patches-4.19/210-dwc2_defaults.patch b/target/linux/cns3xxx/patches-4.19/210-dwc2_defaults.patch index fcadd25a2a..3efcc18854 100644 --- a/target/linux/cns3xxx/patches-4.19/210-dwc2_defaults.patch +++ b/target/linux/cns3xxx/patches-4.19/210-dwc2_defaults.patch @@ -1,6 +1,6 @@ --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c -@@ -151,6 +151,36 @@ static void dwc2_set_stm32f7_hsotg_param +@@ -152,6 +152,36 @@ static void dwc2_set_stm32f7_hsotg_param p->host_perio_tx_fifo_size = 256; } @@ -37,7 +37,7 @@ const struct of_device_id dwc2_of_match_table[] = { { .compatible = "brcm,bcm2835-usb", .data = dwc2_set_bcm_params }, { .compatible = "hisilicon,hi6220-usb", .data = dwc2_set_his_params }, -@@ -819,17 +849,23 @@ int dwc2_get_hwparams(struct dwc2_hsotg +@@ -820,17 +850,23 @@ int dwc2_get_hwparams(struct dwc2_hsotg int dwc2_init_params(struct dwc2_hsotg *hsotg) { diff --git a/target/linux/gemini/patches-4.19/0001-pinctrl-gemini-Mask-and-set-properly.patch b/target/linux/gemini/patches-4.19/0001-pinctrl-gemini-Mask-and-set-properly.patch deleted file mode 100644 index 3bf9341e34..0000000000 --- a/target/linux/gemini/patches-4.19/0001-pinctrl-gemini-Mask-and-set-properly.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f8ac3d3472a8dc99c8647a637611d146d88be8cb Mon Sep 17 00:00:00 2001 -From: Linus Walleij -Date: Tue, 9 Oct 2018 10:09:14 +0200 -Subject: [PATCH 01/18] pinctrl: gemini: Mask and set properly - -The code was written under the assumption that the -regmap_update_bits() would mask the bits in the mask and -set the bits in the value. - -It missed the points that it will not set bits in the value -unless these are also masked in the mask. Set value bits -that are not in the mask will simply be ignored. - -Fixes: 06351d133dea ("pinctrl: add a Gemini SoC pin controller") -Signed-off-by: Linus Walleij ---- - drivers/pinctrl/pinctrl-gemini.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/drivers/pinctrl/pinctrl-gemini.c -+++ b/drivers/pinctrl/pinctrl-gemini.c -@@ -2184,7 +2184,8 @@ static int gemini_pmx_set_mux(struct pin - func->name, grp->name); - - regmap_read(pmx->map, GLOBAL_MISC_CTRL, &before); -- regmap_update_bits(pmx->map, GLOBAL_MISC_CTRL, grp->mask, -+ regmap_update_bits(pmx->map, GLOBAL_MISC_CTRL, -+ grp->mask | grp->value, - grp->value); - regmap_read(pmx->map, GLOBAL_MISC_CTRL, &after); - diff --git a/target/linux/gemini/patches-4.19/0002-pinctrl-gemini-Fix-up-TVC-clock-group.patch b/target/linux/gemini/patches-4.19/0002-pinctrl-gemini-Fix-up-TVC-clock-group.patch deleted file mode 100644 index 64172acb44..0000000000 --- a/target/linux/gemini/patches-4.19/0002-pinctrl-gemini-Fix-up-TVC-clock-group.patch +++ /dev/null @@ -1,141 +0,0 @@ -From ce81398dccb984855de606b75db25eddecdaa9e5 Mon Sep 17 00:00:00 2001 -From: Linus Walleij -Date: Wed, 10 Oct 2018 20:25:39 +0200 -Subject: [PATCH 02/18] pinctrl: gemini: Fix up TVC clock group - -The previous fix made the TVC clock get muxed in on the -D-Link DIR-685 instead of giving nagging warnings of this -not working. Not good. We didn't want that, as it breaks -video. - -Create a specific group for the TVC CLK, and break out -a specific GPIO group for it on the SL3516 so we can use -that line as GPIO if we don't need the TVC CLK. - -Fixes: d17f477c5bc6 ("pinctrl: gemini: Mask and set properly") -Signed-off-by: Linus Walleij ---- - drivers/pinctrl/pinctrl-gemini.c | 44 ++++++++++++++++++++++++++------ - 1 file changed, 36 insertions(+), 8 deletions(-) - ---- a/drivers/pinctrl/pinctrl-gemini.c -+++ b/drivers/pinctrl/pinctrl-gemini.c -@@ -591,13 +591,16 @@ static const unsigned int tvc_3512_pins[ - 319, /* TVC_DATA[1] */ - 301, /* TVC_DATA[2] */ - 283, /* TVC_DATA[3] */ -- 265, /* TVC_CLK */ - 320, /* TVC_DATA[4] */ - 302, /* TVC_DATA[5] */ - 284, /* TVC_DATA[6] */ - 266, /* TVC_DATA[7] */ - }; - -+static const unsigned int tvc_clk_3512_pins[] = { -+ 265, /* TVC_CLK */ -+}; -+ - /* NAND flash pins */ - static const unsigned int nflash_3512_pins[] = { - 199, 200, 201, 202, 216, 217, 218, 219, 220, 234, 235, 236, 237, 252, -@@ -629,7 +632,7 @@ static const unsigned int pflash_3512_pi - /* Serial flash pins CE0, CE1, DI, DO, CK */ - static const unsigned int sflash_3512_pins[] = { 230, 231, 232, 233, 211 }; - --/* The GPIO0A (0) pin overlap with TVC and extended parallel flash */ -+/* The GPIO0A (0) pin overlap with TVC CLK and extended parallel flash */ - static const unsigned int gpio0a_3512_pins[] = { 265 }; - - /* The GPIO0B (1-4) pins overlap with TVC and ICE */ -@@ -823,7 +826,13 @@ static const struct gemini_pin_group gem - .num_pins = ARRAY_SIZE(tvc_3512_pins), - /* Conflict with character LCD and ICE */ - .mask = LCD_PADS_ENABLE, -- .value = TVC_PADS_ENABLE | TVC_CLK_PAD_ENABLE, -+ .value = TVC_PADS_ENABLE, -+ }, -+ { -+ .name = "tvcclkgrp", -+ .pins = tvc_clk_3512_pins, -+ .num_pins = ARRAY_SIZE(tvc_clk_3512_pins), -+ .value = TVC_CLK_PAD_ENABLE, - }, - /* - * The construction is done such that it is possible to use a serial -@@ -860,8 +869,8 @@ static const struct gemini_pin_group gem - .name = "gpio0agrp", - .pins = gpio0a_3512_pins, - .num_pins = ARRAY_SIZE(gpio0a_3512_pins), -- /* Conflict with TVC */ -- .mask = TVC_PADS_ENABLE, -+ /* Conflict with TVC CLK */ -+ .mask = TVC_CLK_PAD_ENABLE, - }, - { - .name = "gpio0bgrp", -@@ -1531,13 +1540,16 @@ static const unsigned int tvc_3516_pins[ - 311, /* TVC_DATA[1] */ - 394, /* TVC_DATA[2] */ - 374, /* TVC_DATA[3] */ -- 333, /* TVC_CLK */ - 354, /* TVC_DATA[4] */ - 395, /* TVC_DATA[5] */ - 312, /* TVC_DATA[6] */ - 334, /* TVC_DATA[7] */ - }; - -+static const unsigned int tvc_clk_3516_pins[] = { -+ 333, /* TVC_CLK */ -+}; -+ - /* NAND flash pins */ - static const unsigned int nflash_3516_pins[] = { - 243, 260, 261, 224, 280, 262, 281, 264, 300, 263, 282, 301, 320, 283, -@@ -1570,7 +1582,7 @@ static const unsigned int pflash_3516_pi - static const unsigned int sflash_3516_pins[] = { 296, 338, 295, 359, 339 }; - - /* The GPIO0A (0-4) pins overlap with TVC and extended parallel flash */ --static const unsigned int gpio0a_3516_pins[] = { 333, 354, 395, 312, 334 }; -+static const unsigned int gpio0a_3516_pins[] = { 354, 395, 312, 334 }; - - /* The GPIO0B (5-7) pins overlap with ICE */ - static const unsigned int gpio0b_3516_pins[] = { 375, 396, 376 }; -@@ -1602,6 +1614,9 @@ static const unsigned int gpio0j_3516_pi - /* The GPIO0K (30,31) pins overlap with NAND flash */ - static const unsigned int gpio0k_3516_pins[] = { 275, 298 }; - -+/* The GPIO0L (0) pins overlap with TVC_CLK */ -+static const unsigned int gpio0l_3516_pins[] = { 333 }; -+ - /* The GPIO1A (0-4) pins that overlap with IDE and parallel flash */ - static const unsigned int gpio1a_3516_pins[] = { 221, 200, 222, 201, 220 }; - -@@ -1761,7 +1776,13 @@ static const struct gemini_pin_group gem - .num_pins = ARRAY_SIZE(tvc_3516_pins), - /* Conflict with character LCD */ - .mask = LCD_PADS_ENABLE, -- .value = TVC_PADS_ENABLE | TVC_CLK_PAD_ENABLE, -+ .value = TVC_PADS_ENABLE, -+ }, -+ { -+ .name = "tvcclkgrp", -+ .pins = tvc_clk_3516_pins, -+ .num_pins = ARRAY_SIZE(tvc_clk_3516_pins), -+ .value = TVC_CLK_PAD_ENABLE, - }, - /* - * The construction is done such that it is possible to use a serial -@@ -1873,6 +1894,13 @@ static const struct gemini_pin_group gem - .value = PFLASH_PADS_DISABLE | NAND_PADS_DISABLE, - }, - { -+ .name = "gpio0lgrp", -+ .pins = gpio0l_3516_pins, -+ .num_pins = ARRAY_SIZE(gpio0l_3516_pins), -+ /* Conflict with TVE CLK */ -+ .mask = TVC_CLK_PAD_ENABLE, -+ }, -+ { - .name = "gpio1agrp", - .pins = gpio1a_3516_pins, - .num_pins = ARRAY_SIZE(gpio1a_3516_pins), diff --git a/target/linux/gemini/patches-4.19/0005-mtd-physmap_of-Move-custom-initialization.patch b/target/linux/gemini/patches-4.19/0005-mtd-physmap_of-Move-custom-initialization.patch index 5462844a79..1af8a03995 100644 --- a/target/linux/gemini/patches-4.19/0005-mtd-physmap_of-Move-custom-initialization.patch +++ b/target/linux/gemini/patches-4.19/0005-mtd-physmap_of-Move-custom-initialization.patch @@ -16,32 +16,22 @@ Signed-off-by: Linus Walleij --- a/drivers/mtd/maps/physmap_of_core.c +++ b/drivers/mtd/maps/physmap_of_core.c -@@ -239,13 +239,6 @@ static int of_flash_probe(struct platfor +@@ -231,6 +231,9 @@ static int of_flash_probe(struct platfor else if (of_property_read_bool(dp, "little-endian")) info->list[i].map.swap = CFI_LITTLE_ENDIAN; -- err = of_flash_probe_gemini(dev, dp, &info->list[i].map); -- if (err) -- goto err_out; -- err = of_flash_probe_versatile(dev, dp, &info->list[i].map); -- if (err) -- goto err_out; -- - err = -ENOMEM; - info->list[i].map.virt = ioremap(info->list[i].map.phys, - info->list[i].map.size); -@@ -257,6 +250,14 @@ static int of_flash_probe(struct platfor - - simple_map_init(&info->list[i].map); - -+ /* Variants can override map accessors */ -+ err = of_flash_probe_gemini(dev, dp, &info->list[i].map); -+ if (err) -+ goto err_out; -+ err = of_flash_probe_versatile(dev, dp, &info->list[i].map); -+ if (err) -+ goto err_out; ++ simple_map_init(&info->list[i].map); + ++ /* Variants can override map accessors */ + err = of_flash_probe_gemini(dev, dp, &info->list[i].map); + if (err) + goto err_out; +@@ -238,8 +241,6 @@ static int of_flash_probe(struct platfor + if (err) + goto err_out; + +- simple_map_init(&info->list[i].map); +- /* * On some platforms (e.g. MPC5200) a direct 1:1 mapping * may cause problems with JFFS2 usage, as the local bus (LPB) diff --git a/target/linux/generic/backport-4.19/200-v5.2-usb-dwc2-Set-lpm-mode-parameters-depend-on-HW-configuration.patch b/target/linux/generic/backport-4.19/200-v5.2-usb-dwc2-Set-lpm-mode-parameters-depend-on-HW-configuration.patch index b41bbf5395..ed4aadf2be 100644 --- a/target/linux/generic/backport-4.19/200-v5.2-usb-dwc2-Set-lpm-mode-parameters-depend-on-HW-configuration.patch +++ b/target/linux/generic/backport-4.19/200-v5.2-usb-dwc2-Set-lpm-mode-parameters-depend-on-HW-configuration.patch @@ -17,7 +17,7 @@ Signed-off-by: Felipe Balbi --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c -@@ -272,6 +272,23 @@ static void dwc2_set_param_power_down(st +@@ -273,6 +273,23 @@ static void dwc2_set_param_power_down(st hsotg->params.power_down = val; } @@ -41,7 +41,7 @@ Signed-off-by: Felipe Balbi /** * dwc2_set_default_params() - Set all core parameters to their * auto-detected default values. -@@ -290,6 +307,7 @@ static void dwc2_set_default_params(stru +@@ -291,6 +308,7 @@ static void dwc2_set_default_params(stru dwc2_set_param_speed(hsotg); dwc2_set_param_phy_utmi_width(hsotg); dwc2_set_param_power_down(hsotg); @@ -49,7 +49,7 @@ Signed-off-by: Felipe Balbi p->phy_ulpi_ddr = false; p->phy_ulpi_ext_vbus = false; -@@ -302,11 +320,6 @@ static void dwc2_set_default_params(stru +@@ -303,11 +321,6 @@ static void dwc2_set_default_params(stru p->reload_ctl = (hw->snpsid >= DWC2_CORE_REV_2_92a); p->uframe_sched = true; p->external_id_pin_ctl = false; diff --git a/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch index 806e0f3c21..71a26dba4a 100644 --- a/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch +++ b/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau EXPORT_SYMBOL(default_qdisc_ops); /* Main transmission queue. */ -@@ -1013,7 +1013,7 @@ static void attach_one_default_qdisc(str +@@ -1025,7 +1025,7 @@ static void attach_one_default_qdisc(str void *_unused) { struct Qdisc *qdisc; diff --git a/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch b/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch index d545cdf7ee..e49507a590 100644 --- a/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch +++ b/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -600,207 +600,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea +@@ -612,207 +612,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea .owner = THIS_MODULE, }; diff --git a/target/linux/generic/pending-4.19/220-optimize_inlining.patch b/target/linux/generic/pending-4.19/220-optimize_inlining.patch index e6a9c19cac..ae032709d2 100644 --- a/target/linux/generic/pending-4.19/220-optimize_inlining.patch +++ b/target/linux/generic/pending-4.19/220-optimize_inlining.patch @@ -122,7 +122,7 @@ { int set; -@@ -982,7 +982,7 @@ void radix__tlb_flush(struct mmu_gather +@@ -983,7 +983,7 @@ void radix__tlb_flush(struct mmu_gather tlb->need_flush_all = 0; } diff --git a/target/linux/generic/pending-4.19/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-4.19/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index f7803f0e36..5ce652ba50 100644 --- a/target/linux/generic/pending-4.19/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-4.19/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau __u16 tc_index; /* traffic control index */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -5468,6 +5468,9 @@ static enum gro_result dev_gro_receive(s +@@ -5482,6 +5482,9 @@ static enum gro_result dev_gro_receive(s int same_flow; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -6962,6 +6965,48 @@ static void __netdev_adjacent_dev_unlink +@@ -6976,6 +6979,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -7009,6 +7054,7 @@ static int __netdev_upper_dev_link(struc +@@ -7023,6 +7068,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -7095,6 +7141,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -7109,6 +7155,7 @@ void netdev_upper_dev_unlink(struct net_ __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); } -@@ -7718,6 +7765,7 @@ int dev_set_mac_address(struct net_devic +@@ -7732,6 +7779,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/lantiq/patches-4.19/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch b/target/linux/lantiq/patches-4.19/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch index 90dc20b901..fbdd117dea 100644 --- a/target/linux/lantiq/patches-4.19/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch +++ b/target/linux/lantiq/patches-4.19/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch @@ -22,7 +22,7 @@ Signed-off-by: John Crispin #include #include -@@ -180,6 +181,10 @@ static int m25p_probe(struct spi_mem *sp +@@ -173,6 +174,10 @@ static int m25p_probe(struct spi_mem *sp }; char *flash_name; int ret; @@ -33,7 +33,7 @@ Signed-off-by: John Crispin data = dev_get_platdata(&spimem->spi->dev); -@@ -218,6 +223,8 @@ static int m25p_probe(struct spi_mem *sp +@@ -211,6 +216,8 @@ static int m25p_probe(struct spi_mem *sp if (data && data->name) nor->mtd.name = data->name; diff --git a/target/linux/lantiq/patches-4.19/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch b/target/linux/lantiq/patches-4.19/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch index 90238e35b4..eed32d3097 100644 --- a/target/linux/lantiq/patches-4.19/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch +++ b/target/linux/lantiq/patches-4.19/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch @@ -18,7 +18,7 @@ Signed-off-by: John Crispin --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -690,6 +690,16 @@ config I2C_MESON +@@ -691,6 +691,16 @@ config I2C_MESON If you say yes to this option, support will be included for the I2C interface on the Amlogic Meson family of SoCs. diff --git a/target/linux/lantiq/patches-4.19/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch b/target/linux/lantiq/patches-4.19/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch index 81d46c3d1e..fed65e5321 100644 --- a/target/linux/lantiq/patches-4.19/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch +++ b/target/linux/lantiq/patches-4.19/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch @@ -23,8 +23,8 @@ Signed-off-by: Hauke Mehrtens --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c -@@ -90,7 +90,14 @@ static void dwc2_set_rk_params(struct dw - GAHBCFG_HBSTLEN_SHIFT; +@@ -91,7 +91,14 @@ static void dwc2_set_rk_params(struct dw + p->power_down = 0; } -static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg) @@ -39,7 +39,7 @@ Signed-off-by: Hauke Mehrtens { struct dwc2_core_params *p = &hsotg->params; -@@ -98,12 +105,20 @@ static void dwc2_set_ltq_params(struct d +@@ -99,12 +106,20 @@ static void dwc2_set_ltq_params(struct d p->host_rx_fifo_size = 288; p->host_nperio_tx_fifo_size = 128; p->host_perio_tx_fifo_size = 96; @@ -62,7 +62,7 @@ Signed-off-by: Hauke Mehrtens static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg) { struct dwc2_core_params *p = &hsotg->params; -@@ -155,8 +170,11 @@ const struct of_device_id dwc2_of_match_ +@@ -156,8 +171,11 @@ const struct of_device_id dwc2_of_match_ { .compatible = "brcm,bcm2835-usb", .data = dwc2_set_bcm_params }, { .compatible = "hisilicon,hi6220-usb", .data = dwc2_set_his_params }, { .compatible = "rockchip,rk3066-usb", .data = dwc2_set_rk_params }, From 7c76565d4ca0d0e20744a877d19318362566b58c Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Fri, 29 Nov 2019 10:52:01 +0100 Subject: [PATCH 04/12] kernel: bump 4.9 to 4.9.205 Refreshed all patches. Fixes: - CVE-2019-18660 Compile-tested on: none Runtime-tested on: none Signed-off-by: Koen Vandeputte --- include/kernel-version.mk | 4 ++-- .../090-net-generalize-napi_complete_done.patch | 6 +++--- ...1-mtd-part-add-generic-parsing-of-linux-part-probe.patch | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index d939b09fb5..2f80a62e7e 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,11 +6,11 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-4.9 = .202 +LINUX_VERSION-4.9 = .205 LINUX_VERSION-4.14 = .156 LINUX_VERSION-4.19 = .86 -LINUX_KERNEL_HASH-4.9.202 = 8108ec1cd10fc40821c84e9f087dba10b1767aad66596f4a36925faef55e4ebf +LINUX_KERNEL_HASH-4.9.205 = 98b9e8644706acc0cf51022372bb263b59a1d2bbe3ccd7ce6bd9bc7378c78b05 LINUX_KERNEL_HASH-4.14.156 = f8889feb0cbd7df36ff35bd4c72c1e2010567621bfcb218fcfa501bc5c7787c0 LINUX_KERNEL_HASH-4.19.86 = bf2cbba319d43d1bd9e876ac0b55ab83118d1a1e61cce3c929d5371f7567bff6 diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch index 4fd101db27..6052bf5777 100644 --- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch +++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch @@ -1150,7 +1150,7 @@ Signed-off-by: David S. Miller return work_done; --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c -@@ -843,7 +843,7 @@ static int cpsw_rx_poll(struct napi_stru +@@ -844,7 +844,7 @@ static int cpsw_rx_poll(struct napi_stru } if (num_rx < budget) { @@ -1227,7 +1227,7 @@ Signed-off-by: David S. Miller } --- a/drivers/net/ethernet/toshiba/tc35815.c +++ b/drivers/net/ethernet/toshiba/tc35815.c -@@ -1639,7 +1639,7 @@ static int tc35815_poll(struct napi_stru +@@ -1641,7 +1641,7 @@ static int tc35815_poll(struct napi_stru spin_unlock(&lp->rx_lock); if (received < budget) { @@ -1346,7 +1346,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c -@@ -2804,7 +2804,7 @@ static int ath10k_pci_napi_poll(struct n +@@ -2803,7 +2803,7 @@ static int ath10k_pci_napi_poll(struct n done = ath10k_htt_txrx_compl_task(ar, budget); if (done < budget) { diff --git a/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch b/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch index 1b6290fca2..64ed23170b 100644 --- a/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch +++ b/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch @@ -40,7 +40,7 @@ Signed-off-by: Hauke Mehrtens errors per {size} bytes". --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c -@@ -113,47 +113,9 @@ static struct mtd_info *obsolete_probe(s +@@ -104,47 +104,9 @@ static struct mtd_info *obsolete_probe(s static const char * const part_probe_types_def[] = { "cmdlinepart", "RedBoot", "ofpart", "ofoldpart", NULL }; @@ -88,7 +88,7 @@ Signed-off-by: Hauke Mehrtens const struct of_device_id *match; struct device_node *dp = dev->dev.of_node; struct resource res; -@@ -317,14 +279,8 @@ static int of_flash_probe(struct platfor +@@ -300,14 +262,8 @@ static int of_flash_probe(struct platfor info->cmtd->dev.parent = &dev->dev; mtd_set_of_node(info->cmtd, dp); From c7fb12beb1d347f1cedc7890dbe2d441f70ccf62 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Mon, 25 Nov 2019 16:53:59 -0300 Subject: [PATCH 05/12] mac80211: unify setup of iw htmode for mesh and adhoc This also fixes mac80211_prepare_vif iw set channel in monitor or mesh mode. Signed-off-by: Santiago Piccinini Signed-off-by: Daniel Golle [daniel@makrotopia.org: fixed commit message] --- .../files/lib/netifd/wireless/mac80211.sh | 65 +++++-------------- 1 file changed, 16 insertions(+), 49 deletions(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 5c67ea0600..91d50c3537 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -551,7 +551,7 @@ mac80211_prepare_vif() { case "$mode" in monitor|mesh) - [ "$auto_channel" -gt 0 ] || iw dev "$ifname" set channel "$channel" $htmode + [ "$auto_channel" -gt 0 ] || iw dev "$ifname" set channel "$channel" $iw_htmode ;; esac @@ -625,40 +625,40 @@ mac80211_setup_supplicant_noctl() { fi } -mac80211_setup_adhoc_htmode() { +mac80211_prepare_iw_htmode() { case "$htmode" in - VHT20|HT20) ibss_htmode=HT20;; + VHT20|HT20) iw_htmode=HT20;; HT40*|VHT40|VHT160) case "$hwmode" in a) case "$(( ($channel / 4) % 2 ))" in - 1) ibss_htmode="HT40+" ;; - 0) ibss_htmode="HT40-";; + 1) iw_htmode="HT40+" ;; + 0) iw_htmode="HT40-";; esac ;; *) case "$htmode" in - HT40+) ibss_htmode="HT40+";; - HT40-) ibss_htmode="HT40-";; + HT40+) iw_htmode="HT40+";; + HT40-) iw_htmode="HT40-";; *) if [ "$channel" -lt 7 ]; then - ibss_htmode="HT40+" + iw_htmode="HT40+" else - ibss_htmode="HT40-" + iw_htmode="HT40-" fi ;; esac ;; esac - [ "$auto_channel" -gt 0 ] && ibss_htmode="HT40+" + [ "$auto_channel" -gt 0 ] && iw_htmode="HT40+" ;; VHT80) - ibss_htmode="80MHZ" + iw_htmode="80MHZ" ;; NONE|NOHT) - ibss_htmode="NOHT" + iw_htmode="NOHT" ;; - *) ibss_htmode="" ;; + *) iw_htmode="" ;; esac } @@ -701,7 +701,7 @@ mac80211_setup_adhoc() { mcval= [ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate" - iw dev "$ifname" ibss join "$ssid" $freq $ibss_htmode fixed-freq $bssid \ + iw dev "$ifname" ibss join "$ssid" $freq $iw_htmode fixed-freq $bssid \ beacon-interval $beacon_int \ ${brstr:+basic-rates $brstr} \ ${mcval:+mcast-rate $mcval} \ @@ -721,40 +721,7 @@ mac80211_setup_mesh() { [ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate" [ -n "$mesh_id" ] && ssid="$mesh_id" - case "$htmode" in - VHT20|HT20) mesh_htmode=HT20;; - HT40*|VHT40) - case "$hwmode" in - a) - case "$(( ($channel / 4) % 2 ))" in - 1) mesh_htmode="HT40+" ;; - 0) mesh_htmode="HT40-";; - esac - ;; - *) - case "$htmode" in - HT40+) mesh_htmode="HT40+";; - HT40-) mesh_htmode="HT40-";; - *) - if [ "$channel" -lt 7 ]; then - mesh_htmode="HT40+" - else - mesh_htmode="HT40-" - fi - ;; - esac - ;; - esac - ;; - VHT80) - mesh_htmode="80Mhz" - ;; - VHT160) - mesh_htmode="160Mhz" - ;; - *) mesh_htmode="NOHT" ;; - esac - iw dev "$ifname" mesh join "$ssid" freq $freq $mesh_htmode \ + iw dev "$ifname" mesh join "$ssid" freq $freq $iw_htmode \ ${mcval:+mcast-rate $mcval} \ beacon-interval $beacon_int } @@ -799,7 +766,6 @@ mac80211_setup_vif() { ;; adhoc) wireless_vif_parse_encryption - mac80211_setup_adhoc_htmode if [ "$wpa" -gt 0 -o "$auto_channel" -gt 0 ]; then freq="$(get_freq "$phy" "$channel")" mac80211_setup_supplicant_noctl $vif_enable || failed=1 @@ -926,6 +892,7 @@ drv_mac80211_setup() { for_each_interface "sta adhoc mesh" mac80211_set_noscan [ -n "$has_ap" ] && mac80211_hostapd_setup_base "$phy" + mac80211_prepare_iw_htmode for_each_interface "sta adhoc mesh monitor" mac80211_prepare_vif NEWAPLIST= for_each_interface "ap" mac80211_prepare_vif From f573e5756a351b73bc835fe3c1c8418c8fab37b3 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Fri, 29 Nov 2019 21:53:21 +0100 Subject: [PATCH 06/12] netifd: update to latest git HEAD e45b140 interface: warn if ip6hint is truncated Signed-off-by: Hans Dedecker --- package/network/config/netifd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index e24ebaba30..1df4d1ee09 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2019-11-12 -PKG_SOURCE_VERSION:=e15147c272201eb17320c10ec95919e641bd03c5 -PKG_MIRROR_HASH:=af830967d3d9f20d8d3c01b1931e501e075984043e38c23ac649faced34e896a +PKG_SOURCE_DATE:=2019-11-20 +PKG_SOURCE_VERSION:=e45b1408284c05984b38a910a1f0a07d6c761397 +PKG_MIRROR_HASH:=5f9b96a20bef71dc42492a8eaf407276a656ff00cce18ed8d0c7391c0a52d3e8 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 From c550b1acfc8105b3dcdca207410c45fbaf360fca Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 25 Nov 2019 15:12:24 +0100 Subject: [PATCH 07/12] ipq40xx: use DTSI for Jalapeno MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lets move common code for Jalapeno into DTSI, this way Jalapeno based boards don't introduce duplicate code. While at it, lets also fix some style issues and update to current DTS style. Signed-off-by: Robert Marko [commit description long line wrap] Signed-off-by: Petr Štetiar --- .../arm/boot/dts/qcom-ipq4018-jalapeno.dts | 263 +---------------- .../arm/boot/dts/qcom-ipq4018-jalapeno.dtsi | 269 ++++++++++++++++++ 2 files changed, 272 insertions(+), 260 deletions(-) create mode 100644 target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts index 9730f1027f..988b86b68d 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts @@ -1,266 +1,9 @@ -/* Copyright (c) 2015, The Linux Foundation. All rights reserved. - * Copyright (c) 2018, Robert Marko - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +// Copyright (c) 2018, Robert Marko -#include "qcom-ipq4019.dtsi" -#include -#include -#include +#include "qcom-ipq4018-jalapeno.dtsi" / { model = "8devices Jalapeno"; compatible = "8dev,jalapeno"; - - soc { - rng@22000 { - status = "okay"; - }; - - mdio@90000 { - status = "okay"; - pinctrl-0 = <&mdio_pins>; - pinctrl-names = "default"; - }; - - ess-psgmii@98000 { - status = "okay"; - }; - - counter@4a1000 { - compatible = "qcom,qca-gcnt"; - reg = <0x4a1000 0x4>; - }; - - tcsr@1949000 { - compatible = "qcom,tcsr"; - reg = <0x1949000 0x100>; - qcom,wifi_glb_cfg = ; - }; - - tcsr@194b000 { - /* select hostmode */ - compatible = "qcom,tcsr"; - reg = <0x194b000 0x100>; - qcom,usb-hsphy-mode-select = ; - status = "okay"; - }; - - ess_tcsr@1953000 { - compatible = "qcom,tcsr"; - reg = <0x1953000 0x1000>; - qcom,ess-interface-select = ; - }; - - tcsr@1957000 { - compatible = "qcom,tcsr"; - reg = <0x1957000 0x100>; - qcom,wifi_noc_memtype_m0_m2 = ; - }; - - usb2: usb2@60f8800 { - status = "okay"; - }; - - usb3: usb3@8af8800 { - status = "okay"; - }; - - crypto@8e3a000 { - status = "okay"; - }; - - watchdog@b017000 { - status = "okay"; - }; - - ess-switch@c000000 { - status = "okay"; - switch_lan_bmp = <0x10>; /* lan port bitmap */ - }; - - edma@c080000 { - status = "okay"; - }; - }; -}; - -&tlmm { - mdio_pins: mdio_pinmux { - pinmux_1 { - pins = "gpio53"; - function = "mdio"; - }; - pinmux_2 { - pins = "gpio52"; - function = "mdc"; - }; - pinconf { - pins = "gpio52", "gpio53"; - bias-pull-up; - }; - }; - - serial_pins: serial_pinmux { - mux { - pins = "gpio60", "gpio61"; - function = "blsp_uart0"; - bias-disable; - }; - }; - - spi_0_pins: spi_0_pinmux { - pin { - function = "blsp_spi0"; - pins = "gpio55", "gpio56", "gpio57"; - drive-strength = <2>; - bias-disable; - }; - pin_cs { - function = "gpio"; - pins = "gpio54", "gpio59"; - drive-strength = <2>; - bias-disable; - output-high; - }; - }; -}; - -&blsp_dma { - status = "okay"; -}; - -&blsp1_spi1 { - pinctrl-0 = <&spi_0_pins>; - pinctrl-names = "default"; - cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 59 GPIO_ACTIVE_HIGH>; - status = "okay"; - - m25p80@0 { - reg = <0>; - compatible = "jedec,spi-nor"; - spi-max-frequency = <24000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition0@0 { - label = "SBL1"; - reg = <0x00000000 0x00040000>; - read-only; - }; - partition1@40000 { - label = "MIBIB"; - reg = <0x00040000 0x00020000>; - read-only; - }; - partition2@60000 { - label = "QSEE"; - reg = <0x00060000 0x00060000>; - read-only; - }; - partition3@c0000 { - label = "CDT"; - reg = <0x000c0000 0x00010000>; - read-only; - }; - partition4@d0000 { - label = "DDRPARAMS"; - reg = <0x000d0000 0x00010000>; - read-only; - }; - partition5@e0000 { - label = "APPSBLENV"; /* uboot env*/ - reg = <0x000e0000 0x00010000>; - read-only; - }; - partition5@f0000 { - label = "APPSBL"; /* uboot */ - reg = <0x000f0000 0x00080000>; - read-only; - }; - partition5@170000 { - label = "ART"; - reg = <0x00170000 0x00010000>; - read-only; - }; - }; - }; - - spi-nand@1 { - status = "okay"; - compatible = "spi-nand"; - reg = <1>; - spi-max-frequency = <24000000>; - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition0@0 { - label = "ubi"; - reg = <0x00000000 0x08000000>; - }; - }; - }; -}; - -&blsp1_uart1 { - pinctrl-0 = <&serial_pins>; - pinctrl-names = "default"; - status = "okay"; -}; - -&cryptobam { - status = "okay"; -}; - -&gmac0 { - qcom,poll_required = <1>; - qcom,poll_required_dynamic = <1>; - qcom,phy_mdio_addr = <3>; - vlan_tag = <1 0x10>; -}; - -&gmac1 { - qcom,poll_required = <1>; - qcom,poll_required_dynamic = <1>; - qcom,phy_mdio_addr = <4>; - vlan_tag = <2 0x20>; -}; - -&wifi0 { - status = "okay"; - qcom,ath10k-calibration-variant = "8devices-Jalapeno"; -}; - -&wifi1 { - status = "okay"; - qcom,ath10k-calibration-variant = "8devices-Jalapeno"; -}; - -&usb3_ss_phy { - status = "okay"; -}; - -&usb3_hs_phy { - status = "okay"; -}; - -&usb2_hs_phy { - status = "okay"; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi new file mode 100644 index 0000000000..3af6de1f60 --- /dev/null +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi @@ -0,0 +1,269 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +// Copyright (c) 2018, Robert Marko + +#include "qcom-ipq4019.dtsi" +#include +#include +#include + +/ { + soc { + rng@22000 { + status = "okay"; + }; + + mdio@90000 { + status = "okay"; + + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + }; + + ess-psgmii@98000 { + status = "okay"; + }; + + counter@4a1000 { + compatible = "qcom,qca-gcnt"; + reg = <0x4a1000 0x4>; + }; + + tcsr@1949000 { + compatible = "qcom,tcsr"; + reg = <0x1949000 0x100>; + qcom,wifi_glb_cfg = ; + }; + + tcsr@194b000 { + status = "okay"; + + compatible = "qcom,tcsr"; + reg = <0x194b000 0x100>; + qcom,usb-hsphy-mode-select = ; + }; + + ess_tcsr@1953000 { + compatible = "qcom,tcsr"; + reg = <0x1953000 0x1000>; + qcom,ess-interface-select = ; + }; + + tcsr@1957000 { + compatible = "qcom,tcsr"; + reg = <0x1957000 0x100>; + qcom,wifi_noc_memtype_m0_m2 = ; + }; + + usb2: usb2@60f8800 { + status = "okay"; + }; + + usb3: usb3@8af8800 { + status = "okay"; + }; + + crypto@8e3a000 { + status = "okay"; + }; + + watchdog@b017000 { + status = "okay"; + }; + + ess-switch@c000000 { + status = "okay"; + + switch_lan_bmp = <0x10>; /* lan port bitmap */ + }; + + edma@c080000 { + status = "okay"; + }; + }; +}; + +&tlmm { + mdio_pins: mdio_pinmux { + pinmux_1 { + pins = "gpio53"; + function = "mdio"; + }; + + pinmux_2 { + pins = "gpio52"; + function = "mdc"; + }; + + pinconf { + pins = "gpio52", "gpio53"; + bias-pull-up; + }; + }; + + serial_pins: serial_pinmux { + mux { + pins = "gpio60", "gpio61"; + function = "blsp_uart0"; + bias-disable; + }; + }; + + spi_0_pins: spi_0_pinmux { + pin { + function = "blsp_spi0"; + pins = "gpio55", "gpio56", "gpio57"; + drive-strength = <2>; + bias-disable; + }; + + pin_cs { + function = "gpio"; + pins = "gpio54", "gpio59"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; +}; + +&blsp_dma { + status = "okay"; +}; + +&blsp1_spi1 { + status = "okay"; + + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; + cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 59 GPIO_ACTIVE_HIGH>; + + flash@0 { + status = "okay"; + + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "SBL1"; + reg = <0x00000000 0x00040000>; + read-only; + }; + + partition@40000 { + label = "MIBIB"; + reg = <0x00040000 0x00020000>; + read-only; + }; + + partition@60000 { + label = "QSEE"; + reg = <0x00060000 0x00060000>; + read-only; + }; + + partition@c0000 { + label = "CDT"; + reg = <0x000c0000 0x00010000>; + read-only; + }; + + partition@d0000 { + label = "DDRPARAMS"; + reg = <0x000d0000 0x00010000>; + read-only; + }; + + partition@e0000 { + label = "APPSBLENV"; /* uboot env*/ + reg = <0x000e0000 0x00010000>; + read-only; + }; + + partition@f0000 { + label = "APPSBL"; /* uboot */ + reg = <0x000f0000 0x00080000>; + read-only; + }; + + partition@170000 { + label = "ART"; + reg = <0x00170000 0x00010000>; + read-only; + }; + }; + }; + + spi-nand@1 { + status = "okay"; + + compatible = "spi-nand"; + reg = <1>; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "ubi"; + reg = <0x00000000 0x08000000>; + }; + }; + }; +}; + +&blsp1_uart1 { + status = "okay"; + + pinctrl-0 = <&serial_pins>; + pinctrl-names = "default"; +}; + +&cryptobam { + status = "okay"; +}; + +&gmac0 { + qcom,poll_required = <1>; + qcom,poll_required_dynamic = <1>; + qcom,phy_mdio_addr = <3>; + vlan_tag = <1 0x10>; +}; + +&gmac1 { + qcom,poll_required = <1>; + qcom,poll_required_dynamic = <1>; + qcom,phy_mdio_addr = <4>; + vlan_tag = <2 0x20>; +}; + +&wifi0 { + status = "okay"; + + qcom,ath10k-calibration-variant = "8devices-Jalapeno"; +}; + +&wifi1 { + status = "okay"; + + qcom,ath10k-calibration-variant = "8devices-Jalapeno"; +}; + +&usb3_ss_phy { + status = "okay"; +}; + +&usb3_hs_phy { + status = "okay"; +}; + +&usb2_hs_phy { + status = "okay"; +}; From 146eb4925c7f32650f38cb52139696a827051700 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 25 Nov 2019 15:25:00 +0100 Subject: [PATCH 08/12] ipq40xx: add support for Crisis Innovation Lab MeshPoint.One MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MeshPoint.One is Wi-Fi hotspot and smart IoT gateway (based upon Jalapeno module from 8Devices). MeshPoint.One (https://meshpointone.com) is a unique Wi-Fi hotspot and smart city gateway that can be installed and powered from street lighting (even solar power in the future). MeshPoint provides up to 27 hours of interrupted Wi-Fi and IoT services from internal battery even when external power is not available. MeshPoint.One can be used for disaster relief efforts in order to provide instant Wi-Fi coverage that can be easily expanded by just adding more devices that create wide area mesh network. MeshPoint.One devices have standard Luci UI for management. Features: - 1x 1Gpbs WAN - 1x 1Gbps LAN - POE input (eth0) - POE output (eth1) - Sensor for temperature, humidity and pressure (Bosch BME280) - current, voltage and power measurement via TI INA230 - Hardware real time clock - optional power via Li-Ion battery - micro USB port with USB to serial chip for easy OpenWrt terminal access - I2C header for connecting additional sensors Installation: ------------- Simply flash the sysupgrade image from stock firmware. Or use the built in Web recovery into bootloader: Hold Reset button for 5 to 20 seconds or use UART and httpd command. Web UI will appear on 192.168.2.100 by default. For web recovery use the factory.ubi image. Signed-off-by: Damir Samardzic Signed-off-by: Damir Franusic Signed-off-by: Valent Turkovic Signed-off-by: Robert Marko [commit description long line wrap, usb->USB] Signed-off-by: Petr Štetiar --- .../ipq40xx/base-files/etc/board.d/02_network | 5 ++ .../base-files/etc/board.d/03_gpio_switches | 3 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 2 + .../base-files/lib/upgrade/platform.sh | 1 + .../boot/dts/qcom-ipq4018-meshpoint-one.dts | 81 +++++++++++++++++++ target/linux/ipq40xx/image/Makefile | 19 ++++- .../901-arm-boot-add-dts-files.patch | 3 +- 7 files changed, 110 insertions(+), 4 deletions(-) create mode 100644 target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-meshpoint-one.dts diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index dafd83234e..122c1a103d 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -18,6 +18,7 @@ ipq40xx_setup_interfaces() ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; asus,map-ac2200|\ + cilab,meshpoint-one|\ openmesh,a42|\ openmesh,a62) ucidef_set_interfaces_lan_wan "eth1" "eth0" @@ -84,6 +85,9 @@ ipq40xx_setup_macs() wan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006) lan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006) ;; + cilab,meshpoint-one) + label_mac=$(mtd_get_mac_binary "ART" 0x1006) + ;; engenius,ens620ext) wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) lan_mac=$(macaddr_add "$wan_mac" 1) @@ -96,6 +100,7 @@ ipq40xx_setup_macs() [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac + [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac } board_config_update diff --git a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches index 4e306a94a5..e46a297ea7 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches @@ -7,6 +7,9 @@ board_config_update board=$(board_name) case "$board" in +cilab,meshpoint-one) + ucidef_add_gpio_switch "poe_passtrough" "POE passtrough enable" "413" "1" + ;; compex,wpj428) ucidef_add_gpio_switch "sim_card_select" "SIM card select" "3" "0" ;; diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index d4e4cc49ec..3d46519415 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -45,6 +45,7 @@ case "$FIRMWARE" in case "$board" in 8dev,jalapeno |\ alfa-network,ap120c-ac |\ + cilab,meshpoint-one |\ glinet,gl-b1300 |\ linksys,ea6350v3 |\ qcom,ap-dk01.1-c1) @@ -109,6 +110,7 @@ case "$FIRMWARE" in case "$board" in 8dev,jalapeno |\ alfa-network,ap120c-ac |\ + cilab,meshpoint-one |\ glinet,gl-b1300 |\ linksys,ea6350v3 |\ qcom,ap-dk01.1-c1) diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index 96f865c67e..41f8fcfccb 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -50,6 +50,7 @@ platform_do_upgrade() { avm,fritzbox-7530 |\ avm,fritzrepeater-1200 |\ avm,fritzrepeater-3000 |\ + cilab,meshpoint-one |\ qxwlan,e2600ac-c2) nand_do_upgrade "$1" ;; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-meshpoint-one.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-meshpoint-one.dts new file mode 100644 index 0000000000..2e21b55325 --- /dev/null +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-meshpoint-one.dts @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* Copyright (c) 2019, CRISIS INNOVATION LAB d.o.o. + * Author: Robert Marko + */ + +#include "qcom-ipq4018-jalapeno.dtsi" + +/ { + model = "Crisis Innovation Lab MeshPoint.One"; + compatible = "cilab,meshpoint-one"; + + aliases { + led-boot = &led_status; + led-failsafe = &led_status; + led-running = &led_status; + led-upgrade = &led_status; + }; + + soc { + i2c-gpio { + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + + compatible = "i2c-gpio"; + gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) /* sda */ + &tlmm 4 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) /* scl */ + >; + + bme280@76 { + status = "okay"; + + compatible = "bosch,bme280"; + reg = <0x76>; + }; + + pcf2129@51 { + status = "okay"; + + compatible = "nxp,pcf2129"; + reg = <0x51>; + }; + + ina230@40 { + status = "okay"; + + compatible = "ti,ina230"; + reg = <0x40>; + shunt-resistor = <2000>; + }; + + ina230@44 { + status = "okay"; + + compatible = "ti,ina230"; + reg = <0x44>; + shunt-resistor = <2000>; + }; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 5 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status: status { + label = "meshpoint-one:blue:status"; + gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>; + }; + }; +}; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index a9c5e625af..ac34447475 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -60,14 +60,18 @@ define Build/SenaoFW @cp $@.new $@ endef -define Device/8dev_jalapeno +define Device/8dev_jalapeno-common $(call Device/FitImage) $(call Device/UbiFit) + BLOCKSIZE := 128k + PAGESIZE := 2048 +endef + +define Device/8dev_jalapeno + $(call Device/8dev_jalapeno-common) DEVICE_VENDOR := 8devices DEVICE_MODEL := Jalapeno DEVICE_DTS := qcom-ipq4018-jalapeno - BLOCKSIZE := 128k - PAGESIZE := 2048 endef TARGET_DEVICES += 8dev_jalapeno @@ -164,6 +168,15 @@ define Device/avm_fritzrepeater-3000 endef TARGET_DEVICES += avm_fritzrepeater-3000 +define Device/cilab_meshpoint-one + $(call Device/8dev_jalapeno-common) + DEVICE_DTS := qcom-ipq4018-meshpoint-one + DEVICE_VENDOR := Crisis Innovation Lab + DEVICE_MODEL := MeshPoint.One + DEVICE_PACKAGES := kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127 +endef +TARGET_DEVICES += cilab_meshpoint-one + define Device/compex_wpj419 $(call Device/FitImage) $(call Device/UbiFit) diff --git a/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch index 4649b337e3..93214e60e9 100644 --- a/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch +++ b/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -785,11 +785,36 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -785,11 +785,37 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ qcom-apq8084-mtp.dtb \ @@ -23,6 +23,7 @@ Signed-off-by: John Crispin + qcom-ipq4018-ex6150v2.dtb \ + qcom-ipq4018-fritz4040.dtb \ + qcom-ipq4018-jalapeno.dtb \ ++ qcom-ipq4018-meshpoint-one.dtb \ + qcom-ipq4018-nbg6617.dtb \ + qcom-ipq4018-rt-ac58u.dtb \ + qcom-ipq4018-wre6606.dtb \ From ca7f1ef575749e3e77961a86b00d9c5cbb9cab04 Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Mon, 14 Oct 2019 15:48:32 +0800 Subject: [PATCH 09/12] Revert "mt76: probe load mt7615 driver asynchronously" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 81764319637f ("mt76: probe load mt7615 driver asynchronously"). After said commit, users report that MT7615 no longer works on boot and they have to manually enable WiFi (via command "wifi") to make it working again. Fixes: FS#2546 Ref: https://forum.openwrt.org/t/xiaomi-r3p-no-wifi-on-boot/45509 Signed-off-by: DENG Qingfang [commit description facelift] Signed-off-by: Petr Štetiar --- package/kernel/mt76/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index ce2bf8f14b..04c1761d88 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -144,7 +144,6 @@ define KernelPackage/mt7615e DEPENDS+=@PCI_SUPPORT +kmod-mt76-core FILES:=\ $(PKG_BUILD_DIR)/mt7615/mt7615e.ko - MODPARAMS:=async_probe AUTOLOAD:=$(call AutoProbe,mt7615e) endef From 839bc1e15ed5c0e00a68c95798b47ae0e279e4e9 Mon Sep 17 00:00:00 2001 From: Alin Nastac Date: Thu, 21 Nov 2019 14:06:18 +0100 Subject: [PATCH 10/12] glibc: backport fix for regexec buffer read overrun MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem found by AddressSanitizer[1]: Latest `grep` (git commit 1019e6e) compiled with asan may cause a heap-buffer-overflow when `-i` is specified. ./grep -i '\(\(\)*.\)*\(\)\(\)\1' /bin/chvt ================================================================= ==16206==ERROR: AddressSanitizer: heap-buffer-overflow on address 1. https://debbugs.gnu.org/34140 Ref: https://sourceware.org/bugzilla/show_bug.cgi?id=24114 Signed-off-by: Alin Nastac [commit title and description facelift] Signed-off-by: Petr Štetiar --- .../patches/001-regex-read-overrun.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 toolchain/glibc/patches/001-regex-read-overrun.patch diff --git a/toolchain/glibc/patches/001-regex-read-overrun.patch b/toolchain/glibc/patches/001-regex-read-overrun.patch new file mode 100644 index 0000000000..c4e4307aa6 --- /dev/null +++ b/toolchain/glibc/patches/001-regex-read-overrun.patch @@ -0,0 +1,26 @@ +commit 583dd860d5b833037175247230a328f0050dbfe9 +Author: Paul Eggert +Date: Mon Jan 21 11:08:13 2019 -0800 + + regex: fix read overrun [BZ #24114] + + Problem found by AddressSanitizer, reported by Hongxu Chen in: + https://debbugs.gnu.org/34140 + * posix/regexec.c (proceed_next_node): + Do not read past end of input buffer. + +--- a/posix/regexec.c ++++ b/posix/regexec.c +@@ -1293,8 +1293,10 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, + else if (naccepted) + { + char *buf = (char *) re_string_get_buffer (&mctx->input); +- if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, +- naccepted) != 0) ++ if (mctx->input.valid_len - *pidx < naccepted ++ || (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, ++ naccepted) ++ != 0)) + return -1; + } + } From f1410902e6c089a53935ab44e83207e877445bc5 Mon Sep 17 00:00:00 2001 From: Satadru Pramanik Date: Fri, 15 Nov 2019 12:42:44 -0500 Subject: [PATCH 11/12] busybox: add glibc dependency for vi regex option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build with musl libc fails with BUSYBOX_DEFAULT_FEATURE_VI_REGEX_SEARCH enabled. Enabling BusyBox's vi regex search option depends upon GNU regex. Musl libc does not support GNU regex[1]. So this patch adds explicit dependency on GNU libc and while at it remove the FIXME comment. 1. https://wiki.musl-libc.org/functional-differences-from-glibc.html Ref: https://dev.archive.openwrt.org/ticket/21741.html Ref: https://forum.openwrt.org/t/busybox-not-compiling/ Ref: https://github.com/openwrt/packages/issues/4453 Signed-off-by: Satadru Pramanik [commit subject/description tweaks, From: fix, USE_GLIBC fix, removed comments] Signed-off-by: Petr Štetiar --- package/utils/busybox/config/editors/Config.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/utils/busybox/config/editors/Config.in b/package/utils/busybox/config/editors/Config.in index c0fbef1939..16d08bc0f8 100644 --- a/package/utils/busybox/config/editors/Config.in +++ b/package/utils/busybox/config/editors/Config.in @@ -126,8 +126,9 @@ config BUSYBOX_CONFIG_FEATURE_VI_SEARCH config BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH bool "Enable regex in search and replace" - default BUSYBOX_DEFAULT_FEATURE_VI_REGEX_SEARCH # Uses GNU regex, which may be unavailable. FIXME + default BUSYBOX_DEFAULT_FEATURE_VI_REGEX_SEARCH depends on BUSYBOX_CONFIG_FEATURE_VI_SEARCH + depends on USE_GLIBC help Use extended regex search. From 82a741c774dc1aa1e2c2e4b2e445bf79158de1a1 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sat, 16 Nov 2019 17:08:07 +0100 Subject: [PATCH 12/12] mac80211: switch to upstream owl-loader driver The Owl Loader (named after the codename that Atheros gave these devices back in the day) has been accepted upstream. This patch removes the "misc" driver OpenWrt had and adds the remaining differences against the version that ships with 5.4-rc1 into a separate "120-owl-loader-compat.patch" file that can be cut down once AR71XX is being dealt with. Note: I decided to keep the existing (kmod-)owl-loader package name around for now. The kernel module file in the kmod package will be called ath9k_pci_owl_loader.ko though. Acked-by: Hauke Mehrtens Signed-off-by: Christian Lamparter --- package/kernel/linux/modules/wireless.mk | 21 -- package/kernel/mac80211/ath.mk | 20 +- ...th9k-use-iowrite32-over-__raw_writel.patch | 40 +++ .../patches/ath/120-owl-loader-compat.patch | 53 ++++ .../generic/files/drivers/misc/owl-loader.c | 246 ------------------ .../hack-4.14/835-misc-owl_loader.patch | 52 ---- .../hack-4.19/835-misc-owl_loader.patch | 52 ---- .../hack-4.9/835-misc-owl_loader.patch | 52 ---- 8 files changed, 112 insertions(+), 424 deletions(-) create mode 100644 package/kernel/mac80211/patches/ath/101-ath9k-use-iowrite32-over-__raw_writel.patch create mode 100644 package/kernel/mac80211/patches/ath/120-owl-loader-compat.patch delete mode 100644 target/linux/generic/files/drivers/misc/owl-loader.c delete mode 100644 target/linux/generic/hack-4.14/835-misc-owl_loader.patch delete mode 100644 target/linux/generic/hack-4.19/835-misc-owl_loader.patch delete mode 100644 target/linux/generic/hack-4.9/835-misc-owl_loader.patch diff --git a/package/kernel/linux/modules/wireless.mk b/package/kernel/linux/modules/wireless.mk index 7b1c663567..72e2bf477b 100644 --- a/package/kernel/linux/modules/wireless.mk +++ b/package/kernel/linux/modules/wireless.mk @@ -41,24 +41,3 @@ define KernelPackage/net-rtl8192su/description endef $(eval $(call KernelPackage,net-rtl8192su)) - - -define KernelPackage/owl-loader - SUBMENU:=$(WIRELESS_MENU) - TITLE:=Owl loader for initializing Atheros PCI(e) Wifi chips - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_OWL_LOADER - FILES:=$(LINUX_DIR)/drivers/misc/owl-loader.ko - AUTOLOAD:=$(call AutoProbe,owl-loader) -endef - -define KernelPackage/owl-loader/description - Kernel module that helps to initialize certain Qualcomm - Atheros' PCI(e) Wifi chips, which have the init data - (which contains the PCI device ID for example) stored - together with the calibration data in the file system. - - This is necessary for devices like the Cisco Meraki Z1. -endef - -$(eval $(call KernelPackage,owl-loader)) diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk index 64aac41b4d..788131b751 100644 --- a/package/kernel/mac80211/ath.mk +++ b/package/kernel/mac80211/ath.mk @@ -1,6 +1,6 @@ PKG_DRIVERS += \ ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k \ - carl9170 + carl9170 owl-loader PKG_CONFIG_DEPENDS += \ CONFIG_PACKAGE_ATH_DEBUG \ @@ -38,6 +38,7 @@ config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK config-$(call config_package,ath9k) += ATH9K config-$(call config_package,ath9k-common) += ATH9K_COMMON +config-$(call config_package,owl-loader) += ATH9K_PCI_NO_EEPROM config-$(CONFIG_TARGET_ar71xx) += ATH9K_AHB config-$(CONFIG_TARGET_ath79) += ATH9K_AHB config-$(CONFIG_TARGET_ipq40xx) += ATH10K_AHB @@ -274,3 +275,20 @@ define KernelPackage/carl9170 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/carl9170/carl9170.ko AUTOLOAD:=$(call AutoProbe,carl9170) endef + +define KernelPackage/owl-loader + $(call KernelPackage/mac80211/Default) + TITLE:=Owl loader for initializing Atheros PCI(e) Wifi chips + DEPENDS:=@PCI_SUPPORT +kmod-ath9k + FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.ko + AUTOLOAD:=$(call AutoProbe,ath9k_pci_owl_loader) +endef + +define KernelPackage/owl-loader/description + Kernel module that helps to initialize certain Qualcomm + Atheros' PCI(e) Wifi chips, which have the init data + (which contains the PCI device ID for example) stored + together with the calibration data in the file system. + + This is necessary for devices like the Cisco Meraki Z1. +endef diff --git a/package/kernel/mac80211/patches/ath/101-ath9k-use-iowrite32-over-__raw_writel.patch b/package/kernel/mac80211/patches/ath/101-ath9k-use-iowrite32-over-__raw_writel.patch new file mode 100644 index 0000000000..dade5cfe3a --- /dev/null +++ b/package/kernel/mac80211/patches/ath/101-ath9k-use-iowrite32-over-__raw_writel.patch @@ -0,0 +1,40 @@ +From bd8eca2c0f5542c5b20b1c2cc506b8b8a46018df Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Sun, 24 Nov 2019 15:22:55 +0100 +Subject: [PATCH] ath9k: use iowrite32 over __raw_writel +To: linux-wireless@vger.kernel.org +Cc: QCA ath9k Development , + Kalle Valo , + Hauke Mehrtens , + Mathias Kresin , + Martin Blumenstingl + +This patch changes the ath9k_pci_owl_loader to use the +same iowrite32 memory accessor that ath9k_pci is using +to communicate with the PCI(e) chip. + +This will fix endian issues that came up during testing +with loaned AVM Fritz!Box 7360 (Lantiq MIPS SoCs + AR9287). + +Fixes: 5a4f2040fd07 ("ath9k: add loader for AR92XX (and older) pci(e)") +Signed-off-by: Christian Lamparter +--- + drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c +index 956fa7828d0c..56d1a7764b9f 100644 +--- a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c ++++ b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c +@@ -83,7 +83,7 @@ static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data, + val = swahb32(val); + } + +- __raw_writel(val, mem + reg); ++ iowrite32(val, mem + reg); + usleep_range(100, 120); + } + +-- +2.24.0 + diff --git a/package/kernel/mac80211/patches/ath/120-owl-loader-compat.patch b/package/kernel/mac80211/patches/ath/120-owl-loader-compat.patch new file mode 100644 index 0000000000..afd5e3eef0 --- /dev/null +++ b/package/kernel/mac80211/patches/ath/120-owl-loader-compat.patch @@ -0,0 +1,53 @@ +From: Christian Lamparter +Date: Sat, 16 Nov 2019 19:25:24 +0100 +Subject: [PATCH] owl_loader: compatibility patch + +This patch includes OpenWrt specific changes that are +not included in the upstream owl-loader. + +This includes a platform data handling changes for ar71xx. + +Signed-off-by: Christian Lamparter + +--- a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c ++++ b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c +@@ -104,6 +104,7 @@ + { + struct pci_dev *pdev = (struct pci_dev *)context; + struct owl_ctx *ctx = (struct owl_ctx *)pci_get_drvdata(pdev); ++ struct ath9k_platform_data *pdata = dev_get_platdata(&pdev->dev); + struct pci_bus *bus; + + complete(&ctx->eeprom_load); +@@ -121,6 +122,16 @@ + goto release; + } + ++ if (pdata) { ++ memcpy(pdata->eeprom_data, fw->data, fw->size); ++ ++ /* ++ * eeprom has been successfully loaded - pass the data to ath9k ++ * but remove the eeprom_name, so it doesn't try to load it too. ++ */ ++ pdata->eeprom_name = NULL; ++ } ++ + if (ath9k_pci_fixup(pdev, (const u16 *)fw->data, fw->size)) + goto release; + +@@ -138,8 +149,14 @@ + static const char *owl_get_eeprom_name(struct pci_dev *pdev) + { + struct device *dev = &pdev->dev; ++ struct ath9k_platform_data *pdata; + char *eeprom_name; + ++ /* try the existing platform data first */ ++ pdata = dev_get_platdata(dev); ++ if (pdata && pdata->eeprom_name) ++ return pdata->eeprom_name; ++ + dev_dbg(dev, "using auto-generated eeprom filename\n"); + + eeprom_name = devm_kzalloc(dev, EEPROM_FILENAME_LEN, GFP_KERNEL); diff --git a/target/linux/generic/files/drivers/misc/owl-loader.c b/target/linux/generic/files/drivers/misc/owl-loader.c deleted file mode 100644 index a4e55ad7b1..0000000000 --- a/target/linux/generic/files/drivers/misc/owl-loader.c +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Initialize Owl Emulation Devices - * - * Copyright (C) 2016 Christian Lamparter - * Copyright (C) 2016 Martin Blumenstingl - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation. - * - * Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway) - * need to be able to initialize the PCIe wifi device. Normally, this is done - * during the early stages of booting linux, because the necessary init code - * is read from the memory mapped SPI and passed to pci_enable_ath9k_fixup. - * However,this isn't possible for devices which have the init code for the - * Atheros chip stored on NAND. Hence, this module can be used to initialze - * the chip when the user-space is ready to extract the init code. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct owl_ctx { - struct completion eeprom_load; -}; - -#define EEPROM_FILENAME_LEN 100 - -#define AR5416_EEPROM_MAGIC 0xa55a - -static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data, - size_t cal_len) -{ - void __iomem *mem; - const void *cal_end = (void *)cal_data + cal_len; - const struct { - u16 reg; - u16 low_val; - u16 high_val; - } __packed *data; - u16 cmd; - u32 bar0; - bool swap_needed = false; - - if (*cal_data != AR5416_EEPROM_MAGIC) { - if (*cal_data != swab16(AR5416_EEPROM_MAGIC)) { - dev_err(&pdev->dev, "invalid calibration data\n"); - return -EINVAL; - } - - dev_dbg(&pdev->dev, "calibration data needs swapping\n"); - swap_needed = true; - } - - dev_info(&pdev->dev, "fixup device configuration\n"); - - mem = pcim_iomap(pdev, 0, 0); - if (!mem) { - dev_err(&pdev->dev, "ioremap error\n"); - return -EINVAL; - } - - pci_read_config_dword(pdev, PCI_BASE_ADDRESS_0, &bar0); - pci_write_config_dword(pdev, PCI_BASE_ADDRESS_0, - pci_resource_start(pdev, 0)); - pci_read_config_word(pdev, PCI_COMMAND, &cmd); - cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY; - pci_write_config_word(pdev, PCI_COMMAND, cmd); - - /* set pointer to first reg address */ - for (data = (const void *) (cal_data + 3); - (const void *) data <= cal_end && data->reg != (u16)~0; - data++) { - u32 val; - u16 reg; - - reg = data->reg; - val = data->low_val; - val |= ((u32)data->high_val) << 16; - - if (swap_needed) { - reg = swab16(reg); - val = swahb32(val); - } - -#ifdef CONFIG_LANTIQ - val = swab32(val); -#endif - - __raw_writel(val, mem + reg); - udelay(100); - } - - pci_read_config_word(pdev, PCI_COMMAND, &cmd); - cmd &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); - pci_write_config_word(pdev, PCI_COMMAND, cmd); - - pci_write_config_dword(pdev, PCI_BASE_ADDRESS_0, bar0); - pcim_iounmap(pdev, mem); - - pci_disable_device(pdev); - - return 0; -} - -static void owl_fw_cb(const struct firmware *fw, void *context) -{ - struct pci_dev *pdev = (struct pci_dev *) context; - struct owl_ctx *ctx = (struct owl_ctx *) pci_get_drvdata(pdev); - struct ath9k_platform_data *pdata = dev_get_platdata(&pdev->dev); - struct pci_bus *bus; - - complete(&ctx->eeprom_load); - - if (!fw) { - dev_err(&pdev->dev, "no eeprom data received.\n"); - goto release; - } - - /* also note that we are doing *u16 operations on the file */ - if (fw->size > sizeof(pdata->eeprom_data) || fw->size < 0x200 || - (fw->size & 1) == 1) { - dev_err(&pdev->dev, "eeprom file has an invalid size.\n"); - goto release; - } - - if (pdata) { - memcpy(pdata->eeprom_data, fw->data, fw->size); - - /* - * eeprom has been successfully loaded - pass the data to ath9k - * but remove the eeprom_name, so it doesn't try to load it too. - */ - pdata->eeprom_name = NULL; - } - - if (ath9k_pci_fixup(pdev, (const u16 *) fw->data, fw->size)) - goto release; - - pci_lock_rescan_remove(); - bus = pdev->bus; - pci_stop_and_remove_bus_device(pdev); - /* - * the device should come back with the proper - * ProductId. But we have to initiate a rescan. - */ - pci_rescan_bus(bus); - pci_unlock_rescan_remove(); - -release: - release_firmware(fw); -} - -static const char *owl_get_eeprom_name(struct pci_dev *pdev) -{ - struct device *dev = &pdev->dev; - struct ath9k_platform_data *pdata; - char *eeprom_name; - - /* try the existing platform data first */ - pdata = dev_get_platdata(dev); - if (pdata && pdata->eeprom_name) - return pdata->eeprom_name; - - dev_dbg(dev, "using auto-generated eeprom filename\n"); - - eeprom_name = devm_kzalloc(dev, EEPROM_FILENAME_LEN, GFP_KERNEL); - if (!eeprom_name) - return NULL; - - /* this should match the pattern used in ath9k/init.c */ - scnprintf(eeprom_name, EEPROM_FILENAME_LEN, "ath9k-eeprom-pci-%s.bin", - dev_name(dev)); - - return eeprom_name; -} - -static int owl_probe(struct pci_dev *pdev, - const struct pci_device_id *id) -{ - struct owl_ctx *ctx; - const char *eeprom_name; - int err = 0; - - if (pcim_enable_device(pdev)) - return -EIO; - - pcim_pin_device(pdev); - - eeprom_name = owl_get_eeprom_name(pdev); - if (!eeprom_name) { - dev_err(&pdev->dev, "no eeprom filename found.\n"); - return -ENODEV; - } - - ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); - if (!ctx) { - dev_err(&pdev->dev, "failed to alloc device context.\n"); - return -ENOMEM; - } - init_completion(&ctx->eeprom_load); - - pci_set_drvdata(pdev, ctx); - err = request_firmware_nowait(THIS_MODULE, true, eeprom_name, - &pdev->dev, GFP_KERNEL, pdev, owl_fw_cb); - if (err) { - dev_err(&pdev->dev, "failed to request caldata (%d).\n", err); - kfree(ctx); - } - return err; -} - -static void owl_remove(struct pci_dev *pdev) -{ - struct owl_ctx *ctx = pci_get_drvdata(pdev); - - if (ctx) { - wait_for_completion(&ctx->eeprom_load); - pci_set_drvdata(pdev, NULL); - kfree(ctx); - } -} - -static const struct pci_device_id owl_pci_table[] = { - { PCI_VDEVICE(ATHEROS, 0xff1c) }, /* PCIe */ - { PCI_VDEVICE(ATHEROS, 0xff1d) }, /* PCI */ - { }, -}; -MODULE_DEVICE_TABLE(pci, owl_pci_table); - -static struct pci_driver owl_driver = { - .name = "owl-loader", - .id_table = owl_pci_table, - .probe = owl_probe, - .remove = owl_remove, -}; -module_pci_driver(owl_driver); -MODULE_AUTHOR("Christian Lamparter "); -MODULE_DESCRIPTION("Initializes Atheros' Owl Emulation devices"); -MODULE_LICENSE("GPL v2"); diff --git a/target/linux/generic/hack-4.14/835-misc-owl_loader.patch b/target/linux/generic/hack-4.14/835-misc-owl_loader.patch deleted file mode 100644 index bf7f7d5cba..0000000000 --- a/target/linux/generic/hack-4.14/835-misc-owl_loader.patch +++ /dev/null @@ -1,52 +0,0 @@ -From dd36f935973d91644449bd9749f6062a2bed821b Mon Sep 17 00:00:00 2001 -From: Christian Lamparter -Date: Fri, 7 Jul 2017 17:26:46 +0200 -Subject: misc: owl-loader for delayed Atheros ath9k fixup - -Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway) -need to be able to initialize the PCIe wifi device. Normally, this is done -during the early stages of booting linux, because the necessary init code -is read from the memory mapped SPI and passed to pci_enable_ath9k_fixup. -However,this isn't possible for devices which have the init code for the -Atheros chip stored on NAND in an UBI volume. Hence, this module can be -used to initialze the chip when the user-space is ready to extract the -init code. - -Signed-off-by: Martin Blumenstingl -Signed-off-by: Christian Lamparter ---- - drivers/misc/Kconfig | 12 ++++++++++++ - drivers/misc/Makefile | 1 + - 2 files changed, 13 insertions(+) - ---- a/drivers/misc/Kconfig -+++ b/drivers/misc/Kconfig -@@ -151,6 +151,18 @@ config SGI_IOC4 - If you have an SGI Altix with an IOC4-based card say Y. - Otherwise say N. - -+config OWL_LOADER -+ tristate "Owl loader for initializing Atheros PCI(e) Wifi chips" -+ depends on PCI -+ ---help--- -+ This kernel module helps to initialize certain Qualcomm -+ Atheros' PCI(e) Wifi chips, which have the init data -+ (which contains the PCI device ID for example) stored -+ together with the calibration data in the file system. -+ -+ This is necessary for devices like the Cisco Meraki Z1, say M. -+ Otherwise say N. -+ - config TIFM_CORE - tristate "TI Flash Media interface support" - depends on PCI ---- a/drivers/misc/Makefile -+++ b/drivers/misc/Makefile -@@ -13,6 +13,7 @@ obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib - obj-$(CONFIG_DUMMY_IRQ) += dummy-irq.o - obj-$(CONFIG_ICS932S401) += ics932s401.o - obj-$(CONFIG_LKDTM) += lkdtm.o -+obj-$(CONFIG_OWL_LOADER) += owl-loader.o - obj-$(CONFIG_TIFM_CORE) += tifm_core.o - obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o - obj-$(CONFIG_PHANTOM) += phantom.o diff --git a/target/linux/generic/hack-4.19/835-misc-owl_loader.patch b/target/linux/generic/hack-4.19/835-misc-owl_loader.patch deleted file mode 100644 index bf0fa596ac..0000000000 --- a/target/linux/generic/hack-4.19/835-misc-owl_loader.patch +++ /dev/null @@ -1,52 +0,0 @@ -From dd36f935973d91644449bd9749f6062a2bed821b Mon Sep 17 00:00:00 2001 -From: Christian Lamparter -Date: Fri, 7 Jul 2017 17:26:46 +0200 -Subject: misc: owl-loader for delayed Atheros ath9k fixup - -Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway) -need to be able to initialize the PCIe wifi device. Normally, this is done -during the early stages of booting linux, because the necessary init code -is read from the memory mapped SPI and passed to pci_enable_ath9k_fixup. -However,this isn't possible for devices which have the init code for the -Atheros chip stored on NAND in an UBI volume. Hence, this module can be -used to initialze the chip when the user-space is ready to extract the -init code. - -Signed-off-by: Martin Blumenstingl -Signed-off-by: Christian Lamparter ---- - drivers/misc/Kconfig | 12 ++++++++++++ - drivers/misc/Makefile | 1 + - 2 files changed, 13 insertions(+) - ---- a/drivers/misc/Kconfig -+++ b/drivers/misc/Kconfig -@@ -164,6 +164,18 @@ config SGI_IOC4 - If you have an SGI Altix with an IOC4-based card say Y. - Otherwise say N. - -+config OWL_LOADER -+ tristate "Owl loader for initializing Atheros PCI(e) Wifi chips" -+ depends on PCI -+ ---help--- -+ This kernel module helps to initialize certain Qualcomm -+ Atheros' PCI(e) Wifi chips, which have the init data -+ (which contains the PCI device ID for example) stored -+ together with the calibration data in the file system. -+ -+ This is necessary for devices like the Cisco Meraki Z1, say M. -+ Otherwise say N. -+ - config TIFM_CORE - tristate "TI Flash Media interface support" - depends on PCI ---- a/drivers/misc/Makefile -+++ b/drivers/misc/Makefile -@@ -14,6 +14,7 @@ obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib - obj-$(CONFIG_DUMMY_IRQ) += dummy-irq.o - obj-$(CONFIG_ICS932S401) += ics932s401.o - obj-$(CONFIG_LKDTM) += lkdtm/ -+obj-$(CONFIG_OWL_LOADER) += owl-loader.o - obj-$(CONFIG_TIFM_CORE) += tifm_core.o - obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o - obj-$(CONFIG_PHANTOM) += phantom.o diff --git a/target/linux/generic/hack-4.9/835-misc-owl_loader.patch b/target/linux/generic/hack-4.9/835-misc-owl_loader.patch deleted file mode 100644 index 07cd4e580a..0000000000 --- a/target/linux/generic/hack-4.9/835-misc-owl_loader.patch +++ /dev/null @@ -1,52 +0,0 @@ -From dd36f935973d91644449bd9749f6062a2bed821b Mon Sep 17 00:00:00 2001 -From: Christian Lamparter -Date: Fri, 7 Jul 2017 17:26:46 +0200 -Subject: misc: owl-loader for delayed Atheros ath9k fixup - -Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway) -need to be able to initialize the PCIe wifi device. Normally, this is done -during the early stages of booting linux, because the necessary init code -is read from the memory mapped SPI and passed to pci_enable_ath9k_fixup. -However,this isn't possible for devices which have the init code for the -Atheros chip stored on NAND in an UBI volume. Hence, this module can be -used to initialze the chip when the user-space is ready to extract the -init code. - -Signed-off-by: Martin Blumenstingl -Signed-off-by: Christian Lamparter ---- - drivers/misc/Kconfig | 12 ++++++++++++ - drivers/misc/Makefile | 1 + - 2 files changed, 13 insertions(+) - ---- a/drivers/misc/Kconfig -+++ b/drivers/misc/Kconfig -@@ -151,6 +151,18 @@ config SGI_IOC4 - If you have an SGI Altix with an IOC4-based card say Y. - Otherwise say N. - -+config OWL_LOADER -+ tristate "Owl loader for initializing Atheros PCI(e) Wifi chips" -+ depends on PCI -+ ---help--- -+ This kernel module helps to initialize certain Qualcomm -+ Atheros' PCI(e) Wifi chips, which have the init data -+ (which contains the PCI device ID for example) stored -+ together with the calibration data in the file system. -+ -+ This is necessary for devices like the Cisco Meraki Z1, say M. -+ Otherwise say N. -+ - config TIFM_CORE - tristate "TI Flash Media interface support" - depends on PCI ---- a/drivers/misc/Makefile -+++ b/drivers/misc/Makefile -@@ -12,6 +12,7 @@ obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib - obj-$(CONFIG_DUMMY_IRQ) += dummy-irq.o - obj-$(CONFIG_ICS932S401) += ics932s401.o - obj-$(CONFIG_LKDTM) += lkdtm.o -+obj-$(CONFIG_OWL_LOADER) += owl-loader.o - obj-$(CONFIG_TIFM_CORE) += tifm_core.o - obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o - obj-$(CONFIG_PHANTOM) += phantom.o