Lines Matching +full:starfive +full:- +full:jh7100
1 // SPDX-License-Identifier: GPL-2.0
3 * StarFive JH7100 Audio Clock Driver
9 #include <linux/clk-provider.h>
16 #include <dt-bindings/clock/starfive-jh7100-audio.h>
18 #include "clk-starfive-jh71x0.h"
90 unsigned int idx = clkspec->args[0]; in jh7100_audclk_get()
93 return &priv->reg[idx].hw; in jh7100_audclk_get()
95 return ERR_PTR(-EINVAL); in jh7100_audclk_get()
104 priv = devm_kzalloc(&pdev->dev, struct_size(priv, reg, JH7100_AUDCLK_END), GFP_KERNEL); in jh7100_audclk_probe()
106 return -ENOMEM; in jh7100_audclk_probe()
108 spin_lock_init(&priv->rmw_lock); in jh7100_audclk_probe()
109 priv->dev = &pdev->dev; in jh7100_audclk_probe()
110 priv->base = devm_platform_ioremap_resource(pdev, 0); in jh7100_audclk_probe()
111 if (IS_ERR(priv->base)) in jh7100_audclk_probe()
112 return PTR_ERR(priv->base); in jh7100_audclk_probe()
124 struct jh71x0_clk *clk = &priv->reg[idx]; in jh7100_audclk_probe()
131 parents[i].hw = &priv->reg[pidx].hw; in jh7100_audclk_probe()
140 clk->hw.init = &init; in jh7100_audclk_probe()
141 clk->idx = idx; in jh7100_audclk_probe()
142 clk->max_div = max & JH71X0_CLK_DIV_MASK; in jh7100_audclk_probe()
144 ret = devm_clk_hw_register(priv->dev, &clk->hw); in jh7100_audclk_probe()
149 return devm_of_clk_add_hw_provider(priv->dev, jh7100_audclk_get, priv); in jh7100_audclk_probe()
153 { .compatible = "starfive,jh7100-audclk" },
161 .name = "clk-starfive-jh7100-audio",
168 MODULE_DESCRIPTION("StarFive JH7100 audio clock driver");