[PATCH v2 1/5] mtd: spi-nor: Add SPI_NOR_QUAD_WRITE hwcap
Sascha Hauer
sha at pengutronix.de
Mon Aug 14 05:57:55 PDT 2023
On Sat, Aug 12, 2023 at 09:48:20AM +0200, Jules Maselbas wrote:
> From: Jules Maselbas <jmaselbas at kalray.eu>
>
> Signed-off-by: Jules Maselbas <jmaselbas at kalray.eu>
> ---
> drivers/mtd/spi-nor/spi-nor.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Applied, thanks
Sascha
>
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index 8f6726ca4b..2c46bb2b10 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -83,6 +83,7 @@ struct flash_info {
> #define USE_CLSR BIT(14) /* use CLSR command */
> #define SPI_NOR_OCTAL_READ BIT(15) /* Flash supports Octal Read */
> #define UNLOCK_GLOBAL_BLOCK BIT(16) /* Unlock global block protection */
> +#define SPI_NOR_QUAD_WRITE BIT(17) /* Flash supports Quad Write */
> };
>
> enum spi_nor_read_command_index {
> @@ -1166,6 +1167,13 @@ static int spi_nor_init_params(struct spi_nor *nor,
> spi_nor_set_pp_settings(¶ms->page_programs[SNOR_CMD_PP],
> SPINOR_OP_PP, SNOR_PROTO_1_1_1);
>
> + if (info->flags & SPI_NOR_QUAD_WRITE) {
> + params->hwcaps.mask |= SNOR_HWCAPS_PP_1_1_4;
> + spi_nor_set_pp_settings(
> + ¶ms->page_programs[SNOR_CMD_PP_1_1_4],
> + SPINOR_OP_PP_1_1_4, SNOR_PROTO_1_1_4);
> + }
> +
> if (info->flags & UNLOCK_GLOBAL_BLOCK) {
> int err;
>
> --
> 2.41.0
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list