Commit edd2e26
spi: airoha: add support of dual/quad wires spi modes to exec_op() handler
Booting without this patch and disabled dirmap support results in
[ 2.980719] spi-nand spi0.0: Micron SPI NAND was found.
[ 2.986040] spi-nand spi0.0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
[ 2.994709] 2 fixed-partitions partitions found on MTD device spi0.0
[ 3.001075] Creating 2 MTD partitions on "spi0.0":
[ 3.005862] 0x000000000000-0x000000020000 : "bl2"
[ 3.011272] 0x000000020000-0x000010000000 : "ubi"
...
[ 6.195594] ubi0: attaching mtd1
[ 13.338398] ubi0: scanning is finished
[ 13.342188] ubi0 error: ubi_read_volume_table: the layout volume was not found
[ 13.349784] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd1, error -22
[ 13.356897] UBI error: cannot attach mtd1
If dirmap is disabled or not supported in the spi driver, the dirmap requests
will be executed via exec_op() handler. Thus, if the hardware supports
dual/quad spi modes, then corresponding requests will be sent to exec_op()
handler. Current driver does not support such requests, so error is arrised.
As result the flash can't be read/write.
This patch adds support of dual and quad wires spi modes to exec_op() handler.
Fixes: a403997 ("spi: airoha: add SPI-NAND Flash controller driver")
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20251012121707.2296160-4-mikhail.kshevetskiy@iopsys.eu
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 4314ffc commit edd2e26
1 file changed
Lines changed: 82 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
195 | 203 | | |
196 | 204 | | |
197 | 205 | | |
| |||
387 | 395 | | |
388 | 396 | | |
389 | 397 | | |
390 | | - | |
391 | | - | |
| 398 | + | |
| 399 | + | |
392 | 400 | | |
393 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
394 | 418 | | |
395 | 419 | | |
396 | 420 | | |
| |||
409 | 433 | | |
410 | 434 | | |
411 | 435 | | |
412 | | - | |
413 | | - | |
| 436 | + | |
| 437 | + | |
414 | 438 | | |
415 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
416 | 456 | | |
417 | 457 | | |
418 | 458 | | |
419 | 459 | | |
420 | 460 | | |
421 | | - | |
| 461 | + | |
422 | 462 | | |
423 | 463 | | |
424 | 464 | | |
| |||
902 | 942 | | |
903 | 943 | | |
904 | 944 | | |
905 | | - | |
906 | 945 | | |
| 946 | + | |
| 947 | + | |
907 | 948 | | |
908 | 949 | | |
909 | 950 | | |
910 | 951 | | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
911 | 967 | | |
912 | 968 | | |
913 | 969 | | |
| |||
918 | 974 | | |
919 | 975 | | |
920 | 976 | | |
921 | | - | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
922 | 980 | | |
923 | 981 | | |
924 | 982 | | |
925 | 983 | | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
933 | 988 | | |
934 | 989 | | |
935 | 990 | | |
936 | 991 | | |
937 | 992 | | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
942 | 997 | | |
943 | 998 | | |
944 | 999 | | |
945 | 1000 | | |
946 | 1001 | | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
955 | 1011 | | |
956 | 1012 | | |
957 | 1013 | | |
| |||
0 commit comments