clockgen
static struct clockgen clockgen;
static struct clk * __init create_one_hwaccel(struct clockgen *cg, int idx)
static void cg_out(struct clockgen *cg, u32 val, u32 __iomem *reg)
static void __init create_muxes(struct clockgen *cg)
if (!clockgen.node) {
clk = clockgen.cmux[idx];
static u32 cg_in(struct clockgen *cg, u32 __iomem *reg)
clk = of_clk_get_by_name(clockgen.node, dtname);
clk = of_clk_get(clockgen.node, 0);
clk = sysclk_from_fixed(clockgen.node, name);
sysclk = of_get_child_by_name(clockgen.node, "sysclk");
clk = clockgen.sysclk;
static void __init create_one_pll(struct clockgen *cg, int idx)
static void __init create_plls(struct clockgen *cg)
pll = &clockgen.pll[idx];
struct clockgen *cg = data;
if (clockgen.node)
clockgen.node = np;
clockgen.regs = of_iomap(np, 0);
if (!clockgen.regs &&
clockgen.regs = ioremap(0x1ee1000, 0x1000);
if (!clockgen.regs) {
clockgen.info = chipinfo[i];
if (clockgen.info.guts_compat) {
clockgen.info.guts_compat);
clockgen.guts = of_iomap(guts, 0);
if (!clockgen.guts) {
clockgen.info.flags |= CG_CMUX_GE_PLAT;
clockgen.sysclk = create_sysclk("cg-sysclk");
clockgen.coreclk = create_coreclk("cg-coreclk");
create_plls(&clockgen);
create_muxes(&clockgen);
if (clockgen.info.init_periph)
clockgen.info.init_periph(&clockgen);
ret = of_clk_add_provider(np, clockgen_clk_get, &clockgen);
iounmap(clockgen.regs);
clockgen.regs = NULL;
static void __init p2041_init_periph(struct clockgen *cg)
static void __init p4080_init_periph(struct clockgen *cg)
static void __init p5020_init_periph(struct clockgen *cg)
static void __init p5040_init_periph(struct clockgen *cg)
static void __init t1023_init_periph(struct clockgen *cg)
static void __init t1040_init_periph(struct clockgen *cg)
static void __init t2080_init_periph(struct clockgen *cg)
static void __init t4240_init_periph(struct clockgen *cg)
struct clockgen;
void (*init_periph)(struct clockgen *cg);
struct clockgen *cg;
static const struct clockgen_pll_div *get_pll_div(struct clockgen *cg,
static struct clk * __init create_mux_common(struct clockgen *cg,
static struct clk * __init create_one_cmux(struct clockgen *cg, int idx)