* linux-next: manual merge of the clk tree with the origin tree
@ 2026-11-13 14:42 Mark Brown
2026-11-13 20:40 ` Brian Masney
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2026-11-13 14:42 UTC (permalink / raw)
To: Brian Masney, Jerome Brunet, Stephen Boyd
Cc: Adrian Ng Ho Yin, Brian Masney, Kees Cook, Kees Cook,
Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 4438 bytes --]
Hi all,
Today's linux-next merge of the clk tree got a conflict in:
drivers/clk/socfpga/clk-s10.c
between commit:
4dd10fbbeb9c3 ("treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family")
from the origin tree and commit:
51805c5218c7e ("clk: socfpga: stratix10: register the SP timer clocks early")
from the clk tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc drivers/clk/socfpga/clk-s10.c
index aad66f8d069d2,1976789b5166a..0000000000000
--- a/drivers/clk/socfpga/clk-s10.c
+++ b/drivers/clk/socfpga/clk-s10.c
@@@ -382,33 -397,112 +397,111 @@@ static int s10_clk_register_pll(const s
return 0;
}
- static int s10_clkmgr_init(struct platform_device *pdev)
+ static struct stratix10_clock_data *s10_clk_data;
+
+ static struct stratix10_clock_data *s10_clk_data_alloc(void __iomem *base)
{
- struct device_node *np = pdev->dev.of_node;
- struct device *dev = &pdev->dev;
struct stratix10_clock_data *clk_data;
- void __iomem *base;
- int i, num_clks;
+ int i;
- base = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(base)) {
- pr_err("%s: failed to map clock registers\n", __func__);
- return PTR_ERR(base);
- }
-
- num_clks = STRATIX10_NUM_CLKS;
- clk_data = devm_kzalloc_flex(dev, *clk_data, clk_data.hws, num_clks);
- clk_data = kzalloc(struct_size(clk_data, clk_data.hws, STRATIX10_NUM_CLKS),
- GFP_KERNEL);
++ clk_data = kzalloc_flex(*clk_data, clk_data.hws, STRATIX10_NUM_CLKS);
if (!clk_data)
- return -ENOMEM;
+ return NULL;
clk_data->base = base;
- clk_data->clk_data.num = num_clks;
+ clk_data->clk_data.num = STRATIX10_NUM_CLKS;
- for (i = 0; i < num_clks; i++)
- clk_data->clk_data.hws[i] = ERR_PTR(-ENOENT);
+ for (i = 0; i < STRATIX10_NUM_CLKS; i++)
+ clk_data->clk_data.hws[i] = ERR_PTR(-EPROBE_DEFER);
+ return clk_data;
+ }
+
+ static void s10_clk_register_early(struct stratix10_clock_data *clk_data)
+ {
s10_clk_register_pll(s10_pll_clks, ARRAY_SIZE(s10_pll_clks), clk_data);
+ s10_clk_register_c_perip(s10_early_perip_c_clks,
+ ARRAY_SIZE(s10_early_perip_c_clks), clk_data);
+
+ s10_clk_register_cnt_perip(s10_early_perip_cnt_clks,
+ ARRAY_SIZE(s10_early_perip_cnt_clks),
+ clk_data);
+
+ s10_clk_register_gate(s10_early_gate_clks,
+ ARRAY_SIZE(s10_early_gate_clks), clk_data);
+ }
+
+ /*
+ * The registered clocks keep using the mapping and clk_data, so neither is
+ * released once the early clocks have been registered.
+ */
+ static int s10_clkmgr_setup(struct device_node *np)
+ {
+ struct stratix10_clock_data *clk_data;
+ void __iomem *base;
+
+ base = of_iomap(np, 0);
+ if (!base) {
+ pr_err("%s: failed to map clock registers\n", __func__);
+ return -ENOMEM;
+ }
+
+ clk_data = s10_clk_data_alloc(base);
+ if (!clk_data) {
+ iounmap(base);
+ return -ENOMEM;
+ }
+
+ s10_clk_register_early(clk_data);
+ s10_clk_data = clk_data;
+
+ return 0;
+ }
+
+ static int s10_clkmgr_add_provider(struct device_node *np)
+ {
+ static bool added;
+ int ret;
+
+ if (added)
+ return 0;
+
+ ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get,
+ &s10_clk_data->clk_data);
+ if (ret)
+ return ret;
+
+ added = true;
+
+ return 0;
+ }
+
+ static void __init s10_clkmgr_early_init(struct device_node *np)
+ {
+ if (s10_clkmgr_setup(np))
+ return;
+
+ if (s10_clkmgr_add_provider(np))
+ pr_err("%s: failed to add clock provider\n", __func__);
+ }
+
+ CLK_OF_DECLARE_DRIVER(stratix10_clkmgr, "intel,stratix10-clkmgr",
+ s10_clkmgr_early_init);
+
+ static int s10_clkmgr_init(struct platform_device *pdev)
+ {
+ struct stratix10_clock_data *clk_data;
+ int i, ret;
+
+ if (!s10_clk_data) {
+ ret = s10_clkmgr_setup(pdev->dev.of_node);
+ if (ret)
+ return ret;
+ }
+
+ clk_data = s10_clk_data;
+
s10_clk_register_c_perip(s10_main_perip_c_clks,
ARRAY_SIZE(s10_main_perip_c_clks), clk_data);
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: linux-next: manual merge of the clk tree with the origin tree
2026-11-13 14:42 linux-next: manual merge of the clk tree with the origin tree Mark Brown
@ 2026-11-13 20:40 ` Brian Masney
0 siblings, 0 replies; 5+ messages in thread
From: Brian Masney @ 2026-11-13 20:40 UTC (permalink / raw)
To: Mark Brown
Cc: Brian Masney, Jerome Brunet, Stephen Boyd, Adrian Ng Ho Yin,
Kees Cook, Kees Cook, Linux Kernel Mailing List,
Linux Next Mailing List
Hi Mark,
On Fri, Nov 13, 2026 at 02:42:25PM +0000, Mark Brown wrote:
> Today's linux-next merge of the clk tree got a conflict in:
>
> drivers/clk/socfpga/clk-s10.c
>
> between commit:
>
> 4dd10fbbeb9c3 ("treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family")
>
> from the origin tree and commit:
>
> 51805c5218c7e ("clk: socfpga: stratix10: register the SP timer clocks early")
We've had 4 different conflicts in the clk tree this so far this
development cycle with that treewide commit that was introduced in
rc2. The clk-next branch is based off of various topic branches that
are merged into clk-next, so we can easily rebase clk-next. I rebased
clk-next against 7.4-rc2, and kept all of the topic branches at
7.4-rc1 because I don't want to rewrite any history there.
If there's any other merge conflicts within the clk tree this
development cycle with that treewide commit, then Jerome or I can take
care of it on our end.
Brian
^ permalink raw reply [flat|nested] 5+ messages in thread
* linux-next: manual merge of the clk tree with the origin tree
@ 2026-11-13 14:38 Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-11-13 14:38 UTC (permalink / raw)
To: Brian Masney, Jerome Brunet, Stephen Boyd
Cc: Adrian Ng Ho Yin, Brian Masney, Kees Cook, Kees Cook,
Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 2382 bytes --]
Hi all,
Today's linux-next merge of the clk tree got a conflict in:
drivers/clk/socfpga/clk-agilex5.c
between commit:
4dd10fbbeb9c3 ("treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family")
from the origin tree and commit:
a13f8c1e4afca ("clk: socfpga: agilex5: register the SP timer clocks early")
from the clk tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc drivers/clk/socfpga/clk-agilex5.c
index 572fbb4192845,50dba11ab45ec..0000000000000
--- a/drivers/clk/socfpga/clk-agilex5.c
+++ b/drivers/clk/socfpga/clk-agilex5.c
@@@ -486,30 -501,29 +501,28 @@@ static int agilex5_clk_register_pll(con
return 0;
}
- static int agilex5_clkmgr_init(struct platform_device *pdev)
+ static struct stratix10_clock_data *agilex5_clk_data;
+
+ static struct stratix10_clock_data *agilex5_clk_data_alloc(void __iomem *base)
{
- struct device_node *np = pdev->dev.of_node;
- struct device *dev = &pdev->dev;
struct stratix10_clock_data *clk_data;
- void __iomem *base;
- int i, num_clks;
+ int i;
- base = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(base))
- return PTR_ERR(base);
-
- num_clks = AGILEX5_NUM_CLKS;
-
- clk_data = devm_kzalloc_flex(dev, *clk_data, clk_data.hws, num_clks);
- clk_data = kzalloc(struct_size(clk_data, clk_data.hws, AGILEX5_NUM_CLKS),
- GFP_KERNEL);
++ clk_data = kzalloc_flex(*clk_data, clk_data.hws, num_clks);
if (!clk_data)
- return -ENOMEM;
+ return NULL;
clk_data->base = base;
- clk_data->clk_data.num = num_clks;
+ clk_data->clk_data.num = AGILEX5_NUM_CLKS;
- for (i = 0; i < num_clks; i++)
- clk_data->clk_data.hws[i] = ERR_PTR(-ENOENT);
+ for (i = 0; i < AGILEX5_NUM_CLKS; i++)
+ clk_data->clk_data.hws[i] = ERR_PTR(-EPROBE_DEFER);
+ return clk_data;
+ }
+
+ static void agilex5_clk_register_early(struct stratix10_clock_data *clk_data)
+ {
agilex5_clk_register_pll(agilex5_pll_clks, ARRAY_SIZE(agilex5_pll_clks),
clk_data);
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* linux-next: manual merge of the clk tree with the origin tree
@ 2026-11-13 14:38 Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-11-13 14:38 UTC (permalink / raw)
To: Brian Masney, Jerome Brunet, Stephen Boyd
Cc: Adrian Ng Ho Yin, Brian Masney, Kees Cook, Kees Cook,
Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 12171 bytes --]
Hi all,
Today's linux-next merge of the clk tree got a conflict in:
drivers/clk/socfpga/clk-agilex.c
between commit:
4dd10fbbeb9c3 ("treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family")
from the origin tree and commit:
0b95e3ec699a8 ("clk: socfpga: agilex: register the SP timer clocks early")
from the clk tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
This just throws away Kees' change.
diff --combined drivers/clk/socfpga/clk-agilex.c
index 3d4d9f35b927e,445d814e2f3ac..0000000000000
--- a/drivers/clk/socfpga/clk-agilex.c
+++ b/drivers/clk/socfpga/clk-agilex.c
@@@ -5,6 -5,7 +5,7 @@@
#include <linux/slab.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
+ #include <linux/of_address.h>
#include <linux/platform_device.h>
#include <dt-bindings/clock/agilex-clock.h>
@@@ -232,24 -233,49 +233,49 @@@ static const struct stratix10_pll_cloc
0, 0x9c},
};
+ /*
+ * The SP timers are probed from time_init() and cannot defer, so their
+ * l4_sp_clk and its parents are registered from of_clk_init(). Everything
+ * else is registered when the platform driver probes.
+ */
+ static const struct n5x_perip_c_clock n5x_early_perip_c_clks[] = {
+ { AGILEX_MAIN_PLL_C1_CLK, "main_pll_c1", "main_pll", NULL, 1, 0, 0x54, 8},
+ { AGILEX_PERIPH_PLL_C1_CLK, "peri_pll_c1", "periph_pll", NULL, 1, 0, 0xA8, 8},
+ };
+
+ static const struct stratix10_perip_c_clock agilex_early_perip_c_clks[] = {
+ { AGILEX_MAIN_PLL_C1_CLK, "main_pll_c1", "main_pll", NULL, 1, 0, 0x5C},
+ { AGILEX_PERIPH_PLL_C1_CLK, "peri_pll_c1", "periph_pll", NULL, 1, 0, 0xB0},
+ };
+
+ static const struct stratix10_perip_cnt_clock agilex_early_perip_cnt_clks[] = {
+ { AGILEX_NOC_FREE_CLK, "noc_free_clk", NULL, noc_free_mux, ARRAY_SIZE(noc_free_mux),
+ 0, 0x40, 0, 0, 0},
+ };
+
+ static const struct stratix10_gate_clock agilex_early_gate_clks[] = {
+ /*
+ * The l4_sp_clk feeds a 100 MHz clock to various peripherals, one of them
+ * being the SP timers, thus cannot get gated.
+ */
+ { AGILEX_L4_SP_CLK, "l4_sp_clk", NULL, noc_mux, ARRAY_SIZE(noc_mux), CLK_IS_CRITICAL, 0x24,
+ 3, 0x44, 16, 2, 0x30, 1, 0},
+ };
+
static const struct n5x_perip_c_clock n5x_main_perip_c_clks[] = {
{ AGILEX_MAIN_PLL_C0_CLK, "main_pll_c0", "main_pll", NULL, 1, 0, 0x54, 0},
- { AGILEX_MAIN_PLL_C1_CLK, "main_pll_c1", "main_pll", NULL, 1, 0, 0x54, 8},
{ AGILEX_MAIN_PLL_C2_CLK, "main_pll_c2", "main_pll", NULL, 1, 0, 0x54, 16},
{ AGILEX_MAIN_PLL_C3_CLK, "main_pll_c3", "main_pll", NULL, 1, 0, 0x54, 24},
{ AGILEX_PERIPH_PLL_C0_CLK, "peri_pll_c0", "periph_pll", NULL, 1, 0, 0xA8, 0},
- { AGILEX_PERIPH_PLL_C1_CLK, "peri_pll_c1", "periph_pll", NULL, 1, 0, 0xA8, 8},
{ AGILEX_PERIPH_PLL_C2_CLK, "peri_pll_c2", "periph_pll", NULL, 1, 0, 0xA8, 16},
{ AGILEX_PERIPH_PLL_C3_CLK, "peri_pll_c3", "periph_pll", NULL, 1, 0, 0xA8, 24},
};
static const struct stratix10_perip_c_clock agilex_main_perip_c_clks[] = {
{ AGILEX_MAIN_PLL_C0_CLK, "main_pll_c0", "main_pll", NULL, 1, 0, 0x58},
- { AGILEX_MAIN_PLL_C1_CLK, "main_pll_c1", "main_pll", NULL, 1, 0, 0x5C},
{ AGILEX_MAIN_PLL_C2_CLK, "main_pll_c2", "main_pll", NULL, 1, 0, 0x64},
{ AGILEX_MAIN_PLL_C3_CLK, "main_pll_c3", "main_pll", NULL, 1, 0, 0x68},
{ AGILEX_PERIPH_PLL_C0_CLK, "peri_pll_c0", "periph_pll", NULL, 1, 0, 0xAC},
- { AGILEX_PERIPH_PLL_C1_CLK, "peri_pll_c1", "periph_pll", NULL, 1, 0, 0xB0},
{ AGILEX_PERIPH_PLL_C2_CLK, "peri_pll_c2", "periph_pll", NULL, 1, 0, 0xB8},
{ AGILEX_PERIPH_PLL_C3_CLK, "peri_pll_c3", "periph_pll", NULL, 1, 0, 0xBC},
};
@@@ -257,8 -283,6 +283,6 @@@
static const struct stratix10_perip_cnt_clock agilex_main_perip_cnt_clks[] = {
{ AGILEX_MPU_FREE_CLK, "mpu_free_clk", NULL, mpu_free_mux, ARRAY_SIZE(mpu_free_mux),
0, 0x3C, 0, 0, 0},
- { AGILEX_NOC_FREE_CLK, "noc_free_clk", NULL, noc_free_mux, ARRAY_SIZE(noc_free_mux),
- 0, 0x40, 0, 0, 0},
{ AGILEX_L3_MAIN_FREE_CLK, "l3_main_free_clk", "noc_free_clk", NULL,
1, 0, 0, 1, 0, 0},
{ AGILEX_L4_SYS_FREE_CLK, "l4_sys_free_clk", NULL, noc_mux, ARRAY_SIZE(noc_mux), 0,
@@@ -292,12 -316,6 +316,6 @@@ static const struct stratix10_gate_cloc
1, 0x44, 0, 2, 0x30, 1, 0},
{ AGILEX_L4_MP_CLK, "l4_mp_clk", NULL, noc_mux, ARRAY_SIZE(noc_mux), 0, 0x24,
2, 0x44, 8, 2, 0x30, 1, 0},
- /*
- * The l4_sp_clk feeds a 100 MHz clock to various peripherals, one of them
- * being the SP timers, thus cannot get gated.
- */
- { AGILEX_L4_SP_CLK, "l4_sp_clk", NULL, noc_mux, ARRAY_SIZE(noc_mux), CLK_IS_CRITICAL, 0x24,
- 3, 0x44, 16, 2, 0x30, 1, 0},
{ AGILEX_CS_AT_CLK, "cs_at_clk", NULL, noc_mux, ARRAY_SIZE(noc_mux), 0, 0x24,
4, 0x44, 24, 2, 0x30, 1, 0},
{ AGILEX_CS_TRACE_CLK, "cs_trace_clk", NULL, noc_mux, ARRAY_SIZE(noc_mux), 0, 0x24,
@@@ -454,31 -472,165 +472,165 @@@ static int n5x_clk_register_pll(const s
return 0;
}
- static int agilex_clkmgr_init(struct platform_device *pdev)
+ static struct stratix10_clock_data *agilex_clk_data;
+
+ static struct stratix10_clock_data *agilex_clk_data_alloc(void __iomem *base)
+ {
+ struct stratix10_clock_data *clk_data;
+ int i;
+
+ clk_data = kzalloc(struct_size(clk_data, clk_data.hws, AGILEX_NUM_CLKS),
+ GFP_KERNEL);
+ if (!clk_data)
+ return NULL;
+
+ clk_data->base = base;
+ clk_data->clk_data.num = AGILEX_NUM_CLKS;
+
+ for (i = 0; i < AGILEX_NUM_CLKS; i++)
+ clk_data->clk_data.hws[i] = ERR_PTR(-EPROBE_DEFER);
+
+ return clk_data;
+ }
+
+ static void agilex_clk_register_early(struct stratix10_clock_data *clk_data)
+ {
+ agilex_clk_register_pll(agilex_pll_clks, ARRAY_SIZE(agilex_pll_clks), clk_data);
+
+ agilex_clk_register_c_perip(agilex_early_perip_c_clks,
+ ARRAY_SIZE(agilex_early_perip_c_clks), clk_data);
+
+ agilex_clk_register_cnt_perip(agilex_early_perip_cnt_clks,
+ ARRAY_SIZE(agilex_early_perip_cnt_clks),
+ clk_data);
+
+ agilex_clk_register_gate(agilex_early_gate_clks,
+ ARRAY_SIZE(agilex_early_gate_clks), clk_data);
+ }
+
+ static void n5x_clk_register_early(struct stratix10_clock_data *clk_data)
+ {
+ n5x_clk_register_pll(agilex_pll_clks, ARRAY_SIZE(agilex_pll_clks), clk_data);
+
+ n5x_clk_register_c_perip(n5x_early_perip_c_clks,
+ ARRAY_SIZE(n5x_early_perip_c_clks), clk_data);
+
+ agilex_clk_register_cnt_perip(agilex_early_perip_cnt_clks,
+ ARRAY_SIZE(agilex_early_perip_cnt_clks),
+ clk_data);
+
+ agilex_clk_register_gate(agilex_early_gate_clks,
+ ARRAY_SIZE(agilex_early_gate_clks), clk_data);
+ }
+
+ /*
+ * The registered clocks keep using the mapping and clk_data, so neither is
+ * released once the early clocks have been registered.
+ */
+ static int
+ agilex_clkmgr_setup(struct device_node *np,
+ void (*register_early)(struct stratix10_clock_data *))
{
- struct device_node *np = pdev->dev.of_node;
- struct device *dev = &pdev->dev;
struct stratix10_clock_data *clk_data;
void __iomem *base;
- int i, num_clks;
- base = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(base))
- return PTR_ERR(base);
-
- num_clks = AGILEX_NUM_CLKS;
-
- clk_data = devm_kzalloc_flex(dev, *clk_data, clk_data.hws, num_clks);
- if (!clk_data)
+ base = of_iomap(np, 0);
+ if (!base) {
+ pr_err("%s: failed to map clock registers\n", __func__);
return -ENOMEM;
+ }
- clk_data->clk_data.num = num_clks;
- clk_data->base = base;
+ clk_data = agilex_clk_data_alloc(base);
+ if (!clk_data) {
+ iounmap(base);
+ return -ENOMEM;
+ }
- for (i = 0; i < num_clks; i++)
- clk_data->clk_data.hws[i] = ERR_PTR(-ENOENT);
+ register_early(clk_data);
+ agilex_clk_data = clk_data;
- agilex_clk_register_pll(agilex_pll_clks, ARRAY_SIZE(agilex_pll_clks), clk_data);
+ return 0;
+ }
+
+ static int agilex_clkmgr_add_provider(struct device_node *np)
+ {
+ static bool added;
+ int ret;
+
+ if (added)
+ return 0;
+
+ ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get,
+ &agilex_clk_data->clk_data);
+ if (ret)
+ return ret;
+
+ added = true;
+
+ return 0;
+ }
+
+ static void __init
+ agilex_clkmgr_of_init(struct device_node *np,
+ void (*register_early)(struct stratix10_clock_data *))
+ {
+ if (agilex_clkmgr_setup(np, register_early))
+ return;
+
+ if (agilex_clkmgr_add_provider(np))
+ pr_err("%s: failed to add clock provider\n", __func__);
+ }
+
+ static void __init agilex_clkmgr_early_init(struct device_node *np)
+ {
+ agilex_clkmgr_of_init(np, agilex_clk_register_early);
+ }
+
+ CLK_OF_DECLARE_DRIVER(agilex_clkmgr, "intel,agilex-clkmgr",
+ agilex_clkmgr_early_init);
+
+ static void __init n5x_clkmgr_early_init(struct device_node *np)
+ {
+ agilex_clkmgr_of_init(np, n5x_clk_register_early);
+ }
+
+ CLK_OF_DECLARE_DRIVER(n5x_clkmgr, "intel,easic-n5x-clkmgr",
+ n5x_clkmgr_early_init);
+
+ static struct stratix10_clock_data *
+ agilex_clkmgr_get_clk_data(struct platform_device *pdev,
+ void (*register_early)(struct stratix10_clock_data *))
+ {
+ int ret;
+
+ if (!agilex_clk_data) {
+ ret = agilex_clkmgr_setup(pdev->dev.of_node, register_early);
+ if (ret)
+ return ERR_PTR(ret);
+ }
+
+ return agilex_clk_data;
+ }
+
+ static int agilex_clkmgr_finish(struct platform_device *pdev,
+ struct stratix10_clock_data *clk_data)
+ {
+ int i;
+
+ for (i = 0; i < AGILEX_NUM_CLKS; i++)
+ if (clk_data->clk_data.hws[i] == ERR_PTR(-EPROBE_DEFER))
+ clk_data->clk_data.hws[i] = ERR_PTR(-ENOENT);
+
+ return agilex_clkmgr_add_provider(pdev->dev.of_node);
+ }
+
+ static int agilex_clkmgr_init(struct platform_device *pdev)
+ {
+ struct stratix10_clock_data *clk_data;
+
+ clk_data = agilex_clkmgr_get_clk_data(pdev, agilex_clk_register_early);
+ if (IS_ERR(clk_data))
+ return PTR_ERR(clk_data);
agilex_clk_register_c_perip(agilex_main_perip_c_clks,
ARRAY_SIZE(agilex_main_perip_c_clks), clk_data);
@@@ -489,35 -641,17 +641,17 @@@
agilex_clk_register_gate(agilex_gate_clks, ARRAY_SIZE(agilex_gate_clks),
clk_data);
- of_clk_add_hw_provider(np, of_clk_hw_onecell_get, &clk_data->clk_data);
- return 0;
+
+ return agilex_clkmgr_finish(pdev, clk_data);
}
static int n5x_clkmgr_init(struct platform_device *pdev)
{
- struct device_node *np = pdev->dev.of_node;
- struct device *dev = &pdev->dev;
struct stratix10_clock_data *clk_data;
- void __iomem *base;
- int i, num_clks;
- base = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(base))
- return PTR_ERR(base);
-
- num_clks = AGILEX_NUM_CLKS;
-
- clk_data = devm_kzalloc_flex(dev, *clk_data, clk_data.hws, num_clks);
- if (!clk_data)
- return -ENOMEM;
-
- clk_data->base = base;
- clk_data->clk_data.num = num_clks;
-
- for (i = 0; i < num_clks; i++)
- clk_data->clk_data.hws[i] = ERR_PTR(-ENOENT);
-
- n5x_clk_register_pll(agilex_pll_clks, ARRAY_SIZE(agilex_pll_clks), clk_data);
+ clk_data = agilex_clkmgr_get_clk_data(pdev, n5x_clk_register_early);
+ if (IS_ERR(clk_data))
+ return PTR_ERR(clk_data);
n5x_clk_register_c_perip(n5x_main_perip_c_clks,
ARRAY_SIZE(n5x_main_perip_c_clks), clk_data);
@@@ -528,8 -662,8 +662,8 @@@
agilex_clk_register_gate(agilex_gate_clks, ARRAY_SIZE(agilex_gate_clks),
clk_data);
- of_clk_add_hw_provider(np, of_clk_hw_onecell_get, &clk_data->clk_data);
- return 0;
+
+ return agilex_clkmgr_finish(pdev, clk_data);
}
static int agilex_clkmgr_probe(struct platform_device *pdev)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* linux-next: manual merge of the clk tree with the origin tree
@ 2026-11-10 17:02 Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-11-10 17:02 UTC (permalink / raw)
To: Brian Masney, Jerome Brunet, Stephen Boyd
Cc: Brian Masney, Kees Cook, Kees Cook, Linux Kernel Mailing List,
Linux Next Mailing List, Rob Herring
[-- Attachment #1: Type: text/plain, Size: 792 bytes --]
Hi all,
Today's linux-next merge of the clk tree got conflicts in:
drivers/clk/hisilicon/clk-hi3559a.c
drivers/clk/hisilicon/crg-hi3516cv300.c
between commit:
4dd10fbbeb9c3 ("treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family")
from the origin tree and commit:
3865d0d4439f5 ("clk: hisilicon: Remove hi3516cv300 driver")
from the clk tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
Deleted the files.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-13 20:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 14:42 linux-next: manual merge of the clk tree with the origin tree Mark Brown
2026-11-13 20:40 ` Brian Masney
-- strict thread matches above, loose matches on Subject: below --
2026-11-13 14:38 Mark Brown
2026-11-13 14:38 Mark Brown
2026-11-10 17:02 Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox