clk.h (54ab6db0909061ab7ee07233d3cab86d29f86e6c) clk.h (cb1d9f6ddaa436f2dce2710740b7a3546700949c)
1/*
2 * Copyright (c) 2014 MundoReader S.L.
3 * Author: Heiko Stuebner <heiko@sntech.de>
4 *
5 * Copyright (c) 2015 Rockchip Electronics Co. Ltd.
6 * Author: Xing Zheng <zhengxing@rock-chips.com>
7 *
8 * based on

--- 303 unchanged lines hidden (view full) ---

312
313#define ROCKCHIP_INVERTER_HIWORD_MASK BIT(0)
314
315struct clk *rockchip_clk_register_inverter(const char *name,
316 const char *const *parent_names, u8 num_parents,
317 void __iomem *reg, int shift, int flags,
318 spinlock_t *lock);
319
1/*
2 * Copyright (c) 2014 MundoReader S.L.
3 * Author: Heiko Stuebner <heiko@sntech.de>
4 *
5 * Copyright (c) 2015 Rockchip Electronics Co. Ltd.
6 * Author: Xing Zheng <zhengxing@rock-chips.com>
7 *
8 * based on

--- 303 unchanged lines hidden (view full) ---

312
313#define ROCKCHIP_INVERTER_HIWORD_MASK BIT(0)
314
315struct clk *rockchip_clk_register_inverter(const char *name,
316 const char *const *parent_names, u8 num_parents,
317 void __iomem *reg, int shift, int flags,
318 spinlock_t *lock);
319
320struct clk *rockchip_clk_register_muxgrf(const char *name,
321 const char *const *parent_names, u8 num_parents,
322 int flags, struct regmap *grf, int reg,
323 int shift, int width, int mux_flags);
324
320#define PNAME(x) static const char *const x[] __initconst
321
322enum rockchip_clk_branch_type {
323 branch_composite,
324 branch_mux,
325#define PNAME(x) static const char *const x[] __initconst
326
327enum rockchip_clk_branch_type {
328 branch_composite,
329 branch_mux,
330 branch_muxgrf,
325 branch_divider,
326 branch_fraction_divider,
327 branch_gate,
328 branch_mmc,
329 branch_inverter,
330 branch_factor,
331 branch_ddrclk,
332};

--- 213 unchanged lines hidden (view full) ---

546 .flags = f, \
547 .muxdiv_offset = o, \
548 .mux_shift = s, \
549 .mux_width = w, \
550 .mux_flags = mf, \
551 .gate_offset = -1, \
552 }
553
331 branch_divider,
332 branch_fraction_divider,
333 branch_gate,
334 branch_mmc,
335 branch_inverter,
336 branch_factor,
337 branch_ddrclk,
338};

--- 213 unchanged lines hidden (view full) ---

552 .flags = f, \
553 .muxdiv_offset = o, \
554 .mux_shift = s, \
555 .mux_width = w, \
556 .mux_flags = mf, \
557 .gate_offset = -1, \
558 }
559
560#define MUXGRF(_id, cname, pnames, f, o, s, w, mf) \
561 { \
562 .id = _id, \
563 .branch_type = branch_muxgrf, \
564 .name = cname, \
565 .parent_names = pnames, \
566 .num_parents = ARRAY_SIZE(pnames), \
567 .flags = f, \
568 .muxdiv_offset = o, \
569 .mux_shift = s, \
570 .mux_width = w, \
571 .mux_flags = mf, \
572 .gate_offset = -1, \
573 }
574
554#define DIV(_id, cname, pname, f, o, s, w, df) \
555 { \
556 .id = _id, \
557 .branch_type = branch_divider, \
558 .name = cname, \
559 .parent_names = (const char *[]){ pname }, \
560 .num_parents = 1, \
561 .flags = f, \

--- 122 unchanged lines hidden ---
575#define DIV(_id, cname, pname, f, o, s, w, df) \
576 { \
577 .id = _id, \
578 .branch_type = branch_divider, \
579 .name = cname, \
580 .parent_names = (const char *[]){ pname }, \
581 .num_parents = 1, \
582 .flags = f, \

--- 122 unchanged lines hidden ---