• Home
  • Raw
  • Download

Lines Matching refs:value

59 	u32 value;  in iproc_pwmc_enable()  local
61 value = readl(ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_enable()
62 value |= 1 << IPROC_PWM_CTRL_EN_SHIFT(channel); in iproc_pwmc_enable()
63 writel(value, ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_enable()
71 u32 value; in iproc_pwmc_disable() local
73 value = readl(ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_disable()
74 value &= ~(1 << IPROC_PWM_CTRL_EN_SHIFT(channel)); in iproc_pwmc_disable()
75 writel(value, ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_disable()
86 u32 value, prescale; in iproc_pwmc_get_state() local
90 value = readl(ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_get_state()
92 if (value & BIT(IPROC_PWM_CTRL_EN_SHIFT(pwm->hwpwm))) in iproc_pwmc_get_state()
97 if (value & BIT(IPROC_PWM_CTRL_POLARITY_SHIFT(pwm->hwpwm))) in iproc_pwmc_get_state()
102 value = readl(ip->base + IPROC_PWM_PRESCALE_OFFSET); in iproc_pwmc_get_state()
103 prescale = value >> IPROC_PWM_PRESCALE_SHIFT(pwm->hwpwm); in iproc_pwmc_get_state()
108 value = readl(ip->base + IPROC_PWM_PERIOD_OFFSET(pwm->hwpwm)); in iproc_pwmc_get_state()
109 tmp = (value & IPROC_PWM_PERIOD_MAX) * multi; in iproc_pwmc_get_state()
112 value = readl(ip->base + IPROC_PWM_DUTY_CYCLE_OFFSET(pwm->hwpwm)); in iproc_pwmc_get_state()
113 tmp = (value & IPROC_PWM_PERIOD_MAX) * multi; in iproc_pwmc_get_state()
122 u32 value, period, duty; in iproc_pwmc_apply() local
138 u64 value, div; in iproc_pwmc_apply() local
141 value = rate * state->period; in iproc_pwmc_apply()
142 period = div64_u64(value, div); in iproc_pwmc_apply()
143 value = rate * state->duty_cycle; in iproc_pwmc_apply()
144 duty = div64_u64(value, div); in iproc_pwmc_apply()
162 value = readl(ip->base + IPROC_PWM_PRESCALE_OFFSET); in iproc_pwmc_apply()
163 value &= ~IPROC_PWM_PRESCALE_MASK(pwm->hwpwm); in iproc_pwmc_apply()
164 value |= prescale << IPROC_PWM_PRESCALE_SHIFT(pwm->hwpwm); in iproc_pwmc_apply()
165 writel(value, ip->base + IPROC_PWM_PRESCALE_OFFSET); in iproc_pwmc_apply()
172 value = readl(ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_apply()
175 value |= 1 << IPROC_PWM_CTRL_POLARITY_SHIFT(pwm->hwpwm); in iproc_pwmc_apply()
177 value &= ~(1 << IPROC_PWM_CTRL_POLARITY_SHIFT(pwm->hwpwm)); in iproc_pwmc_apply()
179 writel(value, ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_apply()
197 u32 value; in iproc_pwmc_probe() local
232 value = readl(ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_probe()
235 value &= ~(1 << IPROC_PWM_CTRL_TYPE_SHIFT(i)); in iproc_pwmc_probe()
236 value |= 1 << IPROC_PWM_CTRL_POLARITY_SHIFT(i); in iproc_pwmc_probe()
239 writel(value, ip->base + IPROC_PWM_CTRL_OFFSET); in iproc_pwmc_probe()