summaryrefslogtreecommitdiffstats
path: root/drivers/clk/ti/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/ti/clk.c')
-rw-r--r--drivers/clk/ti/clk.c135
1 files changed, 0 insertions, 135 deletions
diff --git a/drivers/clk/ti/clk.c b/drivers/clk/ti/clk.c
index 302c9e64e5fa..f4d6802a8544 100644
--- a/drivers/clk/ti/clk.c
+++ b/drivers/clk/ti/clk.c
@@ -336,141 +336,6 @@ void ti_dt_clk_init_retry_clks(void)
}
}
-#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_ATAGS)
-void __init ti_clk_patch_legacy_clks(struct ti_clk **patch)
-{
- while (*patch) {
- memcpy((*patch)->patch, *patch, sizeof(**patch));
- patch++;
- }
-}
-
-struct clk __init *ti_clk_register_clk(struct ti_clk *setup)
-{
- struct clk *clk;
- struct ti_clk_fixed *fixed;
- struct ti_clk_fixed_factor *fixed_factor;
- struct clk_hw *clk_hw;
- int ret;
-
- if (setup->clk)
- return setup->clk;
-
- switch (setup->type) {
- case TI_CLK_FIXED:
- fixed = setup->data;
-
- clk = clk_register_fixed_rate(NULL, setup->name, NULL, 0,
- fixed->frequency);
- if (!IS_ERR(clk)) {
- ret = ti_clk_add_alias(NULL, clk, setup->name);
- if (ret) {
- clk_unregister(clk);
- clk = ERR_PTR(ret);
- }
- }
- break;
- case TI_CLK_MUX:
- clk = ti_clk_register_mux(setup);
- break;
- case TI_CLK_DIVIDER:
- clk = ti_clk_register_divider(setup);
- break;
- case TI_CLK_COMPOSITE:
- clk = ti_clk_register_composite(setup);
- break;
- case TI_CLK_FIXED_FACTOR:
- fixed_factor = setup->data;
-
- clk = clk_register_fixed_factor(NULL, setup->name,
- fixed_factor->parent,
- 0, fixed_factor->mult,
- fixed_factor->div);
- if (!IS_ERR(clk)) {
- ret = ti_clk_add_alias(NULL, clk, setup->name);
- if (ret) {
- clk_unregister(clk);
- clk = ERR_PTR(ret);
- }
- }
- break;
- case TI_CLK_GATE:
- clk = ti_clk_register_gate(setup);
- break;
- case TI_CLK_DPLL:
- clk = ti_clk_register_dpll(setup);
- break;
- default:
- pr_err("bad type for %s!\n", setup->name);
- clk = ERR_PTR(-EINVAL);
- }
-
- if (!IS_ERR(clk)) {
- setup->clk = clk;
- if (setup->clkdm_name) {
- clk_hw = __clk_get_hw(clk);
- if (clk_hw_get_flags(clk_hw) & CLK_IS_BASIC) {
- pr_warn("can't setup clkdm for basic clk %s\n",
- setup->name);
- } else {
- to_clk_hw_omap(clk_hw)->clkdm_name =
- setup->clkdm_name;
- omap2_init_clk_clkdm(clk_hw);
- }
- }
- }
-
- return clk;
-}
-
-int __init ti_clk_register_legacy_clks(struct ti_clk_alias *clks)
-{
- struct clk *clk;
- bool retry;
- struct ti_clk_alias *retry_clk;
- struct ti_clk_alias *tmp;
-
- while (clks->clk) {
- clk = ti_clk_register_clk(clks->clk);
- if (IS_ERR(clk)) {
- if (PTR_ERR(clk) == -EAGAIN) {
- list_add(&clks->link, &retry_list);
- } else {
- pr_err("register for %s failed: %ld\n",
- clks->clk->name, PTR_ERR(clk));
- return PTR_ERR(clk);
- }
- }
- clks++;
- }
-
- retry = true;
-
- while (!list_empty(&retry_list) && retry) {
- retry = false;
- list_for_each_entry_safe(retry_clk, tmp, &retry_list, link) {
- pr_debug("retry-init: %s\n", retry_clk->clk->name);
- clk = ti_clk_register_clk(retry_clk->clk);
- if (IS_ERR(clk)) {
- if (PTR_ERR(clk) == -EAGAIN) {
- continue;
- } else {
- pr_err("register for %s failed: %ld\n",
- retry_clk->clk->name,
- PTR_ERR(clk));
- return PTR_ERR(clk);
- }
- } else {
- retry = true;
- list_del(&retry_clk->link);
- }
- }
- }
-
- return 0;
-}
-#endif
-
static const struct of_device_id simple_clk_match_table[] __initconst = {
{ .compatible = "fixed-clock" },
{ .compatible = "fixed-factor-clock" },