forked from luck/tmp_suning_uos_patched
clk: meson: remove ao input bypass clocks
During probe, bypass clocks (i.e. ao-in-xtal) are made from device-tree inputs to provide input clocks which can be access through global name. The cons of this method are the duplicated clocks, means more string comparison. Specify parent directly with device-tree clock name. Function to regiter bypass clocks is removed. Input parameters from meson aoclk data structure are deprecated and then deleted since all aoclk files are migrated. Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
This commit is contained in:
parent
b90ec1e344
commit
072a043f5a
|
@ -33,7 +33,6 @@ config COMMON_CLK_MESON_VID_PLL_DIV
|
|||
config COMMON_CLK_MESON_AO_CLKC
|
||||
tristate
|
||||
select COMMON_CLK_MESON_REGMAP
|
||||
select COMMON_CLK_MESON_INPUT
|
||||
select RESET_CONTROLLER
|
||||
|
||||
config COMMON_CLK_MESON_EE_CLKC
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
#include <linux/slab.h>
|
||||
#include "meson-aoclk.h"
|
||||
|
||||
#include "clk-input.h"
|
||||
|
||||
static int meson_aoclk_do_reset(struct reset_controller_dev *rcdev,
|
||||
unsigned long id)
|
||||
{
|
||||
|
@ -33,37 +31,6 @@ static const struct reset_control_ops meson_aoclk_reset_ops = {
|
|||
.reset = meson_aoclk_do_reset,
|
||||
};
|
||||
|
||||
static int meson_aoclkc_register_inputs(struct device *dev,
|
||||
struct meson_aoclk_data *data)
|
||||
{
|
||||
struct clk_hw *hw;
|
||||
char *str;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < data->num_inputs; i++) {
|
||||
const struct meson_aoclk_input *in = &data->inputs[i];
|
||||
|
||||
str = kasprintf(GFP_KERNEL, "%s%s", data->input_prefix,
|
||||
in->name);
|
||||
if (!str)
|
||||
return -ENOMEM;
|
||||
|
||||
hw = meson_clk_hw_register_input(dev, in->name, str, 0);
|
||||
kfree(str);
|
||||
|
||||
if (IS_ERR(hw)) {
|
||||
if (!in->required && PTR_ERR(hw) == -ENOENT)
|
||||
continue;
|
||||
else if (PTR_ERR(hw) != -EPROBE_DEFER)
|
||||
dev_err(dev, "failed to register input %s\n",
|
||||
in->name);
|
||||
return PTR_ERR(hw);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int meson_aoclkc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct meson_aoclk_reset_controller *rstc;
|
||||
|
@ -86,10 +53,6 @@ int meson_aoclkc_probe(struct platform_device *pdev)
|
|||
return PTR_ERR(regmap);
|
||||
}
|
||||
|
||||
ret = meson_aoclkc_register_inputs(dev, data);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Reset Controller */
|
||||
rstc->data = data;
|
||||
rstc->regmap = regmap;
|
||||
|
|
|
@ -18,20 +18,12 @@
|
|||
|
||||
#include "clk-regmap.h"
|
||||
|
||||
struct meson_aoclk_input {
|
||||
const char *name;
|
||||
bool required;
|
||||
};
|
||||
|
||||
struct meson_aoclk_data {
|
||||
const unsigned int reset_reg;
|
||||
const int num_reset;
|
||||
const unsigned int *reset;
|
||||
const int num_clks;
|
||||
struct clk_regmap **clks;
|
||||
const int num_inputs;
|
||||
const struct meson_aoclk_input *inputs;
|
||||
const char *input_prefix;
|
||||
const struct clk_hw_onecell_data *hw_data;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user