Skip to content

Commit 1cce3e6

Browse files
inochisabebarino
authored andcommitted
clk: sophgo: Add clock support for SG2000 SoC
Add init code for SG2000 SoC. Signed-off-by: Inochi Amaoto <inochiama@outlook.com> Link: https://github.com/sophgo/sophgo-doc/releases/tag/sg2000-datasheet-v1.0-alpha Link: https://lore.kernel.org/r/IA1PR20MB49537156E71B64483F15C0F2BB262@IA1PR20MB4953.namprd20.prod.outlook.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 3b8d204 commit 1cce3e6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

drivers/clk/sophgo/clk-cv1800.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,20 @@ static const struct cv1800_clk_desc cv1810_desc = {
14371437
.pre_init = cv1810_pre_init,
14381438
};
14391439

1440+
static int sg2000_pre_init(struct device *dev, void __iomem *base,
1441+
struct cv1800_clk_ctrl *ctrl,
1442+
const struct cv1800_clk_desc *desc)
1443+
{
1444+
cv18xx_clk_disable_auto_pd(base);
1445+
1446+
return 0;
1447+
}
1448+
1449+
static const struct cv1800_clk_desc sg2000_desc = {
1450+
.clks_data = &cv1810_hw_clks,
1451+
.pre_init = sg2000_pre_init,
1452+
};
1453+
14401454
static int cv1800_clk_init_ctrl(struct device *dev, void __iomem *reg,
14411455
struct cv1800_clk_ctrl *ctrl,
14421456
const struct cv1800_clk_desc *desc)
@@ -1506,6 +1520,7 @@ static int cv1800_clk_probe(struct platform_device *pdev)
15061520
static const struct of_device_id cv1800_clk_ids[] = {
15071521
{ .compatible = "sophgo,cv1800-clk", .data = &cv1800_desc },
15081522
{ .compatible = "sophgo,cv1810-clk", .data = &cv1810_desc },
1523+
{ .compatible = "sophgo,sg2000-clk", .data = &sg2000_desc },
15091524
{ }
15101525
};
15111526
MODULE_DEVICE_TABLE(of, cv1800_clk_ids);

0 commit comments

Comments
 (0)