Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: ti: Remove unused functions

They are not used any more since
commit 7558562a70fb ("clk: ti: Drop legacy clk-3xxx-legacy code")

Reported-by: Hulk Robot <hulkci@huawei.com>
Suggested-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

YueHaibing and committed by
Stephen Boyd
da6a5dda 60e9c370

-146
-85
drivers/clk/ti/divider.c
··· 425 425 return 0; 426 426 } 427 427 428 - static const struct clk_div_table * 429 - _get_div_table_from_setup(struct ti_clk_divider *setup, u8 *width) 430 - { 431 - const struct clk_div_table *table = NULL; 432 - 433 - ti_clk_parse_divider_data(setup->dividers, setup->num_dividers, 434 - setup->max_div, setup->flags, width, 435 - &table); 436 - 437 - return table; 438 - } 439 - 440 - struct clk_hw *ti_clk_build_component_div(struct ti_clk_divider *setup) 441 - { 442 - struct clk_omap_divider *div; 443 - struct clk_omap_reg *reg; 444 - int ret; 445 - 446 - if (!setup) 447 - return NULL; 448 - 449 - div = kzalloc(sizeof(*div), GFP_KERNEL); 450 - if (!div) 451 - return ERR_PTR(-ENOMEM); 452 - 453 - reg = (struct clk_omap_reg *)&div->reg; 454 - reg->index = setup->module; 455 - reg->offset = setup->reg; 456 - 457 - if (setup->flags & CLKF_INDEX_STARTS_AT_ONE) 458 - div->flags |= CLK_DIVIDER_ONE_BASED; 459 - 460 - if (setup->flags & CLKF_INDEX_POWER_OF_TWO) 461 - div->flags |= CLK_DIVIDER_POWER_OF_TWO; 462 - 463 - div->table = _get_div_table_from_setup(setup, &div->width); 464 - if (IS_ERR(div->table)) { 465 - ret = PTR_ERR(div->table); 466 - kfree(div); 467 - return ERR_PTR(ret); 468 - } 469 - 470 - 471 - div->shift = setup->bit_shift; 472 - div->latch = -EINVAL; 473 - 474 - return &div->hw; 475 - } 476 - 477 - struct clk *ti_clk_register_divider(struct ti_clk *setup) 478 - { 479 - struct ti_clk_divider *div = setup->data; 480 - struct clk_omap_reg reg = { 481 - .index = div->module, 482 - .offset = div->reg, 483 - }; 484 - u8 width; 485 - u32 flags = 0; 486 - u8 div_flags = 0; 487 - const struct clk_div_table *table; 488 - struct clk *clk; 489 - 490 - if (div->flags & CLKF_INDEX_STARTS_AT_ONE) 491 - div_flags |= CLK_DIVIDER_ONE_BASED; 492 - 493 - if (div->flags & CLKF_INDEX_POWER_OF_TWO) 494 - div_flags |= CLK_DIVIDER_POWER_OF_TWO; 495 - 496 - if (div->flags & CLKF_SET_RATE_PARENT) 497 - flags |= CLK_SET_RATE_PARENT; 498 - 499 - table = _get_div_table_from_setup(div, &width); 500 - if (IS_ERR(table)) 501 - return (struct clk *)table; 502 - 503 - clk = _register_divider(NULL, setup->name, div->parent, 504 - flags, &reg, div->bit_shift, 505 - width, -EINVAL, div_flags, table); 506 - 507 - if (IS_ERR(clk)) 508 - kfree(table); 509 - 510 - return clk; 511 - } 512 - 513 428 static struct clk_div_table * 514 429 __init ti_clk_get_div_table(struct device_node *node) 515 430 {
-30
drivers/clk/ti/gate.c
··· 131 131 return clk; 132 132 } 133 133 134 - struct clk_hw *ti_clk_build_component_gate(struct ti_clk_gate *setup) 135 - { 136 - struct clk_hw_omap *gate; 137 - struct clk_omap_reg *reg; 138 - const struct clk_hw_omap_ops *ops = &clkhwops_wait; 139 - 140 - if (!setup) 141 - return NULL; 142 - 143 - gate = kzalloc(sizeof(*gate), GFP_KERNEL); 144 - if (!gate) 145 - return ERR_PTR(-ENOMEM); 146 - 147 - reg = (struct clk_omap_reg *)&gate->enable_reg; 148 - reg->index = setup->module; 149 - reg->offset = setup->reg; 150 - 151 - gate->enable_bit = setup->bit_shift; 152 - 153 - if (setup->flags & CLKF_NO_WAIT) 154 - ops = NULL; 155 - 156 - if (setup->flags & CLKF_INTERFACE) 157 - ops = &clkhwops_iclk_wait; 158 - 159 - gate->ops = ops; 160 - 161 - return &gate->hw; 162 - } 163 - 164 134 static void __init _of_ti_gate_clk_setup(struct device_node *node, 165 135 const struct clk_ops *ops, 166 136 const struct clk_hw_omap_ops *hw_ops)
-31
drivers/clk/ti/mux.c
··· 164 164 return clk; 165 165 } 166 166 167 - struct clk *ti_clk_register_mux(struct ti_clk *setup) 168 - { 169 - struct ti_clk_mux *mux; 170 - u32 flags; 171 - u8 mux_flags = 0; 172 - struct clk_omap_reg reg; 173 - u32 mask; 174 - 175 - mux = setup->data; 176 - flags = CLK_SET_RATE_NO_REPARENT; 177 - 178 - mask = mux->num_parents; 179 - if (!(mux->flags & CLKF_INDEX_STARTS_AT_ONE)) 180 - mask--; 181 - 182 - mask = (1 << fls(mask)) - 1; 183 - reg.index = mux->module; 184 - reg.offset = mux->reg; 185 - reg.ptr = NULL; 186 - 187 - if (mux->flags & CLKF_INDEX_STARTS_AT_ONE) 188 - mux_flags |= CLK_MUX_INDEX_ONE; 189 - 190 - if (mux->flags & CLKF_SET_RATE_PARENT) 191 - flags |= CLK_SET_RATE_PARENT; 192 - 193 - return _register_mux(NULL, setup->name, mux->parents, mux->num_parents, 194 - flags, &reg, mux->bit_shift, mask, -EINVAL, 195 - mux_flags, NULL); 196 - } 197 - 198 167 /** 199 168 * of_mux_clk_setup - Setup function for simple mux rate clock 200 169 * @node: DT node for the clock