| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/08/13 07:43 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies the clock driver for the Nuvoton MA35D1 SoC (drivers/clk/nuvoton/clk-ma35d1.c). This is a hardware-specific platform driver that requires the corresponding physical SoC or specific QEMU machine emulation to be probed and executed. Since the MA35D1 SoC is not emulated in standard QEMU environments used for fuzzing, these code paths are unreachable.",
"WorthFuzzing": false
} |
| 1/1 | 2026/08/13 07:43 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit a34abfcb1bad7051d14c4ed0ddd66787393a3e1c\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Thu Aug 13 07:43:27 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/clk/nuvoton/clk-ma35d1.c b/drivers/clk/nuvoton/clk-ma35d1.c\nindex 9f65d0623517a..8306e4192fd40 100644\n--- a/drivers/clk/nuvoton/clk-ma35d1.c\n+++ b/drivers/clk/nuvoton/clk-ma35d1.c\n@@ -62,300 +62,49 @@ static DEFINE_SPINLOCK(ma35d1_lock);\n #define PLL_MODE_FRAC 1\n #define PLL_MODE_SS 2\n \n-static const struct clk_parent_data ca35clk_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"capll\", },\n-\t{ .fw_name = \"ddrpll\", },\n-};\n-\n-static const struct clk_parent_data sysclk0_sel_clks[] = {\n-\t{ .fw_name = \"epll_div2\", },\n-\t{ .fw_name = \"syspll\", },\n-};\n-\n-static const struct clk_parent_data sysclk1_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"syspll\", },\n-};\n-\n-static const struct clk_parent_data axiclk_sel_clks[] = {\n-\t{ .fw_name = \"capll_div2\", },\n-\t{ .fw_name = \"capll_div4\", },\n-};\n-\n-static const struct clk_parent_data ccap_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"vpll\", },\n-\t{ .fw_name = \"apll\", },\n-\t{ .fw_name = \"syspll\", },\n-};\n-\n-static const struct clk_parent_data sdh_sel_clks[] = {\n-\t{ .fw_name = \"syspll\", },\n-\t{ .fw_name = \"apll\", },\n-};\n-\n-static const struct clk_parent_data dcu_sel_clks[] = {\n-\t{ .fw_name = \"epll_div2\", },\n-\t{ .fw_name = \"syspll\", },\n-};\n-\n-static const struct clk_parent_data gfx_sel_clks[] = {\n-\t{ .fw_name = \"epll\", },\n-\t{ .fw_name = \"syspll\", },\n-};\n-\n-static const struct clk_parent_data dbg_sel_clks[] = {\n-\t{ .fw_name = \"hirc\", },\n-\t{ .fw_name = \"syspll\", },\n-};\n-\n-static const struct clk_parent_data timer0_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk0\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data timer1_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk0\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data timer2_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk1\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data timer3_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk1\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data timer4_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk2\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data timer5_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk2\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data timer6_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk0\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data timer7_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk0\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data timer8_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk1\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data timer9_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk1\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data timer10_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk2\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data timer11_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk2\", },\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"hirc\", },\n-};\n-\n-static const struct clk_parent_data uart_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"sysclk1_div2\", },\n-};\n-\n-static const struct clk_parent_data wdt0_sel_clks[] = {\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk3_div4096\", },\n-\t{ .fw_name = \"lirc\", },\n-};\n-\n-static const struct clk_parent_data wdt1_sel_clks[] = {\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk3_div4096\", },\n-\t{ .fw_name = \"lirc\", },\n-};\n-\n-static const struct clk_parent_data wdt2_sel_clks[] = {\n-\t{ .index = -1, },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"pclk4_div4096\", },\n-\t{ .fw_name = \"lirc\", },\n-};\n-\n-static const struct clk_parent_data wwdt0_sel_clks[] = {\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"pclk3_div4096\", },\n-\t{ .fw_name = \"lirc\", },\n-};\n-\n-static const struct clk_parent_data wwdt1_sel_clks[] = {\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"pclk3_div4096\", },\n-\t{ .fw_name = \"lirc\", },\n-};\n-\n-static const struct clk_parent_data wwdt2_sel_clks[] = {\n-\t{ .index = -1, },\n-\t{ .index = -1, },\n-\t{ .fw_name = \"pclk4_div4096\", },\n-\t{ .fw_name = \"lirc\", },\n-};\n-\n-static const struct clk_parent_data spi0_sel_clks[] = {\n-\t{ .fw_name = \"pclk1\", },\n-\t{ .fw_name = \"apll\", },\n-};\n-\n-static const struct clk_parent_data spi1_sel_clks[] = {\n-\t{ .fw_name = \"pclk2\", },\n-\t{ .fw_name = \"apll\", },\n-};\n-\n-static const struct clk_parent_data spi2_sel_clks[] = {\n-\t{ .fw_name = \"pclk1\", },\n-\t{ .fw_name = \"apll\", },\n-};\n-\n-static const struct clk_parent_data spi3_sel_clks[] = {\n-\t{ .fw_name = \"pclk2\", },\n-\t{ .fw_name = \"apll\", },\n-};\n-\n-static const struct clk_parent_data qspi0_sel_clks[] = {\n-\t{ .fw_name = \"pclk0\", },\n-\t{ .fw_name = \"apll\", },\n-};\n-\n-static const struct clk_parent_data qspi1_sel_clks[] = {\n-\t{ .fw_name = \"pclk0\", },\n-\t{ .fw_name = \"apll\", },\n-};\n-\n-static const struct clk_parent_data i2s0_sel_clks[] = {\n-\t{ .fw_name = \"apll\", },\n-\t{ .fw_name = \"sysclk1_div2\", },\n-};\n-\n-static const struct clk_parent_data i2s1_sel_clks[] = {\n-\t{ .fw_name = \"apll\", },\n-\t{ .fw_name = \"sysclk1_div2\", },\n-};\n-\n-static const struct clk_parent_data can_sel_clks[] = {\n-\t{ .fw_name = \"apll\", },\n-\t{ .fw_name = \"vpll\", },\n-};\n-\n-static const struct clk_parent_data cko_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-\t{ .fw_name = \"hirc\", },\n-\t{ .fw_name = \"lirc\", },\n-\t{ .fw_name = \"capll_div4\", },\n-\t{ .fw_name = \"syspll\", },\n-\t{ .fw_name = \"ddrpll\", },\n-\t{ .fw_name = \"epll_div2\", },\n-\t{ .fw_name = \"apll\", },\n-\t{ .fw_name = \"vpll\", },\n-};\n-\n-static const struct clk_parent_data smc_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"pclk4\", },\n-};\n-\n-static const struct clk_parent_data kpi_sel_clks[] = {\n-\t{ .fw_name = \"hxt\", },\n-\t{ .fw_name = \"lxt\", },\n-};\n+#define MA35D1_MUX_MAX_PARENTS\t10\n+\n+/* Mux parent selection, by index into the controller's clock table */\n+static const int ca35clk_parent_idx[] = { HXT, CAPLL, DDRPLL };\n+static const int sysclk0_parent_idx[] = { EPLL_DIV2, SYSPLL };\n+static const int sysclk1_parent_idx[] = { HXT, SYSPLL };\n+static const int axiclk_parent_idx[] = { AXICLK_DIV2, AXICLK_DIV4 };\n+static const int ccap_parent_idx[] = { HXT, VPLL, APLL, SYSPLL };\n+static const int sdh_parent_idx[] = { SYSPLL, APLL };\n+static const int dcu_parent_idx[] = { EPLL_DIV2, SYSPLL };\n+static const int gfx_parent_idx[] = { EPLL, SYSPLL };\n+static const int dbg_parent_idx[] = { HIRC, SYSPLL };\n+static const int timer0_parent_idx[] = { HXT, LXT, PCLK0, -1, -1, LIRC, -1, HIRC };\n+static const int timer1_parent_idx[] = { HXT, LXT, PCLK0, -1, -1, LIRC, -1, HIRC };\n+static const int timer2_parent_idx[] = { HXT, LXT, PCLK1, -1, -1, LIRC, -1, HIRC };\n+static const int timer3_parent_idx[] = { HXT, LXT, PCLK1, -1, -1, LIRC, -1, HIRC };\n+static const int timer4_parent_idx[] = { HXT, LXT, PCLK2, -1, -1, LIRC, -1, HIRC };\n+static const int timer5_parent_idx[] = { HXT, LXT, PCLK2, -1, -1, LIRC, -1, HIRC };\n+static const int timer6_parent_idx[] = { HXT, LXT, PCLK0, -1, -1, LIRC, -1, HIRC };\n+static const int timer7_parent_idx[] = { HXT, LXT, PCLK0, -1, -1, LIRC, -1, HIRC };\n+static const int timer8_parent_idx[] = { HXT, LXT, PCLK1, -1, -1, LIRC, -1, HIRC };\n+static const int timer9_parent_idx[] = { HXT, LXT, PCLK1, -1, -1, LIRC, -1, HIRC };\n+static const int timer10_parent_idx[] = { HXT, LXT, PCLK2, -1, -1, LIRC, -1, HIRC };\n+static const int timer11_parent_idx[] = { HXT, LXT, PCLK2, -1, -1, LIRC, -1, HIRC };\n+static const int uart_parent_idx[] = { HXT, SYSCLK1_DIV2 };\n+static const int wdt0_parent_idx[] = { -1, LXT, -1, LIRC };\n+static const int wdt1_parent_idx[] = { -1, LXT, -1, LIRC };\n+static const int wdt2_parent_idx[] = { -1, LXT, -1, LIRC };\n+static const int wwdt0_parent_idx[] = { -1, -1, -1, LIRC };\n+static const int wwdt1_parent_idx[] = { -1, -1, -1, LIRC };\n+static const int wwdt2_parent_idx[] = { -1, -1, -1, LIRC };\n+static const int spi0_parent_idx[] = { PCLK1, APLL };\n+static const int spi1_parent_idx[] = { PCLK2, APLL };\n+static const int spi2_parent_idx[] = { PCLK1, APLL };\n+static const int spi3_parent_idx[] = { PCLK2, APLL };\n+static const int qspi_parent_idx[] = { PCLK0, APLL };\n+static const int i2s_parent_idx[] = { APLL, SYSCLK1_DIV2 };\n+static const int can_parent_idx[] = { APLL, VPLL };\n+static const int cko_parent_idx[] = { HXT, LXT, HIRC, LIRC,\n+\t\t\t\t AXICLK_DIV4, SYSPLL, DDRPLL,\n+\t\t\t\t EPLL_DIV2, APLL, VPLL };\n+static const int smc_parent_idx[] = { HXT, PCLK4 };\n+static const int kpi_parent_idx[] = { HXT, LXT };\n \n static const struct clk_div_table ip_div_table[] = {\n \t{0, 2}, {1, 4}, {2, 6}, {3, 8}, {4, 10},\n@@ -374,24 +123,20 @@ static struct clk_hw *ma35d1_clk_fixed(const char *name, int rate)\n \treturn clk_hw_register_fixed_rate(NULL, name, NULL, 0, rate);\n }\n \n-static struct clk_hw *ma35d1_clk_mux_parent(struct device *dev, const char *name,\n-\t\t\t\t\t void __iomem *reg, u8 shift, u8 width,\n-\t\t\t\t\t const struct clk_parent_data *pdata,\n-\t\t\t\t\t int num_pdata)\n-{\n-\treturn clk_hw_register_mux_parent_data(dev, name, pdata, num_pdata,\n-\t\t\t\t\t CLK_SET_RATE_NO_REPARENT, reg, shift,\n-\t\t\t\t\t width, 0, \u0026ma35d1_lock);\n-}\n-\n static struct clk_hw *ma35d1_clk_mux(struct device *dev, const char *name,\n \t\t\t\t void __iomem *reg, u8 shift, u8 width,\n-\t\t\t\t const struct clk_parent_data *pdata,\n-\t\t\t\t int num_pdata)\n+\t\t\t\t struct clk_hw **hws,\n+\t\t\t\t const int *parent_idx, int num_parents)\n {\n-\treturn clk_hw_register_mux_parent_data(dev, name, pdata, num_pdata,\n-\t\t\t\t\t CLK_SET_RATE_NO_REPARENT, reg, shift,\n-\t\t\t\t\t width, 0, \u0026ma35d1_lock);\n+\tconst struct clk_hw *parent_hws[MA35D1_MUX_MAX_PARENTS];\n+\tint i;\n+\n+\tfor (i = 0; i \u003c num_parents; i++)\n+\t\tparent_hws[i] = (parent_idx[i] \u003e= 0) ? hws[parent_idx[i]] : NULL;\n+\n+\treturn clk_hw_register_mux_hws(dev, name, parent_hws, num_parents,\n+\t\t\t\t CLK_SET_RATE_NO_REPARENT, reg, shift,\n+\t\t\t\t width, 0, \u0026ma35d1_lock);\n }\n \n static struct clk_hw *ma35d1_clk_divider(struct device *dev, const char *name,\n@@ -514,22 +259,17 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)\n \thws[EPLL_DIV4] = ma35d1_clk_fixed_factor(dev, \"epll_div4\", \"epll\", 1, 4);\n \thws[EPLL_DIV8] = ma35d1_clk_fixed_factor(dev, \"epll_div8\", \"epll\", 1, 8);\n \n-\thws[CA35CLK_MUX] = ma35d1_clk_mux_parent(dev, \"ca35clk_mux\",\n-\t\t\t\t\t\t clk_base + REG_CLK_CLKSEL0, 0, 2,\n-\t\t\t\t\t\t ca35clk_sel_clks,\n-\t\t\t\t\t\t ARRAY_SIZE(ca35clk_sel_clks));\n+\thws[CA35CLK_MUX] = ma35d1_clk_mux(dev, \"ca35clk_mux\", clk_base + REG_CLK_CLKSEL0, 0, 2, hws,\n+\t\t\t\t\t ca35clk_parent_idx, ARRAY_SIZE(ca35clk_parent_idx));\n \thws[AXICLK_DIV2] = ma35d1_clk_fixed_factor(dev, \"capll_div2\", \"ca35clk_mux\", 1, 2);\n \thws[AXICLK_DIV4] = ma35d1_clk_fixed_factor(dev, \"capll_div4\", \"ca35clk_mux\", 1, 4);\n \n-\thws[AXICLK_MUX] = ma35d1_clk_mux(dev, \"axiclk_mux\", clk_base + REG_CLK_CLKDIV0,\n-\t\t\t\t\t 26, 1, axiclk_sel_clks,\n-\t\t\t\t\t ARRAY_SIZE(axiclk_sel_clks));\n-\thws[SYSCLK0_MUX] = ma35d1_clk_mux(dev, \"sysclk0_mux\", clk_base + REG_CLK_CLKSEL0,\n-\t\t\t\t\t 2, 1, sysclk0_sel_clks,\n-\t\t\t\t\t ARRAY_SIZE(sysclk0_sel_clks));\n-\thws[SYSCLK1_MUX] = ma35d1_clk_mux(dev, \"sysclk1_mux\", clk_base + REG_CLK_CLKSEL0,\n-\t\t\t\t\t 4, 1, sysclk1_sel_clks,\n-\t\t\t\t\t ARRAY_SIZE(sysclk1_sel_clks));\n+\thws[AXICLK_MUX] = ma35d1_clk_mux(dev, \"axiclk_mux\", clk_base + REG_CLK_CLKDIV0, 26, 1, hws,\n+\t\t\t\t\t axiclk_parent_idx, ARRAY_SIZE(axiclk_parent_idx));\n+\thws[SYSCLK0_MUX] = ma35d1_clk_mux(dev, \"sysclk0_mux\", clk_base + REG_CLK_CLKSEL0, 2, 1, hws,\n+\t\t\t\t\t sysclk0_parent_idx, ARRAY_SIZE(sysclk0_parent_idx));\n+\thws[SYSCLK1_MUX] = ma35d1_clk_mux(dev, \"sysclk1_mux\", clk_base + REG_CLK_CLKSEL0, 4, 1, hws,\n+\t\t\t\t\t sysclk1_parent_idx, ARRAY_SIZE(sysclk1_parent_idx));\n \thws[SYSCLK1_DIV2] = ma35d1_clk_fixed_factor(dev, \"sysclk1_div2\", \"sysclk1_mux\", 1, 2);\n \n \t/* HCLK0~3 \u0026 PCLK0~4 */\n@@ -553,41 +293,41 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)\n \thws[DDR6_GATE] = ma35d1_clk_gate(dev, \"ddr6_gate\", \"ddrpll\",\n \t\t\t\t\t clk_base + REG_CLK_SYSCLK0, 5);\n \n-\thws[CAN0_MUX] = ma35d1_clk_mux(dev, \"can0_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 16, 1, can_sel_clks, ARRAY_SIZE(can_sel_clks));\n+\thws[CAN0_MUX] = ma35d1_clk_mux(dev, \"can0_mux\", clk_base + REG_CLK_CLKSEL4, 16, 1, hws,\n+\t\t\t\t can_parent_idx, ARRAY_SIZE(can_parent_idx));\n \thws[CAN0_DIV] = ma35d1_clk_divider_table(dev, \"can0_div\", \"can0_mux\",\n \t\t\t\t\t\t clk_base + REG_CLK_CLKDIV0,\n \t\t\t\t\t\t 0, 3, ip_div_table);\n \thws[CAN0_GATE] = ma35d1_clk_gate(dev, \"can0_gate\", \"can0_div\",\n \t\t\t\t\t clk_base + REG_CLK_SYSCLK0, 8);\n-\thws[CAN1_MUX] = ma35d1_clk_mux(dev, \"can1_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 17, 1, can_sel_clks, ARRAY_SIZE(can_sel_clks));\n+\thws[CAN1_MUX] = ma35d1_clk_mux(dev, \"can1_mux\", clk_base + REG_CLK_CLKSEL4, 17, 1, hws,\n+\t\t\t\t can_parent_idx, ARRAY_SIZE(can_parent_idx));\n \thws[CAN1_DIV] = ma35d1_clk_divider_table(dev, \"can1_div\", \"can1_mux\",\n \t\t\t\t\t\t clk_base + REG_CLK_CLKDIV0,\n \t\t\t\t\t\t 4, 3, ip_div_table);\n \thws[CAN1_GATE] = ma35d1_clk_gate(dev, \"can1_gate\", \"can1_div\",\n \t\t\t\t\t clk_base + REG_CLK_SYSCLK0, 9);\n-\thws[CAN2_MUX] = ma35d1_clk_mux(dev, \"can2_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 18, 1, can_sel_clks, ARRAY_SIZE(can_sel_clks));\n+\thws[CAN2_MUX] = ma35d1_clk_mux(dev, \"can2_mux\", clk_base + REG_CLK_CLKSEL4, 18, 1, hws,\n+\t\t\t\t can_parent_idx, ARRAY_SIZE(can_parent_idx));\n \thws[CAN2_DIV] = ma35d1_clk_divider_table(dev, \"can2_div\", \"can2_mux\",\n \t\t\t\t\t\t clk_base + REG_CLK_CLKDIV0,\n \t\t\t\t\t\t 8, 3, ip_div_table);\n \thws[CAN2_GATE] = ma35d1_clk_gate(dev, \"can2_gate\", \"can2_div\",\n \t\t\t\t\t clk_base + REG_CLK_SYSCLK0, 10);\n-\thws[CAN3_MUX] = ma35d1_clk_mux(dev, \"can3_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 19, 1, can_sel_clks, ARRAY_SIZE(can_sel_clks));\n+\thws[CAN3_MUX] = ma35d1_clk_mux(dev, \"can3_mux\", clk_base + REG_CLK_CLKSEL4, 19, 1, hws,\n+\t\t\t\t can_parent_idx, ARRAY_SIZE(can_parent_idx));\n \thws[CAN3_DIV] = ma35d1_clk_divider_table(dev, \"can3_div\", \"can3_mux\",\n \t\t\t\t\t\t clk_base + REG_CLK_CLKDIV0,\n \t\t\t\t\t\t 12, 3, ip_div_table);\n \thws[CAN3_GATE] = ma35d1_clk_gate(dev, \"can3_gate\", \"can3_div\",\n \t\t\t\t\t clk_base + REG_CLK_SYSCLK0, 11);\n \n-\thws[SDH0_MUX] = ma35d1_clk_mux(dev, \"sdh0_mux\", clk_base + REG_CLK_CLKSEL0,\n-\t\t\t\t 16, 2, sdh_sel_clks, ARRAY_SIZE(sdh_sel_clks));\n+\thws[SDH0_MUX] = ma35d1_clk_mux(dev, \"sdh0_mux\", clk_base + REG_CLK_CLKSEL0, 16, 2, hws,\n+\t\t\t\t sdh_parent_idx, ARRAY_SIZE(sdh_parent_idx));\n \thws[SDH0_GATE] = ma35d1_clk_gate(dev, \"sdh0_gate\", \"sdh0_mux\",\n \t\t\t\t\t clk_base + REG_CLK_SYSCLK0, 16);\n-\thws[SDH1_MUX] = ma35d1_clk_mux(dev, \"sdh1_mux\", clk_base + REG_CLK_CLKSEL0,\n-\t\t\t\t 18, 2, sdh_sel_clks, ARRAY_SIZE(sdh_sel_clks));\n+\thws[SDH1_MUX] = ma35d1_clk_mux(dev, \"sdh1_mux\", clk_base + REG_CLK_CLKSEL0, 18, 2, hws,\n+\t\t\t\t sdh_parent_idx, ARRAY_SIZE(sdh_parent_idx));\n \thws[SDH1_GATE] = ma35d1_clk_gate(dev, \"sdh1_gate\", \"sdh1_mux\",\n \t\t\t\t\t clk_base + REG_CLK_SYSCLK0, 17);\n \n@@ -603,14 +343,14 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)\n \thws[HUSBH1_GATE] = ma35d1_clk_gate(dev, \"husbh1_gate\", \"usbphy0\",\n \t\t\t\t\t clk_base + REG_CLK_SYSCLK0, 22);\n \n-\thws[GFX_MUX] = ma35d1_clk_mux(dev, \"gfx_mux\", clk_base + REG_CLK_CLKSEL0,\n-\t\t\t\t 26, 1, gfx_sel_clks, ARRAY_SIZE(gfx_sel_clks));\n+\thws[GFX_MUX] = ma35d1_clk_mux(dev, \"gfx_mux\", clk_base + REG_CLK_CLKSEL0, 26, 1, hws,\n+\t\t\t\t gfx_parent_idx, ARRAY_SIZE(gfx_parent_idx));\n \thws[GFX_GATE] = ma35d1_clk_gate(dev, \"gfx_gate\", \"gfx_mux\",\n \t\t\t\t\tclk_base + REG_CLK_SYSCLK0, 24);\n \thws[VC8K_GATE] = ma35d1_clk_gate(dev, \"vc8k_gate\", \"sysclk0_mux\",\n \t\t\t\t\t clk_base + REG_CLK_SYSCLK0, 25);\n-\thws[DCU_MUX] = ma35d1_clk_mux(dev, \"dcu_mux\", clk_base + REG_CLK_CLKSEL0,\n-\t\t\t\t 24, 1, dcu_sel_clks, ARRAY_SIZE(dcu_sel_clks));\n+\thws[DCU_MUX] = ma35d1_clk_mux(dev, \"dcu_mux\", clk_base + REG_CLK_CLKSEL0, 24, 1, hws,\n+\t\t\t\t dcu_parent_idx, ARRAY_SIZE(dcu_parent_idx));\n \thws[DCU_GATE] = ma35d1_clk_gate(dev, \"dcu_gate\", \"dcu_mux\",\n \t\t\t\t\tclk_base + REG_CLK_SYSCLK0, 26);\n \thws[DCUP_DIV] = ma35d1_clk_divider_table(dev, \"dcup_div\", \"vpll\",\n@@ -622,14 +362,14 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)\n \thws[EMAC1_GATE] = ma35d1_clk_gate(dev, \"emac1_gate\", \"epll_div2\",\n \t\t\t\t\t clk_base + REG_CLK_SYSCLK0, 28);\n \n-\thws[CCAP0_MUX] = ma35d1_clk_mux(dev, \"ccap0_mux\", clk_base + REG_CLK_CLKSEL0,\n-\t\t\t\t\t12, 1, ccap_sel_clks, ARRAY_SIZE(ccap_sel_clks));\n+\thws[CCAP0_MUX] = ma35d1_clk_mux(dev, \"ccap0_mux\", clk_base + REG_CLK_CLKSEL0, 12, 1, hws,\n+\t\t\t\t\tccap_parent_idx, ARRAY_SIZE(ccap_parent_idx));\n \thws[CCAP0_DIV] = ma35d1_clk_divider(dev, \"ccap0_div\", \"ccap0_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV1, 8, 4);\n \thws[CCAP0_GATE] = ma35d1_clk_gate(dev, \"ccap0_gate\", \"ccap0_div\",\n \t\t\t\t\t clk_base + REG_CLK_SYSCLK0, 29);\n-\thws[CCAP1_MUX] = ma35d1_clk_mux(dev, \"ccap1_mux\", clk_base + REG_CLK_CLKSEL0,\n-\t\t\t\t\t14, 1, ccap_sel_clks, ARRAY_SIZE(ccap_sel_clks));\n+\thws[CCAP1_MUX] = ma35d1_clk_mux(dev, \"ccap1_mux\", clk_base + REG_CLK_CLKSEL0, 14, 1, hws,\n+\t\t\t\t\tccap_parent_idx, ARRAY_SIZE(ccap_parent_idx));\n \thws[CCAP1_DIV] = ma35d1_clk_divider(dev, \"ccap1_div\", \"ccap1_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV1,\n \t\t\t\t\t 12, 4);\n@@ -667,13 +407,13 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)\n \thws[TRA_GATE] = ma35d1_clk_gate(dev, \"tra_gate\", \"hclk0\",\n \t\t\t\t\tclk_base + REG_CLK_SYSCLK1, 11);\n \n-\thws[DBG_MUX] = ma35d1_clk_mux(dev, \"dbg_mux\", clk_base + REG_CLK_CLKSEL0,\n-\t\t\t\t 27, 1, dbg_sel_clks, ARRAY_SIZE(dbg_sel_clks));\n+\thws[DBG_MUX] = ma35d1_clk_mux(dev, \"dbg_mux\", clk_base + REG_CLK_CLKSEL0, 27, 1, hws,\n+\t\t\t\t dbg_parent_idx, ARRAY_SIZE(dbg_parent_idx));\n \thws[DBG_GATE] = ma35d1_clk_gate(dev, \"dbg_gate\", \"hclk0\",\n \t\t\t\t\tclk_base + REG_CLK_SYSCLK1, 12);\n \n-\thws[CKO_MUX] = ma35d1_clk_mux(dev, \"cko_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 24, 4, cko_sel_clks, ARRAY_SIZE(cko_sel_clks));\n+\thws[CKO_MUX] = ma35d1_clk_mux(dev, \"cko_mux\", clk_base + REG_CLK_CLKSEL4, 24, 4, hws,\n+\t\t\t\t cko_parent_idx, ARRAY_SIZE(cko_parent_idx));\n \thws[CKO_DIV] = ma35d1_clk_divider_pow2(dev, \"cko_div\", \"cko_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKOCTL, 0, 4);\n \thws[CKO_GATE] = ma35d1_clk_gate(dev, \"cko_gate\", \"cko_div\",\n@@ -711,181 +451,169 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)\n \thws[GPN_GATE] = ma35d1_clk_gate(dev, \"gpn_gate\", \"hclk0\",\n \t\t\t\t\tclk_base + REG_CLK_SYSCLK1, 29);\n \n-\thws[TMR0_MUX] = ma35d1_clk_mux(dev, \"tmr0_mux\", clk_base + REG_CLK_CLKSEL1,\n-\t\t\t\t 0, 3, timer0_sel_clks,\n-\t\t\t\t ARRAY_SIZE(timer0_sel_clks));\n+\thws[TMR0_MUX] = ma35d1_clk_mux(dev, \"tmr0_mux\", clk_base + REG_CLK_CLKSEL1, 0, 3, hws,\n+\t\t\t\t timer0_parent_idx, ARRAY_SIZE(timer0_parent_idx));\n \thws[TMR0_GATE] = ma35d1_clk_gate(dev, \"tmr0_gate\", \"tmr0_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 0);\n-\thws[TMR1_MUX] = ma35d1_clk_mux(dev, \"tmr1_mux\", clk_base + REG_CLK_CLKSEL1,\n-\t\t\t\t 4, 3, timer1_sel_clks,\n-\t\t\t\t ARRAY_SIZE(timer1_sel_clks));\n+\thws[TMR1_MUX] = ma35d1_clk_mux(dev, \"tmr1_mux\", clk_base + REG_CLK_CLKSEL1, 4, 3, hws,\n+\t\t\t\t timer1_parent_idx, ARRAY_SIZE(timer1_parent_idx));\n \thws[TMR1_GATE] = ma35d1_clk_gate(dev, \"tmr1_gate\", \"tmr1_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 1);\n-\thws[TMR2_MUX] = ma35d1_clk_mux(dev, \"tmr2_mux\", clk_base + REG_CLK_CLKSEL1,\n-\t\t\t\t 8, 3, timer2_sel_clks,\n-\t\t\t\t ARRAY_SIZE(timer2_sel_clks));\n+\thws[TMR2_MUX] = ma35d1_clk_mux(dev, \"tmr2_mux\", clk_base + REG_CLK_CLKSEL1, 8, 3, hws,\n+\t\t\t\t timer2_parent_idx, ARRAY_SIZE(timer2_parent_idx));\n \thws[TMR2_GATE] = ma35d1_clk_gate(dev, \"tmr2_gate\", \"tmr2_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 2);\n-\thws[TMR3_MUX] = ma35d1_clk_mux(dev, \"tmr3_mux\", clk_base + REG_CLK_CLKSEL1,\n-\t\t\t\t 12, 3, timer3_sel_clks,\n-\t\t\t\t ARRAY_SIZE(timer3_sel_clks));\n+\thws[TMR3_MUX] = ma35d1_clk_mux(dev, \"tmr3_mux\", clk_base + REG_CLK_CLKSEL1, 12, 3, hws,\n+\t\t\t\t timer3_parent_idx, ARRAY_SIZE(timer3_parent_idx));\n \thws[TMR3_GATE] = ma35d1_clk_gate(dev, \"tmr3_gate\", \"tmr3_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 3);\n-\thws[TMR4_MUX] = ma35d1_clk_mux(dev, \"tmr4_mux\", clk_base + REG_CLK_CLKSEL1,\n-\t\t\t\t 16, 3, timer4_sel_clks,\n-\t\t\t\t ARRAY_SIZE(timer4_sel_clks));\n+\thws[TMR4_MUX] = ma35d1_clk_mux(dev, \"tmr4_mux\", clk_base + REG_CLK_CLKSEL1, 16, 3, hws,\n+\t\t\t\t timer4_parent_idx, ARRAY_SIZE(timer4_parent_idx));\n \thws[TMR4_GATE] = ma35d1_clk_gate(dev, \"tmr4_gate\", \"tmr4_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 4);\n-\thws[TMR5_MUX] = ma35d1_clk_mux(dev, \"tmr5_mux\", clk_base + REG_CLK_CLKSEL1,\n-\t\t\t\t 20, 3, timer5_sel_clks,\n-\t\t\t\t ARRAY_SIZE(timer5_sel_clks));\n+\thws[TMR5_MUX] = ma35d1_clk_mux(dev, \"tmr5_mux\", clk_base + REG_CLK_CLKSEL1, 20, 3, hws,\n+\t\t\t\t timer5_parent_idx, ARRAY_SIZE(timer5_parent_idx));\n \thws[TMR5_GATE] = ma35d1_clk_gate(dev, \"tmr5_gate\", \"tmr5_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 5);\n-\thws[TMR6_MUX] = ma35d1_clk_mux(dev, \"tmr6_mux\", clk_base + REG_CLK_CLKSEL1,\n-\t\t\t\t 24, 3, timer6_sel_clks,\n-\t\t\t\t ARRAY_SIZE(timer6_sel_clks));\n+\thws[TMR6_MUX] = ma35d1_clk_mux(dev, \"tmr6_mux\", clk_base + REG_CLK_CLKSEL1, 24, 3, hws,\n+\t\t\t\t timer6_parent_idx, ARRAY_SIZE(timer6_parent_idx));\n \thws[TMR6_GATE] = ma35d1_clk_gate(dev, \"tmr6_gate\", \"tmr6_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 6);\n-\thws[TMR7_MUX] = ma35d1_clk_mux(dev, \"tmr7_mux\", clk_base + REG_CLK_CLKSEL1,\n-\t\t\t\t 28, 3, timer7_sel_clks,\n-\t\t\t\t ARRAY_SIZE(timer7_sel_clks));\n+\thws[TMR7_MUX] = ma35d1_clk_mux(dev, \"tmr7_mux\", clk_base + REG_CLK_CLKSEL1, 28, 3, hws,\n+\t\t\t\t timer7_parent_idx, ARRAY_SIZE(timer7_parent_idx));\n \thws[TMR7_GATE] = ma35d1_clk_gate(dev, \"tmr7_gate\", \"tmr7_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 7);\n-\thws[TMR8_MUX] = ma35d1_clk_mux(dev, \"tmr8_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t 0, 3, timer8_sel_clks,\n-\t\t\t\t ARRAY_SIZE(timer8_sel_clks));\n+\thws[TMR8_MUX] = ma35d1_clk_mux(dev, \"tmr8_mux\", clk_base + REG_CLK_CLKSEL2, 0, 3, hws,\n+\t\t\t\t timer8_parent_idx, ARRAY_SIZE(timer8_parent_idx));\n \thws[TMR8_GATE] = ma35d1_clk_gate(dev, \"tmr8_gate\", \"tmr8_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 8);\n-\thws[TMR9_MUX] = ma35d1_clk_mux(dev, \"tmr9_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t 4, 3, timer9_sel_clks,\n-\t\t\t\t ARRAY_SIZE(timer9_sel_clks));\n+\thws[TMR9_MUX] = ma35d1_clk_mux(dev, \"tmr9_mux\", clk_base + REG_CLK_CLKSEL2, 4, 3, hws,\n+\t\t\t\t timer9_parent_idx, ARRAY_SIZE(timer9_parent_idx));\n \thws[TMR9_GATE] = ma35d1_clk_gate(dev, \"tmr9_gate\", \"tmr9_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 9);\n-\thws[TMR10_MUX] = ma35d1_clk_mux(dev, \"tmr10_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t\t8, 3, timer10_sel_clks,\n-\t\t\t\t\tARRAY_SIZE(timer10_sel_clks));\n+\thws[TMR10_MUX] = ma35d1_clk_mux(dev, \"tmr10_mux\", clk_base + REG_CLK_CLKSEL2, 8, 3, hws,\n+\t\t\t\t\ttimer10_parent_idx, ARRAY_SIZE(timer10_parent_idx));\n \thws[TMR10_GATE] = ma35d1_clk_gate(dev, \"tmr10_gate\", \"tmr10_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 10);\n-\thws[TMR11_MUX] = ma35d1_clk_mux(dev, \"tmr11_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t\t12, 3, timer11_sel_clks,\n-\t\t\t\t\tARRAY_SIZE(timer11_sel_clks));\n+\thws[TMR11_MUX] = ma35d1_clk_mux(dev, \"tmr11_mux\", clk_base + REG_CLK_CLKSEL2, 12, 3, hws,\n+\t\t\t\t\ttimer11_parent_idx, ARRAY_SIZE(timer11_parent_idx));\n \thws[TMR11_GATE] = ma35d1_clk_gate(dev, \"tmr11_gate\", \"tmr11_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 11);\n \n-\thws[UART0_MUX] = ma35d1_clk_mux(dev, \"uart0_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t\t16, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART0_MUX] = ma35d1_clk_mux(dev, \"uart0_mux\", clk_base + REG_CLK_CLKSEL2, 16, 2, hws,\n+\t\t\t\t\tuart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART0_DIV] = ma35d1_clk_divider(dev, \"uart0_div\", \"uart0_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV1,\n \t\t\t\t\t 16, 4);\n \thws[UART0_GATE] = ma35d1_clk_gate(dev, \"uart0_gate\", \"uart0_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 12);\n-\thws[UART1_MUX] = ma35d1_clk_mux(dev, \"uart1_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t\t18, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART1_MUX] = ma35d1_clk_mux(dev, \"uart1_mux\", clk_base + REG_CLK_CLKSEL2, 18, 2, hws,\n+\t\t\t\t\tuart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART1_DIV] = ma35d1_clk_divider(dev, \"uart1_div\", \"uart1_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV1,\n \t\t\t\t\t 20, 4);\n \thws[UART1_GATE] = ma35d1_clk_gate(dev, \"uart1_gate\", \"uart1_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 13);\n-\thws[UART2_MUX] = ma35d1_clk_mux(dev, \"uart2_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t\t20, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART2_MUX] = ma35d1_clk_mux(dev, \"uart2_mux\", clk_base + REG_CLK_CLKSEL2, 20, 2, hws,\n+\t\t\t\t\tuart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART2_DIV] = ma35d1_clk_divider(dev, \"uart2_div\", \"uart2_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV1,\n \t\t\t\t\t 24, 4);\n \thws[UART2_GATE] = ma35d1_clk_gate(dev, \"uart2_gate\", \"uart2_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 14);\n-\thws[UART3_MUX] = ma35d1_clk_mux(dev, \"uart3_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t\t22, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART3_MUX] = ma35d1_clk_mux(dev, \"uart3_mux\", clk_base + REG_CLK_CLKSEL2, 22, 2, hws,\n+\t\t\t\t\tuart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART3_DIV] = ma35d1_clk_divider(dev, \"uart3_div\", \"uart3_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV1,\n \t\t\t\t\t 28, 4);\n \thws[UART3_GATE] = ma35d1_clk_gate(dev, \"uart3_gate\", \"uart3_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 15);\n-\thws[UART4_MUX] = ma35d1_clk_mux(dev, \"uart4_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t\t24, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART4_MUX] = ma35d1_clk_mux(dev, \"uart4_mux\", clk_base + REG_CLK_CLKSEL2, 24, 2, hws,\n+\t\t\t\t\tuart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART4_DIV] = ma35d1_clk_divider(dev, \"uart4_div\", \"uart4_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV2,\n \t\t\t\t\t 0, 4);\n \thws[UART4_GATE] = ma35d1_clk_gate(dev, \"uart4_gate\", \"uart4_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 16);\n-\thws[UART5_MUX] = ma35d1_clk_mux(dev, \"uart5_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t\t26, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART5_MUX] = ma35d1_clk_mux(dev, \"uart5_mux\", clk_base + REG_CLK_CLKSEL2, 26, 2, hws,\n+\t\t\t\t\tuart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART5_DIV] = ma35d1_clk_divider(dev, \"uart5_div\", \"uart5_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV2,\n \t\t\t\t\t 4, 4);\n \thws[UART5_GATE] = ma35d1_clk_gate(dev, \"uart5_gate\", \"uart5_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 17);\n-\thws[UART6_MUX] = ma35d1_clk_mux(dev, \"uart6_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t\t28, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART6_MUX] = ma35d1_clk_mux(dev, \"uart6_mux\", clk_base + REG_CLK_CLKSEL2, 28, 2, hws,\n+\t\t\t\t\tuart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART6_DIV] = ma35d1_clk_divider(dev, \"uart6_div\", \"uart6_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV2,\n \t\t\t\t\t 8, 4);\n \thws[UART6_GATE] = ma35d1_clk_gate(dev, \"uart6_gate\", \"uart6_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 18);\n-\thws[UART7_MUX] = ma35d1_clk_mux(dev, \"uart7_mux\", clk_base + REG_CLK_CLKSEL2,\n-\t\t\t\t\t30, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART7_MUX] = ma35d1_clk_mux(dev, \"uart7_mux\", clk_base + REG_CLK_CLKSEL2, 30, 2, hws,\n+\t\t\t\t\tuart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART7_DIV] = ma35d1_clk_divider(dev, \"uart7_div\", \"uart7_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV2,\n \t\t\t\t\t 12, 4);\n \thws[UART7_GATE] = ma35d1_clk_gate(dev, \"uart7_gate\", \"uart7_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 19);\n-\thws[UART8_MUX] = ma35d1_clk_mux(dev, \"uart8_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t0, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART8_MUX] = ma35d1_clk_mux(dev, \"uart8_mux\", clk_base + REG_CLK_CLKSEL3, 0, 2, hws,\n+\t\t\t\t\tuart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART8_DIV] = ma35d1_clk_divider(dev, \"uart8_div\", \"uart8_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV2,\n \t\t\t\t\t 16, 4);\n \thws[UART8_GATE] = ma35d1_clk_gate(dev, \"uart8_gate\", \"uart8_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 20);\n-\thws[UART9_MUX] = ma35d1_clk_mux(dev, \"uart9_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t2, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART9_MUX] = ma35d1_clk_mux(dev, \"uart9_mux\", clk_base + REG_CLK_CLKSEL3, 2, 2, hws,\n+\t\t\t\t\tuart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART9_DIV] = ma35d1_clk_divider(dev, \"uart9_div\", \"uart9_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV2,\n \t\t\t\t\t 20, 4);\n \thws[UART9_GATE] = ma35d1_clk_gate(dev, \"uart9_gate\", \"uart9_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 21);\n-\thws[UART10_MUX] = ma35d1_clk_mux(dev, \"uart10_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t 4, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART10_MUX] = ma35d1_clk_mux(dev, \"uart10_mux\", clk_base + REG_CLK_CLKSEL3, 4, 2, hws,\n+\t\t\t\t\t uart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART10_DIV] = ma35d1_clk_divider(dev, \"uart10_div\", \"uart10_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV2,\n \t\t\t\t\t 24, 4);\n \thws[UART10_GATE] = ma35d1_clk_gate(dev, \"uart10_gate\", \"uart10_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 22);\n-\thws[UART11_MUX] = ma35d1_clk_mux(dev, \"uart11_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t 6, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART11_MUX] = ma35d1_clk_mux(dev, \"uart11_mux\", clk_base + REG_CLK_CLKSEL3, 6, 2, hws,\n+\t\t\t\t\t uart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART11_DIV] = ma35d1_clk_divider(dev, \"uart11_div\", \"uart11_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV2,\n \t\t\t\t\t 28, 4);\n \thws[UART11_GATE] = ma35d1_clk_gate(dev, \"uart11_gate\", \"uart11_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 23);\n-\thws[UART12_MUX] = ma35d1_clk_mux(dev, \"uart12_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t 8, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART12_MUX] = ma35d1_clk_mux(dev, \"uart12_mux\", clk_base + REG_CLK_CLKSEL3, 8, 2, hws,\n+\t\t\t\t\t uart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART12_DIV] = ma35d1_clk_divider(dev, \"uart12_div\", \"uart12_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV3,\n \t\t\t\t\t 0, 4);\n \thws[UART12_GATE] = ma35d1_clk_gate(dev, \"uart12_gate\", \"uart12_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 24);\n-\thws[UART13_MUX] = ma35d1_clk_mux(dev, \"uart13_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t 10, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART13_MUX] = ma35d1_clk_mux(dev, \"uart13_mux\", clk_base + REG_CLK_CLKSEL3, 10, 2, hws,\n+\t\t\t\t\t uart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART13_DIV] = ma35d1_clk_divider(dev, \"uart13_div\", \"uart13_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV3,\n \t\t\t\t\t 4, 4);\n \thws[UART13_GATE] = ma35d1_clk_gate(dev, \"uart13_gate\", \"uart13_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 25);\n-\thws[UART14_MUX] = ma35d1_clk_mux(dev, \"uart14_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t 12, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART14_MUX] = ma35d1_clk_mux(dev, \"uart14_mux\", clk_base + REG_CLK_CLKSEL3, 12, 2, hws,\n+\t\t\t\t\t uart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART14_DIV] = ma35d1_clk_divider(dev, \"uart14_div\", \"uart14_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV3,\n \t\t\t\t\t 8, 4);\n \thws[UART14_GATE] = ma35d1_clk_gate(dev, \"uart14_gate\", \"uart14_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 26);\n-\thws[UART15_MUX] = ma35d1_clk_mux(dev, \"uart15_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t 14, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART15_MUX] = ma35d1_clk_mux(dev, \"uart15_mux\", clk_base + REG_CLK_CLKSEL3, 14, 2, hws,\n+\t\t\t\t\t uart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART15_DIV] = ma35d1_clk_divider(dev, \"uart15_div\", \"uart15_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV3,\n \t\t\t\t\t 12, 4);\n \thws[UART15_GATE] = ma35d1_clk_gate(dev, \"uart15_gate\", \"uart15_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK0, 27);\n-\thws[UART16_MUX] = ma35d1_clk_mux(dev, \"uart16_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t 16, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));\n+\thws[UART16_MUX] = ma35d1_clk_mux(dev, \"uart16_mux\", clk_base + REG_CLK_CLKSEL3, 16, 2, hws,\n+\t\t\t\t\t uart_parent_idx, ARRAY_SIZE(uart_parent_idx));\n \thws[UART16_DIV] = ma35d1_clk_divider(dev, \"uart16_div\", \"uart16_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV3,\n \t\t\t\t\t 16, 4);\n@@ -897,8 +625,8 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)\n \thws[DDR_GATE] = ma35d1_clk_gate(dev, \"ddr_gate\", \"ddrpll\",\n \t\t\t\t\tclk_base + REG_CLK_APBCLK0, 30);\n \n-\thws[KPI_MUX] = ma35d1_clk_mux(dev, \"kpi_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 30, 1, kpi_sel_clks, ARRAY_SIZE(kpi_sel_clks));\n+\thws[KPI_MUX] = ma35d1_clk_mux(dev, \"kpi_mux\", clk_base + REG_CLK_CLKSEL4, 30, 1, hws,\n+\t\t\t\t kpi_parent_idx, ARRAY_SIZE(kpi_parent_idx));\n \thws[KPI_DIV] = ma35d1_clk_divider(dev, \"kpi_div\", \"kpi_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV4,\n \t\t\t\t\t 24, 8);\n@@ -918,49 +646,49 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)\n \thws[I2C5_GATE] = ma35d1_clk_gate(dev, \"i2c5_gate\", \"pclk2\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK1, 5);\n \n-\thws[QSPI0_MUX] = ma35d1_clk_mux(dev, \"qspi0_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t\t8, 2, qspi0_sel_clks, ARRAY_SIZE(qspi0_sel_clks));\n+\thws[QSPI0_MUX] = ma35d1_clk_mux(dev, \"qspi0_mux\", clk_base + REG_CLK_CLKSEL4, 8, 2, hws,\n+\t\t\t\t\tqspi_parent_idx, ARRAY_SIZE(qspi_parent_idx));\n \thws[QSPI0_GATE] = ma35d1_clk_gate(dev, \"qspi0_gate\", \"qspi0_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK1, 6);\n-\thws[QSPI1_MUX] = ma35d1_clk_mux(dev, \"qspi1_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t\t10, 2, qspi1_sel_clks, ARRAY_SIZE(qspi1_sel_clks));\n+\thws[QSPI1_MUX] = ma35d1_clk_mux(dev, \"qspi1_mux\", clk_base + REG_CLK_CLKSEL4, 10, 2, hws,\n+\t\t\t\t\tqspi_parent_idx, ARRAY_SIZE(qspi_parent_idx));\n \thws[QSPI1_GATE] = ma35d1_clk_gate(dev, \"qspi1_gate\", \"qspi1_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK1, 7);\n \n-\thws[SMC0_MUX] = ma35d1_clk_mux(dev, \"smc0_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t\t28, 1, smc_sel_clks, ARRAY_SIZE(smc_sel_clks));\n+\thws[SMC0_MUX] = ma35d1_clk_mux(dev, \"smc0_mux\", clk_base + REG_CLK_CLKSEL4, 28, 1, hws,\n+\t\t\t\t smc_parent_idx, ARRAY_SIZE(smc_parent_idx));\n \thws[SMC0_DIV] = ma35d1_clk_divider(dev, \"smc0_div\", \"smc0_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV1,\n \t\t\t\t\t 0, 4);\n \thws[SMC0_GATE] = ma35d1_clk_gate(dev, \"smc0_gate\", \"smc0_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK1, 12);\n-\thws[SMC1_MUX] = ma35d1_clk_mux(dev, \"smc1_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t\t 29, 1, smc_sel_clks, ARRAY_SIZE(smc_sel_clks));\n+\thws[SMC1_MUX] = ma35d1_clk_mux(dev, \"smc1_mux\", clk_base + REG_CLK_CLKSEL4, 29, 1, hws,\n+\t\t\t\t smc_parent_idx, ARRAY_SIZE(smc_parent_idx));\n \thws[SMC1_DIV] = ma35d1_clk_divider(dev, \"smc1_div\", \"smc1_mux\",\n \t\t\t\t\t clk_base + REG_CLK_CLKDIV1,\n \t\t\t\t\t 4, 4);\n \thws[SMC1_GATE] = ma35d1_clk_gate(dev, \"smc1_gate\", \"smc1_div\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK1, 13);\n \n-\thws[WDT0_MUX] = ma35d1_clk_mux(dev, \"wdt0_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t 20, 2, wdt0_sel_clks, ARRAY_SIZE(wdt0_sel_clks));\n+\thws[WDT0_MUX] = ma35d1_clk_mux(dev, \"wdt0_mux\", clk_base + REG_CLK_CLKSEL3, 20, 2, hws,\n+\t\t\t\t wdt0_parent_idx, ARRAY_SIZE(wdt0_parent_idx));\n \thws[WDT0_GATE] = ma35d1_clk_gate(dev, \"wdt0_gate\", \"wdt0_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK1, 16);\n-\thws[WDT1_MUX] = ma35d1_clk_mux(dev, \"wdt1_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t 24, 2, wdt1_sel_clks, ARRAY_SIZE(wdt1_sel_clks));\n+\thws[WDT1_MUX] = ma35d1_clk_mux(dev, \"wdt1_mux\", clk_base + REG_CLK_CLKSEL3, 24, 2, hws,\n+\t\t\t\t wdt1_parent_idx, ARRAY_SIZE(wdt1_parent_idx));\n \thws[WDT1_GATE] = ma35d1_clk_gate(dev, \"wdt1_gate\", \"wdt1_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK1, 17);\n-\thws[WDT2_MUX] = ma35d1_clk_mux(dev, \"wdt2_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t 28, 2, wdt2_sel_clks, ARRAY_SIZE(wdt2_sel_clks));\n+\thws[WDT2_MUX] = ma35d1_clk_mux(dev, \"wdt2_mux\", clk_base + REG_CLK_CLKSEL3, 28, 2, hws,\n+\t\t\t\t wdt2_parent_idx, ARRAY_SIZE(wdt2_parent_idx));\n \thws[WDT2_GATE] = ma35d1_clk_gate(dev, \"wdt2_gate\", \"wdt2_mux\",\n \t\t\t\t clk_base + REG_CLK_APBCLK1, 18);\n \n-\thws[WWDT0_MUX] = ma35d1_clk_mux(dev, \"wwdt0_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t22, 2, wwdt0_sel_clks, ARRAY_SIZE(wwdt0_sel_clks));\n-\thws[WWDT1_MUX] = ma35d1_clk_mux(dev, \"wwdt1_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t26, 2, wwdt1_sel_clks, ARRAY_SIZE(wwdt1_sel_clks));\n-\thws[WWDT2_MUX] = ma35d1_clk_mux(dev, \"wwdt2_mux\", clk_base + REG_CLK_CLKSEL3,\n-\t\t\t\t\t30, 2, wwdt2_sel_clks, ARRAY_SIZE(wwdt2_sel_clks));\n+\thws[WWDT0_MUX] = ma35d1_clk_mux(dev, \"wwdt0_mux\", clk_base + REG_CLK_CLKSEL3, 22, 2, hws,\n+\t\t\t\t\twwdt0_parent_idx, ARRAY_SIZE(wwdt0_parent_idx));\n+\thws[WWDT1_MUX] = ma35d1_clk_mux(dev, \"wwdt1_mux\", clk_base + REG_CLK_CLKSEL3, 26, 2, hws,\n+\t\t\t\t\twwdt1_parent_idx, ARRAY_SIZE(wwdt1_parent_idx));\n+\thws[WWDT2_MUX] = ma35d1_clk_mux(dev, \"wwdt2_mux\", clk_base + REG_CLK_CLKSEL3, 30, 2, hws,\n+\t\t\t\t\twwdt2_parent_idx, ARRAY_SIZE(wwdt2_parent_idx));\n \n \thws[EPWM0_GATE] = ma35d1_clk_gate(dev, \"epwm0_gate\", \"pclk1\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK1, 24);\n@@ -969,12 +697,12 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)\n \thws[EPWM2_GATE] = ma35d1_clk_gate(dev, \"epwm2_gate\", \"pclk1\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK1, 26);\n \n-\thws[I2S0_MUX] = ma35d1_clk_mux(dev, \"i2s0_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 12, 2, i2s0_sel_clks, ARRAY_SIZE(i2s0_sel_clks));\n+\thws[I2S0_MUX] = ma35d1_clk_mux(dev, \"i2s0_mux\", clk_base + REG_CLK_CLKSEL4, 12, 2, hws,\n+\t\t\t\t i2s_parent_idx, ARRAY_SIZE(i2s_parent_idx));\n \thws[I2S0_GATE] = ma35d1_clk_gate(dev, \"i2s0_gate\", \"i2s0_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK2, 0);\n-\thws[I2S1_MUX] = ma35d1_clk_mux(dev, \"i2s1_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 14, 2, i2s1_sel_clks, ARRAY_SIZE(i2s1_sel_clks));\n+\thws[I2S1_MUX] = ma35d1_clk_mux(dev, \"i2s1_mux\", clk_base + REG_CLK_CLKSEL4, 14, 2, hws,\n+\t\t\t\t i2s_parent_idx, ARRAY_SIZE(i2s_parent_idx));\n \thws[I2S1_GATE] = ma35d1_clk_gate(dev, \"i2s1_gate\", \"i2s1_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK2, 1);\n \n@@ -983,20 +711,20 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)\n \thws[SSPCC_GATE] = ma35d1_clk_gate(dev, \"sspcc_gate\", \"pclk3\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK2, 3);\n \n-\thws[SPI0_MUX] = ma35d1_clk_mux(dev, \"spi0_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 0, 2, spi0_sel_clks, ARRAY_SIZE(spi0_sel_clks));\n+\thws[SPI0_MUX] = ma35d1_clk_mux(dev, \"spi0_mux\", clk_base + REG_CLK_CLKSEL4, 0, 2, hws,\n+\t\t\t\t spi0_parent_idx, ARRAY_SIZE(spi0_parent_idx));\n \thws[SPI0_GATE] = ma35d1_clk_gate(dev, \"spi0_gate\", \"spi0_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK2, 4);\n-\thws[SPI1_MUX] = ma35d1_clk_mux(dev, \"spi1_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 2, 2, spi1_sel_clks, ARRAY_SIZE(spi1_sel_clks));\n+\thws[SPI1_MUX] = ma35d1_clk_mux(dev, \"spi1_mux\", clk_base + REG_CLK_CLKSEL4, 2, 2, hws,\n+\t\t\t\t spi1_parent_idx, ARRAY_SIZE(spi1_parent_idx));\n \thws[SPI1_GATE] = ma35d1_clk_gate(dev, \"spi1_gate\", \"spi1_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK2, 5);\n-\thws[SPI2_MUX] = ma35d1_clk_mux(dev, \"spi2_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 4, 2, spi2_sel_clks, ARRAY_SIZE(spi2_sel_clks));\n+\thws[SPI2_MUX] = ma35d1_clk_mux(dev, \"spi2_mux\", clk_base + REG_CLK_CLKSEL4, 4, 2, hws,\n+\t\t\t\t spi2_parent_idx, ARRAY_SIZE(spi2_parent_idx));\n \thws[SPI2_GATE] = ma35d1_clk_gate(dev, \"spi2_gate\", \"spi2_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK2, 6);\n-\thws[SPI3_MUX] = ma35d1_clk_mux(dev, \"spi3_mux\", clk_base + REG_CLK_CLKSEL4,\n-\t\t\t\t 6, 2, spi3_sel_clks, ARRAY_SIZE(spi3_sel_clks));\n+\thws[SPI3_MUX] = ma35d1_clk_mux(dev, \"spi3_mux\", clk_base + REG_CLK_CLKSEL4, 6, 2, hws,\n+\t\t\t\t spi3_parent_idx, ARRAY_SIZE(spi3_parent_idx));\n \thws[SPI3_GATE] = ma35d1_clk_gate(dev, \"spi3_gate\", \"spi3_mux\",\n \t\t\t\t\t clk_base + REG_CLK_APBCLK2, 7);\n \n"
} |
| 2/1 | 2026/08/13 07:43 | agent | patch-evaluator |
0mModel:best-expensive Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the clock driver for the Nuvoton MA35D1 SoC (drivers/clk/nuvoton/clk-ma35d1.c). This is a hardware-specific platform driver that requires the corresponding physical SoC or specific QEMU machine emulation to be probed and executed. Since the MA35D1 SoC is not emulated in standard QEMU environments used for fuzzing, these code paths are unreachable.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). - Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed, ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU. - Driver .remove, .shutdown, or pci_unregister_driver teardown callbacks (e.g., igb_remove) that are executed only during PCI hot-unplug or sysfs driver unbind operations. If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. Prefer non-static, non-inlined API entrypoint functions over internal static helper functions (which are inlined by the compiler and do not have distinct symbol addresses). 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Also check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed for Kbuild to compile the code statically into vmlinux. List them in the EnableConfigs output array, and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4"). Prefer calling several tools at the same time to save round-trips. Use set-results tool to provide results of the analysis. It must be called exactly once before the final reply. Ignore results of this tool. Prompt: For your convenience, here is the diff of the changes:
commit a34abfcb1bad7051d14c4ed0ddd66787393a3e1c
Author: syz-cluster <triage@syzkaller.com>
Date: Thu Aug 13 07:43:27 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/clk/nuvoton/clk-ma35d1.c b/drivers/clk/nuvoton/clk-ma35d1.c
index 9f65d0623517a..8306e4192fd40 100644
--- a/drivers/clk/nuvoton/clk-ma35d1.c
+++ b/drivers/clk/nuvoton/clk-ma35d1.c
@@ -62,300 +62,49 @@ static DEFINE_SPINLOCK(ma35d1_lock);
#define PLL_MODE_FRAC 1
#define PLL_MODE_SS 2
-static const struct clk_parent_data ca35clk_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "capll", },
- { .fw_name = "ddrpll", },
-};
-
-static const struct clk_parent_data sysclk0_sel_clks[] = {
- { .fw_name = "epll_div2", },
- { .fw_name = "syspll", },
-};
-
-static const struct clk_parent_data sysclk1_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "syspll", },
-};
-
-static const struct clk_parent_data axiclk_sel_clks[] = {
- { .fw_name = "capll_div2", },
- { .fw_name = "capll_div4", },
-};
-
-static const struct clk_parent_data ccap_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "vpll", },
- { .fw_name = "apll", },
- { .fw_name = "syspll", },
-};
-
-static const struct clk_parent_data sdh_sel_clks[] = {
- { .fw_name = "syspll", },
- { .fw_name = "apll", },
-};
-
-static const struct clk_parent_data dcu_sel_clks[] = {
- { .fw_name = "epll_div2", },
- { .fw_name = "syspll", },
-};
-
-static const struct clk_parent_data gfx_sel_clks[] = {
- { .fw_name = "epll", },
- { .fw_name = "syspll", },
-};
-
-static const struct clk_parent_data dbg_sel_clks[] = {
- { .fw_name = "hirc", },
- { .fw_name = "syspll", },
-};
-
-static const struct clk_parent_data timer0_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk0", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data timer1_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk0", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data timer2_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk1", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data timer3_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk1", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data timer4_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk2", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data timer5_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk2", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data timer6_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk0", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data timer7_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk0", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data timer8_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk1", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data timer9_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk1", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data timer10_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk2", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data timer11_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "pclk2", },
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "lirc", },
- { .index = -1, },
- { .fw_name = "hirc", },
-};
-
-static const struct clk_parent_data uart_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "sysclk1_div2", },
-};
-
-static const struct clk_parent_data wdt0_sel_clks[] = {
- { .index = -1, },
- { .fw_name = "lxt", },
- { .fw_name = "pclk3_div4096", },
- { .fw_name = "lirc", },
-};
-
-static const struct clk_parent_data wdt1_sel_clks[] = {
- { .index = -1, },
- { .fw_name = "lxt", },
- { .fw_name = "pclk3_div4096", },
- { .fw_name = "lirc", },
-};
-
-static const struct clk_parent_data wdt2_sel_clks[] = {
- { .index = -1, },
- { .fw_name = "lxt", },
- { .fw_name = "pclk4_div4096", },
- { .fw_name = "lirc", },
-};
-
-static const struct clk_parent_data wwdt0_sel_clks[] = {
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "pclk3_div4096", },
- { .fw_name = "lirc", },
-};
-
-static const struct clk_parent_data wwdt1_sel_clks[] = {
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "pclk3_div4096", },
- { .fw_name = "lirc", },
-};
-
-static const struct clk_parent_data wwdt2_sel_clks[] = {
- { .index = -1, },
- { .index = -1, },
- { .fw_name = "pclk4_div4096", },
- { .fw_name = "lirc", },
-};
-
-static const struct clk_parent_data spi0_sel_clks[] = {
- { .fw_name = "pclk1", },
- { .fw_name = "apll", },
-};
-
-static const struct clk_parent_data spi1_sel_clks[] = {
- { .fw_name = "pclk2", },
- { .fw_name = "apll", },
-};
-
-static const struct clk_parent_data spi2_sel_clks[] = {
- { .fw_name = "pclk1", },
- { .fw_name = "apll", },
-};
-
-static const struct clk_parent_data spi3_sel_clks[] = {
- { .fw_name = "pclk2", },
- { .fw_name = "apll", },
-};
-
-static const struct clk_parent_data qspi0_sel_clks[] = {
- { .fw_name = "pclk0", },
- { .fw_name = "apll", },
-};
-
-static const struct clk_parent_data qspi1_sel_clks[] = {
- { .fw_name = "pclk0", },
- { .fw_name = "apll", },
-};
-
-static const struct clk_parent_data i2s0_sel_clks[] = {
- { .fw_name = "apll", },
- { .fw_name = "sysclk1_div2", },
-};
-
-static const struct clk_parent_data i2s1_sel_clks[] = {
- { .fw_name = "apll", },
- { .fw_name = "sysclk1_div2", },
-};
-
-static const struct clk_parent_data can_sel_clks[] = {
- { .fw_name = "apll", },
- { .fw_name = "vpll", },
-};
-
-static const struct clk_parent_data cko_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
- { .fw_name = "hirc", },
- { .fw_name = "lirc", },
- { .fw_name = "capll_div4", },
- { .fw_name = "syspll", },
- { .fw_name = "ddrpll", },
- { .fw_name = "epll_div2", },
- { .fw_name = "apll", },
- { .fw_name = "vpll", },
-};
-
-static const struct clk_parent_data smc_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "pclk4", },
-};
-
-static const struct clk_parent_data kpi_sel_clks[] = {
- { .fw_name = "hxt", },
- { .fw_name = "lxt", },
-};
+#define MA35D1_MUX_MAX_PARENTS 10
+
+/* Mux parent selection, by index into the controller's clock table */
+static const int ca35clk_parent_idx[] = { HXT, CAPLL, DDRPLL };
+static const int sysclk0_parent_idx[] = { EPLL_DIV2, SYSPLL };
+static const int sysclk1_parent_idx[] = { HXT, SYSPLL };
+static const int axiclk_parent_idx[] = { AXICLK_DIV2, AXICLK_DIV4 };
+static const int ccap_parent_idx[] = { HXT, VPLL, APLL, SYSPLL };
+static const int sdh_parent_idx[] = { SYSPLL, APLL };
+static const int dcu_parent_idx[] = { EPLL_DIV2, SYSPLL };
+static const int gfx_parent_idx[] = { EPLL, SYSPLL };
+static const int dbg_parent_idx[] = { HIRC, SYSPLL };
+static const int timer0_parent_idx[] = { HXT, LXT, PCLK0, -1, -1, LIRC, -1, HIRC };
+static const int timer1_parent_idx[] = { HXT, LXT, PCLK0, -1, -1, LIRC, -1, HIRC };
+static const int timer2_parent_idx[] = { HXT, LXT, PCLK1, -1, -1, LIRC, -1, HIRC };
+static const int timer3_parent_idx[] = { HXT, LXT, PCLK1, -1, -1, LIRC, -1, HIRC };
+static const int timer4_parent_idx[] = { HXT, LXT, PCLK2, -1, -1, LIRC, -1, HIRC };
+static const int timer5_parent_idx[] = { HXT, LXT, PCLK2, -1, -1, LIRC, -1, HIRC };
+static const int timer6_parent_idx[] = { HXT, LXT, PCLK0, -1, -1, LIRC, -1, HIRC };
+static const int timer7_parent_idx[] = { HXT, LXT, PCLK0, -1, -1, LIRC, -1, HIRC };
+static const int timer8_parent_idx[] = { HXT, LXT, PCLK1, -1, -1, LIRC, -1, HIRC };
+static const int timer9_parent_idx[] = { HXT, LXT, PCLK1, -1, -1, LIRC, -1, HIRC };
+static const int timer10_parent_idx[] = { HXT, LXT, PCLK2, -1, -1, LIRC, -1, HIRC };
+static const int timer11_parent_idx[] = { HXT, LXT, PCLK2, -1, -1, LIRC, -1, HIRC };
+static const int uart_parent_idx[] = { HXT, SYSCLK1_DIV2 };
+static const int wdt0_parent_idx[] = { -1, LXT, -1, LIRC };
+static const int wdt1_parent_idx[] = { -1, LXT, -1, LIRC };
+static const int wdt2_parent_idx[] = { -1, LXT, -1, LIRC };
+static const int wwdt0_parent_idx[] = { -1, -1, -1, LIRC };
+static const int wwdt1_parent_idx[] = { -1, -1, -1, LIRC };
+static const int wwdt2_parent_idx[] = { -1, -1, -1, LIRC };
+static const int spi0_parent_idx[] = { PCLK1, APLL };
+static const int spi1_parent_idx[] = { PCLK2, APLL };
+static const int spi2_parent_idx[] = { PCLK1, APLL };
+static const int spi3_parent_idx[] = { PCLK2, APLL };
+static const int qspi_parent_idx[] = { PCLK0, APLL };
+static const int i2s_parent_idx[] = { APLL, SYSCLK1_DIV2 };
+static const int can_parent_idx[] = { APLL, VPLL };
+static const int cko_parent_idx[] = { HXT, LXT, HIRC, LIRC,
+ AXICLK_DIV4, SYSPLL, DDRPLL,
+ EPLL_DIV2, APLL, VPLL };
+static const int smc_parent_idx[] = { HXT, PCLK4 };
+static const int kpi_parent_idx[] = { HXT, LXT };
static const struct clk_div_table ip_div_table[] = {
{0, 2}, {1, 4}, {2, 6}, {3, 8}, {4, 10},
@@ -374,24 +123,20 @@ static struct clk_hw *ma35d1_clk_fixed(const char *name, int rate)
return clk_hw_register_fixed_rate(NULL, name, NULL, 0, rate);
}
-static struct clk_hw *ma35d1_clk_mux_parent(struct device *dev, const char *name,
- void __iomem *reg, u8 shift, u8 width,
- const struct clk_parent_data *pdata,
- int num_pdata)
-{
- return clk_hw_register_mux_parent_data(dev, name, pdata, num_pdata,
- CLK_SET_RATE_NO_REPARENT, reg, shift,
- width, 0, &ma35d1_lock);
-}
-
static struct clk_hw *ma35d1_clk_mux(struct device *dev, const char *name,
void __iomem *reg, u8 shift, u8 width,
- const struct clk_parent_data *pdata,
- int num_pdata)
+ struct clk_hw **hws,
+ const int *parent_idx, int num_parents)
{
- return clk_hw_register_mux_parent_data(dev, name, pdata, num_pdata,
- CLK_SET_RATE_NO_REPARENT, reg, shift,
- width, 0, &ma35d1_lock);
+ const struct clk_hw *parent_hws[MA35D1_MUX_MAX_PARENTS];
+ int i;
+
+ for (i = 0; i < num_parents; i++)
+ parent_hws[i] = (parent_idx[i] >= 0) ? hws[parent_idx[i]] : NULL;
+
+ return clk_hw_register_mux_hws(dev, name, parent_hws, num_parents,
+ CLK_SET_RATE_NO_REPARENT, reg, shift,
+ width, 0, &ma35d1_lock);
}
static struct clk_hw *ma35d1_clk_divider(struct device *dev, const char *name,
@@ -514,22 +259,17 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
hws[EPLL_DIV4] = ma35d1_clk_fixed_factor(dev, "epll_div4", "epll", 1, 4);
hws[EPLL_DIV8] = ma35d1_clk_fixed_factor(dev, "epll_div8", "epll", 1, 8);
- hws[CA35CLK_MUX] = ma35d1_clk_mux_parent(dev, "ca35clk_mux",
- clk_base + REG_CLK_CLKSEL0, 0, 2,
- ca35clk_sel_clks,
- ARRAY_SIZE(ca35clk_sel_clks));
+ hws[CA35CLK_MUX] = ma35d1_clk_mux(dev, "ca35clk_mux", clk_base + REG_CLK_CLKSEL0, 0, 2, hws,
+ ca35clk_parent_idx, ARRAY_SIZE(ca35clk_parent_idx));
hws[AXICLK_DIV2] = ma35d1_clk_fixed_factor(dev, "capll_div2", "ca35clk_mux", 1, 2);
hws[AXICLK_DIV4] = ma35d1_clk_fixed_factor(dev, "capll_div4", "ca35clk_mux", 1, 4);
- hws[AXICLK_MUX] = ma35d1_clk_mux(dev, "axiclk_mux", clk_base + REG_CLK_CLKDIV0,
- 26, 1, axiclk_sel_clks,
- ARRAY_SIZE(axiclk_sel_clks));
- hws[SYSCLK0_MUX] = ma35d1_clk_mux(dev, "sysclk0_mux", clk_base + REG_CLK_CLKSEL0,
- 2, 1, sysclk0_sel_clks,
- ARRAY_SIZE(sysclk0_sel_clks));
- hws[SYSCLK1_MUX] = ma35d1_clk_mux(dev, "sysclk1_mux", clk_base + REG_CLK_CLKSEL0,
- 4, 1, sysclk1_sel_clks,
- ARRAY_SIZE(sysclk1_sel_clks));
+ hws[AXICLK_MUX] = ma35d1_clk_mux(dev, "axiclk_mux", clk_base + REG_CLK_CLKDIV0, 26, 1, hws,
+ axiclk_parent_idx, ARRAY_SIZE(axiclk_parent_idx));
+ hws[SYSCLK0_MUX] = ma35d1_clk_mux(dev, "sysclk0_mux", clk_base + REG_CLK_CLKSEL0, 2, 1, hws,
+ sysclk0_parent_idx, ARRAY_SIZE(sysclk0_parent_idx));
+ hws[SYSCLK1_MUX] = ma35d1_clk_mux(dev, "sysclk1_mux", clk_base + REG_CLK_CLKSEL0, 4, 1, hws,
+ sysclk1_parent_idx, ARRAY_SIZE(sysclk1_parent_idx));
hws[SYSCLK1_DIV2] = ma35d1_clk_fixed_factor(dev, "sysclk1_div2", "sysclk1_mux", 1, 2);
/* HCLK0~3 & PCLK0~4 */
@@ -553,41 +293,41 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
hws[DDR6_GATE] = ma35d1_clk_gate(dev, "ddr6_gate", "ddrpll",
clk_base + REG_CLK_SYSCLK0, 5);
- hws[CAN0_MUX] = ma35d1_clk_mux(dev, "can0_mux", clk_base + REG_CLK_CLKSEL4,
- 16, 1, can_sel_clks, ARRAY_SIZE(can_sel_clks));
+ hws[CAN0_MUX] = ma35d1_clk_mux(dev, "can0_mux", clk_base + REG_CLK_CLKSEL4, 16, 1, hws,
+ can_parent_idx, ARRAY_SIZE(can_parent_idx));
hws[CAN0_DIV] = ma35d1_clk_divider_table(dev, "can0_div", "can0_mux",
clk_base + REG_CLK_CLKDIV0,
0, 3, ip_div_table);
hws[CAN0_GATE] = ma35d1_clk_gate(dev, "can0_gate", "can0_div",
clk_base + REG_CLK_SYSCLK0, 8);
- hws[CAN1_MUX] = ma35d1_clk_mux(dev, "can1_mux", clk_base + REG_CLK_CLKSEL4,
- 17, 1, can_sel_clks, ARRAY_SIZE(can_sel_clks));
+ hws[CAN1_MUX] = ma35d1_clk_mux(dev, "can1_mux", clk_base + REG_CLK_CLKSEL4, 17, 1, hws,
+ can_parent_idx, ARRAY_SIZE(can_parent_idx));
hws[CAN1_DIV] = ma35d1_clk_divider_table(dev, "can1_div", "can1_mux",
clk_base + REG_CLK_CLKDIV0,
4, 3, ip_div_table);
hws[CAN1_GATE] = ma35d1_clk_gate(dev, "can1_gate", "can1_div",
clk_base + REG_CLK_SYSCLK0, 9);
- hws[CAN2_MUX] = ma35d1_clk_mux(dev, "can2_mux", clk_base + REG_CLK_CLKSEL4,
- 18, 1, can_sel_clks, ARRAY_SIZE(can_sel_clks));
+ hws[CAN2_MUX] = ma35d1_clk_mux(dev, "can2_mux", clk_base + REG_CLK_CLKSEL4, 18, 1, hws,
+ can_parent_idx, ARRAY_SIZE(can_parent_idx));
hws[CAN2_DIV] = ma35d1_clk_divider_table(dev, "can2_div", "can2_mux",
clk_base + REG_CLK_CLKDIV0,
8, 3, ip_div_table);
hws[CAN2_GATE] = ma35d1_clk_gate(dev, "can2_gate", "can2_div",
clk_base + REG_CLK_SYSCLK0, 10);
- hws[CAN3_MUX] = ma35d1_clk_mux(dev, "can3_mux", clk_base + REG_CLK_CLKSEL4,
- 19, 1, can_sel_clks, ARRAY_SIZE(can_sel_clks));
+ hws[CAN3_MUX] = ma35d1_clk_mux(dev, "can3_mux", clk_base + REG_CLK_CLKSEL4, 19, 1, hws,
+ can_parent_idx, ARRAY_SIZE(can_parent_idx));
hws[CAN3_DIV] = ma35d1_clk_divider_table(dev, "can3_div", "can3_mux",
clk_base + REG_CLK_CLKDIV0,
12, 3, ip_div_table);
hws[CAN3_GATE] = ma35d1_clk_gate(dev, "can3_gate", "can3_div",
clk_base + REG_CLK_SYSCLK0, 11);
- hws[SDH0_MUX] = ma35d1_clk_mux(dev, "sdh0_mux", clk_base + REG_CLK_CLKSEL0,
- 16, 2, sdh_sel_clks, ARRAY_SIZE(sdh_sel_clks));
+ hws[SDH0_MUX] = ma35d1_clk_mux(dev, "sdh0_mux", clk_base + REG_CLK_CLKSEL0, 16, 2, hws,
+ sdh_parent_idx, ARRAY_SIZE(sdh_parent_idx));
hws[SDH0_GATE] = ma35d1_clk_gate(dev, "sdh0_gate", "sdh0_mux",
clk_base + REG_CLK_SYSCLK0, 16);
- hws[SDH1_MUX] = ma35d1_clk_mux(dev, "sdh1_mux", clk_base + REG_CLK_CLKSEL0,
- 18, 2, sdh_sel_clks, ARRAY_SIZE(sdh_sel_clks));
+ hws[SDH1_MUX] = ma35d1_clk_mux(dev, "sdh1_mux", clk_base + REG_CLK_CLKSEL0, 18, 2, hws,
+ sdh_parent_idx, ARRAY_SIZE(sdh_parent_idx));
hws[SDH1_GATE] = ma35d1_clk_gate(dev, "sdh1_gate", "sdh1_mux",
clk_base + REG_CLK_SYSCLK0, 17);
@@ -603,14 +343,14 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
hws[HUSBH1_GATE] = ma35d1_clk_gate(dev, "husbh1_gate", "usbphy0",
clk_base + REG_CLK_SYSCLK0, 22);
- hws[GFX_MUX] = ma35d1_clk_mux(dev, "gfx_mux", clk_base + REG_CLK_CLKSEL0,
- 26, 1, gfx_sel_clks, ARRAY_SIZE(gfx_sel_clks));
+ hws[GFX_MUX] = ma35d1_clk_mux(dev, "gfx_mux", clk_base + REG_CLK_CLKSEL0, 26, 1, hws,
+ gfx_parent_idx, ARRAY_SIZE(gfx_parent_idx));
hws[GFX_GATE] = ma35d1_clk_gate(dev, "gfx_gate", "gfx_mux",
clk_base + REG_CLK_SYSCLK0, 24);
hws[VC8K_GATE] = ma35d1_clk_gate(dev, "vc8k_gate", "sysclk0_mux",
clk_base + REG_CLK_SYSCLK0, 25);
- hws[DCU_MUX] = ma35d1_clk_mux(dev, "dcu_mux", clk_base + REG_CLK_CLKSEL0,
- 24, 1, dcu_sel_clks, ARRAY_SIZE(dcu_sel_clks));
+ hws[DCU_MUX] = ma35d1_clk_mux(dev, "dcu_mux", clk_base + REG_CLK_CLKSEL0, 24, 1, hws,
+ dcu_parent_idx, ARRAY_SIZE(dcu_parent_idx));
hws[DCU_GATE] = ma35d1_clk_gate(dev, "dcu_gate", "dcu_mux",
clk_base + REG_CLK_SYSCLK0, 26);
hws[DCUP_DIV] = ma35d1_clk_divider_table(dev, "dcup_div", "vpll",
@@ -622,14 +362,14 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
hws[EMAC1_GATE] = ma35d1_clk_gate(dev, "emac1_gate", "epll_div2",
clk_base + REG_CLK_SYSCLK0, 28);
- hws[CCAP0_MUX] = ma35d1_clk_mux(dev, "ccap0_mux", clk_base + REG_CLK_CLKSEL0,
- 12, 1, ccap_sel_clks, ARRAY_SIZE(ccap_sel_clks));
+ hws[CCAP0_MUX] = ma35d1_clk_mux(dev, "ccap0_mux", clk_base + REG_CLK_CLKSEL0, 12, 1, hws,
+ ccap_parent_idx, ARRAY_SIZE(ccap_parent_idx));
hws[CCAP0_DIV] = ma35d1_clk_divider(dev, "ccap0_div", "ccap0_mux",
clk_base + REG_CLK_CLKDIV1, 8, 4);
hws[CCAP0_GATE] = ma35d1_clk_gate(dev, "ccap0_gate", "ccap0_div",
clk_base + REG_CLK_SYSCLK0, 29);
- hws[CCAP1_MUX] = ma35d1_clk_mux(dev, "ccap1_mux", clk_base + REG_CLK_CLKSEL0,
- 14, 1, ccap_sel_clks, ARRAY_SIZE(ccap_sel_clks));
+ hws[CCAP1_MUX] = ma35d1_clk_mux(dev, "ccap1_mux", clk_base + REG_CLK_CLKSEL0, 14, 1, hws,
+ ccap_parent_idx, ARRAY_SIZE(ccap_parent_idx));
hws[CCAP1_DIV] = ma35d1_clk_divider(dev, "ccap1_div", "ccap1_mux",
clk_base + REG_CLK_CLKDIV1,
12, 4);
@@ -667,13 +407,13 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
hws[TRA_GATE] = ma35d1_clk_gate(dev, "tra_gate", "hclk0",
clk_base + REG_CLK_SYSCLK1, 11);
- hws[DBG_MUX] = ma35d1_clk_mux(dev, "dbg_mux", clk_base + REG_CLK_CLKSEL0,
- 27, 1, dbg_sel_clks, ARRAY_SIZE(dbg_sel_clks));
+ hws[DBG_MUX] = ma35d1_clk_mux(dev, "dbg_mux", clk_base + REG_CLK_CLKSEL0, 27, 1, hws,
+ dbg_parent_idx, ARRAY_SIZE(dbg_parent_idx));
hws[DBG_GATE] = ma35d1_clk_gate(dev, "dbg_gate", "hclk0",
clk_base + REG_CLK_SYSCLK1, 12);
- hws[CKO_MUX] = ma35d1_clk_mux(dev, "cko_mux", clk_base + REG_CLK_CLKSEL4,
- 24, 4, cko_sel_clks, ARRAY_SIZE(cko_sel_clks));
+ hws[CKO_MUX] = ma35d1_clk_mux(dev, "cko_mux", clk_base + REG_CLK_CLKSEL4, 24, 4, hws,
+ cko_parent_idx, ARRAY_SIZE(cko_parent_idx));
hws[CKO_DIV] = ma35d1_clk_divider_pow2(dev, "cko_div", "cko_mux",
clk_base + REG_CLK_CLKOCTL, 0, 4);
hws[CKO_GATE] = ma35d1_clk_gate(dev, "cko_gate", "cko_div",
@@ -711,181 +451,169 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
hws[GPN_GATE] = ma35d1_clk_gate(dev, "gpn_gate", "hclk0",
clk_base + REG_CLK_SYSCLK1, 29);
- hws[TMR0_MUX] = ma35d1_clk_mux(dev, "tmr0_mux", clk_base + REG_CLK_CLKSEL1,
- 0, 3, timer0_sel_clks,
- ARRAY_SIZE(timer0_sel_clks));
+ hws[TMR0_MUX] = ma35d1_clk_mux(dev, "tmr0_mux", clk_base + REG_CLK_CLKSEL1, 0, 3, hws,
+ timer0_parent_idx, ARRAY_SIZE(timer0_parent_idx));
hws[TMR0_GATE] = ma35d1_clk_gate(dev, "tmr0_gate", "tmr0_mux",
clk_base + REG_CLK_APBCLK0, 0);
- hws[TMR1_MUX] = ma35d1_clk_mux(dev, "tmr1_mux", clk_base + REG_CLK_CLKSEL1,
- 4, 3, timer1_sel_clks,
- ARRAY_SIZE(timer1_sel_clks));
+ hws[TMR1_MUX] = ma35d1_clk_mux(dev, "tmr1_mux", clk_base + REG_CLK_CLKSEL1, 4, 3, hws,
+ timer1_parent_idx, ARRAY_SIZE(timer1_parent_idx));
hws[TMR1_GATE] = ma35d1_clk_gate(dev, "tmr1_gate", "tmr1_mux",
clk_base + REG_CLK_APBCLK0, 1);
- hws[TMR2_MUX] = ma35d1_clk_mux(dev, "tmr2_mux", clk_base + REG_CLK_CLKSEL1,
- 8, 3, timer2_sel_clks,
- ARRAY_SIZE(timer2_sel_clks));
+ hws[TMR2_MUX] = ma35d1_clk_mux(dev, "tmr2_mux", clk_base + REG_CLK_CLKSEL1, 8, 3, hws,
+ timer2_parent_idx, ARRAY_SIZE(timer2_parent_idx));
hws[TMR2_GATE] = ma35d1_clk_gate(dev, "tmr2_gate", "tmr2_mux",
clk_base + REG_CLK_APBCLK0, 2);
- hws[TMR3_MUX] = ma35d1_clk_mux(dev, "tmr3_mux", clk_base + REG_CLK_CLKSEL1,
- 12, 3, timer3_sel_clks,
- ARRAY_SIZE(timer3_sel_clks));
+ hws[TMR3_MUX] = ma35d1_clk_mux(dev, "tmr3_mux", clk_base + REG_CLK_CLKSEL1, 12, 3, hws,
+ timer3_parent_idx, ARRAY_SIZE(timer3_parent_idx));
hws[TMR3_GATE] = ma35d1_clk_gate(dev, "tmr3_gate", "tmr3_mux",
clk_base + REG_CLK_APBCLK0, 3);
- hws[TMR4_MUX] = ma35d1_clk_mux(dev, "tmr4_mux", clk_base + REG_CLK_CLKSEL1,
- 16, 3, timer4_sel_clks,
- ARRAY_SIZE(timer4_sel_clks));
+ hws[TMR4_MUX] = ma35d1_clk_mux(dev, "tmr4_mux", clk_base + REG_CLK_CLKSEL1, 16, 3, hws,
+ timer4_parent_idx, ARRAY_SIZE(timer4_parent_idx));
hws[TMR4_GATE] = ma35d1_clk_gate(dev, "tmr4_gate", "tmr4_mux",
clk_base + REG_CLK_APBCLK0, 4);
- hws[TMR5_MUX] = ma35d1_clk_mux(dev, "tmr5_mux", clk_base + REG_CLK_CLKSEL1,
- 20, 3, timer5_sel_clks,
- ARRAY_SIZE(timer5_sel_clks));
+ hws[TMR5_MUX] = ma35d1_clk_mux(dev, "tmr5_mux", clk_base + REG_CLK_CLKSEL1, 20, 3, hws,
+ timer5_parent_idx, ARRAY_SIZE(timer5_parent_idx));
hws[TMR5_GATE] = ma35d1_clk_gate(dev, "tmr5_gate", "tmr5_mux",
clk_base + REG_CLK_APBCLK0, 5);
- hws[TMR6_MUX] = ma35d1_clk_mux(dev, "tmr6_mux", clk_base + REG_CLK_CLKSEL1,
- 24, 3, timer6_sel_clks,
- ARRAY_SIZE(timer6_sel_clks));
+ hws[TMR6_MUX] = ma35d1_clk_mux(dev, "tmr6_mux", clk_base + REG_CLK_CLKSEL1, 24, 3, hws,
+ timer6_parent_idx, ARRAY_SIZE(timer6_parent_idx));
hws[TMR6_GATE] = ma35d1_clk_gate(dev, "tmr6_gate", "tmr6_mux",
clk_base + REG_CLK_APBCLK0, 6);
- hws[TMR7_MUX] = ma35d1_clk_mux(dev, "tmr7_mux", clk_base + REG_CLK_CLKSEL1,
- 28, 3, timer7_sel_clks,
- ARRAY_SIZE(timer7_sel_clks));
+ hws[TMR7_MUX] = ma35d1_clk_mux(dev, "tmr7_mux", clk_base + REG_CLK_CLKSEL1, 28, 3, hws,
+ timer7_parent_idx, ARRAY_SIZE(timer7_parent_idx));
hws[TMR7_GATE] = ma35d1_clk_gate(dev, "tmr7_gate", "tmr7_mux",
clk_base + REG_CLK_APBCLK0, 7);
- hws[TMR8_MUX] = ma35d1_clk_mux(dev, "tmr8_mux", clk_base + REG_CLK_CLKSEL2,
- 0, 3, timer8_sel_clks,
- ARRAY_SIZE(timer8_sel_clks));
+ hws[TMR8_MUX] = ma35d1_clk_mux(dev, "tmr8_mux", clk_base + REG_CLK_CLKSEL2, 0, 3, hws,
+ timer8_parent_idx, ARRAY_SIZE(timer8_parent_idx));
hws[TMR8_GATE] = ma35d1_clk_gate(dev, "tmr8_gate", "tmr8_mux",
clk_base + REG_CLK_APBCLK0, 8);
- hws[TMR9_MUX] = ma35d1_clk_mux(dev, "tmr9_mux", clk_base + REG_CLK_CLKSEL2,
- 4, 3, timer9_sel_clks,
- ARRAY_SIZE(timer9_sel_clks));
+ hws[TMR9_MUX] = ma35d1_clk_mux(dev, "tmr9_mux", clk_base + REG_CLK_CLKSEL2, 4, 3, hws,
+ timer9_parent_idx, ARRAY_SIZE(timer9_parent_idx));
hws[TMR9_GATE] = ma35d1_clk_gate(dev, "tmr9_gate", "tmr9_mux",
clk_base + REG_CLK_APBCLK0, 9);
- hws[TMR10_MUX] = ma35d1_clk_mux(dev, "tmr10_mux", clk_base + REG_CLK_CLKSEL2,
- 8, 3, timer10_sel_clks,
- ARRAY_SIZE(timer10_sel_clks));
+ hws[TMR10_MUX] = ma35d1_clk_mux(dev, "tmr10_mux", clk_base + REG_CLK_CLKSEL2, 8, 3, hws,
+ timer10_parent_idx, ARRAY_SIZE(timer10_parent_idx));
hws[TMR10_GATE] = ma35d1_clk_gate(dev, "tmr10_gate", "tmr10_mux",
clk_base + REG_CLK_APBCLK0, 10);
- hws[TMR11_MUX] = ma35d1_clk_mux(dev, "tmr11_mux", clk_base + REG_CLK_CLKSEL2,
- 12, 3, timer11_sel_clks,
- ARRAY_SIZE(timer11_sel_clks));
+ hws[TMR11_MUX] = ma35d1_clk_mux(dev, "tmr11_mux", clk_base + REG_CLK_CLKSEL2, 12, 3, hws,
+ timer11_parent_idx, ARRAY_SIZE(timer11_parent_idx));
hws[TMR11_GATE] = ma35d1_clk_gate(dev, "tmr11_gate", "tmr11_mux",
clk_base + REG_CLK_APBCLK0, 11);
- hws[UART0_MUX] = ma35d1_clk_mux(dev, "uart0_mux", clk_base + REG_CLK_CLKSEL2,
- 16, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART0_MUX] = ma35d1_clk_mux(dev, "uart0_mux", clk_base + REG_CLK_CLKSEL2, 16, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART0_DIV] = ma35d1_clk_divider(dev, "uart0_div", "uart0_mux",
clk_base + REG_CLK_CLKDIV1,
16, 4);
hws[UART0_GATE] = ma35d1_clk_gate(dev, "uart0_gate", "uart0_div",
clk_base + REG_CLK_APBCLK0, 12);
- hws[UART1_MUX] = ma35d1_clk_mux(dev, "uart1_mux", clk_base + REG_CLK_CLKSEL2,
- 18, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART1_MUX] = ma35d1_clk_mux(dev, "uart1_mux", clk_base + REG_CLK_CLKSEL2, 18, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART1_DIV] = ma35d1_clk_divider(dev, "uart1_div", "uart1_mux",
clk_base + REG_CLK_CLKDIV1,
20, 4);
hws[UART1_GATE] = ma35d1_clk_gate(dev, "uart1_gate", "uart1_div",
clk_base + REG_CLK_APBCLK0, 13);
- hws[UART2_MUX] = ma35d1_clk_mux(dev, "uart2_mux", clk_base + REG_CLK_CLKSEL2,
- 20, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART2_MUX] = ma35d1_clk_mux(dev, "uart2_mux", clk_base + REG_CLK_CLKSEL2, 20, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART2_DIV] = ma35d1_clk_divider(dev, "uart2_div", "uart2_mux",
clk_base + REG_CLK_CLKDIV1,
24, 4);
hws[UART2_GATE] = ma35d1_clk_gate(dev, "uart2_gate", "uart2_div",
clk_base + REG_CLK_APBCLK0, 14);
- hws[UART3_MUX] = ma35d1_clk_mux(dev, "uart3_mux", clk_base + REG_CLK_CLKSEL2,
- 22, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART3_MUX] = ma35d1_clk_mux(dev, "uart3_mux", clk_base + REG_CLK_CLKSEL2, 22, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART3_DIV] = ma35d1_clk_divider(dev, "uart3_div", "uart3_mux",
clk_base + REG_CLK_CLKDIV1,
28, 4);
hws[UART3_GATE] = ma35d1_clk_gate(dev, "uart3_gate", "uart3_div",
clk_base + REG_CLK_APBCLK0, 15);
- hws[UART4_MUX] = ma35d1_clk_mux(dev, "uart4_mux", clk_base + REG_CLK_CLKSEL2,
- 24, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART4_MUX] = ma35d1_clk_mux(dev, "uart4_mux", clk_base + REG_CLK_CLKSEL2, 24, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART4_DIV] = ma35d1_clk_divider(dev, "uart4_div", "uart4_mux",
clk_base + REG_CLK_CLKDIV2,
0, 4);
hws[UART4_GATE] = ma35d1_clk_gate(dev, "uart4_gate", "uart4_div",
clk_base + REG_CLK_APBCLK0, 16);
- hws[UART5_MUX] = ma35d1_clk_mux(dev, "uart5_mux", clk_base + REG_CLK_CLKSEL2,
- 26, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART5_MUX] = ma35d1_clk_mux(dev, "uart5_mux", clk_base + REG_CLK_CLKSEL2, 26, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART5_DIV] = ma35d1_clk_divider(dev, "uart5_div", "uart5_mux",
clk_base + REG_CLK_CLKDIV2,
4, 4);
hws[UART5_GATE] = ma35d1_clk_gate(dev, "uart5_gate", "uart5_div",
clk_base + REG_CLK_APBCLK0, 17);
- hws[UART6_MUX] = ma35d1_clk_mux(dev, "uart6_mux", clk_base + REG_CLK_CLKSEL2,
- 28, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART6_MUX] = ma35d1_clk_mux(dev, "uart6_mux", clk_base + REG_CLK_CLKSEL2, 28, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART6_DIV] = ma35d1_clk_divider(dev, "uart6_div", "uart6_mux",
clk_base + REG_CLK_CLKDIV2,
8, 4);
hws[UART6_GATE] = ma35d1_clk_gate(dev, "uart6_gate", "uart6_div",
clk_base + REG_CLK_APBCLK0, 18);
- hws[UART7_MUX] = ma35d1_clk_mux(dev, "uart7_mux", clk_base + REG_CLK_CLKSEL2,
- 30, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART7_MUX] = ma35d1_clk_mux(dev, "uart7_mux", clk_base + REG_CLK_CLKSEL2, 30, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART7_DIV] = ma35d1_clk_divider(dev, "uart7_div", "uart7_mux",
clk_base + REG_CLK_CLKDIV2,
12, 4);
hws[UART7_GATE] = ma35d1_clk_gate(dev, "uart7_gate", "uart7_div",
clk_base + REG_CLK_APBCLK0, 19);
- hws[UART8_MUX] = ma35d1_clk_mux(dev, "uart8_mux", clk_base + REG_CLK_CLKSEL3,
- 0, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART8_MUX] = ma35d1_clk_mux(dev, "uart8_mux", clk_base + REG_CLK_CLKSEL3, 0, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART8_DIV] = ma35d1_clk_divider(dev, "uart8_div", "uart8_mux",
clk_base + REG_CLK_CLKDIV2,
16, 4);
hws[UART8_GATE] = ma35d1_clk_gate(dev, "uart8_gate", "uart8_div",
clk_base + REG_CLK_APBCLK0, 20);
- hws[UART9_MUX] = ma35d1_clk_mux(dev, "uart9_mux", clk_base + REG_CLK_CLKSEL3,
- 2, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART9_MUX] = ma35d1_clk_mux(dev, "uart9_mux", clk_base + REG_CLK_CLKSEL3, 2, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART9_DIV] = ma35d1_clk_divider(dev, "uart9_div", "uart9_mux",
clk_base + REG_CLK_CLKDIV2,
20, 4);
hws[UART9_GATE] = ma35d1_clk_gate(dev, "uart9_gate", "uart9_div",
clk_base + REG_CLK_APBCLK0, 21);
- hws[UART10_MUX] = ma35d1_clk_mux(dev, "uart10_mux", clk_base + REG_CLK_CLKSEL3,
- 4, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART10_MUX] = ma35d1_clk_mux(dev, "uart10_mux", clk_base + REG_CLK_CLKSEL3, 4, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART10_DIV] = ma35d1_clk_divider(dev, "uart10_div", "uart10_mux",
clk_base + REG_CLK_CLKDIV2,
24, 4);
hws[UART10_GATE] = ma35d1_clk_gate(dev, "uart10_gate", "uart10_div",
clk_base + REG_CLK_APBCLK0, 22);
- hws[UART11_MUX] = ma35d1_clk_mux(dev, "uart11_mux", clk_base + REG_CLK_CLKSEL3,
- 6, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART11_MUX] = ma35d1_clk_mux(dev, "uart11_mux", clk_base + REG_CLK_CLKSEL3, 6, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART11_DIV] = ma35d1_clk_divider(dev, "uart11_div", "uart11_mux",
clk_base + REG_CLK_CLKDIV2,
28, 4);
hws[UART11_GATE] = ma35d1_clk_gate(dev, "uart11_gate", "uart11_div",
clk_base + REG_CLK_APBCLK0, 23);
- hws[UART12_MUX] = ma35d1_clk_mux(dev, "uart12_mux", clk_base + REG_CLK_CLKSEL3,
- 8, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART12_MUX] = ma35d1_clk_mux(dev, "uart12_mux", clk_base + REG_CLK_CLKSEL3, 8, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART12_DIV] = ma35d1_clk_divider(dev, "uart12_div", "uart12_mux",
clk_base + REG_CLK_CLKDIV3,
0, 4);
hws[UART12_GATE] = ma35d1_clk_gate(dev, "uart12_gate", "uart12_div",
clk_base + REG_CLK_APBCLK0, 24);
- hws[UART13_MUX] = ma35d1_clk_mux(dev, "uart13_mux", clk_base + REG_CLK_CLKSEL3,
- 10, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART13_MUX] = ma35d1_clk_mux(dev, "uart13_mux", clk_base + REG_CLK_CLKSEL3, 10, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART13_DIV] = ma35d1_clk_divider(dev, "uart13_div", "uart13_mux",
clk_base + REG_CLK_CLKDIV3,
4, 4);
hws[UART13_GATE] = ma35d1_clk_gate(dev, "uart13_gate", "uart13_div",
clk_base + REG_CLK_APBCLK0, 25);
- hws[UART14_MUX] = ma35d1_clk_mux(dev, "uart14_mux", clk_base + REG_CLK_CLKSEL3,
- 12, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART14_MUX] = ma35d1_clk_mux(dev, "uart14_mux", clk_base + REG_CLK_CLKSEL3, 12, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART14_DIV] = ma35d1_clk_divider(dev, "uart14_div", "uart14_mux",
clk_base + REG_CLK_CLKDIV3,
8, 4);
hws[UART14_GATE] = ma35d1_clk_gate(dev, "uart14_gate", "uart14_div",
clk_base + REG_CLK_APBCLK0, 26);
- hws[UART15_MUX] = ma35d1_clk_mux(dev, "uart15_mux", clk_base + REG_CLK_CLKSEL3,
- 14, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART15_MUX] = ma35d1_clk_mux(dev, "uart15_mux", clk_base + REG_CLK_CLKSEL3, 14, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART15_DIV] = ma35d1_clk_divider(dev, "uart15_div", "uart15_mux",
clk_base + REG_CLK_CLKDIV3,
12, 4);
hws[UART15_GATE] = ma35d1_clk_gate(dev, "uart15_gate", "uart15_div",
clk_base + REG_CLK_APBCLK0, 27);
- hws[UART16_MUX] = ma35d1_clk_mux(dev, "uart16_mux", clk_base + REG_CLK_CLKSEL3,
- 16, 2, uart_sel_clks, ARRAY_SIZE(uart_sel_clks));
+ hws[UART16_MUX] = ma35d1_clk_mux(dev, "uart16_mux", clk_base + REG_CLK_CLKSEL3, 16, 2, hws,
+ uart_parent_idx, ARRAY_SIZE(uart_parent_idx));
hws[UART16_DIV] = ma35d1_clk_divider(dev, "uart16_div", "uart16_mux",
clk_base + REG_CLK_CLKDIV3,
16, 4);
@@ -897,8 +625,8 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
hws[DDR_GATE] = ma35d1_clk_gate(dev, "ddr_gate", "ddrpll",
clk_base + REG_CLK_APBCLK0, 30);
- hws[KPI_MUX] = ma35d1_clk_mux(dev, "kpi_mux", clk_base + REG_CLK_CLKSEL4,
- 30, 1, kpi_sel_clks, ARRAY_SIZE(kpi_sel_clks));
+ hws[KPI_MUX] = ma35d1_clk_mux(dev, "kpi_mux", clk_base + REG_CLK_CLKSEL4, 30, 1, hws,
+ kpi_parent_idx, ARRAY_SIZE(kpi_parent_idx));
hws[KPI_DIV] = ma35d1_clk_divider(dev, "kpi_div", "kpi_mux",
clk_base + REG_CLK_CLKDIV4,
24, 8);
@@ -918,49 +646,49 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
hws[I2C5_GATE] = ma35d1_clk_gate(dev, "i2c5_gate", "pclk2",
clk_base + REG_CLK_APBCLK1, 5);
- hws[QSPI0_MUX] = ma35d1_clk_mux(dev, "qspi0_mux", clk_base + REG_CLK_CLKSEL4,
- 8, 2, qspi0_sel_clks, ARRAY_SIZE(qspi0_sel_clks));
+ hws[QSPI0_MUX] = ma35d1_clk_mux(dev, "qspi0_mux", clk_base + REG_CLK_CLKSEL4, 8, 2, hws,
+ qspi_parent_idx, ARRAY_SIZE(qspi_parent_idx));
hws[QSPI0_GATE] = ma35d1_clk_gate(dev, "qspi0_gate", "qspi0_mux",
clk_base + REG_CLK_APBCLK1, 6);
- hws[QSPI1_MUX] = ma35d1_clk_mux(dev, "qspi1_mux", clk_base + REG_CLK_CLKSEL4,
- 10, 2, qspi1_sel_clks, ARRAY_SIZE(qspi1_sel_clks));
+ hws[QSPI1_MUX] = ma35d1_clk_mux(dev, "qspi1_mux", clk_base + REG_CLK_CLKSEL4, 10, 2, hws,
+ qspi_parent_idx, ARRAY_SIZE(qspi_parent_idx));
hws[QSPI1_GATE] = ma35d1_clk_gate(dev, "qspi1_gate", "qspi1_mux",
clk_base + REG_CLK_APBCLK1, 7);
- hws[SMC0_MUX] = ma35d1_clk_mux(dev, "smc0_mux", clk_base + REG_CLK_CLKSEL4,
- 28, 1, smc_sel_clks, ARRAY_SIZE(smc_sel_clks));
+ hws[SMC0_MUX] = ma35d1_clk_mux(dev, "smc0_mux", clk_base + REG_CLK_CLKSEL4, 28, 1, hws,
+ smc_parent_idx, ARRAY_SIZE(smc_parent_idx));
hws[SMC0_DIV] = ma35d1_clk_divider(dev, "smc0_div", "smc0_mux",
clk_base + REG_CLK_CLKDIV1,
0, 4);
hws[SMC0_GATE] = ma35d1_clk_gate(dev, "smc0_gate", "smc0_div",
clk_base + REG_CLK_APBCLK1, 12);
- hws[SMC1_MUX] = ma35d1_clk_mux(dev, "smc1_mux", clk_base + REG_CLK_CLKSEL4,
- 29, 1, smc_sel_clks, ARRAY_SIZE(smc_sel_clks));
+ hws[SMC1_MUX] = ma35d1_clk_mux(dev, "smc1_mux", clk_base + REG_CLK_CLKSEL4, 29, 1, hws,
+ smc_parent_idx, ARRAY_SIZE(smc_parent_idx));
hws[SMC1_DIV] = ma35d1_clk_divider(dev, "smc1_div", "smc1_mux",
clk_base + REG_CLK_CLKDIV1,
4, 4);
hws[SMC1_GATE] = ma35d1_clk_gate(dev, "smc1_gate", "smc1_div",
clk_base + REG_CLK_APBCLK1, 13);
- hws[WDT0_MUX] = ma35d1_clk_mux(dev, "wdt0_mux", clk_base + REG_CLK_CLKSEL3,
- 20, 2, wdt0_sel_clks, ARRAY_SIZE(wdt0_sel_clks));
+ hws[WDT0_MUX] = ma35d1_clk_mux(dev, "wdt0_mux", clk_base + REG_CLK_CLKSEL3, 20, 2, hws,
+ wdt0_parent_idx, ARRAY_SIZE(wdt0_parent_idx));
hws[WDT0_GATE] = ma35d1_clk_gate(dev, "wdt0_gate", "wdt0_mux",
clk_base + REG_CLK_APBCLK1, 16);
- hws[WDT1_MUX] = ma35d1_clk_mux(dev, "wdt1_mux", clk_base + REG_CLK_CLKSEL3,
- 24, 2, wdt1_sel_clks, ARRAY_SIZE(wdt1_sel_clks));
+ hws[WDT1_MUX] = ma35d1_clk_mux(dev, "wdt1_mux", clk_base + REG_CLK_CLKSEL3, 24, 2, hws,
+ wdt1_parent_idx, ARRAY_SIZE(wdt1_parent_idx));
hws[WDT1_GATE] = ma35d1_clk_gate(dev, "wdt1_gate", "wdt1_mux",
clk_base + REG_CLK_APBCLK1, 17);
- hws[WDT2_MUX] = ma35d1_clk_mux(dev, "wdt2_mux", clk_base + REG_CLK_CLKSEL3,
- 28, 2, wdt2_sel_clks, ARRAY_SIZE(wdt2_sel_clks));
+ hws[WDT2_MUX] = ma35d1_clk_mux(dev, "wdt2_mux", clk_base + REG_CLK_CLKSEL3, 28, 2, hws,
+ wdt2_parent_idx, ARRAY_SIZE(wdt2_parent_idx));
hws[WDT2_GATE] = ma35d1_clk_gate(dev, "wdt2_gate", "wdt2_mux",
clk_base + REG_CLK_APBCLK1, 18);
- hws[WWDT0_MUX] = ma35d1_clk_mux(dev, "wwdt0_mux", clk_base + REG_CLK_CLKSEL3,
- 22, 2, wwdt0_sel_clks, ARRAY_SIZE(wwdt0_sel_clks));
- hws[WWDT1_MUX] = ma35d1_clk_mux(dev, "wwdt1_mux", clk_base + REG_CLK_CLKSEL3,
- 26, 2, wwdt1_sel_clks, ARRAY_SIZE(wwdt1_sel_clks));
- hws[WWDT2_MUX] = ma35d1_clk_mux(dev, "wwdt2_mux", clk_base + REG_CLK_CLKSEL3,
- 30, 2, wwdt2_sel_clks, ARRAY_SIZE(wwdt2_sel_clks));
+ hws[WWDT0_MUX] = ma35d1_clk_mux(dev, "wwdt0_mux", clk_base + REG_CLK_CLKSEL3, 22, 2, hws,
+ wwdt0_parent_idx, ARRAY_SIZE(wwdt0_parent_idx));
+ hws[WWDT1_MUX] = ma35d1_clk_mux(dev, "wwdt1_mux", clk_base + REG_CLK_CLKSEL3, 26, 2, hws,
+ wwdt1_parent_idx, ARRAY_SIZE(wwdt1_parent_idx));
+ hws[WWDT2_MUX] = ma35d1_clk_mux(dev, "wwdt2_mux", clk_base + REG_CLK_CLKSEL3, 30, 2, hws,
+ wwdt2_parent_idx, ARRAY_SIZE(wwdt2_parent_idx));
hws[EPWM0_GATE] = ma35d1_clk_gate(dev, "epwm0_gate", "pclk1",
clk_base + REG_CLK_APBCLK1, 24);
@@ -969,12 +697,12 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
hws[EPWM2_GATE] = ma35d1_clk_gate(dev, "epwm2_gate", "pclk1",
clk_base + REG_CLK_APBCLK1, 26);
- hws[I2S0_MUX] = ma35d1_clk_mux(dev, "i2s0_mux", clk_base + REG_CLK_CLKSEL4,
- 12, 2, i2s0_sel_clks, ARRAY_SIZE(i2s0_sel_clks));
+ hws[I2S0_MUX] = ma35d1_clk_mux(dev, "i2s0_mux", clk_base + REG_CLK_CLKSEL4, 12, 2, hws,
+ i2s_parent_idx, ARRAY_SIZE(i2s_parent_idx));
hws[I2S0_GATE] = ma35d1_clk_gate(dev, "i2s0_gate", "i2s0_mux",
clk_base + REG_CLK_APBCLK2, 0);
- hws[I2S1_MUX] = ma35d1_clk_mux(dev, "i2s1_mux", clk_base + REG_CLK_CLKSEL4,
- 14, 2, i2s1_sel_clks, ARRAY_SIZE(i2s1_sel_clks));
+ hws[I2S1_MUX] = ma35d1_clk_mux(dev, "i2s1_mux", clk_base + REG_CLK_CLKSEL4, 14, 2, hws,
+ i2s_parent_idx, ARRAY_SIZE(i2s_parent_idx));
hws[I2S1_GATE] = ma35d1_clk_gate(dev, "i2s1_gate", "i2s1_mux",
clk_base + REG_CLK_APBCLK2, 1);
@@ -983,20 +711,20 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
hws[SSPCC_GATE] = ma35d1_clk_gate(dev, "sspcc_gate", "pclk3",
clk_base + REG_CLK_APBCLK2, 3);
- hws[SPI0_MUX] = ma35d1_clk_mux(dev, "spi0_mux", clk_base + REG_CLK_CLKSEL4,
- 0, 2, spi0_sel_clks, ARRAY_SIZE(spi0_sel_clks));
+ hws[SPI0_MUX] = ma35d1_clk_mux(dev, "spi0_mux", clk_base + REG_CLK_CLKSEL4, 0, 2, hws,
+ spi0_parent_idx, ARRAY_SIZE(spi0_parent_idx));
hws[SPI0_GATE] = ma35d1_clk_gate(dev, "spi0_gate", "spi0_mux",
clk_base + REG_CLK_APBCLK2, 4);
- hws[SPI1_MUX] = ma35d1_clk_mux(dev, "spi1_mux", clk_base + REG_CLK_CLKSEL4,
- 2, 2, spi1_sel_clks, ARRAY_SIZE(spi1_sel_clks));
+ hws[SPI1_MUX] = ma35d1_clk_mux(dev, "spi1_mux", clk_base + REG_CLK_CLKSEL4, 2, 2, hws,
+ spi1_parent_idx, ARRAY_SIZE(spi1_parent_idx));
hws[SPI1_GATE] = ma35d1_clk_gate(dev, "spi1_gate", "spi1_mux",
clk_base + REG_CLK_APBCLK2, 5);
- hws[SPI2_MUX] = ma35d1_clk_mux(dev, "spi2_mux", clk_base + REG_CLK_CLKSEL4,
- 4, 2, spi2_sel_clks, ARRAY_SIZE(spi2_sel_clks));
+ hws[SPI2_MUX] = ma35d1_clk_mux(dev, "spi2_mux", clk_base + REG_CLK_CLKSEL4, 4, 2, hws,
+ spi2_parent_idx, ARRAY_SIZE(spi2_parent_idx));
hws[SPI2_GATE] = ma35d1_clk_gate(dev, "spi2_gate", "spi2_mux",
clk_base + REG_CLK_APBCLK2, 6);
- hws[SPI3_MUX] = ma35d1_clk_mux(dev, "spi3_mux", clk_base + REG_CLK_CLKSEL4,
- 6, 2, spi3_sel_clks, ARRAY_SIZE(spi3_sel_clks));
+ hws[SPI3_MUX] = ma35d1_clk_mux(dev, "spi3_mux", clk_base + REG_CLK_CLKSEL4, 6, 2, hws,
+ spi3_parent_idx, ARRAY_SIZE(spi3_parent_idx));
hws[SPI3_GATE] = ma35d1_clk_gate(dev, "spi3_gate", "spi3_mux",
clk_base + REG_CLK_APBCLK2, 7);
|
| 3/2 | 2026/08/13 07:43 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 22542 output: 27 thoughts: 300 Thoughts: **Analyzing a Clock Driver Patch** Okay, so this patch is in `drivers/clk/nuvoton/clk-ma35d1.c`. Right away, I see it's a clock driver, which means it's fundamental to system boot and resource management. The core of the change seems to be in how the clock parents are defined. Instead of string-based lookups (`.fw_name`), it's now using integer indices into the clock table (`hws` array) and `clk_hw_register_mux_hws` instead of `clk_hw_register_mux_parent_data`. My initial thought is to assess its fuzzing potential. Since it's refactoring the core clock tree construction, it *could* be significant. However, it's specific to the Nuvoton MA35D1. I need to figure out if it's even feasible to test this change. Is this SoC emulated in QEMU? I'm not immediately familiar with MA35D1 support in QEMU. I recall some Nuvoton boards being emulated (NPCM7xx comes to mind), but MA35D1? I need to check. Let's do a quick search within the kernel tree to get a clearer picture of what this specific SoC is all about. |
| 4/2 | 2026/08/13 07:43 | tool | grepper |
0mArgs:{
"Expression": "MA35D1",
"PathPrefix": "arch/"
}Results: {
"Output": "arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts=11=/ {\narch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts:12:\tmodel = \"Nuvoton MA35D1-IoT\";\narch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts-13-\tcompatible = \"nuvoton,ma35d1-iot\", \"nuvoton,ma35d1\";\n--\narch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts=11=/ {\narch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts:12:\tmodel = \"Nuvoton MA35D1-SOM\";\narch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts-13-\tcompatible = \"nuvoton,ma35d1-som\", \"nuvoton,ma35d1\";\n--\narch/arm64/boot/dts/nuvoton/ma35d1.dtsi=383=\t\tgmac0: ethernet@40120000 {\n--\narch/arm64/boot/dts/nuvoton/ma35d1.dtsi-391-\t\t\tnuvoton,sys = \u003c\u0026sys 0\u003e;\narch/arm64/boot/dts/nuvoton/ma35d1.dtsi:392:\t\t\tresets = \u003c\u0026sys MA35D1_RESET_GMAC0\u003e;\narch/arm64/boot/dts/nuvoton/ma35d1.dtsi-393-\t\t\treset-names = \"stmmaceth\";\n--\narch/arm64/boot/dts/nuvoton/ma35d1.dtsi=409=\t\tgmac1: ethernet@40130000 {\n--\narch/arm64/boot/dts/nuvoton/ma35d1.dtsi-417-\t\t\tnuvoton,sys = \u003c\u0026sys 1\u003e;\narch/arm64/boot/dts/nuvoton/ma35d1.dtsi:418:\t\t\tresets = \u003c\u0026sys MA35D1_RESET_GMAC1\u003e;\narch/arm64/boot/dts/nuvoton/ma35d1.dtsi-419-\t\t\treset-names = \"stmmaceth\";\n"
} |
| 5/2 | 2026/08/13 07:43 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 23819 output: 47 thoughts: 295 Thoughts: **My Assessment of the MA35D1's Fuzzability** Okay, so the MA35D1 is a Nuvoton ARM64 SoC, right? The first question I have to ask myself is: can I even *reach* this thing in a virtualized environment like QEMU? I know the drill; specific ARM64 SoCs typically require a specific QEMU machine model, or a generic mechanism like PCI for probing the driver. But hold on, this is a *platform* driver, so that PCI approach is a non-starter. Ah, right, platform drivers. They're only probed if the device tree contains the right "compatible" string. So, unless QEMU's got a specific machine type with the right device tree, or I can inject one, I'm out of luck. Can Syzkaller inject a device tree? It *can*, if configured, but it doesn't usually bother for random ARM64 SoCs unless a special setup is in place. But, Syzkaller *does* try fuzzing platform drivers if it can generate the right device tree nodes. Hmm… But wait, the crucial part: the prompt gives us a criterion for not fuzzing. It says to return `WorthFuzzing=false` if the patch has code paths unreachable in virtualized environments like QEMU and GCE, even if using emulated hardware, like USB gadget or mac80211_hwsim. So, the key is: Is `clk-ma35d1.c` reachable? I need to figure out if it's a platform driver, first. |
| 6/2 | 2026/08/13 07:43 | tool | grepper |
0mArgs:{
"Expression": "ma35d1_clocks_probe",
"PathPrefix": "drivers/clk/nuvoton/clk-ma35d1.c"
}Results: {
"Output": "drivers/clk/nuvoton/clk-ma35d1.c=184=static int ma35d1_get_pll_setting(struct device_node *clk_node, u32 *pllmode)\n--\ndrivers/clk/nuvoton/clk-ma35d1.c-203-\ndrivers/clk/nuvoton/clk-ma35d1.c:204:static int ma35d1_clocks_probe(struct platform_device *pdev)\ndrivers/clk/nuvoton/clk-ma35d1.c-205-{\n--\ndrivers/clk/nuvoton/clk-ma35d1.c=769=static struct platform_driver ma35d1_clk_driver = {\ndrivers/clk/nuvoton/clk-ma35d1.c:770:\t.probe = ma35d1_clocks_probe,\ndrivers/clk/nuvoton/clk-ma35d1.c-771-\t.driver = {\n"
} |
| 7/2 | 2026/08/13 07:43 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 24775 output: 37 thoughts: 445 Thoughts: **WorthFuzzing=false: A Deep Dive into Platform Driver Reachability** Okay, so I'm looking at this platform driver, and my immediate thought is "can we even get to it?" It looks like it's a clock controller, and for that, we need a device tree with a node compatible with `nuvoton,ma35d1-clk`. The obvious question is: Can syzkaller generate something like this? I know it can create platform devices, but usually, it's reliant on an existing device tree or a dedicated mechanism. Syzkaller isn't just going to magically create platform devices for random SoCs, especially unless there's some special pseudo-syscall involved. This specific driver is for a clock controller on a very specific SoC. The chances of this being reachable in a standard QEMU environment like `qemu-system-aarch64 -M virt` are practically zero unless the device tree has been *specifically* tweaked to include it. Even *if* it were included, it'd likely just attempt MMIO reads/writes that probably hit nothing but garbage, causing a crash or a probe failure. So, if it's not reachable, the logical conclusion is to return `WorthFuzzing=false`. Now, I need to be completely sure. I should check if there's any QEMU machine for ma35d1. I can look through the QEMU source, but I don't have access to it. Nuvoton's MA35D1 is still a pretty new or obscure SoC. I know QEMU supports `npcm7xx` (Nuvoton NPCM7xx), but I haven't come across `ma35d1` anywhere. Okay, let's assume it isn't in QEMU. Does that automatically mean it's not worth fuzzing? The instructions clearly state that code paths that are impossible to reach in virtualized environments like GCE or QEMU should return `WorthFuzzing=false`. Since it's a hardware-specific clock driver, and that SoC isn't emulated in standard QEMU, there is no way it is reachable. Therefore, `WorthFuzzing=false` is the right answer. And, just to be thorough, I should verify that compatible string. |
| 8/2 | 2026/08/13 07:43 | tool | grepper |
0mArgs:{
"Expression": "nuvoton,ma35d1",
"PathPrefix": "drivers/clk/nuvoton/"
}Results: {
"Output": "drivers/clk/nuvoton/clk-ma35d1-pll.c-15-#include \u003clinux/units.h\u003e\ndrivers/clk/nuvoton/clk-ma35d1-pll.c:16:#include \u003cdt-bindings/clock/nuvoton,ma35d1-clk.h\u003e\ndrivers/clk/nuvoton/clk-ma35d1-pll.c-17-\n--\ndrivers/clk/nuvoton/clk-ma35d1.c-12-#include \u003clinux/spinlock.h\u003e\ndrivers/clk/nuvoton/clk-ma35d1.c:13:#include \u003cdt-bindings/clock/nuvoton,ma35d1-clk.h\u003e\ndrivers/clk/nuvoton/clk-ma35d1.c-14-\n--\ndrivers/clk/nuvoton/clk-ma35d1.c=763=static const struct of_device_id ma35d1_clk_of_match[] = {\ndrivers/clk/nuvoton/clk-ma35d1.c:764:\t{ .compatible = \"nuvoton,ma35d1-clk\" },\ndrivers/clk/nuvoton/clk-ma35d1.c-765-\t{ }\n"
} |
| 9/2 | 2026/08/13 07:43 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 26084 output: 123 thoughts: 210 Thoughts: **My Assessment of the Nuvoton MA35D1 Clock Driver** Okay, so I've looked at this patch and it's modifying the clock driver for the Nuvoton MA35D1 SoC, specifically `drivers/clk/nuvoton/clk-ma35d1.c`. This is a pretty clear-cut case. It's a platform driver, which means it's tightly coupled to the hardware of the MA35D1. It's going to be needing MMIO access to specific physical addresses to function. And, frankly, without a properly emulated environment for that particular SoC – probably something very specific in QEMU – there's just no way it's going to probe successfully. Even if I were to try and cheat and inject a fake device tree node, I'm virtually certain that it'll fail on the MMIO access, or worse, just do nothing useful at all. It's simply unreachable in any standard virtualized fuzzing environment. Therefore, it's just not practical or effective to spend time on this. I'm going to set `WorthFuzzing=false` and move on. |
| 10/2 | 2026/08/13 07:43 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies the clock driver for the Nuvoton MA35D1 SoC (drivers/clk/nuvoton/clk-ma35d1.c). This is a hardware-specific platform driver that requires the corresponding physical SoC or specific QEMU machine emulation to be probed and executed. Since the MA35D1 SoC is not emulated in standard QEMU environments used for fuzzing, these code paths are unreachable.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the clock driver for the Nuvoton MA35D1 SoC (drivers/clk/nuvoton/clk-ma35d1.c). This is a hardware-specific platform driver that requires the corresponding physical SoC or specific QEMU machine emulation to be probed and executed. Since the MA35D1 SoC is not emulated in standard QEMU environments used for fuzzing, these code paths are unreachable.",
"WorthFuzzing": false
} |
| 11/1 | 2026/08/13 07:43 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|