Lines Matching refs:value

49 	u32 value;  in iproc_pwmc_enable()  local
51 value = readl(ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_enable()
52 value |= 1 << IPROC_PWM_CTRL_EN_SHIFT(channel); in iproc_pwmc_enable()
53 writel(value, ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_enable()
61 u32 value; in iproc_pwmc_disable() local
63 value = readl(ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_disable()
64 value &= ~(1 << IPROC_PWM_CTRL_EN_SHIFT(channel)); in iproc_pwmc_disable()
65 writel(value, ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_disable()
76 u32 value, prescale; in iproc_pwmc_get_state() local
78 value = readl(ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_get_state()
80 if (value & BIT(IPROC_PWM_CTRL_EN_SHIFT(pwm->hwpwm))) in iproc_pwmc_get_state()
85 if (value & BIT(IPROC_PWM_CTRL_POLARITY_SHIFT(pwm->hwpwm))) in iproc_pwmc_get_state()
97 value = readl(ip->base + IPROC_PWM_PRESCALE_OFFSET); in iproc_pwmc_get_state()
98 prescale = value >> IPROC_PWM_PRESCALE_SHIFT(pwm->hwpwm); in iproc_pwmc_get_state()
103 value = readl(ip->base + IPROC_PWM_PERIOD_OFFSET(pwm->hwpwm)); in iproc_pwmc_get_state()
104 tmp = (value & IPROC_PWM_PERIOD_MAX) * multi; in iproc_pwmc_get_state()
107 value = readl(ip->base + IPROC_PWM_DUTY_CYCLE_OFFSET(pwm->hwpwm)); in iproc_pwmc_get_state()
108 tmp = (value & IPROC_PWM_PERIOD_MAX) * multi; in iproc_pwmc_get_state()
119 u32 value, period, duty; in iproc_pwmc_apply() local
135 u64 value, div; in iproc_pwmc_apply() local
138 value = rate * state->period; in iproc_pwmc_apply()
139 period = div64_u64(value, div); in iproc_pwmc_apply()
140 value = rate * state->duty_cycle; in iproc_pwmc_apply()
141 duty = div64_u64(value, div); in iproc_pwmc_apply()
158 value = readl(ip->base + IPROC_PWM_PRESCALE_OFFSET); in iproc_pwmc_apply()
159 value &= ~IPROC_PWM_PRESCALE_MASK(pwm->hwpwm); in iproc_pwmc_apply()
160 value |= prescale << IPROC_PWM_PRESCALE_SHIFT(pwm->hwpwm); in iproc_pwmc_apply()
161 writel(value, ip->base + IPROC_PWM_PRESCALE_OFFSET); in iproc_pwmc_apply()
168 value = readl(ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_apply()
171 value |= 1 << IPROC_PWM_CTRL_POLARITY_SHIFT(pwm->hwpwm); in iproc_pwmc_apply()
173 value &= ~(1 << IPROC_PWM_CTRL_POLARITY_SHIFT(pwm->hwpwm)); in iproc_pwmc_apply()
175 writel(value, ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_apply()
193 u32 value; in iproc_pwmc_probe() local
224 value = readl(ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_probe()
227 value &= ~(1 << IPROC_PWM_CTRL_TYPE_SHIFT(i)); in iproc_pwmc_probe()
228 value |= 1 << IPROC_PWM_CTRL_POLARITY_SHIFT(i); in iproc_pwmc_probe()
231 writel(value, ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_probe()