Lines Matching refs:v
73 u32 v, best_period = 0, duty; in sunxi_pwm_set_config() local
104 v = readl(®s->ctrl); in sunxi_pwm_set_config()
105 v &= ~SUNXI_PWM_CTRL_CLK_GATE; in sunxi_pwm_set_config()
106 writel(v, ®s->ctrl); in sunxi_pwm_set_config()
107 v &= ~SUNXI_PWM_CTRL_PRESCALE0_MASK; in sunxi_pwm_set_config()
108 v |= (best_prescaler & SUNXI_PWM_CTRL_PRESCALE0_MASK); in sunxi_pwm_set_config()
109 writel(v, ®s->ctrl); in sunxi_pwm_set_config()
110 v |= SUNXI_PWM_CTRL_CLK_GATE; in sunxi_pwm_set_config()
111 writel(v, ®s->ctrl); in sunxi_pwm_set_config()
129 u32 v; in sunxi_pwm_set_enable() local
133 v = readl(®s->ctrl); in sunxi_pwm_set_enable()
135 v &= ~SUNXI_PWM_CTRL_ENABLE0; in sunxi_pwm_set_enable()
136 writel(v, ®s->ctrl); in sunxi_pwm_set_enable()
143 v &= ~SUNXI_PWM_CTRL_CH0_ACT_STA; in sunxi_pwm_set_enable()
145 v |= SUNXI_PWM_CTRL_CH0_ACT_STA; in sunxi_pwm_set_enable()
146 v |= SUNXI_PWM_CTRL_ENABLE0; in sunxi_pwm_set_enable()
147 writel(v, ®s->ctrl); in sunxi_pwm_set_enable()