Lines Matching refs:reg
39 #define FACTOR_GET(bit, len, reg) (((reg) & SETMASK(len, bit)) >> (bit)) argument
41 #define FACTOR_SET(bit, len, reg, val) \ argument
42 (((reg) & CLRMASK(len, bit)) | (val << (bit)))
48 u32 reg; in clk_factors_recalc_rate() local
54 reg = readl(factors->reg); in clk_factors_recalc_rate()
58 n = FACTOR_GET(config->nshift, config->nwidth, reg); in clk_factors_recalc_rate()
60 k = FACTOR_GET(config->kshift, config->kwidth, reg); in clk_factors_recalc_rate()
62 m = FACTOR_GET(config->mshift, config->mwidth, reg); in clk_factors_recalc_rate()
64 p = FACTOR_GET(config->pshift, config->pwidth, reg); in clk_factors_recalc_rate()
124 u32 reg; in clk_factors_set_rate() local
135 reg = readl(factors->reg); in clk_factors_set_rate()
138 reg = FACTOR_SET(config->nshift, config->nwidth, reg, n); in clk_factors_set_rate()
139 reg = FACTOR_SET(config->kshift, config->kwidth, reg, k); in clk_factors_set_rate()
140 reg = FACTOR_SET(config->mshift, config->mwidth, reg, m); in clk_factors_set_rate()
141 reg = FACTOR_SET(config->pshift, config->pwidth, reg, p); in clk_factors_set_rate()
144 writel(reg, factors->reg); in clk_factors_set_rate()
165 void __iomem *reg) in sunxi_factors_register() argument
194 factors->reg = reg; in sunxi_factors_register()
208 gate->reg = reg; in sunxi_factors_register()
224 mux->reg = reg; in sunxi_factors_register()