Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | drivers/clk/renesas/rcar-usb2-clock-sel.c |
static int rcar_usb2_clock_sel_remove(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
of_clk_del_provider(dev->of_node);
pm_runtime_put(dev);
pm_runtime_disable(dev);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/clk/renesas/renesas-cpg-mssr.c | static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable) {
struct mstp_clock *clock = to_mstp_clock(hw);
struct cpg_mssr_priv *priv = clock->priv;
unsigned int reg = clock->index / 32;
unsigned int bit = clock->index % 32;
struct device *dev = priv->dev;
u32 bitmask = BIT(bit);
unsigned long fl... | [
1,
0
] |
Linux Kernel | drivers/clk/renesas/renesas-cpg-mssr.c |
static int cpg_mstp_clock_enable(struct clk_hw *hw) {
return cpg_mstp_clock_endisable(hw, true);
} | [
0,
0
] |
Linux Kernel | drivers/clk/renesas/renesas-cpg-mssr.c |
static struct clk *cpg_mssr_clk_src_twocell_get(struct of_phandle_args *clkspec,
void *data) {
unsigned int clkidx = clkspec->args[1];
struct cpg_mssr_priv *priv = data;
struct device *dev = priv->dev;
unsigned int idx;
const char *type;
struct clk *clk;
in... | [
1,
0
] |
Linux Kernel | drivers/clk/renesas/renesas-cpg-mssr.c |
static int cpg_mssr_deassert(struct reset_controller_dev *rcdev,
unsigned long id) {
struct cpg_mssr_priv *priv = rcdev_to_priv(rcdev);
unsigned int reg = id / 32;
unsigned int bit = id % 32;
u32 bitmask = BIT(bit);
dev_dbg(priv->dev, "deassert %u%02u\n", reg, bit);
writel(bi... | [
1,
0
] |
Linux Kernel | drivers/clk/renesas/renesas-cpg-mssr.c |
static int cpg_mssr_reset_xlate(struct reset_controller_dev *rcdev,
const struct of_phandle_args *reset_spec) {
struct cpg_mssr_priv *priv = rcdev_to_priv(rcdev);
unsigned int unpacked = reset_spec->args[0];
unsigned int idx = MOD_CLK_PACK(unpacked);
if (unpacked % 100 > 31 || ... | [
1,
0
] |
Linux Kernel | drivers/clk/renesas/renesas-cpg-mssr.c | static inline int
cpg_mssr_reset_controller_register(struct cpg_mssr_priv *priv) {
return 0;
}
#endif | [
0,
0
] |
Linux Kernel | drivers/clk/renesas/renesas-cpg-mssr.c |
static void cpg_mssr_del_clk_provider(void *data) { of_clk_del_provider(data); }
#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM_PSCI_FW) | [
0,
0
] |
Linux Kernel | drivers/clk/renesas/renesas-cpg-mssr.c |
void __init cpg_mssr_early_init(struct device_node *np,
const struct cpg_mssr_info *info) {
int error;
int i;
error = cpg_mssr_common_init(NULL, np, info);
if (error)
return;
for (i = 0; i < info->num_early_core_clks; i++)
cpg_mssr_register_core_clk(&info->early_core... | [
0,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c | static int rzg2l_cpg_sd_clk_mux_set_parent(struct clk_hw *hw, u8 index) {
struct sd_hw_data *hwdata = to_sd_hw_data(hw);
struct rzg2l_cpg_priv *priv = hwdata->priv;
u32 off = GET_REG_OFFSET(hwdata->conf);
u32 shift = GET_SHIFT(hwdata->conf);
const u32 clk_src_266 = 2;
u32 bitmask;
bitmask = (GENMASK(GET_... | [
1,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c | static u8 rzg2l_cpg_sd_clk_mux_get_parent(struct clk_hw *hw) {
struct sd_hw_data *hwdata = to_sd_hw_data(hw);
struct rzg2l_cpg_priv *priv = hwdata->priv;
u32 val = readl(priv->base + GET_REG_OFFSET(hwdata->conf));
val >>= GET_SHIFT(hwdata->conf);
val &= GENMASK(GET_WIDTH(hwdata->conf) - 1, 0);
if (val) {
... | [
1,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c |
static unsigned long rzg2l_cpg_dsi_div_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate) {
struct dsi_div_hw_data *dsi_div = to_dsi_div_hw_data(hw);
unsigned long rate = dsi_div->rate;
if (!rate)
rate = parent_rate;
return rate;
} | [
1,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c |
static int rzg2l_cpg_dsi_div_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req) {
if (req->rate > MAX_VCLK_FREQ)
req->rate = MAX_VCLK_FREQ;
req->best_parent_rate = rzg2l_cpg_get_vclk_parent_rate(hw, req->rate);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c | static int rzg2l_cpg_dsi_div_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate) {
struct dsi_div_hw_data *dsi_div = to_dsi_div_hw_data(hw);
struct rzg2l_cpg_priv *priv = dsi_div->priv;
if (!rate || rate > MAX_VCLK_FREQ)
return -EINVAL;
dsi_div-... | [
1,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c |
static u8 rzg2l_cpg_pll5_4_clk_mux_get_parent(struct clk_hw *hw) {
struct pll5_mux_hw_data *hwdata = to_pll5_mux_hw_data(hw);
struct rzg2l_cpg_priv *priv = hwdata->priv;
return readl(priv->base + GET_REG_OFFSET(hwdata->conf));
} | [
0,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c |
static unsigned long rzg2l_cpg_get_vclk_rate(struct clk_hw *hw,
unsigned long rate) {
struct sipll5 *sipll5 = to_sipll5(hw);
struct rzg2l_cpg_priv *priv = sipll5->priv;
unsigned long vclk;
vclk = rate / ((1 << priv->mux_dsi_div_params.dsi_div_a) *
... | [
0,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c |
static struct clk *
rzg2l_cpg_clk_src_twocell_get(struct of_phandle_args *clkspec, void *data) {
unsigned int clkidx = clkspec->args[1];
struct rzg2l_cpg_priv *priv = data;
struct device *dev = priv->dev;
const char *type;
struct clk *clk;
switch (clkspec->args[0]) {
case CPG_CORE:
type = "core";
... | [
1,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c |
static int rzg2l_mod_clock_enable(struct clk_hw *hw) {
struct mstp_clock *clock = to_mod_clock(hw);
if (clock->sibling) {
struct rzg2l_cpg_priv *priv = clock->priv;
unsigned long flags;
bool enabled;
spin_lock_irqsave(&priv->rmw_lock, flags);
enabled = clock->sibling->enabled;
clock->enab... | [
0,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c |
static void rzg2l_mod_clock_disable(struct clk_hw *hw) {
struct mstp_clock *clock = to_mod_clock(hw);
if (clock->sibling) {
struct rzg2l_cpg_priv *priv = clock->priv;
unsigned long flags;
bool enabled;
spin_lock_irqsave(&priv->rmw_lock, flags);
enabled = clock->sibling->enabled;
clock->en... | [
0,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c |
static struct mstp_clock *
rzg2l_mod_clock_get_sibling(struct mstp_clock *clock,
struct rzg2l_cpg_priv *priv) {
struct clk_hw *hw;
unsigned int i;
for (i = 0; i < priv->num_mod_clks; i++) {
struct mstp_clock *clk;
if (priv->clks[priv->num_core_clks + i] == ERR_PTR(-ENOENT))
... | [
1,
0
] |
Linux Kernel | drivers/clk/renesas/rzg2l-cpg.c |
static int rzg2l_cpg_reset_controller_register(struct rzg2l_cpg_priv *priv) {
priv->rcdev.ops = &rzg2l_cpg_reset_ops;
priv->rcdev.of_node = priv->dev->of_node;
priv->rcdev.dev = priv->dev;
priv->rcdev.of_reset_n_cells = 1;
priv->rcdev.of_xlate = rzg2l_cpg_reset_xlate;
priv->rcdev.nr_resets = priv->num_rese... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-half-divider.c |
static unsigned long clk_half_divider_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate) {
struct clk_divider *divider = to_clk_divider(hw);
unsigned int val;
val = readl(divider->reg) >> divider->shift;
val &= div_mask(divider->width);
val = val * 2 ... | [
1,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-half-divider.c |
static int clk_half_divider_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate) {
struct clk_divider *divider = to_clk_divider(hw);
unsigned int value;
unsigned long flags = 0;
u32 val;
value = DIV_ROUND_UP_ULL(((u64)parent_rate * 2), rate);
valu... | [
1,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-inverter.c |
static int rockchip_inv_set_phase(struct clk_hw *hw, int degrees) {
struct rockchip_inv_clock *inv_clock = to_inv_clock(hw);
u32 val;
if (degrees % 180 == 0) {
val = !!degrees;
} else {
pr_err("%s: unsupported phase %d for %s\n", __func__, degrees,
clk_hw_get_name(hw));
return -EINVAL;
... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-mmc-phase.c | static unsigned long rockchip_mmc_recalc(struct clk_hw *hw,
unsigned long parent_rate) {
return parent_rate / RK3288_MMC_CLKGEN_DIV;
}
#define ROCKCHIP_MMC_DELAY_SEL BIT(10)
#define ROCKCHIP_MMC_DEGREE_MASK 0x3
#define ROCKCHIP_MMC_DELAYNUM_OFFSET 2
#define ROCKCHIP_MMC_DELAY... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-mmc-phase.c |
struct clk *rockchip_clk_register_mmc(const char *name,
const char *const *parent_names,
u8 num_parents, void __iomem *reg,
int shift) {
struct clk_init_data init;
struct rockchip_mmc_clock *mmc_clock;... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-muxgrf.c |
static u8 rockchip_muxgrf_get_parent(struct clk_hw *hw) {
struct rockchip_muxgrf_clock *mux = to_muxgrf_clock(hw);
unsigned int mask = GENMASK(mux->width - 1, 0);
unsigned int val;
regmap_read(mux->regmap, mux->reg, &val);
val >>= mux->shift;
val &= mask;
return val;
} | [
1,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-pll.c | static int rockchip_pll_wait_lock(struct rockchip_clk_pll *pll) {
struct regmap *grf = pll->ctx->grf;
unsigned int val;
int ret;
ret = regmap_read_poll_timeout(grf, pll->lock_offset, val,
val & BIT(pll->lock_shift), 0, 1000);
if (ret)
pr_err("%s: timeout waiting for pll t... | [
1,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-pll.c |
static void
rockchip_rk3036_pll_get_params(struct rockchip_clk_pll *pll,
struct rockchip_pll_rate_table *rate) {
u32 pllcon;
pllcon = readl_relaxed(pll->reg_base + RK3036_PLLCON(0));
rate->fbdiv =
((pllcon >> RK3036_PLLCON0_FBDIV_SHIFT) & RK3036_PLLCON0_FBDIV_MASK);
rate->... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-pll.c | static int rockchip_rk3036_pll_set_rate(struct clk_hw *hw, unsigned long drate,
unsigned long prate) {
struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
const struct rockchip_pll_rate_table *rate;
pr_debug("%s: changing %s to %lu with a parent rate of %lu\n", __func_... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-pll.c |
static unsigned long rockchip_rk3066_pll_recalc_rate(struct clk_hw *hw,
unsigned long prate) {
struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
struct rockchip_pll_rate_table cur;
u64 rate64 = prate;
u32 pllcon;
pllcon = readl_relaxed(pll->reg_base... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-pll.c |
static void rockchip_rk3066_pll_disable(struct clk_hw *hw) {
struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
writel(HIWORD_UPDATE(RK3066_PLLCON3_PWRDOWN, RK3066_PLLCON3_PWRDOWN, 0),
pll->reg_base + RK3066_PLLCON(3));
} | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-pll.c |
static int rockchip_rk3066_pll_is_enabled(struct clk_hw *hw) {
struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
u32 pllcon = readl(pll->reg_base + RK3066_PLLCON(3));
return !(pllcon & RK3066_PLLCON3_PWRDOWN);
} | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-pll.c | static int rockchip_rk3399_pll_wait_lock(struct rockchip_clk_pll *pll) {
u32 pllcon;
int ret;
ret =
readl_relaxed_poll_timeout(pll->reg_base + RK3399_PLLCON(2), pllcon,
pllcon & RK3399_PLLCON2_LOCK_STATUS, 0, 1000);
if (ret)
pr_err("%s: timeout waiting for pll to lock... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-pll.c | static int rockchip_rk3399_pll_init(struct clk_hw *hw) {
struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
const struct rockchip_pll_rate_table *rate;
struct rockchip_pll_rate_table cur;
unsigned long drate;
if (!(pll->flags & ROCKCHIP_PLL_SYNC_RATE))
return 0;
drate = clk_hw_get_rate(hw);
rat... | [
1,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-pll.c |
static void
rockchip_rk3588_pll_get_params(struct rockchip_clk_pll *pll,
struct rockchip_pll_rate_table *rate) {
u32 pllcon;
pllcon = readl_relaxed(pll->reg_base + RK3588_PLLCON(0));
rate->m = ((pllcon >> RK3588_PLLCON0_M_SHIFT) & RK3588_PLLCON0_M_MASK);
pllcon = readl_relaxed(... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-pll.c | static int rockchip_rk3588_pll_set_rate(struct clk_hw *hw, unsigned long drate,
unsigned long prate) {
struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
const struct rockchip_pll_rate_table *rate;
pr_debug("%s: changing %s to %lu with a parent rate of %lu\n", __func_... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-pll.c |
static int rockchip_rk3588_pll_init(struct clk_hw *hw) {
struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
if (!(pll->flags & ROCKCHIP_PLL_SYNC_RATE))
return 0;
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-rk3128.c |
static struct rockchip_clk_provider *__init
rk3128_common_clk_init(struct device_node *np) {
struct rockchip_clk_provider *ctx;
void __iomem *reg_base;
reg_base = of_iomap(np, 0);
if (!reg_base) {
pr_err("%s: could not map cru region\n", __func__);
return ERR_PTR(-ENOMEM);
}
ctx = rockchip_clk_in... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-rk3128.c |
static void __init rk3126_clk_init(struct device_node *np) {
struct rockchip_clk_provider *ctx;
ctx = rk3128_common_clk_init(np);
if (IS_ERR(ctx))
return;
rockchip_clk_register_branches(ctx, rk3126_clk_branches,
ARRAY_SIZE(rk3126_clk_branches));
rockchip_clk_protect_cri... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-rk3128.c |
static void __init rk3128_clk_init(struct device_node *np) {
struct rockchip_clk_provider *ctx;
ctx = rk3128_common_clk_init(np);
if (IS_ERR(ctx))
return;
rockchip_clk_register_branches(ctx, rk3128_clk_branches,
ARRAY_SIZE(rk3128_clk_branches));
rockchip_clk_protect_cri... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-rk3188.c |
static void __init rk3188_clk_init(struct device_node *np) {
int i;
for (i = 0; i < ARRAY_SIZE(rk3188_pll_clks); i++) {
struct rockchip_pll_clock *pll = &rk3188_pll_clks[i];
struct rockchip_pll_rate_table *rate;
if (!pll->rate_table)
continue;
rate = pll->rate_table;
while (rate->rate ... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-rk3288.c |
static void rk3288_clk_shutdown(void) {
writel_relaxed(0xf3030000, rk3288_cru_base + RK3288_MODE_CON);
} | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-rk3288.c |
static void __init rk3288_common_init(struct device_node *np,
enum rk3288_variant soc) {
struct rockchip_clk_provider *ctx;
rk3288_cru_base = of_iomap(np, 0);
if (!rk3288_cru_base) {
pr_err("%s: could not map cru region\n", __func__);
return;
}
ctx = rockchip_c... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-rk3288.c |
static void __init rk3288w_clk_init(struct device_node *np) {
rk3288_common_init(np, RK3288W_CRU);
} | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-rk3368.c |
static void __init rk3368_clk_init(struct device_node *np) {
struct rockchip_clk_provider *ctx;
void __iomem *reg_base;
reg_base = of_iomap(np, 0);
if (!reg_base) {
pr_err("%s: could not map cru region\n", __func__);
return;
}
ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
if (IS_ERR(ctx))... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-rk3588.c |
static int __init clk_rk3588_probe(struct platform_device *pdev) {
const struct clk_rk3588_inits *init_data;
struct device *dev = &pdev->dev;
init_data = device_get_match_data(dev);
if (!init_data)
return -EINVAL;
if (init_data->inits)
init_data->inits(dev->of_node);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-rv1126.c |
static void __init rv1126_pmu_clk_init(struct device_node *np) {
struct rockchip_clk_provider *ctx;
void __iomem *reg_base;
reg_base = of_iomap(np, 0);
if (!reg_base) {
pr_err("%s: could not map cru pmu region\n", __func__);
return;
}
ctx = rockchip_clk_init(np, reg_base, CLKPMU_NR_CLKS);
if (I... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk-rv1126.c |
static int __init clk_rv1126_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
const struct clk_rv1126_inits *init_data;
init_data = (struct clk_rv1126_inits *)of_device_get_match_data(&pdev->dev);
if (!init_data)
return -EINVAL;
if (init_data->inits)
init_data->init... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk.c | static void rockchip_fractional_approximation(struct clk_hw *hw,
unsigned long rate,
unsigned long *parent_rate,
unsigned long *m,
unsig... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk.c |
static void rockchip_clk_add_lookup(struct rockchip_clk_provider *ctx,
struct clk *clk, unsigned int id) {
ctx->clk_data.clks[id] = clk;
} | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/clk.c |
struct rockchip_clk_provider *rockchip_clk_init(struct device_node *np,
void __iomem *base,
unsigned long nr_clks) {
struct rockchip_clk_provider *ctx;
struct clk **clk_table;
int i;
ctx = kzalloc(sizeof(struct roc... | [
1,
0
] |
Linux Kernel | drivers/clk/rockchip/clk.c |
void rockchip_clk_register_armclk(
struct rockchip_clk_provider *ctx, unsigned int lookup_id, const char *name,
const char *const *parent_names, u8 num_parents,
const struct rockchip_cpuclk_reg_data *reg_data,
const struct rockchip_cpuclk_rate_table *rates, int nrates) {
struct clk *clk;
clk = roc... | [
0,
0
] |
Linux Kernel | drivers/clk/rockchip/softrst.c |
void rockchip_register_softrst_lut(struct device_node *np,
const int *lookup_table,
unsigned int num_regs, void __iomem *base,
u8 flags) {
struct rockchip_softrst *softrst;
int ret;
softrst = kzalloc(sizeof(... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-cpu.c | static long exynos_cpuclk_round_rate(struct clk_hw *hw, unsigned long drate,
unsigned long *prate) {
struct clk_hw *parent = clk_hw_get_parent(hw);
*prate = clk_hw_round_rate(parent, drate);
return *prate;
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-cpu.c | static int exynos5433_cpuclk_post_rate_change(struct clk_notifier_data *ndata,
struct exynos_cpuclk *cpuclk,
void __iomem *base) {
unsigned long div = 0, div_mask = DIV_MASK;
unsigned long mux_reg;
unsigned long flags;
... | [
1,
0
] |
Linux Kernel | drivers/clk/samsung/clk-cpu.c | void __init samsung_clk_register_cpu(struct samsung_clk_provider *ctx,
const struct samsung_cpu_clock *list,
unsigned int nr_clk) {
unsigned int idx;
unsigned int num_cfgs;
struct clk_hw **hws = ctx->clk_data.hws;
for (idx = 0; idx < nr_... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos-audss.c |
static int exynos_audss_clk_remove(struct platform_device *pdev) {
of_clk_del_provider(pdev->dev.of_node);
exynos_audss_clk_teardown();
pm_runtime_disable(&pdev->dev);
if (!IS_ERR(epll))
clk_disable_unprepare(epll);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos-clkout.c |
static int exynos_clkout_remove(struct platform_device *pdev) {
struct exynos_clkout *clkout = platform_get_drvdata(pdev);
of_clk_del_provider(clkout->np);
clk_hw_unregister(clkout->data.hws[0]);
iounmap(clkout->reg);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos3250.c |
static int __init exynos3250_cmu_platform_init(void) {
return platform_driver_probe(&exynos3250_cmu_isp_driver,
exynos3250_cmu_isp_probe);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos4.c | static unsigned long __init exynos4_get_xom(void) {
unsigned long xom = 0;
void __iomem *chipid_base;
struct device_node *np;
np = of_find_compatible_node(NULL, NULL, "samsung,exynos4210-chipid");
if (np) {
chipid_base = of_iomap(np, 0);
if (chipid_base)
xom = readl(chipid_base + 8);
ioun... | [
1,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos4.c |
static void __init
exynos4_clk_register_finpll(struct samsung_clk_provider *ctx) {
struct samsung_fixed_rate_clock fclk;
struct clk *clk;
unsigned long finpll_f = 24000000;
char *parent_name;
unsigned int xom = exynos4_get_xom();
parent_name = xom & 1 ? "xusbxti" : "xxti";
clk = clk_get(NULL, parent_nam... | [
1,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos4.c |
static void __init exynos4210_clk_init(struct device_node *np) {
exynos4_clk_init(np, EXYNOS4210);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos5-subcmu.c |
static void exynos5_subcmu_defer_gate(struct samsung_clk_provider *ctx,
const struct samsung_gate_clock *list,
int nr_clk) {
while (nr_clk--)
samsung_clk_add_lookup(ctx, ERR_PTR(-EPROBE_DEFER), list++->id);
} | [
1,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos5-subcmu.c |
static int __init exynos5_subcmu_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct exynos5_subcmu_info *info = dev_get_drvdata(dev);
pm_runtime_set_suspended(dev);
pm_runtime_enable(dev);
pm_runtime_get(dev);
ctx->dev = dev;
samsung_clk_register_div(ctx, info->div_clks, info... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos5-subcmu.c |
static int __init exynos5_clk_drv_init(void) {
platform_driver_register(&exynos5_clk_driver);
platform_driver_register(&exynos5_subcmu_driver);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos5260.c |
static void __init exynos5260_clk_gscl_init(struct device_node *np) {
samsung_cmu_register_one(np, &gscl_cmu);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos5260.c |
static void __init exynos5260_clk_kfc_init(struct device_node *np) {
samsung_cmu_register_one(np, &kfc_cmu);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos5410.c | static void __init exynos5410_clk_init(struct device_node *np) {
struct clk *xxti = of_clk_get(np, 0);
if (!IS_ERR(xxti) && clk_get_rate(xxti) == 24 * MHZ)
exynos5410_plls[epll].rate_table = exynos5410_pll2550x_24mhz_tbl;
samsung_cmu_register_one(np, &cmu);
pr_debug("Exynos5410: clock setup completed.\n"... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos5433.c |
static void __init exynos5433_cmu_cpif_init(struct device_node *np) {
samsung_cmu_register_one(np, &cpif_cmu_info);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos5433.c |
static void __init exynos5433_cmu_apollo_init(struct device_node *np) {
samsung_cmu_register_one(np, &apollo_cmu_info);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos5433.c |
static int __maybe_unused exynos5433_cmu_resume(struct device *dev) {
struct exynos5433_cmu_data *data = dev_get_drvdata(dev);
int i;
clk_prepare_enable(data->clk);
for (i = 0; i < data->nr_pclks; i++)
clk_prepare_enable(data->pclks[i]);
samsung_clk_restore(data->ctx.reg_base, data->clk_save, data->nr... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos7.c |
static void __init exynos7_clk_topc_init(struct device_node *np) {
samsung_cmu_register_one(np, &topc_cmu_info);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos7.c |
static void __init exynos7_clk_ccore_init(struct device_node *np) {
samsung_cmu_register_one(np, &ccore_cmu_info);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos7.c | static void __init exynos7_clk_peric0_init(struct device_node *np) {
samsung_cmu_register_one(np, &peric0_cmu_info);
}
#define MUX_SEL_PERIC10 0x0200
#define MUX_SEL_PERIC11 0x0204
#define MUX_SEL_PERIC12 0x0208
#define ENABLE_PCLK_PERIC1 0x0900
#define ENABLE_SCLK_PERIC10 0x0A00 | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos7.c |
static void __init exynos7_clk_fsys1_init(struct device_node *np) {
samsung_cmu_register_one(np, &fsys1_cmu_info);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos850.c |
static void __init exynos850_cmu_peri_init(struct device_node *np) {
exynos_arm64_register_cmu(NULL, np, &peri_cmu_info);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynos850.c | static int __init exynos850_cmu_probe(struct platform_device *pdev) {
const struct samsung_cmu_info *info;
struct device *dev = &pdev->dev;
info = of_device_get_match_data(dev);
exynos_arm64_register_cmu(dev, dev->of_node, info);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-exynosautov9.c |
static void __init exynosautov9_cmu_top_init(struct device_node *np) {
exynos_arm64_register_cmu(NULL, np, &top_cmu_info);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-pll.c |
static const struct samsung_pll_rate_table *
samsung_get_pll_settings(struct samsung_clk_pll *pll, unsigned long rate) {
const struct samsung_pll_rate_table *rate_table = pll->rate_table;
int i;
for (i = 0; i < pll->rate_count; i++) {
if (rate == rate_table[i].rate)
return &rate_table[i];
}
retur... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-pll.c |
static int __init samsung_pll_disable_early_timeout(void) {
pll_early_timeout = false;
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-pll.c |
static unsigned long samsung_pll3000_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate) {
struct samsung_clk_pll *pll = to_clk_pll(hw);
u32 pll_con, mdiv, pdiv, sdiv;
u64 fvco = parent_rate;
pll_con = readl_relaxed(pll->con_reg);
mdiv = (pll_con >> PLL... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-pll.c | static int samsung_pll0822x_set_rate(struct clk_hw *hw, unsigned long drate,
unsigned long prate) {
const struct samsung_pll_rate_table *rate;
struct samsung_clk_pll *pll = to_clk_pll(hw);
u32 pll_con3;
rate = samsung_get_pll_settings(pll, drate);
if (!rate) {
pr_err(... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-pll.c |
static bool
samsung_pll45xx_mp_change(u32 pll_con0, u32 pll_con1,
const struct samsung_pll_rate_table *rate) {
u32 old_mdiv, old_pdiv, old_afc;
old_mdiv = (pll_con0 >> PLL45XX_MDIV_SHIFT) & PLL45XX_MDIV_MASK;
old_pdiv = (pll_con0 >> PLL45XX_PDIV_SHIFT) & PLL45XX_PDIV_MASK;
old_afc = ... | [
1,
0
] |
Linux Kernel | drivers/clk/samsung/clk-pll.c |
static unsigned long
samsung_s3c2440_mpll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) {
struct samsung_clk_pll *pll = to_clk_pll(hw);
u32 pll_con, mdiv, pdiv, sdiv;
u64 fvco = parent_rate;
pll_con = readl_relaxed(pll->con_reg);
mdiv = (pll_con >> PLLS3C2410_MDIV_SHIFT) & PLLS3C2410_MDIV_MASK;
... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-pll.c |
static unsigned long samsung_pll2550xx_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate) {
struct samsung_clk_pll *pll = to_clk_pll(hw);
u32 mdiv, pdiv, sdiv, pll_con;
u64 fvco = parent_rate;
pll_con = readl_relaxed(pll->con_reg);
mdiv = (pll_con >>... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-s3c2410-dclk.c |
static u8 s3c24xx_clkout_get_parent(struct clk_hw *hw) {
struct s3c24xx_clkout *clkout = to_s3c24xx_clkout(hw);
int num_parents = clk_hw_get_num_parents(hw);
u32 val;
val = clkout->modify_misccr(0, 0) >> clkout->shift;
val >>= clkout->shift;
val &= clkout->mask;
if (val >= num_parents)
return -EINV... | [
1,
0
] |
Linux Kernel | drivers/clk/samsung/clk-s3c2410-dclk.c |
static void s3c24xx_dclk_update_cmp(struct s3c24xx_dclk *s3c24xx_dclk,
int div_shift, int cmp_shift) {
unsigned long flags = 0;
u32 dclk_con, div, cmp;
spin_lock_irqsave(&s3c24xx_dclk->dclk_lock, flags);
dclk_con = readl_relaxed(s3c24xx_dclk->base);
div = ((dclk_con >> ... | [
1,
0
] |
Linux Kernel | drivers/clk/samsung/clk-s3c2410-dclk.c |
static int s3c24xx_dclk0_div_notify(struct notifier_block *nb,
unsigned long event, void *data) {
struct s3c24xx_dclk *s3c24xx_dclk = to_s3c24xx_dclk0(nb);
if (event == POST_RATE_CHANGE) {
s3c24xx_dclk_update_cmp(s3c24xx_dclk, DCLKCON_DCLK0_DIV_SHIFT,
... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-s3c2410.c |
static void __init s3c2410_clk_init(struct device_node *np) {
s3c2410_common_clk_init(np, 0, S3C2410, NULL);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-s3c2412.c | static void __init s3c2412_common_clk_register_fixed_ext(
struct samsung_clk_provider *ctx, unsigned long xti_f,
unsigned long ext_f) {
struct samsung_clock_alias xti_alias = ALIAS(XTI, NULL, "xtal");
s3c2412_common_frate_clks[0].fixed_rate = xti_f;
s3c2412_common_frate_clks[1].fixed_rate = ext_f;
sam... | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-s3c2443.c |
static void __init s3c2450_clk_init(struct device_node *np) {
s3c2443_common_clk_init(np, 0, S3C2450, NULL);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-s3c64xx.c |
static void __init s3c6400_clk_init(struct device_node *np) {
s3c64xx_clk_init(np, 0, 0, true, NULL);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk-s5pv210-audss.c |
static void s5pv210_audss_clk_resume(void) {
int i;
for (i = 0; i < ARRAY_SIZE(reg_save); i++)
writel(reg_save[i][1], reg_base + reg_save[i][0]);
} | [
0,
0
] |
Linux Kernel | drivers/clk/samsung/clk.c |
struct samsung_clk_reg_dump *
samsung_clk_alloc_reg_dump(const unsigned long *rdump, unsigned long nr_rdump) {
struct samsung_clk_reg_dump *rd;
unsigned int i;
rd = kcalloc(nr_rdump, sizeof(*rd), GFP_KERNEL);
if (!rd)
return NULL;
for (i = 0; i < nr_rdump; ++i)
rd[i].offset = rdump[i];
return rd... | [
1,
0
] |
Linux Kernel | drivers/clk/samsung/clk.c | void __init samsung_clk_register_gate(struct samsung_clk_provider *ctx,
const struct samsung_gate_clock *list,
unsigned int nr_clk) {
struct clk_hw *clk_hw;
unsigned int idx;
for (idx = 0; idx < nr_clk; idx++, list++) {
clk_hw = clk_... | [
1,
0
] |
Linux Kernel | drivers/clk/samsung/clk.c | void __init samsung_clk_of_register_fixed_ext(
struct samsung_clk_provider *ctx,
struct samsung_fixed_rate_clock *fixed_rate_clk,
unsigned int nr_fixed_rate_clk, const struct of_device_id *clk_matches) {
const struct of_device_id *match;
struct device_node *clk_np;
u32 freq;
for_each_matching_node_... | [
1,
0
] |
Linux Kernel | drivers/clk/samsung/clk.h | static inline void samsung_clk_extended_sleep_init(
void __iomem *reg_base, const unsigned long *rdump, unsigned long nr_rdump,
const struct samsung_clk_reg_dump *rsuspend, unsigned long nr_rsuspend) {}
#endif
#define samsung_clk_sleep_init(reg_base, rdump, nr_rdump) \
samsung_clk_extende... | [
0,
0
] |
Linux Kernel | drivers/clk/sifive/sifive-prci.c | static u32 __prci_readl(struct __prci_data *pd, u32 offs) {
return readl_relaxed(pd->va + offs);
} | [
0,
0
] |
Linux Kernel | drivers/clk/sifive/sifive-prci.c | static void __prci_wrpll_unpack(struct wrpll_cfg *c, u32 r) {
u32 v;
v = r & PRCI_COREPLLCFG0_DIVR_MASK;
v >>= PRCI_COREPLLCFG0_DIVR_SHIFT;
c->divr = v;
v = r & PRCI_COREPLLCFG0_DIVF_MASK;
v >>= PRCI_COREPLLCFG0_DIVF_SHIFT;
c->divf = v;
v = r & PRCI_COREPLLCFG0_DIVQ_MASK;
v >>= PRCI_COREPLLCFG0_DIV... | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.