Skip to content

Commit

Permalink
rk3588: edge: Rewrite kernel patches
Browse files Browse the repository at this point in the history
  • Loading branch information
ColorfulRhino committed Jun 12, 2024
1 parent 9bb9f7b commit d6de4a8
Show file tree
Hide file tree
Showing 30 changed files with 95 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Subject: compile .scr and install overlays in right path
2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
index 67956f6496a5..151687728a60 100644
index 111111111111..222222222222 100644
--- a/scripts/Makefile.dtbinst
+++ b/scripts/Makefile.dtbinst
@@ -33,7 +33,18 @@ endef
Expand All @@ -33,7 +33,7 @@ index 67956f6496a5..151687728a60 100644
endif # CONFIG_ARCH_WANT_FLAT_DTB_INSTALL

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 9f06f6aaf7fc..a8254bab1b96 100644
index 111111111111..222222222222 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -402,7 +402,7 @@ $(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Signed-off-by: Sebastian Reichel <[email protected]>
1 file changed, 11 insertions(+)

diff --git a/include/linux/math.h b/include/linux/math.h
index dd4152711de7..f80bfb375ab9 100644
index 111111111111..222222222222 100644
--- a/include/linux/math.h
+++ b/include/linux/math.h
@@ -36,6 +36,17 @@
Expand Down Expand Up @@ -67,7 +67,7 @@ Signed-off-by: Sebastian Reichel <[email protected]>
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
index a2c2b5203b0a..94b4fb66a60f 100644
index 111111111111..222222222222 100644
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -220,7 +220,7 @@ static int _div_round_up(const struct clk_div_table *table,
Expand Down Expand Up @@ -114,7 +114,7 @@ Signed-off-by: Sebastian Reichel <[email protected]>
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
index 66759fe28fad..478a4e594336 100644
index 111111111111..222222222222 100644
--- a/drivers/clk/clk-composite.c
+++ b/drivers/clk/clk-composite.c
@@ -6,6 +6,7 @@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Subject: irqchip/irq-gic-v3-its: fix its timeout issue for rk35xx boards
1 file changed, 72 insertions(+), 7 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 40ebf1726393..eb6ca4504a27 100644
index 111111111111..222222222222 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -163,6 +163,7 @@ struct its_device {
Expand All @@ -19,7 +19,7 @@ index 40ebf1726393..eb6ca4504a27 100644
u32 nr_ites;
u32 device_id;
bool shared;
@@ -2211,6 +2212,9 @@ static void gic_reset_prop_table(void *va)
@@ -2191,6 +2192,9 @@ static void gic_reset_prop_table(void *va)
static struct page *its_allocate_prop_table(gfp_t gfp_flags)
{
struct page *prop_page;
Expand All @@ -29,15 +29,15 @@ index 40ebf1726393..eb6ca4504a27 100644

prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
if (!prop_page)
@@ -2335,6 +2339,7 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
@@ -2315,6 +2319,7 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
u32 alloc_pages, psz;
struct page *page;
void *base;
+ gfp_t gfp_flags;

psz = baser->psz;
alloc_pages = (PAGE_ORDER_TO_SIZE(order) / psz);
@@ -2346,7 +2351,11 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
@@ -2326,7 +2331,11 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
order = get_order(GITS_BASER_PAGES_MAX * psz);
}

Expand All @@ -50,7 +50,7 @@ index 40ebf1726393..eb6ca4504a27 100644
if (!page)
return -ENOMEM;

@@ -2396,6 +2405,15 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
@@ -2376,6 +2385,15 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
its_write_baser(its, baser, val);
tmp = baser->val;

Expand All @@ -66,7 +66,7 @@ index 40ebf1726393..eb6ca4504a27 100644
if ((val ^ tmp) & GITS_BASER_SHAREABILITY_MASK) {
/*
* Shareability didn't stick. Just use
@@ -2985,7 +3003,9 @@ static int its_alloc_collections(struct its_node *its)
@@ -2965,7 +2983,9 @@ static int its_alloc_collections(struct its_node *its)
static struct page *its_allocate_pending_table(gfp_t gfp_flags)
{
struct page *pend_page;
Expand All @@ -77,7 +77,7 @@ index 40ebf1726393..eb6ca4504a27 100644
pend_page = alloc_pages(gfp_flags | __GFP_ZERO,
get_order(LPI_PENDBASE_SZ));
if (!pend_page)
@@ -3144,6 +3164,11 @@ static void its_cpu_init_lpis(void)
@@ -3124,6 +3144,11 @@ static void its_cpu_init_lpis(void)
if (!rdists_support_shareable())
tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK;

Expand All @@ -89,7 +89,7 @@ index 40ebf1726393..eb6ca4504a27 100644
if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) {
if (!(tmp & GICR_PROPBASER_SHAREABILITY_MASK)) {
/*
@@ -3171,6 +3196,11 @@ static void its_cpu_init_lpis(void)
@@ -3151,6 +3176,11 @@ static void its_cpu_init_lpis(void)
if (!rdists_support_shareable())
tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK;

Expand All @@ -101,7 +101,7 @@ index 40ebf1726393..eb6ca4504a27 100644
if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) {
/*
* The HW reports non-shareable, we must remove the
@@ -3334,7 +3364,11 @@ static bool its_alloc_table_entry(struct its_node *its,
@@ -3314,7 +3344,11 @@ static bool its_alloc_table_entry(struct its_node *its,

/* Allocate memory for 2nd level table */
if (!table[idx]) {
Expand All @@ -114,15 +114,15 @@ index 40ebf1726393..eb6ca4504a27 100644
get_order(baser->psz));
if (!page)
return false;
@@ -3423,6 +3457,7 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
@@ -3403,6 +3437,7 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
int nr_lpis;
int nr_ites;
int sz;
+ gfp_t gfp_flags;

if (!its_alloc_device_table(its, dev_id))
return NULL;
@@ -3438,7 +3473,15 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
@@ -3418,7 +3453,15 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
nr_ites = max(2, nvecs);
sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1);
sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
Expand All @@ -139,7 +139,7 @@ index 40ebf1726393..eb6ca4504a27 100644
if (alloc_lpis) {
lpi_map = its_lpi_alloc(nvecs, &lpi_base, &nr_lpis);
if (lpi_map)
@@ -3452,7 +3495,13 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
@@ -3432,7 +3475,13 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,

if (!dev || !itt || !col_map || (!lpi_map && alloc_lpis)) {
kfree(dev);
Expand All @@ -154,15 +154,15 @@ index 40ebf1726393..eb6ca4504a27 100644
bitmap_free(lpi_map);
kfree(col_map);
return NULL;
@@ -3462,6 +3511,7 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
@@ -3442,6 +3491,7 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,

dev->its = its;
dev->itt = itt;
+ dev->itt_sz = sz;
dev->nr_ites = nr_ites;
dev->event_map.lpi_map = lpi_map;
dev->event_map.col_map = col_map;
@@ -3489,7 +3539,13 @@ static void its_free_device(struct its_device *its_dev)
@@ -3469,7 +3519,13 @@ static void its_free_device(struct its_device *its_dev)
list_del(&its_dev->entry);
raw_spin_unlock_irqrestore(&its_dev->its->lock, flags);
kfree(its_dev->event_map.col_map);
Expand All @@ -177,15 +177,15 @@ index 40ebf1726393..eb6ca4504a27 100644
kfree(its_dev);
}

@@ -5098,6 +5154,7 @@ static int __init its_probe_one(struct its_node *its)
@@ -5078,6 +5134,7 @@ static int __init its_probe_one(struct its_node *its)
struct page *page;
u32 ctlr;
int err;
+ gfp_t gfp_flags;

its_enable_quirks(its);

@@ -5131,7 +5188,10 @@ static int __init its_probe_one(struct its_node *its)
@@ -5111,7 +5168,10 @@ static int __init its_probe_one(struct its_node *its)
}
}

Expand All @@ -197,7 +197,7 @@ index 40ebf1726393..eb6ca4504a27 100644
get_order(ITS_CMD_QUEUE_SZ));
if (!page) {
err = -ENOMEM;
@@ -5160,6 +5220,11 @@ static int __init its_probe_one(struct its_node *its)
@@ -5140,6 +5200,11 @@ static int __init its_probe_one(struct its_node *its)
if (its->flags & ITS_FLAGS_FORCE_NON_SHAREABLE)
tmp &= ~GITS_CBASER_SHAREABILITY_MASK;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Subject: [ARCHEOLOGY] Fix PCIe for RK35xx+Fix ROCK5A PCIe device tree
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
index d6842141d384..a909e42b4273 100644
index 111111111111..222222222222 100644
--- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
+++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
@@ -240,7 +240,7 @@ static int rockchip_pcie_resource_get(struct platform_device *pdev,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Signed-off-by: Alexey Charkov <[email protected]>
1 file changed, 147 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
index 6ac5ac8b48ab..ef06c1f742e8 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
@@ -10,6 +10,7 @@
Expand Down Expand Up @@ -213,7 +213,7 @@ Signed-off-by: Alexey Charkov <[email protected]>
8 files changed, 32 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts b/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
index 98c622b27647..c667704ba985 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
@@ -673,6 +673,10 @@ regulator-state-mem {
Expand All @@ -228,7 +228,7 @@ index 98c622b27647..c667704ba985 100644
status = "okay";
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-common.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-common.dtsi
index 709d348cf06b..03fd193be253 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-common.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-common.dtsi
@@ -466,3 +466,7 @@ regulator-state-mem {
Expand All @@ -240,7 +240,7 @@ index 709d348cf06b..03fd193be253 100644
+ status = "okay";
+};
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
index 7be2190244ba..7c3696a3ad3a 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
@@ -1131,6 +1131,10 @@ &sata0 {
Expand All @@ -255,7 +255,7 @@ index 7be2190244ba..7c3696a3ad3a 100644
status = "okay";
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-ok3588-c.dts b/arch/arm64/boot/dts/rockchip/rk3588-ok3588-c.dts
index 009566d881f3..230e630820b4 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-ok3588-c.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-ok3588-c.dts
@@ -376,6 +376,10 @@ &sdmmc {
Expand All @@ -270,7 +270,7 @@ index 009566d881f3..230e630820b4 100644
status = "okay";
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
index b8e15b76a8a6..21e96c212dd8 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -742,6 +742,10 @@ regulator-state-mem {
Expand All @@ -285,7 +285,7 @@ index b8e15b76a8a6..21e96c212dd8 100644
pinctrl-0 = <&uart2m0_xfer>;
status = "okay";
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts b/arch/arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts
index 9090c5c99f2a..d0021524e7f9 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts
@@ -648,6 +648,10 @@ regulator-state-mem {
Expand All @@ -300,7 +300,7 @@ index 9090c5c99f2a..d0021524e7f9 100644
status = "okay";
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
index 6b9206ce4a03..77bcf0f6b028 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
@@ -601,6 +601,10 @@ regulator-state-mem {
Expand All @@ -315,7 +315,7 @@ index 6b9206ce4a03..77bcf0f6b028 100644
pinctrl-0 = <&uart2m0_xfer>;
status = "okay";
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
index 8e2a07612d17..c671a61d3aef 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
@@ -697,6 +697,10 @@ regulator-state-mem {
Expand Down Expand Up @@ -346,7 +346,7 @@ Signed-off-by: Alexey Charkov <[email protected]>
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
index ef06c1f742e8..57c2d998ae75 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
@@ -2487,17 +2487,29 @@ center_crit: center-crit {
Expand Down Expand Up @@ -412,7 +412,7 @@ Signed-off-by: Alexey Charkov <[email protected]>
2 files changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
index 7c3696a3ad3a..00f660d50127 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
@@ -878,6 +878,8 @@ regulators {
Expand Down Expand Up @@ -470,7 +470,7 @@ index 7c3696a3ad3a..00f660d50127 100644
regulator-max-microvolt = <950000>;
regulator-ramp-delay = <12500>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts b/arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts
index b4f22d95ac0e..baeb08d665c7 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts
@@ -832,6 +832,8 @@ vdd_cpu_big1_s0: dcdc-reg1 {
Expand Down Expand Up @@ -565,7 +565,7 @@ Signed-off-by: Alexey Charkov <[email protected]>
1 file changed, 122 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
index 57c2d998ae75..85c25d5efdad 100644
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
@@ -97,6 +97,7 @@ cpu_l0: cpu@0 {
Expand Down
Loading

0 comments on commit d6de4a8

Please sign in to comment.