Re: [RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-24 Thread Tudor Ambarus
Hi, Marek, On 05/23/2018 03:54 PM, Marek Vasut wrote: On 05/23/2018 02:52 PM, Tudor Ambarus wrote: Hi, Marek, Hi, On 05/23/2018 12:56 PM, Marek Vasut wrote: [...] [...] +while (len) { +cmd = spi_nor_find_best_erase_cmd(map, region, addr, len); +if (!cmd) +

Re: [RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-23 Thread Marek Vasut
On 05/23/2018 02:52 PM, Tudor Ambarus wrote: > Hi, Marek, Hi, > On 05/23/2018 12:56 PM, Marek Vasut wrote: > [...] [...] >>> +    while (len) { >>> +    cmd = spi_nor_find_best_erase_cmd(map, region, addr, len); >>> +    if (!cmd) >>> +    return -EINVAL;

Re: [RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-23 Thread Tudor Ambarus
Hi, Marek, On 05/23/2018 12:56 PM, Marek Vasut wrote: [...] [...] +while (len) { +cmd = spi_nor_find_best_erase_cmd(map, region, addr, len); +if (!cmd) +return -EINVAL; What would happen if you realize mid-way that you cannot erase some sector , do you end up w

Re: [RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-23 Thread Marek Vasut
On 05/22/2018 07:01 AM, Tudor Ambarus wrote: > Hi, Marek, Hi! > On 05/21/2018 07:59 PM, Marek Vasut wrote: >> On 05/21/2018 06:42 PM, Tudor Ambarus wrote: >>> Hi, Marek, >> >> [...] >> > This is a transitional patch: non-uniform erase maps will be used > later > when initialized based

Re: [RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-21 Thread Tudor Ambarus
Hi, Marek, On 05/21/2018 07:59 PM, Marek Vasut wrote: On 05/21/2018 06:42 PM, Tudor Ambarus wrote: Hi, Marek, [...] This is a transitional patch: non-uniform erase maps will be used later when initialized based on the SFDP data. What about non-SFDP non-linear flashes ? Non-SFDP non-unif

Re: [RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-21 Thread Marek Vasut
On 05/21/2018 06:42 PM, Tudor Ambarus wrote: > Hi, Marek, [...] >>> This is a transitional patch: non-uniform erase maps will be used later >>> when initialized based on the SFDP data. >> >> What about non-SFDP non-linear flashes ? > > Non-SFDP non-uniform flashes support is not addressed with t

Re: [RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-21 Thread Tudor Ambarus
Hi, Marek, On 05/21/2018 02:35 PM, Marek Vasut wrote: On 05/18/2018 11:32 AM, Tudor Ambarus wrote: From: Cyrille Pitchen This patch is a first step in introducing the support of SPI memories with non-uniform erase sizes like Spansion s25fs512s. It introduces the memory erase map which split

Re: [RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-21 Thread Marek Vasut
On 05/18/2018 11:32 AM, Tudor Ambarus wrote: > From: Cyrille Pitchen > > This patch is a first step in introducing the support of SPI memories > with non-uniform erase sizes like Spansion s25fs512s. > > It introduces the memory erase map which splits the memory array into one > or many erase re

[RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-18 Thread Tudor Ambarus
From: Cyrille Pitchen This patch is a first step in introducing the support of SPI memories with non-uniform erase sizes like Spansion s25fs512s. It introduces the memory erase map which splits the memory array into one or many erase regions. Each erase region supports up to 4 erase commands, a