+Amit

> -----Original Message-----
> From: Quanyang Wang <[email protected]>
> Sent: Monday, January 6, 2020 2:33 PM
> To: Michal Simek <[email protected]>; Bruce <[email protected]>; Naga
> Sureshkumar Relli <[email protected]>
> Cc: [email protected]
> Subject: Re: [linux-yocto][PATCH 1/1] mtd: spi-nor: fix erasesize for dual 
> qspi mode
> 
> Hi Naga,
> 
> On 12/18/19 5:59 PM, Michal Simek wrote:
> > On 18. 12. 19 7:33, [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]>
> >> ---
> >>   drivers/mtd/spi-nor/spi-nor.c | 6 +++++-
> >>   1 file changed, 5 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/mtd/spi-nor/spi-nor.c
> >> b/drivers/mtd/spi-nor/spi-nor.c index c6fca2a81c44..79f6a6f4445d
> >> 100644
> >> --- a/drivers/mtd/spi-nor/spi-nor.c
> >> +++ b/drivers/mtd/spi-nor/spi-nor.c
> >> @@ -5446,7 +5446,7 @@ int spi_nor_scan(struct spi_nor *nor, const char 
> >> *name,
> >>    struct device_node *np_spi;
> >>    int ret;
> >>    int i;
> >> -  u32 is_dual;
> >> +  u32 is_dual = 0;
> >>
> >>    ret = spi_nor_check(nor);
> >>    if (ret)
> >> @@ -5666,6 +5666,10 @@ int spi_nor_scan(struct spi_nor *nor, const char 
> >> *name,
> >>            if (info->flags & SPI_NOR_4B_OPCODES)
> >>                    nor->flags |= SNOR_F_4B_OPCODES;
> >>
> >> +  /* If in dual mode, erasesize should be doubled */
> >> +  if (is_dual)
> >> +          mtd->erasesize = mtd->erasesize * 2;
> >> +
> >>    ret = spi_nor_set_addr_width(nor);
> >>    if (ret)
> >>            return ret;
> >>
> > please keep Naga in CC on these spi patches.
> >
> > Naga: Please take a look and review.
> 
> Would you please help review this patch?
> 
> Thanks,
> 
> Quanyang
> 
> >
> > Thanks,
> > Michal
> >
> >
> >
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#8290): 
https://lists.yoctoproject.org/g/linux-yocto/message/8290
Mute This Topic: https://lists.yoctoproject.org/mt/68786088/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to