diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-10 22:34:18 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-10 23:14:27 +0100 |
commit | 68163e8f4974545a33de236139b5995883df7a17 (patch) | |
tree | 1e0f13dd3fc58e8726d96bc9e4a7d8d77c56d010 /firmware/target/arm/imx233 | |
parent | e1003b1536091a7bdc421e05bd9eefcddd366bfe (diff) | |
download | rockbox-68163e8f4974545a33de236139b5995883df7a17.tar.gz rockbox-68163e8f4974545a33de236139b5995883df7a17.zip |
imx233: don"t be smart when waiting for voltage stabilisation
Unfortunately the hardware is not very helpful when changing voltage: in DCDC
mode we have the DC_OK_IRQ but in linear regulator mode, the only available
bit doesn't work when lowering the voltages. At the moment, simply sleep for a
little while before a better solution is found.
Change-Id: I89335873e9e42e5c6e9131f40db7839b008c021c
Diffstat (limited to 'firmware/target/arm/imx233')
-rw-r--r-- | firmware/target/arm/imx233/power-imx233.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/firmware/target/arm/imx233/power-imx233.c b/firmware/target/arm/imx233/power-imx233.c index 9ad8734823..0a4482fa08 100644 --- a/firmware/target/arm/imx233/power-imx233.c +++ b/firmware/target/arm/imx233/power-imx233.c | |||
@@ -383,13 +383,7 @@ void imx233_power_set_regulator(enum imx233_regulator_t reg, unsigned value_mv, | |||
383 | * Otherwise it is unreliable (doesn't work when lowering voltage on linregs) | 383 | * Otherwise it is unreliable (doesn't work when lowering voltage on linregs) |
384 | * It usually takes between 0.5ms and 2.5ms */ | 384 | * It usually takes between 0.5ms and 2.5ms */ |
385 | #if IMX233_SUBTARGET >= 3700 | 385 | #if IMX233_SUBTARGET >= 3700 |
386 | if(!BF_RD(POWER_5VCTRL, ENABLE_DCDC)) | 386 | sleep(1); |
387 | panicf("regulator %d: wait for voltage stabilize in linreg mode !", reg); | ||
388 | unsigned timeout = current_tick + (HZ * 20) / 1000; | ||
389 | while(!BF_RD(POWER_CTRL, DC_OK_IRQ) || !TIME_AFTER(current_tick, timeout)) | ||
390 | yield(); | ||
391 | if(!BF_RD(POWER_CTRL, DC_OK_IRQ)) | ||
392 | panicf("regulator %d: failed to stabilize", reg); | ||
393 | #else | 387 | #else |
394 | if(!BF_RD(POWER_5VCTRL, EN_DCDC1) || !BF_RD(POWER_5VCTRL, EN_DCDC2)) | 388 | if(!BF_RD(POWER_5VCTRL, EN_DCDC1) || !BF_RD(POWER_5VCTRL, EN_DCDC2)) |
395 | panicf("regulator %d: wait for voltage stabilize in linreg mode !", reg); | 389 | panicf("regulator %d: wait for voltage stabilize in linreg mode !", reg); |