diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2012-12-26 01:06:04 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2012-12-26 01:17:28 +0100 |
commit | ca83b558dffbdc91e7ada0e1c48c208b945e1385 (patch) | |
tree | a07be868bc57bde3e106a95d358856aeebd0c200 /firmware/target/arm/imx233/clkctrl-imx233.h | |
parent | 423755d1bd8e12c9b525b7d3c2918510d72bb37e (diff) | |
download | rockbox-ca83b558dffbdc91e7ada0e1c48c208b945e1385.tar.gz rockbox-ca83b558dffbdc91e7ada0e1c48c208b945e1385.zip |
imx233: fix potential hbus dividor settings + doc
HBUS uses the same field for integer and fractional dividers, the
choice is made by a bit. Make sure both are changed together,
otherwise this could result in the wrong divider to be used and in
HBUS freq to be too low or too high (very bad).
Change-Id: I253d8eeee26c5038868b729c4f791511295a39f0
Diffstat (limited to 'firmware/target/arm/imx233/clkctrl-imx233.h')
-rw-r--r-- | firmware/target/arm/imx233/clkctrl-imx233.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/clkctrl-imx233.h b/firmware/target/arm/imx233/clkctrl-imx233.h index ec3412d0f3..665674108c 100644 --- a/firmware/target/arm/imx233/clkctrl-imx233.h +++ b/firmware/target/arm/imx233/clkctrl-imx233.h | |||
@@ -124,7 +124,7 @@ enum imx233_clock_t | |||
124 | CLK_HBUS, /* freq, div, frac */ | 124 | CLK_HBUS, /* freq, div, frac */ |
125 | CLK_PLL, /* freq, enable */ | 125 | CLK_PLL, /* freq, enable */ |
126 | CLK_XTAL, /* freq */ | 126 | CLK_XTAL, /* freq */ |
127 | CLK_EMI, /* freq, div, frac, bypass (NOTE: don't modify directly EMI) */ | 127 | CLK_EMI, /* freq, div, frac, bypass */ |
128 | CLK_XBUS, /* freq, div */ | 128 | CLK_XBUS, /* freq, div */ |
129 | }; | 129 | }; |
130 | 130 | ||
@@ -139,6 +139,7 @@ enum imx233_xtal_clk_t | |||
139 | /* Auto-Slow monitoring */ | 139 | /* Auto-Slow monitoring */ |
140 | enum imx233_as_monitor_t | 140 | enum imx233_as_monitor_t |
141 | { | 141 | { |
142 | AS_NONE = 0, /* Do not monitor any activity */ | ||
142 | AS_CPU_INSTR = 1 << 21, /* Monitor CPU instruction access to AHB */ | 143 | AS_CPU_INSTR = 1 << 21, /* Monitor CPU instruction access to AHB */ |
143 | AS_CPU_DATA = 1 << 22, /* Monitor CPU data access to AHB */ | 144 | AS_CPU_DATA = 1 << 22, /* Monitor CPU data access to AHB */ |
144 | AS_TRAFFIC = 1 << 23, /* Monitor AHB master activity */ | 145 | AS_TRAFFIC = 1 << 23, /* Monitor AHB master activity */ |
@@ -147,6 +148,7 @@ enum imx233_as_monitor_t | |||
147 | AS_APBHDMA = 1 << 26, /* Monitor APBH DMA activity */ | 148 | AS_APBHDMA = 1 << 26, /* Monitor APBH DMA activity */ |
148 | AS_PXP = 1 << 27, /* Monitor PXP activity */ | 149 | AS_PXP = 1 << 27, /* Monitor PXP activity */ |
149 | AS_DCP = 1 << 28, /* Monitor DCP activity */ | 150 | AS_DCP = 1 << 28, /* Monitor DCP activity */ |
151 | AS_ALL = 0xff << 21, /* Monitor all activity */ | ||
150 | }; | 152 | }; |
151 | 153 | ||
152 | enum imx233_as_div_t | 154 | enum imx233_as_div_t |
@@ -183,6 +185,7 @@ void imx233_clkctrl_set_auto_slow_divisor(enum imx233_as_div_t div); | |||
183 | enum imx233_as_div_t imx233_clkctrl_get_auto_slow_divisor(void); | 185 | enum imx233_as_div_t imx233_clkctrl_get_auto_slow_divisor(void); |
184 | void imx233_clkctrl_enable_auto_slow(bool enable); | 186 | void imx233_clkctrl_enable_auto_slow(bool enable); |
185 | bool imx233_clkctrl_is_auto_slow_enabled(void); | 187 | bool imx233_clkctrl_is_auto_slow_enabled(void); |
188 | /* can use a mask of clocks */ | ||
186 | void imx233_clkctrl_enable_auto_slow_monitor(enum imx233_as_monitor_t monitor, bool enable); | 189 | void imx233_clkctrl_enable_auto_slow_monitor(enum imx233_as_monitor_t monitor, bool enable); |
187 | bool imx233_clkctrl_is_auto_slow_monitor_enabled(enum imx233_as_monitor_t monitor); | 190 | bool imx233_clkctrl_is_auto_slow_monitor_enabled(enum imx233_as_monitor_t monitor); |
188 | 191 | ||