diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2013-07-07 17:29:41 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2013-07-07 17:36:21 +0200 |
commit | 3afcb53fb94b7bb937147236f338dd89afb781d0 (patch) | |
tree | fca31ca98a49047e49a0f317abdc00ede26599f3 /firmware/target/arm/imx233/system-imx233.c | |
parent | 659febc749627a92c59f2d765da59eb9c995c50d (diff) | |
download | rockbox-3afcb53fb94b7bb937147236f338dd89afb781d0.tar.gz rockbox-3afcb53fb94b7bb937147236f338dd89afb781d0.zip |
imx233: rework power management
The current code was spreaded over power and powermgmt which made
it behave strangely, especially since there are relationships
between power management and frequency scaling. The new code makes
sure power management is initialised before frequency scaling
starts. It also makes sure to start from a known state, thus
fixing potential issue when the bootloader stops in a trickle
state where DCDC is improperly configured.
Change-Id: Ibded2e590e108f6c98daa52d2cf1bd28763c8923
Diffstat (limited to 'firmware/target/arm/imx233/system-imx233.c')
-rw-r--r-- | firmware/target/arm/imx233/system-imx233.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/system-imx233.c b/firmware/target/arm/imx233/system-imx233.c index aa1c216e46..d1f2cfbf15 100644 --- a/firmware/target/arm/imx233/system-imx233.c +++ b/firmware/target/arm/imx233/system-imx233.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include "backlight-target.h" | 43 | #include "backlight-target.h" |
44 | #include "button.h" | 44 | #include "button.h" |
45 | #include "fmradio_i2c.h" | 45 | #include "fmradio_i2c.h" |
46 | #include "powermgmt.h" | ||
46 | 47 | ||
47 | void imx233_chip_reset(void) | 48 | void imx233_chip_reset(void) |
48 | { | 49 | { |
@@ -132,6 +133,7 @@ void system_init(void) | |||
132 | imx233_lradc_init(); | 133 | imx233_lradc_init(); |
133 | imx233_power_init(); | 134 | imx233_power_init(); |
134 | imx233_i2c_init(); | 135 | imx233_i2c_init(); |
136 | imx233_powermgmt_init(); | ||
135 | 137 | ||
136 | /* make sure auto-slow is disable now, we don't know at which frequency we | 138 | /* make sure auto-slow is disable now, we don't know at which frequency we |
137 | * are running and auto-slow could violate constraints on {xbus,hbus} */ | 139 | * are running and auto-slow could violate constraints on {xbus,hbus} */ |