Commit 718f98e
committed
nvmem: rockchip-efuse: add mutex lock for rk1808 efuse read
The rk1808 efuse read has some issues when several threads start to read
efuse through nvmem file node.
Thread1 thread2
1. timing_init
2. write auto_ctrl
3. delay timing_init
4. read status write auto_ctrl
5. if error goto to timing_deinit delay
The thread1 will read no finish bit and then goto error, the user will
see a "Input/Output Error".
The thread1 do timing deinit will cause thread2 halt on read status, and
the user will never success to do read efuse again.
Change-Id: I3f462afd844686aac153acc0c33215fbd96827a3
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>1 parent 9318ec9 commit 718f98e
1 file changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| 164 | + | |
| 165 | + | |
163 | 166 | | |
164 | 167 | | |
165 | 168 | | |
166 | | - | |
| 169 | + | |
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
170 | 173 | | |
171 | | - | |
172 | 174 | | |
173 | | - | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
207 | 209 | | |
208 | 210 | | |
209 | 211 | | |
210 | | - | |
211 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
212 | 217 | | |
213 | 218 | | |
214 | 219 | | |
| |||
632 | 637 | | |
633 | 638 | | |
634 | 639 | | |
| 640 | + | |
| 641 | + | |
635 | 642 | | |
636 | 643 | | |
637 | 644 | | |
| |||
0 commit comments