Fix the AR933x platform device start/stop code.

This was ported from the AR724x code and I think that also doesn't
quite work.  I'll investigate that soon.

With this in place the system reset path works, so 'reset' from kdb
actually resets the SoC.

Tested:

* AP121 test board
This commit is contained in:
Adrian Chadd 2013-03-28 05:43:03 +00:00
parent 22f3da672d
commit 09ac4e68f3

View File

@ -119,25 +119,19 @@ ar933x_chip_detect_sys_frequency(void)
static void
ar933x_chip_device_stop(uint32_t mask)
{
uint32_t mask_inv, reg;
uint32_t reg;
mask_inv = mask;
reg = ATH_READ_REG(AR933X_RESET_REG_RESET_MODULE);
reg |= mask;
reg &= ~mask_inv;
ATH_WRITE_REG(AR933X_RESET_REG_RESET_MODULE, reg);
ATH_WRITE_REG(AR933X_RESET_REG_RESET_MODULE, reg | mask);
}
static void
ar933x_chip_device_start(uint32_t mask)
{
uint32_t mask_inv, reg;
uint32_t reg;
mask_inv = mask;
reg = ATH_READ_REG(AR933X_RESET_REG_RESET_MODULE);
reg &= ~mask;
reg |= mask_inv;
ATH_WRITE_REG(AR933X_RESET_REG_RESET_MODULE, reg);
ATH_WRITE_REG(AR933X_RESET_REG_RESET_MODULE, reg & ~mask);
}
static int