Commit 04b05c5
LF-9952 clocksource: imx-tpm: Wait for CnV write to take effect
The value write into the TPM CnV can only be updated into the HW when
CNT increase. Additional writes to the CnV write buffer are ignored until
the register has been updated. So we need to check if the CnV has been
updated before continue. Wait for 1 CNT cycle in worst case.
Additionally, current return check is not correct, if a max_delta need
be set, it will return '-ETIME' wrongly due to the 'int' type cast,
so refine the check logic to fix it.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jason Liu <jason.hui.liu@nxp.com>1 parent 5a6b16b commit 04b05c5
1 file changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
99 | | - | |
| 107 | + | |
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| |||
0 commit comments