Commit 97e4827
spi: cadence-quadspi: fix protocol setup for non-1-1-X operations
cqspi_set_protocol() only set the data width, but ignored the command
and address width (except for 8-8-8 DTR ops), leading to corruption of
all transfers using 1-X-X or X-X-X ops. Fix by setting the other two
widths as well.
While we're at it, simplify the code a bit by replacing the
CQSPI_INST_TYPE_* constants with ilog2().
Tested on a TI AM64x with a Macronix MX25U51245G QSPI flash with 1-4-4
read and write operations.
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/20220331110819.133392-1-matthias.schiffer@ew.tq-group.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 409543c commit 97e4827
1 file changed
Lines changed: 12 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 106 | | |
112 | 107 | | |
113 | 108 | | |
| |||
376 | 371 | | |
377 | 372 | | |
378 | 373 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | 374 | | |
384 | 375 | | |
385 | 376 | | |
| |||
389 | 380 | | |
390 | 381 | | |
391 | 382 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
410 | 394 | | |
411 | 395 | | |
412 | 396 | | |
413 | 397 | | |
414 | 398 | | |
415 | | - | |
416 | 399 | | |
417 | | - | |
418 | 400 | | |
419 | 401 | | |
420 | 402 | | |
421 | 403 | | |
422 | 404 | | |
423 | 405 | | |
424 | 406 | | |
425 | | - | |
426 | 407 | | |
427 | | - | |
428 | 408 | | |
429 | 409 | | |
430 | 410 | | |
431 | 411 | | |
432 | 412 | | |
433 | 413 | | |
434 | 414 | | |
435 | | - | |
436 | 415 | | |
437 | | - | |
438 | 416 | | |
439 | 417 | | |
440 | 418 | | |
| |||
0 commit comments