Lines Matching full:emc
53 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw); in tegra210_clk_emc_get_parent() local
57 value = readl_relaxed(emc->regs + CLK_SOURCE_EMC); in tegra210_clk_emc_get_parent()
66 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw); in tegra210_clk_emc_recalc_rate() local
74 * This can lead to wrong results being reported for the EMC clock if in tegra210_clk_emc_recalc_rate()
75 * the parent and/or parent rate have changed as part of the EMC rate in tegra210_clk_emc_recalc_rate()
81 value = readl_relaxed(emc->regs + CLK_SOURCE_EMC); in tegra210_clk_emc_recalc_rate()
92 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw); in tegra210_clk_emc_round_rate() local
93 struct tegra210_clk_emc_provider *provider = emc->provider; in tegra210_clk_emc_round_rate()
107 static struct clk *tegra210_clk_emc_find_parent(struct tegra210_clk_emc *emc, in tegra210_clk_emc_find_parent() argument
110 struct clk_hw *parent = clk_hw_get_parent_by_index(&emc->hw, index); in tegra210_clk_emc_find_parent()
121 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw); in tegra210_clk_emc_set_rate() local
122 struct tegra210_clk_emc_provider *provider = emc->provider; in tegra210_clk_emc_set_rate()
190 clk = tegra210_clk_emc_find_parent(emc, index); in tegra210_clk_emc_set_rate()
218 /* update the EMC source configuration to reflect the new parent */ in tegra210_clk_emc_set_rate()
223 * Finally, switch the EMC programming with both old and new parent in tegra210_clk_emc_set_rate()
228 dev_err(dev, "failed to set EMC rate to %lu Hz: %d\n", rate, in tegra210_clk_emc_set_rate()
232 * If we're unable to switch to the new EMC frequency, we no in tegra210_clk_emc_set_rate()
243 clk = tegra210_clk_emc_find_parent(emc, old_idx); in tegra210_clk_emc_set_rate()
269 struct tegra210_clk_emc *emc; in tegra210_clk_register_emc() local
273 emc = kzalloc(sizeof(*emc), GFP_KERNEL); in tegra210_clk_register_emc()
274 if (!emc) in tegra210_clk_register_emc()
277 emc->regs = regs; in tegra210_clk_register_emc()
279 init.name = "emc"; in tegra210_clk_register_emc()
284 emc->hw.init = &init; in tegra210_clk_register_emc()
286 clk = clk_register(NULL, &emc->hw); in tegra210_clk_register_emc()
288 kfree(emc); in tegra210_clk_register_emc()
299 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw); in tegra210_clk_emc_attach() local
316 /* do basic sanity checking on the EMC timings */ in tegra210_clk_emc_attach()
328 "ambiguous EMC to MC ratio for rate %lu Hz\n", in tegra210_clk_emc_attach()
354 emc->provider = provider; in tegra210_clk_emc_attach()
366 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(__clk_get_hw(clk)); in tegra210_clk_emc_detach() local
368 module_put(emc->provider->owner); in tegra210_clk_emc_detach()
369 emc->provider = NULL; in tegra210_clk_emc_detach()