Lines Matching defs:clk
15 #include <linux/clk.h>
16 #include <linux/clk-provider.h>
18 #include <linux/clk/clk-conf.h>
19 #include <linux/clk/tegra.h>
63 #define PMC_CNTRL_SYSCLK_POLARITY BIT(10) /* sys clk polarity */
238 struct clk **clks;
348 * @clk: pointer to pclk clock
378 struct clk *clk;
866 * @clk: clock for partition
869 * Must be called with clk disabled, and returns with clk enabled.
871 int tegra_powergate_sequence_power_up(unsigned int id, struct clk *clk,
885 pg->clks = &clk;
1033 struct clk *clk;
1041 pg->clks = kcalloc(count, sizeof(clk), GFP_KERNEL);
1308 if (pmc->clk) {
1346 if (pmc->clk)
2252 /* pmc clk propagation delay 2 us */
2258 struct pmc_clk *clk = to_pmc_clk(hw);
2261 val = tegra_pmc_readl(pmc, clk->offs) >> clk->mux_shift;
2269 struct pmc_clk *clk = to_pmc_clk(hw);
2272 val = tegra_pmc_readl(pmc, clk->offs);
2273 val &= ~(PMC_CLK_OUT_MUX_MASK << clk->mux_shift);
2274 val |= index << clk->mux_shift;
2275 tegra_pmc_writel(pmc, val, clk->offs);
2276 pmc_clk_fence_udelay(clk->offs);
2283 struct pmc_clk *clk = to_pmc_clk(hw);
2286 val = tegra_pmc_readl(pmc, clk->offs) & BIT(clk->force_en_shift);
2303 struct pmc_clk *clk = to_pmc_clk(hw);
2305 pmc_clk_set_state(clk->offs, clk->force_en_shift, 1);
2312 struct pmc_clk *clk = to_pmc_clk(hw);
2314 pmc_clk_set_state(clk->offs, clk->force_en_shift, 0);
2326 static struct clk *
2382 static struct clk *
2410 struct clk *clk;
2441 clk = tegra_pmc_clk_out_register(pmc, data, PMC_CLK_OUT_CNTRL);
2442 if (IS_ERR(clk)) {
2444 data->name, PTR_ERR_OR_ZERO(clk));
2448 err = clk_register_clkdev(clk, data->name, NULL);
2456 clk_data->clks[data->clk_id] = clk;
2461 clk = tegra_pmc_clk_gate_register(pmc,
2466 if (IS_ERR(clk)) {
2469 PTR_ERR_OR_ZERO(clk));
2473 clk = tegra_pmc_clk_gate_register(pmc, "pmc_blink",
2477 if (IS_ERR(clk)) {
2480 PTR_ERR_OR_ZERO(clk));
2484 err = clk_register_clkdev(clk, "pmc_blink", NULL);
2492 clk_data->clks[TEGRA_PMC_CLK_BLINK] = clk;
2552 pmc->clk = devm_clk_get(&pdev->dev, "pclk");
2553 if (IS_ERR(pmc->clk)) {
2554 err = PTR_ERR(pmc->clk);
2561 pmc->clk = NULL;
2569 if (pmc->clk) {
2571 err = clk_notifier_register(pmc->clk, &pmc->clk_nb);
2574 "failed to register clk notifier\n");
2578 pmc->rate = clk_get_rate(pmc->clk);
2633 clk_notifier_unregister(pmc->clk, &pmc->clk_nb);
3130 _pad(TEGRA_IO_PAD_PEX_CLK_BIAS, 4, UINT_MAX, "pex-clk-bias"), \
3284 _pad(TEGRA_IO_PAD_PEX_CLK_BIAS, 4, UINT_MAX, "pex-clk-bias"), \
3289 _pad(TEGRA_IO_PAD_PEX_CLK_2_BIAS, 9, UINT_MAX, "pex-clk-2-bias"), \
3290 _pad(TEGRA_IO_PAD_PEX_CLK_2, 10, UINT_MAX, "pex-clk-2"), \