While working on the emulation of the freescale p2010 (e500v2) I realized that
there's no implementation of booke's timers features. Currently mpc8544 uses
ppc_emb (ppc_emb_timers_init) which is close but not exactly like booke (for
example booke uses different SPR).
Signed-off-by: Fabien Chouteau<address@hidden>
---
V2:
- Fix fixed timer, now trigger each time the selected
bit switch from 0 to 1.
- Fix e500 criterion.
- Trigger an interrupt when user set DIE/FIE/WIE while
DIS/FIS/WIS is already set.
- Minor fixes (mask definition, variable name...).
- Rename ppc_emb to ppc_40x
V3:
- Fix bit selection for e500 fixed timers (fp == 000000 selects msb)
- Improved formula to compute the next event of a fixed timer
v4:
- Centralized interrupt handling
- Timer flags (BOOKE, E500, DECR_UNDERFLOW_TRIGGERED, DECR_ZERO_TRIGGERED)