Message ID | 45f73124ace6e2110cbda2eee9ba44b1320feeae.1713154967.git.Takahiro.Kuwano@infineon.com |
---|---|
State | Superseded |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show |
Series | mtd: Make sure UBIFS does not do multi-pass page programming on flashes that don't support it | expand |
On 4/15/24 05:33, tkuw584924@gmail.com wrote: > diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c > index 8f371a5213..773afd4040 100644 > --- a/drivers/mtd/spi/spi-nor-core.c > +++ b/drivers/mtd/spi/spi-nor-core.c > @@ -3459,6 +3459,13 @@ static void s25_default_init(struct spi_nor *nor, > struct spi_nor_flash_parameter *params) > { > nor->setup = s25_s28_setup; > + > + /* > + * Programming is supported only in 16-byte ECC data unit granularity. > + * Byte-programming, bit-walking, or multiple program operations to the > + * same ECC data unit without an erase are not allowed. > + */ > + params->writesize = 16; > } Use late_init() please. Looks good. ta
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 8f371a5213..773afd4040 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -3459,6 +3459,13 @@ static void s25_default_init(struct spi_nor *nor, struct spi_nor_flash_parameter *params) { nor->setup = s25_s28_setup; + + /* + * Programming is supported only in 16-byte ECC data unit granularity. + * Byte-programming, bit-walking, or multiple program operations to the + * same ECC data unit without an erase are not allowed. + */ + params->writesize = 16; } static int s25_s28_post_bfpt_fixup(struct spi_nor *nor, @@ -3623,6 +3630,13 @@ static void s28hx_t_default_init(struct spi_nor *nor, { nor->octal_dtr_enable = spi_nor_cypress_octal_dtr_enable; nor->setup = s25_s28_setup; + + /* + * Programming is supported only in 16-byte ECC data unit granularity. + * Byte-programming, bit-walking, or multiple program operations to the + * same ECC data unit without an erase are not allowed. + */ + params->writesize = 16; } static void s28hx_t_post_sfdp_fixup(struct spi_nor *nor,