Commit 6b35a2d
committed
device: spi_master: optimize the fix of spi cs auto toggle issue
and add polling function for sub system spi master driver.
* For currently supported arc boards, there is one issue that
the cs pin of dw spi master & sub system spi master will toggle
automacticall when spi tx fifo is empty.
* the spi tx fifo can be empty by two reasons
* the spi transfer is finished which is a correct case
* the spi transfer is not finished, but spi fifo operation is
interruptted by higher priority interrupts. This is a wrong case as
the toggle of cs will confuse spi slave before spi transfer is
finished.
* to avoid reason 2
* use other bit/pin to mast spi cs, e.g. emsk 2.2, hsdk
* disable interrupts for poll based operations, e.g. emsdp
* avoid interrupt preemption to spi mst interrupt for int based
operations, e.g. iotdk.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>1 parent 22727c6 commit 6b35a2d
File tree
13 files changed
+128
-913
lines changed- board
- emsdp/drivers
- ip/designware/spi
- pmwifi
- emsk/drivers
- ip/designware/spi
- pmwifi
- sdcard
- hsdk/drivers/pmwifi
- iotdk/drivers/pmwifi
- device
- ip/subsystem/spi
- peripheral/802_15_4/mrf24j40
- middleware/fatfs/source/diskdrv
13 files changed
+128
-913
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
61 | 72 | | |
62 | 73 | | |
63 | 74 | | |
| |||
137 | 148 | | |
138 | 149 | | |
139 | 150 | | |
140 | | - | |
| 151 | + | |
141 | 152 | | |
142 | 153 | | |
143 | 154 | | |
| |||
151 | 162 | | |
152 | 163 | | |
153 | 164 | | |
154 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
155 | 176 | | |
156 | 177 | | |
157 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
65 | | - | |
66 | | - | |
67 | 63 | | |
68 | 64 | | |
69 | 65 | | |
| |||
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
81 | | - | |
82 | 77 | | |
83 | 78 | | |
84 | 79 | | |
| |||
252 | 247 | | |
253 | 248 | | |
254 | 249 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
266 | 261 | | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
281 | 276 | | |
282 | 277 | | |
283 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | 95 | | |
97 | 96 | | |
| 97 | + | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | | - | |
104 | 103 | | |
105 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
106 | 109 | | |
| 110 | + | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| |||
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
0 commit comments