| 909 | } |
| 910 | |
| 911 | static __fi void rcntWcount(int index, u32 value) |
| 912 | { |
| 913 | EECNT_LOG("EE Counter[%d] writeCount = %x, oldcount=%x, target=%x", index, value, counters[index].count, counters[index].target); |
| 914 | |
| 915 | // re-calculate the start cycle of the counter based on elapsed time since the last counter update: |
| 916 | rcntSyncCounter(index); |
| 917 | |
| 918 | counters[index].count = value & 0xffff; |
| 919 | |
| 920 | // reset the target, and make sure we don't get a premature target. |
| 921 | counters[index].target &= 0xffff; |
| 922 | |
| 923 | if (counters[index].count >= counters[index].target) |
| 924 | counters[index].target |= EECNT_FUTURE_TARGET; |
| 925 | |
| 926 | _rcntSet(index); |
| 927 | } |
| 928 | |
| 929 | static __fi void rcntWtarget(int index, u32 value) |
| 930 | { |
no test coverage detected