|
24 | 24 | #define SPINOR_REG_CYPRESS_STR1V \
|
25 | 25 | (SPINOR_REG_CYPRESS_VREG + SPINOR_REG_CYPRESS_STR1)
|
26 | 26 | #define SPINOR_REG_CYPRESS_CFR1 0x2
|
27 |
| -#define SPINOR_REG_CYPRESS_CFR1V \ |
28 |
| - (SPINOR_REG_CYPRESS_VREG + SPINOR_REG_CYPRESS_CFR1) |
29 | 27 | #define SPINOR_REG_CYPRESS_CFR1_QUAD_EN BIT(1) /* Quad Enable */
|
30 | 28 | #define SPINOR_REG_CYPRESS_CFR2 0x3
|
31 | 29 | #define SPINOR_REG_CYPRESS_CFR2V \
|
@@ -348,10 +346,6 @@ static int cypress_nor_quad_enable_volatile(struct spi_nor *nor)
|
348 | 346 | u8 i;
|
349 | 347 | int ret;
|
350 | 348 |
|
351 |
| - if (!params->n_dice) |
352 |
| - return cypress_nor_quad_enable_volatile_reg(nor, |
353 |
| - SPINOR_REG_CYPRESS_CFR1V); |
354 |
| - |
355 | 349 | for (i = 0; i < params->n_dice; i++) {
|
356 | 350 | addr = params->vreg_offset[i] + SPINOR_REG_CYPRESS_CFR1;
|
357 | 351 | ret = cypress_nor_quad_enable_volatile_reg(nor, addr);
|
@@ -657,15 +651,17 @@ static int s25hx_t_late_init(struct spi_nor *nor)
|
657 | 651 | {
|
658 | 652 | struct spi_nor_flash_parameter *params = nor->params;
|
659 | 653 |
|
| 654 | + if (!params->n_dice || !params->vreg_offset) { |
| 655 | + dev_err(nor->dev, "%s failed. The volatile register offset could not be retrieved from SFDP.\n", |
| 656 | + __func__); |
| 657 | + return -EOPNOTSUPP; |
| 658 | + } |
| 659 | + |
660 | 660 | /* Fast Read 4B requires mode cycles */
|
661 | 661 | params->reads[SNOR_CMD_READ_FAST].num_mode_clocks = 8;
|
662 |
| - |
| 662 | + params->ready = cypress_nor_sr_ready_and_clear; |
663 | 663 | cypress_nor_ecc_init(nor);
|
664 | 664 |
|
665 |
| - /* Replace ready() with multi die version */ |
666 |
| - if (params->n_dice) |
667 |
| - params->ready = cypress_nor_sr_ready_and_clear; |
668 |
| - |
669 | 665 | return 0;
|
670 | 666 | }
|
671 | 667 |
|
|
0 commit comments