imx233: fix block reset code

Change-Id: I5fbc76315a651c91b278e1c7dc6cb49b7e00d9ad
This commit is contained in:
Amaury Pouly 2013-09-18 13:03:31 +02:00
parent 27433076e9
commit b4c1bb0214

View file

@ -158,6 +158,11 @@ bool imx233_us_elapsed(uint32_t ref, unsigned us_delay)
void imx233_reset_block(volatile uint32_t *block_reg) 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 */ /* soft-reset */
__REG_SET(*block_reg) = __BLOCK_SFTRST; __REG_SET(*block_reg) = __BLOCK_SFTRST;
/* make sure block is gated off */ /* make sure block is gated off */