diff options
author | Takahiro Kuwano <Takahiro.Kuwano@infineon.com> | 2023-01-20 06:28:22 +0300 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2023-01-26 18:28:09 +0300 |
commit | da16d72efd004e046b8b4f98a662afd4bef09206 (patch) | |
tree | 2e7fa2d2c4e8030a76391802aa153438e34168f6 /drivers | |
parent | ee7296bbcd6bae3ded087cb56c786da10aa6fc6a (diff) | |
download | u-boot-da16d72efd004e046b8b4f98a662afd4bef09206.tar.xz |
mtd: spi-nor-core: Make CFRx reg fields generic
Cypress defines two flavors of configuration registers, volatile and
non volatile, and both use the same bit fields. Rename the bitfields in
the configuration registers so that they can be used for both flavors.
Suggested-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/spi/spi-nor-core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 1ea8363d9f..a3198253ca 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -3373,7 +3373,7 @@ static int spi_nor_cypress_octal_dtr_enable(struct spi_nor *nor) if (ret) return ret; - buf = SPINOR_REG_CYPRESS_CFR2V_MEMLAT_11_24; + buf = SPINOR_REG_CYPRESS_CFR2_MEMLAT_11_24; op = (struct spi_mem_op)SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WR_ANY_REG, 1), SPI_MEM_OP_ADDR(addr_width, SPINOR_REG_CYPRESS_CFR2V, 1), SPI_MEM_OP_NO_DUMMY, @@ -3396,7 +3396,7 @@ static int spi_nor_cypress_octal_dtr_enable(struct spi_nor *nor) if (ret) return ret; - buf = SPINOR_REG_CYPRESS_CFR5V_OCT_DTR_EN; + buf = SPINOR_REG_CYPRESS_CFR5_OCT_DTR_EN; op = (struct spi_mem_op)SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WR_ANY_REG, 1), SPI_MEM_OP_ADDR(addr_width, SPINOR_REG_CYPRESS_CFR5V, 1), SPI_MEM_OP_NO_DUMMY, @@ -3444,7 +3444,7 @@ static int s28hx_t_setup(struct spi_nor *nor, const struct flash_info *info, if (ret) return ret; - if (!(buf & SPINOR_REG_CYPRESS_CFR3V_UNISECT)) + if (!(buf & SPINOR_REG_CYPRESS_CFR3_UNISECT)) nor->erase = s28hx_t_erase_non_uniform; return spi_nor_default_setup(nor, info, params); @@ -3511,7 +3511,7 @@ static int s28hx_t_post_bfpt_fixup(struct spi_nor *nor, if (ret) return ret; - if (buf & SPINOR_REG_CYPRESS_CFR3V_PGSZ) + if (buf & SPINOR_REG_CYPRESS_CFR3_PGSZ) params->page_size = 512; else params->page_size = 256; |