Selaa lähdekoodia

ipq806x: 6.1: manually refresh kernel patches

Refresh kernel patches for version 6.1.

Signed-off-by: Christian Marangi <[email protected]>
Christian Marangi 3 vuotta sitten
vanhempi
sitoutus
eb69d7a4ff

+ 2 - 2
target/linux/ipq806x/patches-6.1/0067-generic-Mangle-bootloader-s-kernel-arguments.patch

@@ -248,7 +248,7 @@ Signed-off-by: Adrian Panella <[email protected]>
  }
  }
 --- a/init/main.c
 --- a/init/main.c
 +++ b/init/main.c
 +++ b/init/main.c
-@@ -114,6 +114,10 @@
+@@ -113,6 +113,10 @@
  
  
  #include <kunit/test.h>
  #include <kunit/test.h>
  
  
@@ -259,7 +259,7 @@ Signed-off-by: Adrian Panella <[email protected]>
  static int kernel_init(void *);
  static int kernel_init(void *);
  
  
  extern void init_IRQ(void);
  extern void init_IRQ(void);
-@@ -993,6 +997,18 @@ asmlinkage __visible void __init __no_sa
+@@ -992,6 +996,18 @@ asmlinkage __visible void __init __no_sa
  	pr_notice("Kernel command line: %s\n", saved_command_line);
  	pr_notice("Kernel command line: %s\n", saved_command_line);
  	/* parameters may set static keys */
  	/* parameters may set static keys */
  	jump_label_init();
  	jump_label_init();

+ 31 - 31
target/linux/ipq806x/patches-6.1/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch

@@ -29,7 +29,25 @@ Tested-by: Jonathan McDowell <[email protected]>
  		cxo_board: cxo_board {
  		cxo_board: cxo_board {
  			compatible = "fixed-clock";
  			compatible = "fixed-clock";
  			#clock-cells = <0>;
  			#clock-cells = <0>;
-@@ -503,11 +509,19 @@
+@@ -490,6 +490,17 @@
+ 			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+ 			clock-names = "pll8_vote", "pxo";
+ 			clock-output-names = "acpu_l2_aux";
++			#clock-cells = <0>;
++		};
++
++		kraitcc: clock-controller {
++			compatible = "qcom,krait-cc-v1";
++			clocks = <&gcc PLL9>, <&gcc PLL10>, <&gcc PLL12>,
++				 <&acc0>, <&acc1>, <&l2cc>, <&qsb>, <&pxo_board>;
++			clock-names = "hfpll0", "hfpll1", "hfpll_l2",
++				      "acpu0_aux", "acpu1_aux", "acpu_l2_aux",
++				      "qsb", "pxo";
++			#clock-cells = <1>;
+ 		};
+ 
+ 		acc0: clock-controller@2088000 {
+@@ -503,17 +509,25 @@
  		acc0: clock-controller@2088000 {
  		acc0: clock-controller@2088000 {
  			compatible = "qcom,kpss-acc-v1";
  			compatible = "qcom,kpss-acc-v1";
  			reg = <0x02088000 0x1000>, <0x02008000 0x1000>;
  			reg = <0x02088000 0x1000>, <0x02008000 0x1000>;
@@ -39,6 +57,13 @@ Tested-by: Jonathan McDowell <[email protected]>
 +			#clock-cells = <0>;
 +			#clock-cells = <0>;
  		};
  		};
  
  
+ 		saw0: regulator@2089000 {
+-			compatible = "qcom,saw2";
++			compatible = "qcom,saw2", "qcom,apq8064-saw2-v1.1-cpu", "syscon";
+ 			reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
+ 			regulator;
+ 		};
+ 
  		acc1: clock-controller@2098000 {
  		acc1: clock-controller@2098000 {
  			compatible = "qcom,kpss-acc-v1";
  			compatible = "qcom,kpss-acc-v1";
  			reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
  			reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
@@ -48,15 +73,8 @@ Tested-by: Jonathan McDowell <[email protected]>
 +			#clock-cells = <0>;
 +			#clock-cells = <0>;
  		};
  		};
  
  
- 		adm_dma: dma-controller@18300000 {
-@@ -531,17 +545,23 @@
- 		};
- 
- 		saw0: regulator@2089000 {
--			compatible = "qcom,saw2";
-+			compatible = "qcom,saw2", "qcom,apq8064-saw2-v1.1-cpu", "syscon";
- 			reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
- 			regulator;
+ 		saw1: regulator@2099000 {
+@@ -531,11 +545,17 @@
  		};
  		};
  
  
  		saw1: regulator@2099000 {
  		saw1: regulator@2099000 {
@@ -72,24 +90,6 @@ Tested-by: Jonathan McDowell <[email protected]>
 +			regulator;
 +			regulator;
 +		};
 +		};
 +
 +
- 		gsbi1: gsbi@12440000 {
- 			compatible = "qcom,gsbi-v1.0.0";
- 			reg = <0x12440000 0x100>;
-@@ -920,6 +940,17 @@
- 			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
- 			clock-names = "pll8_vote", "pxo";
- 			clock-output-names = "acpu_l2_aux";
-+			#clock-cells = <0>;
-+		};
-+
-+		kraitcc: clock-controller {
-+			compatible = "qcom,krait-cc-v1";
-+			clocks = <&gcc PLL9>, <&gcc PLL10>, <&gcc PLL12>,
-+				 <&acc0>, <&acc1>, <&l2cc>, <&qsb>, <&pxo_board>;
-+			clock-names = "hfpll0", "hfpll1", "hfpll_l2",
-+				      "acpu0_aux", "acpu1_aux", "acpu_l2_aux",
-+				      "qsb", "pxo";
-+			#clock-cells = <1>;
- 		};
- 
- 		lcc: clock-controller@28000000 {
+ 		nss_common: syscon@03000000 {
+ 			compatible = "syscon";
+ 			reg = <0x03000000 0x0000FFFF>;

+ 42 - 49
target/linux/ipq806x/patches-6.1/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch

@@ -51,7 +51,7 @@ Signed-off-by: Christian Marangi <[email protected]>
  obj-$(CONFIG_PM_DEVFREQ_EVENT)		+= event/
  obj-$(CONFIG_PM_DEVFREQ_EVENT)		+= event/
 --- /dev/null
 --- /dev/null
 +++ b/drivers/devfreq/krait-cache-devfreq.c
 +++ b/drivers/devfreq/krait-cache-devfreq.c
-@@ -0,0 +1,188 @@
+@@ -0,0 +1,181 @@
 +// SPDX-License-Identifier: GPL-2.0
 +// SPDX-License-Identifier: GPL-2.0
 +
 +
 +#include <linux/kernel.h>
 +#include <linux/kernel.h>
@@ -71,28 +71,25 @@ Signed-off-by: Christian Marangi <[email protected]>
 +struct krait_cache_data {
 +struct krait_cache_data {
 +	struct clk *clk;
 +	struct clk *clk;
 +	unsigned long idle_freq;
 +	unsigned long idle_freq;
++	int token;
 +};
 +};
 +
 +
-+static int krait_cache_set_opp(struct dev_pm_set_opp_data *data)
++static int krait_cache_config_clk(struct device *dev, struct opp_table *opp_table,
++			struct dev_pm_opp *old_opp, struct dev_pm_opp *opp,
++			void *data, bool scaling_down)
 +{
 +{
-+	unsigned long old_freq = data->old_opp.rate, freq = data->new_opp.rate;
-+	struct dev_pm_opp_supply *supply = &data->new_opp.supplies[0];
-+	struct regulator *reg = data->regulators[0];
 +	struct krait_cache_data *kdata;
 +	struct krait_cache_data *kdata;
-+	struct clk *clk = data->clk;
++	unsigned long old_freq, freq;
 +	unsigned long idle_freq;
 +	unsigned long idle_freq;
++	struct clk *clk;
 +	int ret;
 +	int ret;
 +
 +
-+	kdata = dev_get_drvdata(data->dev);
++	kdata = dev_get_drvdata(dev);
 +	idle_freq = kdata->idle_freq;
 +	idle_freq = kdata->idle_freq;
++	clk = kdata->clk;
 +
 +
-+	if (reg) {
-+		ret = regulator_set_voltage_triplet(reg, supply->u_volt_min,
-+						    supply->u_volt,
-+						    supply->u_volt_max);
-+		if (ret)
-+			goto exit;
-+	}
++	old_freq = dev_pm_opp_get_freq(old_opp);
++	freq = dev_pm_opp_get_freq(opp);
 +
 +
 +	/*
 +	/*
 +	 * Set to idle bin if switching from normal to high bin
 +	 * Set to idle bin if switching from normal to high bin
@@ -104,15 +101,10 @@ Signed-off-by: Christian Marangi <[email protected]>
 +	if (likely(freq != idle_freq && old_freq != idle_freq)) {
 +	if (likely(freq != idle_freq && old_freq != idle_freq)) {
 +		ret = clk_set_rate(clk, idle_freq);
 +		ret = clk_set_rate(clk, idle_freq);
 +		if (ret)
 +		if (ret)
-+			goto exit;
++			return ret;
 +	}
 +	}
 +
 +
-+	ret = clk_set_rate(clk, freq);
-+	if (ret)
-+		goto exit;
-+
-+exit:
-+	return ret;
++	return clk_set_rate(clk, freq);
 +};
 +};
 +
 +
 +static int krait_cache_get_cur_freq(struct device *dev, unsigned long *freq)
 +static int krait_cache_get_cur_freq(struct device *dev, unsigned long *freq)
@@ -162,15 +154,13 @@ Signed-off-by: Christian Marangi <[email protected]>
 +
 +
 +static int krait_cache_probe(struct platform_device *pdev)
 +static int krait_cache_probe(struct platform_device *pdev)
 +{
 +{
++	struct dev_pm_opp_config config = { };
 +	struct device *dev = &pdev->dev;
 +	struct device *dev = &pdev->dev;
 +	struct krait_cache_data *data;
 +	struct krait_cache_data *data;
-+	struct opp_table *table;
 +	struct devfreq *devfreq;
 +	struct devfreq *devfreq;
 +	struct dev_pm_opp *opp;
 +	struct dev_pm_opp *opp;
 +	struct clk *clk;
 +	struct clk *clk;
-+	int ret;
-+
-+	krait_cache_devfreq_profile.freq_table = NULL;
++	int ret, token;
 +
 +
 +	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
 +	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
 +	if (!data)
 +	if (!data)
@@ -180,44 +170,47 @@ Signed-off-by: Christian Marangi <[email protected]>
 +	if (IS_ERR(clk))
 +	if (IS_ERR(clk))
 +		return PTR_ERR(clk);
 +		return PTR_ERR(clk);
 +
 +
-+	table = dev_pm_opp_set_regulators(dev, (const char *[]){ "l2" }, 1);
-+	if (IS_ERR(table)) {
-+		ret = PTR_ERR(table);
-+		dev_err_probe(dev, -EPROBE_DEFER, "failed to set regulators %d\n", ret);
-+		return ret;
-+	}
++	config.regulator_names = (const char *[]){ "l2", NULL };
++	config.clk_names = (const char *[]){ "l2", NULL };
++	config.config_clks = krait_cache_config_clk;
 +
 +
-+	ret = PTR_ERR_OR_ZERO(
-+		dev_pm_opp_register_set_opp_helper(dev, krait_cache_set_opp));
-+	if (ret)
-+		return ret;
++	token = dev_pm_opp_set_config(dev, &config);
++	if (token < 0)
++		return token;
 +
 +
-+	ret = dev_pm_opp_of_add_table(dev);
-+	if (ret) {
-+		dev_err(dev, "failed to parse L2 freq thresholds\n");
-+		return ret;
-+	}
++	ret = devm_pm_opp_of_add_table(dev);
++	if (ret)
++		goto free_opp;
 +
 +
-+	data->clk = clk;
 +	opp = dev_pm_opp_find_freq_ceil(dev, &data->idle_freq);
 +	opp = dev_pm_opp_find_freq_ceil(dev, &data->idle_freq);
++	if (IS_ERR(opp)) {
++		ret = PTR_ERR(opp);
++		goto free_opp;
++	}
 +	dev_pm_opp_put(opp);
 +	dev_pm_opp_put(opp);
 +
 +
++	data->token = token;
++	data->clk = clk;
 +	dev_set_drvdata(dev, data);
 +	dev_set_drvdata(dev, data);
-+
-+	devfreq = devm_devfreq_add_device(&pdev->dev, &krait_cache_devfreq_profile,
++	devfreq = devm_devfreq_add_device(dev, &krait_cache_devfreq_profile,
 +					  DEVFREQ_GOV_PASSIVE, &devfreq_gov_data);
 +					  DEVFREQ_GOV_PASSIVE, &devfreq_gov_data);
 +	if (IS_ERR(devfreq)) {
 +	if (IS_ERR(devfreq)) {
-+		dev_pm_opp_remove_table(dev);
-+		dev_pm_opp_put_regulators(table);
-+		dev_pm_opp_unregister_set_opp_helper(table);
++		ret = PTR_ERR(devfreq);
++		goto free_opp;
 +	}
 +	}
 +
 +
-+	return PTR_ERR_OR_ZERO(devfreq);
++	return 0;
++
++free_opp:
++	dev_pm_opp_clear_config(token);
++	return ret;
 +};
 +};
 +
 +
 +static int krait_cache_remove(struct platform_device *pdev)
 +static int krait_cache_remove(struct platform_device *pdev)
 +{
 +{
-+	dev_pm_opp_remove_table(&pdev->dev);
++	struct krait_cache_data *data = dev_get_drvdata(&pdev->dev);
++
++	dev_pm_opp_clear_config(data->token);
 +
 +
 +	return 0;
 +	return 0;
 +};
 +};
@@ -238,5 +231,5 @@ Signed-off-by: Christian Marangi <[email protected]>
 +module_platform_driver(krait_cache_driver);
 +module_platform_driver(krait_cache_driver);
 +
 +
 +MODULE_DESCRIPTION("Krait CPU Cache Scaling driver");
 +MODULE_DESCRIPTION("Krait CPU Cache Scaling driver");
-+MODULE_AUTHOR("Christian 'Ansuel' Marangi <[email protected]>");
++MODULE_AUTHOR("Christian Marangi <[email protected]>");
 +MODULE_LICENSE("GPL v2");
 +MODULE_LICENSE("GPL v2");

+ 8 - 4
target/linux/ipq806x/patches-6.1/120-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch

@@ -13,15 +13,16 @@ Link: https://lore.kernel.org/r/[email protected]
  drivers/clk/qcom/kpss-xcc.c | 13 +++++++++----
  drivers/clk/qcom/kpss-xcc.c | 13 +++++++++----
  1 file changed, 9 insertions(+), 4 deletions(-)
  1 file changed, 9 insertions(+), 4 deletions(-)
 
 
+diff --git a/drivers/clk/qcom/kpss-xcc.c b/drivers/clk/qcom/kpss-xcc.c
+index b1b370274ec4..97358c98c6c9 100644
 --- a/drivers/clk/qcom/kpss-xcc.c
 --- a/drivers/clk/qcom/kpss-xcc.c
 +++ b/drivers/clk/qcom/kpss-xcc.c
 +++ b/drivers/clk/qcom/kpss-xcc.c
-@@ -31,13 +31,14 @@ MODULE_DEVICE_TABLE(of, kpss_xcc_match_t
+@@ -31,12 +31,13 @@ MODULE_DEVICE_TABLE(of, kpss_xcc_match_table);
  
  
  static int kpss_xcc_driver_probe(struct platform_device *pdev)
  static int kpss_xcc_driver_probe(struct platform_device *pdev)
  {
  {
 +	struct device *dev = &pdev->dev;
 +	struct device *dev = &pdev->dev;
  	const struct of_device_id *id;
  	const struct of_device_id *id;
- 	struct resource *res;
  	void __iomem *base;
  	void __iomem *base;
  	struct clk_hw *hw;
  	struct clk_hw *hw;
  	const char *name;
  	const char *name;
@@ -31,7 +32,7 @@ Link: https://lore.kernel.org/r/[email protected]
  	if (!id)
  	if (!id)
  		return -ENODEV;
  		return -ENODEV;
  
  
-@@ -47,7 +48,7 @@ static int kpss_xcc_driver_probe(struct
+@@ -45,7 +46,7 @@ static int kpss_xcc_driver_probe(struct platform_device *pdev)
  		return PTR_ERR(base);
  		return PTR_ERR(base);
  
  
  	if (id->data) {
  	if (id->data) {
@@ -40,7 +41,7 @@ Link: https://lore.kernel.org/r/[email protected]
  						  "clock-output-names",
  						  "clock-output-names",
  						  0, &name))
  						  0, &name))
  			return -ENODEV;
  			return -ENODEV;
-@@ -57,12 +58,16 @@ static int kpss_xcc_driver_probe(struct
+@@ -55,12 +56,16 @@ static int kpss_xcc_driver_probe(struct platform_device *pdev)
  		base += 0x28;
  		base += 0x28;
  	}
  	}
  
  
@@ -59,3 +60,6 @@ Link: https://lore.kernel.org/r/[email protected]
  }
  }
  
  
  static struct platform_driver kpss_xcc_driver = {
  static struct platform_driver kpss_xcc_driver = {
+-- 
+2.37.2
+

+ 6 - 1
target/linux/ipq806x/patches-6.1/121-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch

@@ -14,9 +14,11 @@ Link: https://lore.kernel.org/r/[email protected]
  drivers/clk/qcom/krait-cc.c | 2 +-
  drivers/clk/qcom/krait-cc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 
+diff --git a/drivers/clk/qcom/krait-cc.c b/drivers/clk/qcom/krait-cc.c
+index e91275663973..33a78b7de0bd 100644
 --- a/drivers/clk/qcom/krait-cc.c
 --- a/drivers/clk/qcom/krait-cc.c
 +++ b/drivers/clk/qcom/krait-cc.c
 +++ b/drivers/clk/qcom/krait-cc.c
-@@ -62,7 +62,7 @@ static int krait_notifier_register(struc
+@@ -64,7 +64,7 @@ static int krait_notifier_register(struct device *dev, struct clk *clk,
  	int ret = 0;
  	int ret = 0;
  
  
  	mux->clk_nb.notifier_call = krait_notifier_cb;
  	mux->clk_nb.notifier_call = krait_notifier_cb;
@@ -25,3 +27,6 @@ Link: https://lore.kernel.org/r/[email protected]
  	if (ret)
  	if (ret)
  		dev_err(dev, "failed to register clock notifier: %d\n", ret);
  		dev_err(dev, "failed to register clock notifier: %d\n", ret);
  
  
+-- 
+2.37.2
+

+ 9 - 4
target/linux/ipq806x/patches-6.1/122-01-clk-qcom-krait-cc-handle-qsb-clock-defined-in-DTS.patch

@@ -12,18 +12,20 @@ Signed-off-by: Christian Marangi <[email protected]>
  drivers/clk/qcom/krait-cc.c | 14 +++++++++++---
  drivers/clk/qcom/krait-cc.c | 14 +++++++++++---
  1 file changed, 11 insertions(+), 3 deletions(-)
  1 file changed, 11 insertions(+), 3 deletions(-)
 
 
+diff --git a/drivers/clk/qcom/krait-cc.c b/drivers/clk/qcom/krait-cc.c
+index 84f0048961f5..f1d64b16cac3 100644
 --- a/drivers/clk/qcom/krait-cc.c
 --- a/drivers/clk/qcom/krait-cc.c
 +++ b/drivers/clk/qcom/krait-cc.c
 +++ b/drivers/clk/qcom/krait-cc.c
-@@ -348,7 +348,7 @@ static int krait_cc_probe(struct platfor
+@@ -305,7 +305,7 @@ static int krait_cc_probe(struct platform_device *pdev)
  {
  {
  	struct device *dev = &pdev->dev;
  	struct device *dev = &pdev->dev;
  	const struct of_device_id *id;
  	const struct of_device_id *id;
 -	unsigned long cur_rate, aux_rate;
 -	unsigned long cur_rate, aux_rate;
 +	unsigned long cur_rate, aux_rate, qsb_rate;
 +	unsigned long cur_rate, aux_rate, qsb_rate;
  	int cpu;
  	int cpu;
- 	struct clk_hw *mux, *l2_pri_mux;
- 	struct clk *clk, **clks;
-@@ -357,11 +357,19 @@ static int krait_cc_probe(struct platfor
+ 	struct clk *clk;
+ 	struct clk **clks;
+@@ -315,11 +315,19 @@ static int krait_cc_probe(struct platform_device *pdev)
  	if (!id)
  	if (!id)
  		return -ENODEV;
  		return -ENODEV;
  
  
@@ -45,3 +47,6 @@ Signed-off-by: Christian Marangi <[email protected]>
  	if (!id->data) {
  	if (!id->data) {
  		clk = clk_register_fixed_factor(dev, "acpu_aux",
  		clk = clk_register_fixed_factor(dev, "acpu_aux",
  						"gpll0_vote", 0, 1, 2);
  						"gpll0_vote", 0, 1, 2);
+-- 
+2.37.2
+

+ 6 - 1
target/linux/ipq806x/patches-6.1/122-02-clk-qcom-krait-cc-register-REAL-qsb-fixed-clock.patch

@@ -14,6 +14,8 @@ Signed-off-by: Christian Marangi <[email protected]>
  drivers/clk/qcom/krait-cc.c | 8 +++++---
  drivers/clk/qcom/krait-cc.c | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
  1 file changed, 5 insertions(+), 3 deletions(-)
 
 
+diff --git a/drivers/clk/qcom/krait-cc.c b/drivers/clk/qcom/krait-cc.c
+index f1d64b16cac3..e91275663973 100644
 --- a/drivers/clk/qcom/krait-cc.c
 --- a/drivers/clk/qcom/krait-cc.c
 +++ b/drivers/clk/qcom/krait-cc.c
 +++ b/drivers/clk/qcom/krait-cc.c
 @@ -25,6 +25,8 @@ enum {
 @@ -25,6 +25,8 @@ enum {
@@ -25,7 +27,7 @@ Signed-off-by: Christian Marangi <[email protected]>
  static unsigned int sec_mux_map[] = {
  static unsigned int sec_mux_map[] = {
  	2,
  	2,
  	0,
  	0,
-@@ -364,7 +366,7 @@ static int krait_cc_probe(struct platfor
+@@ -322,7 +324,7 @@ static int krait_cc_probe(struct platform_device *pdev)
  	 */
  	 */
  	clk = clk_get(dev, "qsb");
  	clk = clk_get(dev, "qsb");
  	if (IS_ERR(clk))
  	if (IS_ERR(clk))
@@ -34,3 +36,6 @@ Signed-off-by: Christian Marangi <[email protected]>
  	if (IS_ERR(clk))
  	if (IS_ERR(clk))
  		return PTR_ERR(clk);
  		return PTR_ERR(clk);
  
  
+-- 
+2.37.2
+

+ 7 - 2
target/linux/ipq806x/patches-6.1/122-03-clk-qcom-krait-cc-drop-pr_info-and-use-dev_info.patch

@@ -10,10 +10,12 @@ Signed-off-by: Christian Marangi <[email protected]>
  drivers/clk/qcom/krait-cc.c | 8 ++++----
  drivers/clk/qcom/krait-cc.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 
+diff --git a/drivers/clk/qcom/krait-cc.c b/drivers/clk/qcom/krait-cc.c
+index b71067a49ee7..e4fb3ff2b5b5 100644
 --- a/drivers/clk/qcom/krait-cc.c
 --- a/drivers/clk/qcom/krait-cc.c
 +++ b/drivers/clk/qcom/krait-cc.c
 +++ b/drivers/clk/qcom/krait-cc.c
-@@ -423,25 +423,25 @@ static int krait_cc_probe(struct platfor
- 	cur_rate = clk_get_rate(clks[l2_mux]);
+@@ -391,25 +391,25 @@ static int krait_cc_probe(struct platform_device *pdev)
+ 	cur_rate = clk_get_rate(l2_pri_mux_clk);
  	aux_rate = 384000000;
  	aux_rate = 384000000;
  	if (cur_rate < aux_rate) {
  	if (cur_rate < aux_rate) {
 -		pr_info("L2 @ Undefined rate. Forcing new rate.\n");
 -		pr_info("L2 @ Undefined rate. Forcing new rate.\n");
@@ -42,3 +44,6 @@ Signed-off-by: Christian Marangi <[email protected]>
  	}
  	}
  
  
  	of_clk_add_provider(dev->of_node, krait_of_get, clks);
  	of_clk_add_provider(dev->of_node, krait_of_get, clks);
+-- 
+2.37.2
+

+ 8 - 4
target/linux/ipq806x/patches-6.1/122-04-clk-qcom-krait-cc-rework-mux-reset-logic-and-reset-h.patch

@@ -17,6 +17,8 @@ Signed-off-by: Christian Marangi <[email protected]>
  drivers/clk/qcom/krait-cc.c | 50 +++++++++++++++++--------------------
  drivers/clk/qcom/krait-cc.c | 50 +++++++++++++++++--------------------
  1 file changed, 23 insertions(+), 27 deletions(-)
  1 file changed, 23 insertions(+), 27 deletions(-)
 
 
+diff --git a/drivers/clk/qcom/krait-cc.c b/drivers/clk/qcom/krait-cc.c
+index 717eff44b6a4..90dee71e7c38 100644
 --- a/drivers/clk/qcom/krait-cc.c
 --- a/drivers/clk/qcom/krait-cc.c
 +++ b/drivers/clk/qcom/krait-cc.c
 +++ b/drivers/clk/qcom/krait-cc.c
 @@ -25,7 +25,9 @@ enum {
 @@ -25,7 +25,9 @@ enum {
@@ -30,16 +32,16 @@ Signed-off-by: Christian Marangi <[email protected]>
  
  
  static unsigned int sec_mux_map[] = {
  static unsigned int sec_mux_map[] = {
  	2,
  	2,
-@@ -350,7 +352,7 @@ static int krait_cc_probe(struct platfor
+@@ -317,7 +319,7 @@ static int krait_cc_probe(struct platform_device *pdev)
  {
  {
  	struct device *dev = &pdev->dev;
  	struct device *dev = &pdev->dev;
  	const struct of_device_id *id;
  	const struct of_device_id *id;
 -	unsigned long cur_rate, aux_rate, qsb_rate;
 -	unsigned long cur_rate, aux_rate, qsb_rate;
 +	unsigned long cur_rate, qsb_rate;
 +	unsigned long cur_rate, qsb_rate;
  	int cpu;
  	int cpu;
- 	struct clk_hw *mux, *l2_pri_mux;
- 	struct clk *clk, **clks;
-@@ -420,28 +422,29 @@ static int krait_cc_probe(struct platfor
+ 	struct clk *clk;
+ 	struct clk **clks;
+@@ -397,28 +399,29 @@ static int krait_cc_probe(struct platform_device *pdev)
  	 * two different rates to force a HFPLL reinit under all
  	 * two different rates to force a HFPLL reinit under all
  	 * circumstances.
  	 * circumstances.
  	 */
  	 */
@@ -86,3 +88,5 @@ Signed-off-by: Christian Marangi <[email protected]>
  	}
  	}
  
  
  	of_clk_add_provider(dev->of_node, krait_of_get, clks);
  	of_clk_add_provider(dev->of_node, krait_of_get, clks);
+ 
+

+ 1 - 1
target/linux/ipq806x/patches-6.1/850-soc-add-qualcomm-syscon.patch

@@ -12,7 +12,7 @@ Subject: SoC: add qualcomm syscon
  obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o
  obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o
 --- a/drivers/soc/qcom/Kconfig
 --- a/drivers/soc/qcom/Kconfig
 +++ b/drivers/soc/qcom/Kconfig
 +++ b/drivers/soc/qcom/Kconfig
-@@ -192,6 +192,13 @@ config QCOM_SOCINFO
+@@ -190,6 +190,13 @@ config QCOM_SOCINFO
  	 Say yes here to support the Qualcomm socinfo driver, providing
  	 Say yes here to support the Qualcomm socinfo driver, providing
  	 information about the SoC to user space.
  	 information about the SoC to user space.
  
  

+ 3 - 3
target/linux/ipq806x/patches-6.1/900-arm-add-cmdline-override.patch

@@ -19,7 +19,7 @@
 +++ b/drivers/of/fdt.c
 +++ b/drivers/of/fdt.c
 @@ -1162,6 +1162,17 @@ int __init early_init_dt_scan_chosen(uns
 @@ -1162,6 +1162,17 @@ int __init early_init_dt_scan_chosen(uns
  	if (p != NULL && l > 0)
  	if (p != NULL && l > 0)
- 		strlcat(data, p, min_t(int, strlen(data) + (int)l, COMMAND_LINE_SIZE));
+ 		strlcat(cmdline, p, min_t(int, strlen(cmdline) + (int)l, COMMAND_LINE_SIZE));
  
  
 +    /* CONFIG_CMDLINE_OVERRIDE is used to fallback to a different
 +    /* CONFIG_CMDLINE_OVERRIDE is used to fallback to a different
 +     * device tree option of chosen/bootargs-override. This is
 +     * device tree option of chosen/bootargs-override. This is
@@ -29,9 +29,9 @@
 +#ifdef CONFIG_CMDLINE_OVERRIDE
 +#ifdef CONFIG_CMDLINE_OVERRIDE
 +	p = of_get_flat_dt_prop(node, "bootargs-override", &l);
 +	p = of_get_flat_dt_prop(node, "bootargs-override", &l);
 +	if (p != NULL && l > 0)
 +	if (p != NULL && l > 0)
-+		strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE));
++		strlcpy(cmdline, p, min((int)l, COMMAND_LINE_SIZE));
 +#endif
 +#endif
 +
 +
+ handle_cmdline:
  	/*
  	/*
  	 * CONFIG_CMDLINE is meant to be a default in case nothing else
  	 * CONFIG_CMDLINE is meant to be a default in case nothing else
- 	 * managed to set the command line, unless CONFIG_CMDLINE_FORCE