mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-10 13:42:29 -05:00
imx233: fix block reset code
Change-Id: I5fbc76315a651c91b278e1c7dc6cb49b7e00d9ad
This commit is contained in:
parent
27433076e9
commit
b4c1bb0214
1 changed files with 5 additions and 0 deletions
|
|
@ -158,6 +158,11 @@ bool imx233_us_elapsed(uint32_t ref, unsigned us_delay)
|
|||
|
||||
void imx233_reset_block(volatile uint32_t *block_reg)
|
||||
{
|
||||
/* deassert reset and clock gate */
|
||||
__REG_CLR(*block_reg) = __BLOCK_SFTRST;
|
||||
while(*block_reg & __BLOCK_SFTRST);
|
||||
__REG_CLR(*block_reg) = __BLOCK_CLKGATE;
|
||||
while(*block_reg & __BLOCK_CLKGATE);
|
||||
/* soft-reset */
|
||||
__REG_SET(*block_reg) = __BLOCK_SFTRST;
|
||||
/* make sure block is gated off */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue