Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mtd: spi-nor: Introduce templates for SPI NOR operations

Clean the op declaration and hide the details of each op. With this it
results a cleanner, easier to read code. No functional change expected.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Acked-by: Michael Walle <michael@walle.cc>
Acked-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20220420103427.47867-10-tudor.ambarus@microchip.com

authored by

Tudor Ambarus and committed by
Pratyush Yadav
c0abb861 27ff0d34

+158 -107
+18 -83
drivers/mtd/spi-nor/core.c
··· 364 364 int ret; 365 365 366 366 if (nor->spimem) { 367 - struct spi_mem_op op = 368 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WREN, 0), 369 - SPI_MEM_OP_NO_ADDR, 370 - SPI_MEM_OP_NO_DUMMY, 371 - SPI_MEM_OP_NO_DATA); 367 + struct spi_mem_op op = SPI_NOR_WREN_OP; 372 368 373 369 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 374 370 ··· 391 395 int ret; 392 396 393 397 if (nor->spimem) { 394 - struct spi_mem_op op = 395 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WRDI, 0), 396 - SPI_MEM_OP_NO_ADDR, 397 - SPI_MEM_OP_NO_DUMMY, 398 - SPI_MEM_OP_NO_DATA); 398 + struct spi_mem_op op = SPI_NOR_WRDI_OP; 399 399 400 400 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 401 401 ··· 451 459 int ret; 452 460 453 461 if (nor->spimem) { 454 - struct spi_mem_op op = 455 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_RDSR, 0), 456 - SPI_MEM_OP_NO_ADDR, 457 - SPI_MEM_OP_NO_DUMMY, 458 - SPI_MEM_OP_DATA_IN(1, sr, 0)); 462 + struct spi_mem_op op = SPI_NOR_RDSR_OP(sr); 459 463 460 464 if (nor->reg_proto == SNOR_PROTO_8_8_8_DTR) { 461 465 op.addr.nbytes = nor->params->rdsr_addr_nbytes; ··· 491 503 int ret; 492 504 493 505 if (nor->spimem) { 494 - struct spi_mem_op op = 495 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_RDCR, 0), 496 - SPI_MEM_OP_NO_ADDR, 497 - SPI_MEM_OP_NO_DUMMY, 498 - SPI_MEM_OP_DATA_IN(1, cr, 0)); 506 + struct spi_mem_op op = SPI_NOR_RDCR_OP(cr); 499 507 500 508 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 501 509 ··· 520 536 int ret; 521 537 522 538 if (nor->spimem) { 523 - struct spi_mem_op op = 524 - SPI_MEM_OP(SPI_MEM_OP_CMD(enable ? 525 - SPINOR_OP_EN4B : 526 - SPINOR_OP_EX4B, 527 - 0), 528 - SPI_MEM_OP_NO_ADDR, 529 - SPI_MEM_OP_NO_DUMMY, 530 - SPI_MEM_OP_NO_DATA); 539 + struct spi_mem_op op = SPI_NOR_EN4B_EX4B_OP(enable); 531 540 532 541 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 533 542 ··· 554 577 nor->bouncebuf[0] = enable << 7; 555 578 556 579 if (nor->spimem) { 557 - struct spi_mem_op op = 558 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_BRWR, 0), 559 - SPI_MEM_OP_NO_ADDR, 560 - SPI_MEM_OP_NO_DUMMY, 561 - SPI_MEM_OP_DATA_OUT(1, nor->bouncebuf, 0)); 580 + struct spi_mem_op op = SPI_NOR_BRWR_OP(nor->bouncebuf); 562 581 563 582 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 564 583 ··· 584 611 nor->bouncebuf[0] = ear; 585 612 586 613 if (nor->spimem) { 587 - struct spi_mem_op op = 588 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WREAR, 0), 589 - SPI_MEM_OP_NO_ADDR, 590 - SPI_MEM_OP_NO_DUMMY, 591 - SPI_MEM_OP_DATA_OUT(1, nor->bouncebuf, 0)); 614 + struct spi_mem_op op = SPI_NOR_WREAR_OP(nor->bouncebuf); 592 615 593 616 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 594 617 ··· 695 726 return ret; 696 727 697 728 if (nor->spimem) { 698 - struct spi_mem_op op = 699 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_GBULK, 0), 700 - SPI_MEM_OP_NO_ADDR, 701 - SPI_MEM_OP_NO_DUMMY, 702 - SPI_MEM_OP_NO_DATA); 729 + struct spi_mem_op op = SPI_NOR_GBULK_OP; 703 730 704 731 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 705 732 ··· 730 765 return ret; 731 766 732 767 if (nor->spimem) { 733 - struct spi_mem_op op = 734 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WRSR, 0), 735 - SPI_MEM_OP_NO_ADDR, 736 - SPI_MEM_OP_NO_DUMMY, 737 - SPI_MEM_OP_DATA_OUT(len, sr, 0)); 768 + struct spi_mem_op op = SPI_NOR_WRSR_OP(sr, len); 738 769 739 770 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 740 771 ··· 939 978 return ret; 940 979 941 980 if (nor->spimem) { 942 - struct spi_mem_op op = 943 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WRSR2, 0), 944 - SPI_MEM_OP_NO_ADDR, 945 - SPI_MEM_OP_NO_DUMMY, 946 - SPI_MEM_OP_DATA_OUT(1, sr2, 0)); 981 + struct spi_mem_op op = SPI_NOR_WRSR2_OP(sr2); 947 982 948 983 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 949 984 ··· 971 1014 int ret; 972 1015 973 1016 if (nor->spimem) { 974 - struct spi_mem_op op = 975 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_RDSR2, 0), 976 - SPI_MEM_OP_NO_ADDR, 977 - SPI_MEM_OP_NO_DUMMY, 978 - SPI_MEM_OP_DATA_IN(1, sr2, 0)); 1017 + struct spi_mem_op op = SPI_NOR_RDSR2_OP(sr2); 979 1018 980 1019 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 981 1020 ··· 1000 1047 dev_dbg(nor->dev, " %lldKiB\n", (long long)(nor->mtd.size >> 10)); 1001 1048 1002 1049 if (nor->spimem) { 1003 - struct spi_mem_op op = 1004 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_CHIP_ERASE, 0), 1005 - SPI_MEM_OP_NO_ADDR, 1006 - SPI_MEM_OP_NO_DUMMY, 1007 - SPI_MEM_OP_NO_DATA); 1050 + struct spi_mem_op op = SPI_NOR_CHIP_ERASE_OP; 1008 1051 1009 1052 spi_nor_spimem_setup_op(nor, &op, nor->write_proto); 1010 1053 ··· 1142 1193 1143 1194 if (nor->spimem) { 1144 1195 struct spi_mem_op op = 1145 - SPI_MEM_OP(SPI_MEM_OP_CMD(nor->erase_opcode, 0), 1146 - SPI_MEM_OP_ADDR(nor->addr_width, addr, 0), 1147 - SPI_MEM_OP_NO_DUMMY, 1148 - SPI_MEM_OP_NO_DATA); 1196 + SPI_NOR_SECTOR_ERASE_OP(nor->erase_opcode, 1197 + nor->addr_width, addr); 1149 1198 1150 1199 spi_nor_spimem_setup_op(nor, &op, nor->write_proto); 1151 1200 ··· 1939 1992 static int spi_nor_spimem_check_readop(struct spi_nor *nor, 1940 1993 const struct spi_nor_read_command *read) 1941 1994 { 1942 - struct spi_mem_op op = SPI_MEM_OP(SPI_MEM_OP_CMD(read->opcode, 0), 1943 - SPI_MEM_OP_ADDR(3, 0, 0), 1944 - SPI_MEM_OP_DUMMY(1, 0), 1945 - SPI_MEM_OP_DATA_IN(2, NULL, 0)); 1995 + struct spi_mem_op op = SPI_NOR_READ_OP(read->opcode); 1946 1996 1947 1997 spi_nor_spimem_setup_op(nor, &op, read->proto); 1948 1998 ··· 1962 2018 static int spi_nor_spimem_check_pp(struct spi_nor *nor, 1963 2019 const struct spi_nor_pp_command *pp) 1964 2020 { 1965 - struct spi_mem_op op = SPI_MEM_OP(SPI_MEM_OP_CMD(pp->opcode, 0), 1966 - SPI_MEM_OP_ADDR(3, 0, 0), 1967 - SPI_MEM_OP_NO_DUMMY, 1968 - SPI_MEM_OP_DATA_OUT(2, NULL, 0)); 2021 + struct spi_mem_op op = SPI_NOR_PP_OP(pp->opcode); 1969 2022 1970 2023 spi_nor_spimem_setup_op(nor, &op, pp->proto); 1971 2024 ··· 2786 2845 struct spi_mem_op op; 2787 2846 int ret; 2788 2847 2789 - op = (struct spi_mem_op)SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_SRSTEN, 0), 2790 - SPI_MEM_OP_NO_DUMMY, 2791 - SPI_MEM_OP_NO_ADDR, 2792 - SPI_MEM_OP_NO_DATA); 2848 + op = (struct spi_mem_op)SPINOR_SRSTEN_OP; 2793 2849 2794 2850 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 2795 2851 ··· 2796 2858 return; 2797 2859 } 2798 2860 2799 - op = (struct spi_mem_op)SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_SRST, 0), 2800 - SPI_MEM_OP_NO_DUMMY, 2801 - SPI_MEM_OP_NO_ADDR, 2802 - SPI_MEM_OP_NO_DATA); 2861 + op = (struct spi_mem_op)SPINOR_SRST_OP; 2803 2862 2804 2863 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 2805 2864
+102
drivers/mtd/spi-nor/core.h
··· 18 18 SPI_MEM_OP_DUMMY(ndummy, 0), \ 19 19 SPI_MEM_OP_DATA_IN(len, buf, 0)) 20 20 21 + #define SPI_NOR_WREN_OP \ 22 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WREN, 0), \ 23 + SPI_MEM_OP_NO_ADDR, \ 24 + SPI_MEM_OP_NO_DUMMY, \ 25 + SPI_MEM_OP_NO_DATA) 26 + 27 + #define SPI_NOR_WRDI_OP \ 28 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WRDI, 0), \ 29 + SPI_MEM_OP_NO_ADDR, \ 30 + SPI_MEM_OP_NO_DUMMY, \ 31 + SPI_MEM_OP_NO_DATA) 32 + 33 + #define SPI_NOR_RDSR_OP(buf) \ 34 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_RDSR, 0), \ 35 + SPI_MEM_OP_NO_ADDR, \ 36 + SPI_MEM_OP_NO_DUMMY, \ 37 + SPI_MEM_OP_DATA_IN(1, buf, 0)) 38 + 39 + #define SPI_NOR_WRSR_OP(buf, len) \ 40 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WRSR, 0), \ 41 + SPI_MEM_OP_NO_ADDR, \ 42 + SPI_MEM_OP_NO_DUMMY, \ 43 + SPI_MEM_OP_DATA_OUT(len, buf, 0)) 44 + 45 + #define SPI_NOR_RDSR2_OP(buf) \ 46 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_RDSR2, 0), \ 47 + SPI_MEM_OP_NO_ADDR, \ 48 + SPI_MEM_OP_NO_DUMMY, \ 49 + SPI_MEM_OP_DATA_OUT(1, buf, 0)) 50 + 51 + #define SPI_NOR_WRSR2_OP(buf) \ 52 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WRSR2, 0), \ 53 + SPI_MEM_OP_NO_ADDR, \ 54 + SPI_MEM_OP_NO_DUMMY, \ 55 + SPI_MEM_OP_DATA_OUT(1, buf, 0)) 56 + 57 + #define SPI_NOR_RDCR_OP(buf) \ 58 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_RDCR, 0), \ 59 + SPI_MEM_OP_NO_ADDR, \ 60 + SPI_MEM_OP_NO_DUMMY, \ 61 + SPI_MEM_OP_DATA_IN(1, buf, 0)) 62 + 63 + #define SPI_NOR_EN4B_EX4B_OP(enable) \ 64 + SPI_MEM_OP(SPI_MEM_OP_CMD(enable ? SPINOR_OP_EN4B : SPINOR_OP_EX4B, 0), \ 65 + SPI_MEM_OP_NO_ADDR, \ 66 + SPI_MEM_OP_NO_DUMMY, \ 67 + SPI_MEM_OP_NO_DATA) 68 + 69 + #define SPI_NOR_BRWR_OP(buf) \ 70 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_BRWR, 0), \ 71 + SPI_MEM_OP_NO_ADDR, \ 72 + SPI_MEM_OP_NO_DUMMY, \ 73 + SPI_MEM_OP_DATA_OUT(1, buf, 0)) 74 + 75 + #define SPI_NOR_WREAR_OP(buf) \ 76 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WREAR, 0), \ 77 + SPI_MEM_OP_NO_ADDR, \ 78 + SPI_MEM_OP_NO_DUMMY, \ 79 + SPI_MEM_OP_DATA_OUT(1, buf, 0)) 80 + 81 + #define SPI_NOR_GBULK_OP \ 82 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_GBULK, 0), \ 83 + SPI_MEM_OP_NO_ADDR, \ 84 + SPI_MEM_OP_NO_DUMMY, \ 85 + SPI_MEM_OP_NO_DATA) 86 + 87 + #define SPI_NOR_CHIP_ERASE_OP \ 88 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_CHIP_ERASE, 0), \ 89 + SPI_MEM_OP_NO_ADDR, \ 90 + SPI_MEM_OP_NO_DUMMY, \ 91 + SPI_MEM_OP_NO_DATA) 92 + 93 + #define SPI_NOR_SECTOR_ERASE_OP(opcode, addr_width, addr) \ 94 + SPI_MEM_OP(SPI_MEM_OP_CMD(opcode, 0), \ 95 + SPI_MEM_OP_ADDR(addr_width, addr, 0), \ 96 + SPI_MEM_OP_NO_DUMMY, \ 97 + SPI_MEM_OP_NO_DATA) 98 + 99 + #define SPI_NOR_READ_OP(opcode) \ 100 + SPI_MEM_OP(SPI_MEM_OP_CMD(opcode, 0), \ 101 + SPI_MEM_OP_ADDR(3, 0, 0), \ 102 + SPI_MEM_OP_DUMMY(1, 0), \ 103 + SPI_MEM_OP_DATA_IN(2, NULL, 0)) 104 + 105 + #define SPI_NOR_PP_OP(opcode) \ 106 + SPI_MEM_OP(SPI_MEM_OP_CMD(opcode, 0), \ 107 + SPI_MEM_OP_ADDR(3, 0, 0), \ 108 + SPI_MEM_OP_NO_DUMMY, \ 109 + SPI_MEM_OP_DATA_OUT(2, NULL, 0)) 110 + 111 + #define SPINOR_SRSTEN_OP \ 112 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_SRSTEN, 0), \ 113 + SPI_MEM_OP_NO_DUMMY, \ 114 + SPI_MEM_OP_NO_ADDR, \ 115 + SPI_MEM_OP_NO_DATA) 116 + 117 + #define SPINOR_SRST_OP \ 118 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_SRST, 0), \ 119 + SPI_MEM_OP_NO_DUMMY, \ 120 + SPI_MEM_OP_NO_ADDR, \ 121 + SPI_MEM_OP_NO_DATA) 122 + 21 123 enum spi_nor_option_flags { 22 124 SNOR_F_HAS_SR_TB = BIT(0), 23 125 SNOR_F_NO_OP_CHIP_ERASE = BIT(1),
+14 -10
drivers/mtd/spi-nor/micron-st.c
··· 35 35 SPI_MEM_OP_NO_DUMMY, \ 36 36 SPI_MEM_OP_DATA_OUT(ndata, buf, 0)) 37 37 38 + #define MICRON_ST_RDFSR_OP(buf) \ 39 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_RDFSR, 0), \ 40 + SPI_MEM_OP_NO_ADDR, \ 41 + SPI_MEM_OP_NO_DUMMY, \ 42 + SPI_MEM_OP_DATA_IN(1, buf, 0)) 43 + 44 + #define MICRON_ST_CLFSR_OP \ 45 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_CLFSR, 0), \ 46 + SPI_MEM_OP_NO_ADDR, \ 47 + SPI_MEM_OP_NO_DUMMY, \ 48 + SPI_MEM_OP_NO_DATA) 49 + 38 50 static int micron_st_nor_octal_dtr_en(struct spi_nor *nor) 39 51 { 40 52 struct spi_mem_op op; ··· 336 324 int ret; 337 325 338 326 if (nor->spimem) { 339 - struct spi_mem_op op = 340 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_RDFSR, 0), 341 - SPI_MEM_OP_NO_ADDR, 342 - SPI_MEM_OP_NO_DUMMY, 343 - SPI_MEM_OP_DATA_IN(1, fsr, 0)); 327 + struct spi_mem_op op = MICRON_ST_RDFSR_OP(fsr); 344 328 345 329 if (nor->reg_proto == SNOR_PROTO_8_8_8_DTR) { 346 330 op.addr.nbytes = nor->params->rdsr_addr_nbytes; ··· 371 363 int ret; 372 364 373 365 if (nor->spimem) { 374 - struct spi_mem_op op = 375 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_CLFSR, 0), 376 - SPI_MEM_OP_NO_ADDR, 377 - SPI_MEM_OP_NO_DUMMY, 378 - SPI_MEM_OP_NO_DATA); 366 + struct spi_mem_op op = MICRON_ST_CLFSR_OP; 379 367 380 368 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 381 369
+17 -9
drivers/mtd/spi-nor/spansion.c
··· 30 30 SPI_MEM_OP_NO_DUMMY, \ 31 31 SPI_MEM_OP_DATA_OUT(ndata, buf, 0)) 32 32 33 + #define CYPRESS_NOR_RD_ANY_REG_OP(naddr, addr, buf) \ 34 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_RD_ANY_REG, 0), \ 35 + SPI_MEM_OP_ADDR(naddr, addr, 0), \ 36 + SPI_MEM_OP_NO_DUMMY, \ 37 + SPI_MEM_OP_DATA_IN(1, buf, 0)) 38 + 39 + #define SPANSION_CLSR_OP \ 40 + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_CLSR, 0), \ 41 + SPI_MEM_OP_NO_ADDR, \ 42 + SPI_MEM_OP_NO_DUMMY, \ 43 + SPI_MEM_OP_NO_DATA) 44 + 33 45 static int cypress_nor_octal_dtr_en(struct spi_nor *nor) 34 46 { 35 47 struct spi_mem_op op; ··· 177 165 * CFR3V[4] and set the correct size. 178 166 */ 179 167 struct spi_mem_op op = 180 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_RD_ANY_REG, 1), 181 - SPI_MEM_OP_ADDR(3, SPINOR_REG_CYPRESS_CFR3V, 1), 182 - SPI_MEM_OP_NO_DUMMY, 183 - SPI_MEM_OP_DATA_IN(1, nor->bouncebuf, 1)); 168 + CYPRESS_NOR_RD_ANY_REG_OP(3, SPINOR_REG_CYPRESS_CFR3V, 169 + nor->bouncebuf); 184 170 int ret; 171 + 172 + spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 185 173 186 174 ret = spi_mem_exec_op(nor->spimem, &op); 187 175 if (ret) ··· 332 320 int ret; 333 321 334 322 if (nor->spimem) { 335 - struct spi_mem_op op = 336 - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_CLSR, 0), 337 - SPI_MEM_OP_NO_ADDR, 338 - SPI_MEM_OP_NO_DUMMY, 339 - SPI_MEM_OP_NO_DATA); 323 + struct spi_mem_op op = SPANSION_CLSR_OP; 340 324 341 325 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 342 326
+7 -5
drivers/mtd/spi-nor/xilinx.c
··· 15 15 #define XSR_PAGESIZE BIT(0) /* Page size in Po2 or Linear */ 16 16 #define XSR_RDY BIT(7) /* Ready */ 17 17 18 + #define XILINX_RDSR_OP(buf) \ 19 + SPI_MEM_OP(SPI_MEM_OP_CMD(XILINX_OP_RDSR, 0), \ 20 + SPI_MEM_OP_NO_ADDR, \ 21 + SPI_MEM_OP_NO_DUMMY, \ 22 + SPI_MEM_OP_DATA_IN(1, buf, 0)) 23 + 18 24 #define S3AN_INFO(_jedec_id, _n_sectors, _page_size) \ 19 25 .id = { \ 20 26 ((_jedec_id) >> 16) & 0xff, \ ··· 78 72 int ret; 79 73 80 74 if (nor->spimem) { 81 - struct spi_mem_op op = 82 - SPI_MEM_OP(SPI_MEM_OP_CMD(XILINX_OP_RDSR, 0), 83 - SPI_MEM_OP_NO_ADDR, 84 - SPI_MEM_OP_NO_DUMMY, 85 - SPI_MEM_OP_DATA_IN(1, sr, 0)); 75 + struct spi_mem_op op = XILINX_RDSR_OP(sr); 86 76 87 77 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); 88 78