In message: [V2] [linux-yocto][PATCH 1/1] mtd: spi-nor: fix erasesize for dual qspi mode on 06/01/2020 [email protected] wrote:
> From: Quanyang Wang <[email protected]> > > The zcu102 and zc706 boards support qspi dual mode, and in > the dual mode, the erasesize for mtd device should be twice > as much as the erasesize for each nor flash chip. > > Signed-off-by: Quanyang Wang <[email protected]> > --- > V1 ---> V2: > 1) use nor->shift instead of 2. > 2) put the implementation in the function spi_nor_select_erase(). It looks like we are good to go on this patch as well, but which kernel versions is it valid for ? Things have udpated since it was originally sent, so I'd like to confirm. Bruce > > drivers/mtd/spi-nor/spi-nor.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c > index c6fca2a81c44..5949ff63df46 100644 > --- a/drivers/mtd/spi-nor/spi-nor.c > +++ b/drivers/mtd/spi-nor/spi-nor.c > @@ -4793,7 +4793,7 @@ static int spi_nor_select_erase(struct spi_nor *nor) > if (!erase) > return -EINVAL; > nor->erase_opcode = erase->opcode; > - mtd->erasesize = erase->size; > + mtd->erasesize = erase->size << nor->shift; > return 0; > } > > @@ -4811,7 +4811,7 @@ static int spi_nor_select_erase(struct spi_nor *nor) > if (!erase) > return -EINVAL; > > - mtd->erasesize = erase->size; > + mtd->erasesize = erase->size << nor->shift; > return 0; > } > > -- > 2.17.1 >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8375): https://lists.yoctoproject.org/g/linux-yocto/message/8375 Mute This Topic: https://lists.yoctoproject.org/mt/69464832/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
