On Wed, Feb 5, 2020 at 8:24 PM Quanyang Wang
<[email protected]> wrote:
>
> Hi Bruce,
>
> On 2/6/20 5:42 AM, Bruce Ashfield wrote:
> > 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.
>
> Would you please help merge this patch to the branches:
>
> linux-yocto-dev standard/xlnx-soc
>
> linux-yocto-dev v5.4/standard/xlnx-soc

merged to both branches.

Bruce

>
> Thanks,
>
> Quanyang
>
> >
> > 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
> >>



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#8383): 
https://lists.yoctoproject.org/g/linux-yocto/message/8383
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]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to