Date:2011-03-16 13:43:17 (11 years 6 months ago)
Author:Lars C.
Commit:b12b148d224f9d62db64e5bc535a0883865f7b5d
Message:MIPS: JZ47XX: PWM: Fix pwm_disable

With certain configurations the current pwm_disable implementation can cause
problems such that when re-enabling the PWM the output is always high instead of
the desired PWM signal.
By changing the order of the different steps in pwm_disable these problems no
longer appear.
Files: arch/mips/jz47xx/pwm.c (1 diff)

Change Details

arch/mips/jz47xx/pwm.c
156156    uint32_t ctrl = jz4740_timer_get_ctrl(pwm->id);
157157
158158    ctrl &= ~JZ_TIMER_CTRL_PWM_ENABLE;
159    jz4740_timer_disable(pwm->id);
160159    jz4740_timer_set_ctrl(pwm->id, ctrl);
160    jz4740_timer_disable(pwm->id);
161161}
162162
163163int __init jz47xx_pwm_init(struct pwm_device* pwm_list, int pwm_count)

Archive Download the corresponding diff file



interactive