]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/mach-tegra/pwm.c
arm: mvebu: dram.c: Rework dram_init() and dram_init_banksize()
[u-boot] / arch / arm / mach-tegra / pwm.c
index 86642004309265a044ff012c15da168e2559d887..1c38fc1784938b41e67e7b4989f87ced19e40188 100644 (file)
@@ -24,7 +24,10 @@ void pwm_enable(unsigned channel, int rate, int pulse_width, int freq_divider)
        assert(channel < PWM_NUM_CHANNELS);
 
        /* TODO: Can we use clock_adjust_periph_pll_div() here? */
-       clock_start_periph_pll(PERIPH_ID_PWM, CLOCK_ID_SFROM32KHZ, rate);
+       if (rate) {
+               clock_start_periph_pll(PERIPH_ID_PWM, CLOCK_ID_SFROM32KHZ,
+                                      rate);
+       }
 
        reg = PWM_ENABLE_MASK;
        reg |= pulse_width << PWM_WIDTH_SHIFT;