Skip to content

Commit d274c77

Browse files
ziyao233pdp7
authored andcommitted
clk: thead: th1520-ap: Correctly refer the parent of osc_12m
The "osc_12m" fixed factor clock refers the external oscillator by setting clk_parent_data.fw_name to osc_24m, which is obviously wrong since no clock-names property is allowed for compatible thead,th1520-clk-ap. Refer the oscillator as parent by index instead. Fixes: ae81b69 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks") Signed-off-by: Yao Zi <[email protected]> Reviewed-by: Drew Fustini <[email protected]> Signed-off-by: Drew Fustini <[email protected]>
1 parent 0370395 commit d274c77

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/clk/thead/clk-th1520-ap.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,14 @@ static const struct clk_parent_data peri2sys_apb_pclk_pd[] = {
582582
{ .hw = &peri2sys_apb_pclk.common.hw }
583583
};
584584

585-
static CLK_FIXED_FACTOR_FW_NAME(osc12m_clk, "osc_12m", "osc_24m", 2, 1, 0);
585+
static struct clk_fixed_factor osc12m_clk = {
586+
.div = 2,
587+
.mult = 1,
588+
.hw.init = CLK_HW_INIT_PARENTS_DATA("osc_12m",
589+
osc_24m_clk,
590+
&clk_fixed_factor_ops,
591+
0),
592+
};
586593

587594
static const char * const out_parents[] = { "osc_24m", "osc_12m" };
588595

0 commit comments

Comments
 (0)