From: Ansuel Smith Date: Sun, 26 Jan 2020 03:27:46 +0000 (+0100) Subject: ipq806x: refresh patches for kernel 5.4 X-Git-Tag: v21.02.0-rc1~3608 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=71eb7b057b953e8ea40eae3c19db5c064f28b677;p=openwrt%2Fstaging%2Fpepe2k.git ipq806x: refresh patches for kernel 5.4 Refresh patches and minor changes for new kernel support Signed-off-by: Ansuel Smith --- diff --git a/target/linux/ipq806x/patches-5.4/0002-dmaengine-Add-ADM-driver.patch b/target/linux/ipq806x/patches-5.4/0002-dmaengine-Add-ADM-driver.patch index fedb8ed798..aa7d2e791e 100644 --- a/target/linux/ipq806x/patches-5.4/0002-dmaengine-Add-ADM-driver.patch +++ b/target/linux/ipq806x/patches-5.4/0002-dmaengine-Add-ADM-driver.patch @@ -26,7 +26,7 @@ Signed-off-by: Thomas Pedersen --- a/drivers/dma/qcom/Kconfig +++ b/drivers/dma/qcom/Kconfig -@@ -27,3 +27,13 @@ config QCOM_HIDMA +@@ -28,3 +28,13 @@ config QCOM_HIDMA (user to kernel, kernel to kernel, etc.). It only supports memcpy interface. The core is not intended for general purpose slave DMA. diff --git a/target/linux/ipq806x/patches-5.4/0030-clk-Disable-i2c-device-on-gsbi4.patch b/target/linux/ipq806x/patches-5.4/0030-clk-Disable-i2c-device-on-gsbi4.patch index b2a6afe0dd..a5fb714e6c 100644 --- a/target/linux/ipq806x/patches-5.4/0030-clk-Disable-i2c-device-on-gsbi4.patch +++ b/target/linux/ipq806x/patches-5.4/0030-clk-Disable-i2c-device-on-gsbi4.patch @@ -12,7 +12,7 @@ Signed-off-by: John Crispin --- a/drivers/clk/qcom/gcc-ipq806x.c +++ b/drivers/clk/qcom/gcc-ipq806x.c -@@ -294,7 +294,7 @@ static struct clk_rcg gsbi1_uart_src = { +@@ -365,7 +365,7 @@ static struct clk_rcg gsbi1_uart_src = { .parent_names = gcc_pxo_pll8, .num_parents = 2, .ops = &clk_rcg_ops, @@ -21,7 +21,7 @@ Signed-off-by: John Crispin }, }, }; -@@ -312,7 +312,7 @@ static struct clk_branch gsbi1_uart_clk +@@ -383,7 +383,7 @@ static struct clk_branch gsbi1_uart_clk }, .num_parents = 1, .ops = &clk_branch_ops, @@ -30,7 +30,7 @@ Signed-off-by: John Crispin }, }, }; -@@ -890,6 +890,7 @@ static struct clk_branch gsbi1_h_clk = { +@@ -961,6 +961,7 @@ static struct clk_branch gsbi1_h_clk = { .hw.init = &(struct clk_init_data){ .name = "gsbi1_h_clk", .ops = &clk_branch_ops, diff --git a/target/linux/ipq806x/patches-5.4/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch b/target/linux/ipq806x/patches-5.4/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch index a7e95513fd..e19ad5277e 100644 --- a/target/linux/ipq806x/patches-5.4/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch +++ b/target/linux/ipq806x/patches-5.4/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch @@ -10,17 +10,17 @@ SMEM and use it to register an MTD layout according to its content. Signed-off-by: Mathieu Olivari Signed-off-by: Ram Chandra Jangir --- - drivers/mtd/Kconfig | 7 ++ - drivers/mtd/Makefile | 1 + - drivers/mtd/qcom_smem_part.c | 228 +++++++++++++++++++++++++++++++++++++++++++ + drivers/mtd/parsers/Kconfig | 7 ++ + drivers/mtd/parsers/Makefile | 1 + + drivers/mtd/parsers/qcom_smem_part.c | 228 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 236 insertions(+) - create mode 100644 drivers/mtd/qcom_smem_part.c + create mode 100644 drivers/mtd/parsers/qcom_smem_part.c ---- a/drivers/mtd/Kconfig -+++ b/drivers/mtd/Kconfig -@@ -193,6 +193,13 @@ config MTD_MYLOADER_PARTS - You will still need the parsing functions to be called by the driver - for your particular device. It won't happen automatically. +--- a/drivers/mtd/parsers/Kconfig ++++ b/drivers/mtd/parsers/Kconfig +@@ -20,6 +20,13 @@ config MTD_BCM63XX_PARTS + This provides partition parsing for BCM63xx devices with CFE + bootloaders. +config MTD_QCOM_SMEM_PARTS + tristate "QCOM SMEM partitioning support" @@ -29,11 +29,11 @@ Signed-off-by: Ram Chandra Jangir + This provides partitions parser for QCOM devices using SMEM + such as IPQ806x. + - comment "User Modules And Translation Layers" - - # + config MTD_CMDLINE_PARTS + tristate "Command line partition table parsing" + depends on MTD --- /dev/null -+++ b/drivers/mtd/qcom_smem_part.c ++++ b/drivers/mtd/parsers/qcom_smem_part.c @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2015, The Linux Foundation. All rights reserved. @@ -149,7 +149,7 @@ Signed-off-by: Ram Chandra Jangir + return 0; +} + -+static int of_dev_node_match(struct device *dev, void *data) ++static int of_dev_node_match(struct device *dev, const void *data) +{ + return dev->of_node == data; +} @@ -270,13 +270,13 @@ Signed-off-by: Ram Chandra Jangir +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Mathieu Olivari "); +MODULE_DESCRIPTION("Parsing code for SMEM based partition tables"); ---- a/drivers/mtd/Makefile -+++ b/drivers/mtd/Makefile -@@ -17,6 +17,7 @@ obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o - obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o - obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o - obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o +--- a/drivers/mtd/parsers/Makefile ++++ b/drivers/mtd/parsers/Makefile +@@ -3,6 +3,7 @@ obj-$(CONFIG_MTD_AR7_PARTS) += ar7part. + obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o + obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o + obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o +obj-$(CONFIG_MTD_QCOM_SMEM_PARTS) += qcom_smem_part.o - obj-y += parsers/ - - # 'Users' - code which presents functionality to userspace. + obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o + obj-$(CONFIG_MTD_PARSER_IMAGETAG) += parser_imagetag.o + obj-$(CONFIG_MTD_AFS_PARTS) += afs.o diff --git a/target/linux/ipq806x/patches-5.4/0032-phy-add-qcom-dwc3-phy.patch b/target/linux/ipq806x/patches-5.4/0032-phy-add-qcom-dwc3-phy.patch index 0de0878f86..3eabba0ab4 100644 --- a/target/linux/ipq806x/patches-5.4/0032-phy-add-qcom-dwc3-phy.patch +++ b/target/linux/ipq806x/patches-5.4/0032-phy-add-qcom-dwc3-phy.patch @@ -8,7 +8,7 @@ Signed-off-by: Andy Gross --- a/drivers/phy/qualcomm/Kconfig +++ b/drivers/phy/qualcomm/Kconfig -@@ -65,3 +65,15 @@ config PHY_QCOM_USB_HSIC +@@ -91,3 +91,15 @@ config PHY_QCOM_USB_HSIC select GENERIC_PHY help Support for the USB HSIC ULPI compliant PHY on QCOM chipsets. @@ -26,8 +26,8 @@ Signed-off-by: Andy Gross + --- a/drivers/phy/qualcomm/Makefile +++ b/drivers/phy/qualcomm/Makefile -@@ -9,3 +9,4 @@ obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom- - obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom-ufs-qmp-20nm.o +@@ -10,3 +10,4 @@ obj-$(CONFIG_PHY_QCOM_UFS_14NM) += phy- + obj-$(CONFIG_PHY_QCOM_UFS_20NM) += phy-qcom-ufs-qmp-20nm.o obj-$(CONFIG_PHY_QCOM_USB_HS) += phy-qcom-usb-hs.o obj-$(CONFIG_PHY_QCOM_USB_HSIC) += phy-qcom-usb-hsic.o +obj-$(CONFIG_PHY_QCOM_DWC3) += phy-qcom-dwc3.o diff --git a/target/linux/ipq806x/patches-5.4/0033-ARM-qcom-automatically-select-PCI_DOMAINS-if-PCI-is-.patch b/target/linux/ipq806x/patches-5.4/0033-ARM-qcom-automatically-select-PCI_DOMAINS-if-PCI-is-.patch index a6c7953aaa..a12aa721e2 100644 --- a/target/linux/ipq806x/patches-5.4/0033-ARM-qcom-automatically-select-PCI_DOMAINS-if-PCI-is-.patch +++ b/target/linux/ipq806x/patches-5.4/0033-ARM-qcom-automatically-select-PCI_DOMAINS-if-PCI-is-.patch @@ -19,7 +19,7 @@ Signed-off-by: Mathieu Olivari --- a/arch/arm/mach-qcom/Kconfig +++ b/arch/arm/mach-qcom/Kconfig -@@ -6,6 +6,7 @@ menuconfig ARCH_QCOM +@@ -7,6 +7,7 @@ menuconfig ARCH_QCOM select ARM_AMBA select PINCTRL select QCOM_SCM if SMP diff --git a/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch b/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch index bb82251bfd..efbc34dbe0 100644 --- a/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch +++ b/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch @@ -39,7 +39,7 @@ Signed-off-by: Sylwester Nawrocki --- a/drivers/opp/core.c +++ b/drivers/opp/core.c -@@ -1623,6 +1623,75 @@ put_table: +@@ -2103,6 +2103,75 @@ put_table: } /** @@ -117,7 +117,7 @@ Signed-off-by: Sylwester Nawrocki * @freq: OPP frequency to enable --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h -@@ -25,6 +25,7 @@ struct opp_table; +@@ -22,6 +22,7 @@ struct opp_table; enum dev_pm_opp_event { OPP_EVENT_ADD, OPP_EVENT_REMOVE, OPP_EVENT_ENABLE, OPP_EVENT_DISABLE, @@ -125,9 +125,9 @@ Signed-off-by: Sylwester Nawrocki }; /** -@@ -108,6 +109,10 @@ int dev_pm_opp_add(struct device *dev, u - unsigned long u_volt); +@@ -113,6 +114,10 @@ int dev_pm_opp_add(struct device *dev, u void dev_pm_opp_remove(struct device *dev, unsigned long freq); + void dev_pm_opp_remove_all_dynamic(struct device *dev); +int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq, + unsigned long u_volt, unsigned long u_volt_min, @@ -136,7 +136,7 @@ Signed-off-by: Sylwester Nawrocki int dev_pm_opp_enable(struct device *dev, unsigned long freq); int dev_pm_opp_disable(struct device *dev, unsigned long freq); -@@ -208,6 +213,14 @@ static inline void dev_pm_opp_remove(str +@@ -242,6 +247,14 @@ static inline void dev_pm_opp_remove_all { } diff --git a/target/linux/ipq806x/patches-5.4/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch b/target/linux/ipq806x/patches-5.4/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch index 4312db905a..35fe45fca7 100644 --- a/target/linux/ipq806x/patches-5.4/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch +++ b/target/linux/ipq806x/patches-5.4/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/opp/core.c +++ b/drivers/opp/core.c -@@ -125,6 +125,27 @@ unsigned long dev_pm_opp_get_freq(struct +@@ -127,6 +127,27 @@ unsigned long dev_pm_opp_get_freq(struct } EXPORT_SYMBOL_GPL(dev_pm_opp_get_freq); @@ -38,15 +38,15 @@ Signed-off-by: Georgi Djakov +EXPORT_SYMBOL_GPL(dev_pm_opp_get_regulator); + /** - * dev_pm_opp_is_turbo() - Returns if opp is turbo OPP or not - * @opp: opp for which turbo mode is being verified + * dev_pm_opp_get_level() - Gets the level corresponding to an available opp + * @opp: opp for which level value has to be returned for --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h -@@ -85,6 +85,7 @@ void dev_pm_opp_put_opp_table(struct opp +@@ -83,6 +83,7 @@ void dev_pm_opp_put_opp_table(struct opp unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp); unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp); +struct regulator *dev_pm_opp_get_regulator(struct device *dev); - bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp); + unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp); diff --git a/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch b/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch index 8ba2369ddd..433889970a 100644 --- a/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch +++ b/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch @@ -17,7 +17,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/opp/core.c +++ b/drivers/opp/core.c -@@ -1663,6 +1663,7 @@ int dev_pm_opp_adjust_voltage(struct dev +@@ -2143,6 +2143,7 @@ int dev_pm_opp_adjust_voltage(struct dev struct opp_table *opp_table; struct dev_pm_opp *tmp_opp, *opp = ERR_PTR(-ENODEV); int r = 0; @@ -25,7 +25,7 @@ Signed-off-by: Georgi Djakov /* Find the opp_table */ opp_table = _find_opp_table(dev); -@@ -1692,8 +1693,17 @@ int dev_pm_opp_adjust_voltage(struct dev +@@ -2172,8 +2173,17 @@ int dev_pm_opp_adjust_voltage(struct dev goto adjust_unlock; opp->supplies->u_volt = u_volt; diff --git a/target/linux/ipq806x/patches-5.4/0053-regulator-add-smb208-support.patch b/target/linux/ipq806x/patches-5.4/0053-regulator-add-smb208-support.patch index 0d2862c609..058b303798 100644 --- a/target/linux/ipq806x/patches-5.4/0053-regulator-add-smb208-support.patch +++ b/target/linux/ipq806x/patches-5.4/0053-regulator-add-smb208-support.patch @@ -31,7 +31,7 @@ Signed-off-by: Adrian Panella --- a/drivers/regulator/qcom_rpm-regulator.c +++ b/drivers/regulator/qcom_rpm-regulator.c -@@ -933,12 +933,21 @@ static const struct rpm_regulator_data r +@@ -925,12 +925,21 @@ static const struct rpm_regulator_data r { } }; diff --git a/target/linux/ipq806x/patches-5.4/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch b/target/linux/ipq806x/patches-5.4/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch index 9620891194..2e9c101d94 100644 --- a/target/linux/ipq806x/patches-5.4/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch +++ b/target/linux/ipq806x/patches-5.4/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch @@ -25,9 +25,9 @@ Signed-off-by: Georgi Djakov --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c -@@ -32,6 +32,9 @@ struct private_data { +@@ -27,6 +27,9 @@ struct private_data { + struct opp_table *opp_table; struct device *cpu_dev; - struct thermal_cooling_device *cdev; const char *reg_name; + struct notifier_block opp_nb; + struct mutex lock; @@ -35,7 +35,7 @@ Signed-off-by: Georgi Djakov bool have_static_opps; }; -@@ -47,12 +50,15 @@ static int set_target(struct cpufreq_pol +@@ -42,12 +45,15 @@ static int set_target(struct cpufreq_pol unsigned long freq = policy->freq_table[index].frequency; int ret; @@ -51,7 +51,7 @@ Signed-off-by: Georgi Djakov return ret; } -@@ -95,6 +101,39 @@ node_put: +@@ -90,6 +96,39 @@ node_put: return name; } @@ -91,7 +91,7 @@ Signed-off-by: Georgi Djakov static int resources_available(void) { struct device *cpu_dev; -@@ -251,10 +290,14 @@ static int cpufreq_init(struct cpufreq_p +@@ -246,10 +285,14 @@ static int cpufreq_init(struct cpufreq_p __func__, ret); } @@ -107,7 +107,7 @@ Signed-off-by: Georgi Djakov } priv->cpu_dev = cpu_dev; -@@ -284,6 +327,8 @@ static int cpufreq_init(struct cpufreq_p +@@ -281,6 +324,8 @@ static int cpufreq_init(struct cpufreq_p out_free_cpufreq_table: dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); diff --git a/target/linux/ipq806x/patches-5.4/0056-cpufreq-dt-Add-missing-rcu-locks.patch b/target/linux/ipq806x/patches-5.4/0056-cpufreq-dt-Add-missing-rcu-locks.patch index ef03ba4de8..9b85839e19 100644 --- a/target/linux/ipq806x/patches-5.4/0056-cpufreq-dt-Add-missing-rcu-locks.patch +++ b/target/linux/ipq806x/patches-5.4/0056-cpufreq-dt-Add-missing-rcu-locks.patch @@ -10,7 +10,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c -@@ -173,8 +173,10 @@ static int opp_notifier(struct notifier_ +@@ -178,8 +178,10 @@ static int opp_notifier(struct notifier_ ret = PTR_ERR(cpu_reg); goto out; } diff --git a/target/linux/ipq806x/patches-5.4/0057-add-fab-scaling-support-with-cpufreq.patch b/target/linux/ipq806x/patches-5.4/0057-add-fab-scaling-support-with-cpufreq.patch index dc65230f47..441500df79 100644 --- a/target/linux/ipq806x/patches-5.4/0057-add-fab-scaling-support-with-cpufreq.patch +++ b/target/linux/ipq806x/patches-5.4/0057-add-fab-scaling-support-with-cpufreq.patch @@ -109,8 +109,7 @@ + drv_data->cpu_freq_threshold = 1000000000; + } + -+ drv_data->apps_fab_clk = devm_clk_get(&pdev->dev, "apps-fab-clk"); -+ apps_fab_clk = drv_data->apps_fab_clk; ++ apps_fab_clk = devm_clk_get(&pdev->dev, "apps-fab-clk"); + ret = PTR_ERR_OR_ZERO(apps_fab_clk); + if (ret) { + /* @@ -124,11 +123,11 @@ + goto err; + } + -+ clk_set_rate(apps_fab_clk, drv_data->fab_freq_high); + clk_prepare_enable(apps_fab_clk); ++ clk_set_rate(apps_fab_clk, drv_data->fab_freq_high); ++ drv_data->apps_fab_clk = apps_fab_clk; + -+ drv_data->ddr_fab_clk = devm_clk_get(&pdev->dev, "ddr-fab-clk"); -+ ddr_fab_clk = drv_data->ddr_fab_clk; ++ ddr_fab_clk = devm_clk_get(&pdev->dev, "ddr-fab-clk"); + ret = PTR_ERR_OR_ZERO(ddr_fab_clk); + if (ret) { + /* @@ -143,8 +142,9 @@ + goto err; + } + -+ clk_set_rate(ddr_fab_clk, drv_data->fab_freq_high); + clk_prepare_enable(ddr_fab_clk); ++ clk_set_rate(ddr_fab_clk, drv_data->fab_freq_high); ++ drv_data->ddr_fab_clk = ddr_fab_clk; + + return 0; +err: @@ -219,7 +219,7 @@ +#endif --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c -@@ -24,6 +24,7 @@ +@@ -20,6 +20,7 @@ #include #include #include @@ -227,7 +227,7 @@ #include "cpufreq-dt.h" -@@ -106,6 +107,13 @@ static int set_target(struct cpufreq_pol +@@ -111,6 +112,13 @@ static int set_target(struct cpufreq_pol } } } diff --git a/target/linux/ipq806x/patches-5.4/0059-ARM-cpuidle-Add-cpuidle-support-for-QCOM-cpus.patch b/target/linux/ipq806x/patches-5.4/0059-ARM-cpuidle-Add-cpuidle-support-for-QCOM-cpus.patch index 5bd58c8137..7d6e3f1605 100644 --- a/target/linux/ipq806x/patches-5.4/0059-ARM-cpuidle-Add-cpuidle-support-for-QCOM-cpus.patch +++ b/target/linux/ipq806x/patches-5.4/0059-ARM-cpuidle-Add-cpuidle-support-for-QCOM-cpus.patch @@ -16,7 +16,7 @@ Signed-off-by: Lina Iyer --- a/drivers/cpuidle/Kconfig.arm +++ b/drivers/cpuidle/Kconfig.arm -@@ -75,3 +75,10 @@ config ARM_MVEBU_V7_CPUIDLE +@@ -86,3 +86,10 @@ config ARM_MVEBU_V7_CPUIDLE depends on ARCH_MVEBU && !ARM64 help Select this to enable cpuidle on Armada 370, 38x and XP processors. diff --git a/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch b/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch index 543f18ce4d..d3b39ac3e3 100644 --- a/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch +++ b/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch @@ -33,7 +33,7 @@ Signed-off-by: Mathieu Olivari --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -331,7 +331,7 @@ config ARCH_MULTIPLATFORM +@@ -318,7 +318,7 @@ config ARCH_MULTIPLATFORM depends on MMU select ARM_HAS_SG_CHAIN select ARM_PATCH_PHYS_VIRT @@ -44,7 +44,7 @@ Signed-off-by: Mathieu Olivari select GENERIC_CLOCKEVENTS --- a/arch/arm/Makefile +++ b/arch/arm/Makefile -@@ -255,9 +255,11 @@ MACHINE := arch/arm/mach-$(word 1,$(mac +@@ -258,9 +258,11 @@ MACHINE := arch/arm/mach-$(word 1,$(mac else MACHINE := endif diff --git a/target/linux/ipq806x/patches-5.4/0061-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch b/target/linux/ipq806x/patches-5.4/0061-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch index a4a957545b..ff6f6edf49 100644 --- a/target/linux/ipq806x/patches-5.4/0061-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch +++ b/target/linux/ipq806x/patches-5.4/0061-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch @@ -5,11 +5,11 @@ Subject: [PATCH 61/69] mtd: "rootfs" conflicts with OpenWrt auto mounting Signed-off-by: John Crispin --- - drivers/mtd/qcom_smem_part.c | 4 ++++ + drivers/mtd/parsers/qcom_smem_part.c | 4 ++++ 1 file changed, 4 insertions(+) ---- a/drivers/mtd/qcom_smem_part.c -+++ b/drivers/mtd/qcom_smem_part.c +--- a/drivers/mtd/parsers/qcom_smem_part.c ++++ b/drivers/mtd/parsers/qcom_smem_part.c @@ -189,6 +189,10 @@ static int parse_qcom_smem_partitions(st m_part->size = le32_to_cpu(s_part->size) * (*smem_blksz); m_part->offset = le32_to_cpu(s_part->start) * (*smem_blksz); diff --git a/target/linux/ipq806x/patches-5.4/0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch b/target/linux/ipq806x/patches-5.4/0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch index 717934315a..0965a31d90 100644 --- a/target/linux/ipq806x/patches-5.4/0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch +++ b/target/linux/ipq806x/patches-5.4/0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch @@ -14,7 +14,7 @@ Signed-off-by: Abhishek Sahu --- a/drivers/clk/qcom/gcc-ipq806x.c +++ b/drivers/clk/qcom/gcc-ipq806x.c -@@ -1233,6 +1233,8 @@ static struct clk_rcg prng_src = { +@@ -1225,6 +1225,8 @@ static struct clk_rcg prng_src = { .parent_map = gcc_pxo_pll8_map, }, .clkr = { diff --git a/target/linux/ipq806x/patches-5.4/0064-clk-clk-rpm-fixes.patch b/target/linux/ipq806x/patches-5.4/0064-clk-clk-rpm-fixes.patch index 72217de12e..e3a955b659 100644 --- a/target/linux/ipq806x/patches-5.4/0064-clk-clk-rpm-fixes.patch +++ b/target/linux/ipq806x/patches-5.4/0064-clk-clk-rpm-fixes.patch @@ -17,12 +17,12 @@ Signed-off-by: John Crispin "qcom,rpmcc-apq8064", "qcom,rpmcc" "qcom,rpmcc-msm8996", "qcom,rpmcc" + "qcom,rpmcc-ipq806x", "qcom,rpmcc" - - - #clock-cells : shall contain 1 + "qcom,rpmcc-msm8998", "qcom,rpmcc" + "qcom,rpmcc-qcs404", "qcom,rpmcc" --- a/include/dt-bindings/clock/qcom,rpmcc.h +++ b/include/dt-bindings/clock/qcom,rpmcc.h -@@ -45,6 +45,10 @@ +@@ -37,6 +37,10 @@ #define RPM_XO_A0 27 #define RPM_XO_A1 28 #define RPM_XO_A2 29 @@ -35,7 +35,7 @@ Signed-off-by: John Crispin #define RPM_SMD_XO_CLK_SRC 0 --- a/drivers/clk/qcom/clk-rpm.c +++ b/drivers/clk/qcom/clk-rpm.c -@@ -520,6 +520,16 @@ DEFINE_CLK_RPM_XO_BUFFER(apq8064, xo_a0_ +@@ -512,6 +512,16 @@ DEFINE_CLK_RPM_XO_BUFFER(apq8064, xo_a0_ DEFINE_CLK_RPM_XO_BUFFER(apq8064, xo_a1_clk, xo_a1_a_clk, 24); DEFINE_CLK_RPM_XO_BUFFER(apq8064, xo_a2_clk, xo_a2_a_clk, 28); @@ -52,7 +52,7 @@ Signed-off-by: John Crispin static struct clk_rpm *apq8064_clks[] = { [RPM_APPS_FABRIC_CLK] = &apq8064_afab_clk, [RPM_APPS_FABRIC_A_CLK] = &apq8064_afab_a_clk, -@@ -546,15 +556,40 @@ static struct clk_rpm *apq8064_clks[] = +@@ -538,15 +548,40 @@ static struct clk_rpm *apq8064_clks[] = [RPM_XO_A2] = &apq8064_xo_a2_clk, }; diff --git a/target/linux/ipq806x/patches-5.4/0065-arm-override-compiler-flags.patch b/target/linux/ipq806x/patches-5.4/0065-arm-override-compiler-flags.patch index 6f1cdcf4d6..0d2a4274c7 100644 --- a/target/linux/ipq806x/patches-5.4/0065-arm-override-compiler-flags.patch +++ b/target/linux/ipq806x/patches-5.4/0065-arm-override-compiler-flags.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/arm/Makefile +++ b/arch/arm/Makefile -@@ -64,7 +64,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-i +@@ -67,7 +67,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-i # macro, but instead defines a whole series of macros which makes # testing for a specific architecture or later rather impossible. arch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m diff --git a/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch index b7b9c991e0..396309d203 100644 --- a/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch @@ -22,7 +22,7 @@ Signed-off-by: Adrian Panella --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1926,6 +1926,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN +@@ -1825,6 +1825,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN The command-line arguments provided by the boot loader will be appended to the the device tree bootargs property. @@ -133,7 +133,7 @@ Signed-off-by: Adrian Panella } *ptr = '\0'; -@@ -148,7 +212,9 @@ int atags_to_fdt(void *atag_list, void * +@@ -166,7 +230,9 @@ int atags_to_fdt(void *atag_list, void * else setprop_string(fdt, "/chosen", "bootargs", atag->u.cmdline.cmdline); @@ -144,7 +144,7 @@ Signed-off-by: Adrian Panella if (memcount >= sizeof(mem_reg_property)/4) continue; if (!atag->u.mem.size) -@@ -187,6 +253,10 @@ int atags_to_fdt(void *atag_list, void * +@@ -210,6 +276,10 @@ int atags_to_fdt(void *atag_list, void * setprop(fdt, "/memory", "reg", mem_reg_property, 4 * memcount * memsize); } @@ -157,7 +157,7 @@ Signed-off-by: Adrian Panella } --- a/init/main.c +++ b/init/main.c -@@ -102,6 +102,10 @@ +@@ -103,6 +103,10 @@ #define CREATE_TRACE_POINTS #include @@ -168,7 +168,7 @@ Signed-off-by: Adrian Panella static int kernel_init(void *); extern void init_IRQ(void); -@@ -593,6 +597,18 @@ asmlinkage __visible void __init start_k +@@ -632,6 +636,18 @@ asmlinkage __visible void __init start_k pr_notice("Kernel command line: %s\n", boot_command_line); /* parameters may set static keys */ jump_label_init(); diff --git a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch index 77ce4c4245..1d21703bdd 100644 --- a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch +++ b/target/linux/ipq806x/patches-5.4/0069-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 -@@ -791,6 +791,18 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -843,6 +843,18 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-ipq4019-ap.dk07.1-c1.dtb \ qcom-ipq4019-ap.dk07.1-c2.dtb \ qcom-ipq8064-ap148.dtb \ diff --git a/target/linux/ipq806x/patches-5.4/0070-qcom-spm-fix-probe-order.patch b/target/linux/ipq806x/patches-5.4/0070-qcom-spm-fix-probe-order.patch index b7e375dfb2..febfd53398 100644 --- a/target/linux/ipq806x/patches-5.4/0070-qcom-spm-fix-probe-order.patch +++ b/target/linux/ipq806x/patches-5.4/0070-qcom-spm-fix-probe-order.patch @@ -4,9 +4,9 @@ Signed-off-by: Felix Fietkau --- a/drivers/soc/qcom/spm.c +++ b/drivers/soc/qcom/spm.c -@@ -219,6 +219,9 @@ static int __init qcom_cpuidle_init(stru - cpumask_t mask; - bool use_scm_power_down = false; +@@ -214,6 +214,9 @@ static int __init qcom_cpuidle_init(stru + if (!qcom_scm_is_available()) + return -EPROBE_DEFER; + if (!qcom_scm_is_available()) + return -EPROBE_DEFER; diff --git a/target/linux/ipq806x/patches-5.4/0071-6-PCI-qcom-Force-GEN1-support.patch b/target/linux/ipq806x/patches-5.4/0071-6-PCI-qcom-Force-GEN1-support.patch index c1461e68c2..275b7c0915 100644 --- a/target/linux/ipq806x/patches-5.4/0071-6-PCI-qcom-Force-GEN1-support.patch +++ b/target/linux/ipq806x/patches-5.4/0071-6-PCI-qcom-Force-GEN1-support.patch @@ -38,7 +38,7 @@ Signed-off-by: Sham Muthayyan /* Set the Max TLP size to 2K, instead of using default of 4K */ -@@ -1367,6 +1375,8 @@ static int qcom_pcie_probe(struct platfo +@@ -1340,6 +1348,8 @@ static int qcom_pcie_probe(struct platfo struct dw_pcie *pci; struct qcom_pcie *pcie; int ret; @@ -47,7 +47,7 @@ Signed-off-by: Sham Muthayyan pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); if (!pcie) -@@ -1397,6 +1407,9 @@ static int qcom_pcie_probe(struct platfo +@@ -1370,6 +1380,9 @@ static int qcom_pcie_probe(struct platfo goto err_pm_runtime_put; } diff --git a/target/linux/ipq806x/patches-5.4/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch b/target/linux/ipq806x/patches-5.4/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch index e7b5b6f9af..51df248c04 100644 --- a/target/linux/ipq806x/patches-5.4/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch +++ b/target/linux/ipq806x/patches-5.4/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch @@ -31,7 +31,7 @@ Signed-off-by: Gokul Sriram Palanisamy #define QCOM_PCIE_2_1_0_MAX_SUPPLY 3 struct qcom_pcie_resources_2_1_0 { struct clk *iface_clk; -@@ -1475,6 +1483,35 @@ err_pm_runtime_put: +@@ -1448,6 +1456,35 @@ err_pm_runtime_put: return ret; } diff --git a/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch b/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch index 76c7cfd568..5d6d5316c7 100644 --- a/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch +++ b/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch @@ -1,12 +1,10 @@ --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c -@@ -609,6 +609,9 @@ static const struct of_device_id qcom_sc - { .compatible = "qcom,scm-ipq4019", - .data = NULL, /* no clocks */ +@@ -601,6 +601,7 @@ static const struct of_device_id qcom_sc + SCM_HAS_BUS_CLK) }, -+ { .compatible = "qcom,scm-ipq806x", -+ .data = NULL, /* no clocks */ -+ }, - { .compatible = "qcom,scm", - .data = (void *)(SCM_HAS_CORE_CLK - | SCM_HAS_IFACE_CLK + { .compatible = "qcom,scm-ipq4019" }, ++ { .compatible = "qcom,scm-ipq806x" }, + { .compatible = "qcom,scm-msm8660", .data = (void *) SCM_HAS_CORE_CLK }, + { .compatible = "qcom,scm-msm8960", .data = (void *) SCM_HAS_CORE_CLK }, + { .compatible = "qcom,scm-msm8916", .data = (void *)(SCM_HAS_CORE_CLK | diff --git a/target/linux/ipq806x/patches-5.4/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch b/target/linux/ipq806x/patches-5.4/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch index 78a5bb4173..53e81b7a78 100644 --- a/target/linux/ipq806x/patches-5.4/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch +++ b/target/linux/ipq806x/patches-5.4/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch @@ -14,7 +14,7 @@ Signed-off-by: Ajay Kishore --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c -@@ -30,7 +30,8 @@ +@@ -22,7 +22,8 @@ #include #include #include @@ -24,7 +24,7 @@ Signed-off-by: Ajay Kishore #include "../core.h" #include "../pinconf.h" #include "pinctrl-msm.h" -@@ -628,6 +629,9 @@ static void msm_gpio_irq_mask(struct irq +@@ -706,6 +707,9 @@ static void msm_gpio_irq_mask(struct irq const struct msm_pingroup *g; unsigned long flags; u32 val; @@ -34,22 +34,30 @@ Signed-off-by: Ajay Kishore g = &pctrl->soc->groups[d->hwirq]; -@@ -732,11 +736,30 @@ static int msm_gpio_irq_set_type(struct +@@ -819,6 +823,7 @@ static int msm_gpio_irq_set_type(struct + const struct msm_pingroup *g; + unsigned long flags; + u32 val; ++ int ret; + + g = &pctrl->soc->groups[d->hwirq]; + +@@ -832,11 +837,30 @@ static int msm_gpio_irq_set_type(struct else clear_bit(d->hwirq, pctrl->dual_edge_irqs); -+ int ret = of_device_is_compatible(pctrl->dev->of_node, ++ ret = of_device_is_compatible(pctrl->dev->of_node, + "qcom,ipq8064-pinctrl"); /* Route interrupts to application cpu */ -- val = readl(pctrl->regs + g->intr_target_reg); +- val = msm_readl_intr_target(pctrl, g); - val &= ~(7 << g->intr_target_bit); - val |= g->intr_target_kpss_val << g->intr_target_bit; -- writel(val, pctrl->regs + g->intr_target_reg); +- msm_writel_intr_target(val, pctrl, g); + if (!ret) { -+ val = readl(pctrl->regs + g->intr_target_reg); ++ val = msm_readl_intr_target(pctrl, g); + val &= ~(7 << g->intr_target_bit); + val |= g->intr_target_kpss_val << g->intr_target_bit; -+ writel(val, pctrl->regs + g->intr_target_reg); ++ msm_writel_intr_target(val, pctrl, g); + } else { + const __be32 *reg = of_get_property(pctrl->dev->of_node, "reg", NULL); + if (reg) { diff --git a/target/linux/ipq806x/patches-5.4/0075-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch b/target/linux/ipq806x/patches-5.4/0075-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch index 2867239d1c..a0ea8eba54 100644 --- a/target/linux/ipq806x/patches-5.4/0075-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch +++ b/target/linux/ipq806x/patches-5.4/0075-ipq8064-pinctrl-Fixed-missing-RGMII-pincontrol-defin.patch @@ -10,7 +10,7 @@ Signed-off-by: Ram Chandra Jangir --- a/drivers/pinctrl/qcom/pinctrl-ipq8064.c +++ b/drivers/pinctrl/qcom/pinctrl-ipq8064.c -@@ -308,7 +308,7 @@ static const char * const gpio_groups[] +@@ -299,7 +299,7 @@ static const char * const gpio_groups[] }; static const char * const mdio_groups[] = { @@ -19,7 +19,7 @@ Signed-off-by: Ram Chandra Jangir }; static const char * const mi2s_groups[] = { -@@ -412,8 +412,8 @@ static const char * const usb2_hsic_grou +@@ -403,8 +403,8 @@ static const char * const usb2_hsic_grou }; static const char * const rgmii2_groups[] = { @@ -30,7 +30,7 @@ Signed-off-by: Ram Chandra Jangir }; static const char * const sata_groups[] = { -@@ -548,7 +548,7 @@ static const struct msm_function ipq8064 +@@ -539,7 +539,7 @@ static const struct msm_function ipq8064 static const struct msm_pingroup ipq8064_groups[] = { PINGROUP(0, mdio, NA, NA, NA, NA, NA, NA, NA, NA, NA), PINGROUP(1, mdio, NA, NA, NA, NA, NA, NA, NA, NA, NA), @@ -39,7 +39,7 @@ Signed-off-by: Ram Chandra Jangir PINGROUP(3, pcie1_rst, pcie1_prsnt, pdm, NA, NA, NA, NA, NA, NA, NA), PINGROUP(4, pcie1_pwren_n, pcie1_pwren, NA, NA, NA, NA, NA, NA, NA, NA), PINGROUP(5, pcie1_clk_req, pcie1_pwrflt, NA, NA, NA, NA, NA, NA, NA, NA), -@@ -612,7 +612,7 @@ static const struct msm_pingroup ipq8064 +@@ -603,7 +603,7 @@ static const struct msm_pingroup ipq8064 PINGROUP(63, pcie3_rst, NA, NA, NA, NA, NA, NA, NA, NA, NA), PINGROUP(64, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), PINGROUP(65, pcie3_clk_req, NA, NA, NA, NA, NA, NA, NA, NA, NA), diff --git a/target/linux/ipq806x/patches-5.4/080-ARM-dts-qcom-add-gpio-ranges-property.patch b/target/linux/ipq806x/patches-5.4/080-ARM-dts-qcom-add-gpio-ranges-property.patch index 1ab070bdab..1e572a91a5 100644 --- a/target/linux/ipq806x/patches-5.4/080-ARM-dts-qcom-add-gpio-ranges-property.patch +++ b/target/linux/ipq806x/patches-5.4/080-ARM-dts-qcom-add-gpio-ranges-property.patch @@ -60,7 +60,7 @@ will be executed twice with the same parameters for the same pinctrl. --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi -@@ -668,6 +668,7 @@ +@@ -671,6 +671,7 @@ reg = <0x800000 0x4000>; gpio-controller; diff --git a/target/linux/ipq806x/patches-5.4/850-soc-add-qualcomm-syscon.patch b/target/linux/ipq806x/patches-5.4/850-soc-add-qualcomm-syscon.patch index 50414596d9..9e1ac7db04 100644 --- a/target/linux/ipq806x/patches-5.4/850-soc-add-qualcomm-syscon.patch +++ b/target/linux/ipq806x/patches-5.4/850-soc-add-qualcomm-syscon.patch @@ -2,9 +2,9 @@ From: Christian Lamparter Subject: SoC: add qualcomm syscon --- a/drivers/soc/qcom/Makefile +++ b/drivers/soc/qcom/Makefile -@@ -18,6 +18,7 @@ obj-$(CONFIG_QCOM_SMEM_STATE) += smem_st - obj-$(CONFIG_QCOM_SMP2P) += smp2p.o +@@ -20,6 +20,7 @@ obj-$(CONFIG_QCOM_SMP2P) += smp2p.o obj-$(CONFIG_QCOM_SMSM) += smsm.o + obj-$(CONFIG_QCOM_SOCINFO) += socinfo.o obj-$(CONFIG_QCOM_WCNSS_CTRL) += wcnss_ctrl.o +obj-$(CONFIG_QCOM_TCSR) += qcom_tcsr.o obj-$(CONFIG_QCOM_APR) += apr.o @@ -12,9 +12,9 @@ Subject: SoC: add qualcomm syscon obj-$(CONFIG_QCOM_SDM845_LLCC) += llcc-sdm845.o --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig -@@ -146,6 +146,13 @@ config QCOM_SMSM - Say yes here to support the Qualcomm Shared Memory State Machine. - The state machine is represented by bits in shared memory. +@@ -183,6 +183,13 @@ config QCOM_SOCINFO + Say yes here to support the Qualcomm socinfo driver, providing + information about the SoC to user space. +config QCOM_TCSR + tristate "QCOM Top Control and Status Registers" @@ -25,7 +25,7 @@ Subject: SoC: add qualcomm syscon + config QCOM_WCNSS_CTRL tristate "Qualcomm WCNSS control driver" - depends on ARCH_QCOM + depends on ARCH_QCOM || COMPILE_TEST --- /dev/null +++ b/drivers/soc/qcom/qcom_tcsr.c @@ -0,0 +1,64 @@