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_determine_rate() local
93 struct tegra210_clk_emc_provider *provider = emc->provider; in tegra210_clk_emc_determine_rate()
115 static struct clk *tegra210_clk_emc_find_parent(struct tegra210_clk_emc *emc, in tegra210_clk_emc_find_parent() argument
118 struct clk_hw *parent = clk_hw_get_parent_by_index(&emc->hw, index); in tegra210_clk_emc_find_parent()
129 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw); in tegra210_clk_emc_set_rate() local
130 struct tegra210_clk_emc_provider *provider = emc->provider; in tegra210_clk_emc_set_rate()
198 clk = tegra210_clk_emc_find_parent(emc, index); in tegra210_clk_emc_set_rate()
226 /* update the EMC source configuration to reflect the new parent */ in tegra210_clk_emc_set_rate()
231 * Finally, switch the EMC programming with both old and new parent in tegra210_clk_emc_set_rate()
236 dev_err(dev, "failed to set EMC rate to %lu Hz: %d\n", rate, in tegra210_clk_emc_set_rate()
240 * If we're unable to switch to the new EMC frequency, we no in tegra210_clk_emc_set_rate()
251 clk = tegra210_clk_emc_find_parent(emc, old_idx); in tegra210_clk_emc_set_rate()
277 struct tegra210_clk_emc *emc; in tegra210_clk_register_emc() local
281 emc = kzalloc(sizeof(*emc), GFP_KERNEL); in tegra210_clk_register_emc()
282 if (!emc) in tegra210_clk_register_emc()
285 emc->regs = regs; in tegra210_clk_register_emc()
287 init.name = "emc"; in tegra210_clk_register_emc()
292 emc->hw.init = &init; in tegra210_clk_register_emc()
294 clk = clk_register(NULL, &emc->hw); in tegra210_clk_register_emc()
296 kfree(emc); in tegra210_clk_register_emc()
307 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw); in tegra210_clk_emc_attach() local
324 /* do basic sanity checking on the EMC timings */ in tegra210_clk_emc_attach()
336 "ambiguous EMC to MC ratio for rate %lu Hz\n", in tegra210_clk_emc_attach()
362 emc->provider = provider; in tegra210_clk_emc_attach()
374 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(__clk_get_hw(clk)); in tegra210_clk_emc_detach() local
376 module_put(emc->provider->owner); in tegra210_clk_emc_detach()
377 emc->provider = NULL; in tegra210_clk_emc_detach()