aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorKurban Mallachiev <mallachiev@ispras.ru>2017-02-28 12:08:16 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-02-28 12:08:16 +0000
commitc98c9eba888c9ae450d41d92b1e6abbb66832e4c (patch)
treeb9eb3db369d685e707ee1dcecd3e9ee43ae2addd /cpus.c
parentccc11b027923d738e5196ef355c48aac866802a9 (diff)
ARM i.MX timers: fix reset handling
The i.MX timer device can be reset by writing to the SWR bit of the CR register. This has to behave differently from hard (power-on) reset because it does not reset all of the bits in the CR register. We were incorrectly implementing soft reset and hard reset the same way, and in addition had a logic error which meant that we were clearing the bits that soft-reset is supposed to preserve and not touching the bits that soft-reset clears. This was not correct behaviour for either kind of reset. Separate out the soft reset and hard reset code paths, and correct the handling of reset of the CR register so that it is correct in both cases. Signed-off-by: Kurban Mallachiev <mallachiev@ispras.ru> [PMM: rephrased commit message, spacing on operators; use bool rather than int for is_soft_reset] Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'cpus.c')
0 files changed, 0 insertions, 0 deletions