mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
imx233: fix auto slow divisor
The divisor must be set only when auto-slow is disabled. Change-Id: I31ed94f43a7c9deb80275dc73f8e3c78463b54c0
This commit is contained in:
parent
ee21359437
commit
3a1ba755c6
1 changed files with 5 additions and 2 deletions
|
|
@ -225,8 +225,11 @@ bool imx233_clkctrl_is_usb_pll_enabled(void)
|
|||
|
||||
void imx233_clkctrl_set_auto_slow_divisor(enum imx233_as_div_t div)
|
||||
{
|
||||
__REG_CLR(HW_CLKCTRL_HBUS) = HW_CLKCTRL_HBUS__SLOW_DIV_BM;
|
||||
__REG_SET(HW_CLKCTRL_HBUS) = div;
|
||||
/* the SLOW_DIV must only be set when auto-slow is disabled */
|
||||
bool old_status = imx233_clkctrl_is_auto_slow_enabled();
|
||||
imx233_clkctrl_enable_auto_slow(false);
|
||||
__FIELD_SET(HW_CLKCTRL_HBUS, SLOW_DIV, div);
|
||||
imx233_clkctrl_enable_auto_slow(old_status);
|
||||
}
|
||||
|
||||
enum imx233_as_div_t imx233_clkctrl_get_auto_slow_divisor(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue