All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] spi-nor-core: Fix small sector erase with SFDP
@ 2019-09-26 13:34 Vignesh Raghavendra
  2019-09-26 13:34 ` [U-Boot] [PATCH 1/2] mtd: spi-nor-core: Use dev_err for reporting erase/write failures Vignesh Raghavendra
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vignesh Raghavendra @ 2019-09-26 13:34 UTC (permalink / raw)
  To: u-boot

First patch improves error reporting on erase/write failures
Second patch makes sure small sector is used even when SFDP is enabled
and CONFIG_SPI_FLASH_USE_4K_SECTORS is set.

Jagan,

Could you please consider these patches for next -rc?

Vignesh Raghavendra (2):
  mtd: spi-nor-core: Use dev_err for reporting erase/write failures
  mtd: spi-nor-core: Replace MTD_SPI_NOR_USE_4K_SECTORS with
    SPI_FLASH_USE_4K_SECTORS

 drivers/mtd/spi/spi-nor-core.c | 8 ++++----
 drivers/mtd/spi/spi-nor-ids.c  | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.23.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/2] mtd: spi-nor-core: Use dev_err for reporting erase/write failures
  2019-09-26 13:34 [U-Boot] [PATCH 0/2] spi-nor-core: Fix small sector erase with SFDP Vignesh Raghavendra
@ 2019-09-26 13:34 ` Vignesh Raghavendra
  2019-09-26 13:34 ` [U-Boot] [PATCH 2/2] mtd: spi-nor-core: Replace MTD_SPI_NOR_USE_4K_SECTORS with SPI_FLASH_USE_4K_SECTORS Vignesh Raghavendra
  2019-10-22 18:20 ` [U-Boot] [PATCH 0/2] spi-nor-core: Fix small sector erase with SFDP Jagan Teki
  2 siblings, 0 replies; 4+ messages in thread
From: Vignesh Raghavendra @ 2019-09-26 13:34 UTC (permalink / raw)
  To: u-boot

Use dev_err() when reporting reason for erase/write failures so that
users can be made aware of the reason for failure.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 drivers/mtd/spi/spi-nor-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index 1acff745d1a2..22915c23edff 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -380,12 +380,12 @@ static int spi_nor_fsr_ready(struct spi_nor *nor)
 
 	if (fsr & (FSR_E_ERR | FSR_P_ERR)) {
 		if (fsr & FSR_E_ERR)
-			dev_dbg(nor->dev, "Erase operation failed.\n");
+			dev_err(nor->dev, "Erase operation failed.\n");
 		else
-			dev_dbg(nor->dev, "Program operation failed.\n");
+			dev_err(nor->dev, "Program operation failed.\n");
 
 		if (fsr & FSR_PT_ERR)
-			dev_dbg(nor->dev,
+			dev_err(nor->dev,
 				"Attempted to modify a protected sector.\n");
 
 		nor->write_reg(nor, SPINOR_OP_CLFSR, NULL, 0);
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] mtd: spi-nor-core: Replace MTD_SPI_NOR_USE_4K_SECTORS with SPI_FLASH_USE_4K_SECTORS
  2019-09-26 13:34 [U-Boot] [PATCH 0/2] spi-nor-core: Fix small sector erase with SFDP Vignesh Raghavendra
  2019-09-26 13:34 ` [U-Boot] [PATCH 1/2] mtd: spi-nor-core: Use dev_err for reporting erase/write failures Vignesh Raghavendra
@ 2019-09-26 13:34 ` Vignesh Raghavendra
  2019-10-22 18:20 ` [U-Boot] [PATCH 0/2] spi-nor-core: Fix small sector erase with SFDP Jagan Teki
  2 siblings, 0 replies; 4+ messages in thread
From: Vignesh Raghavendra @ 2019-09-26 13:34 UTC (permalink / raw)
  To: u-boot

U-Boot uses CONFIG_SPI_FLASH_USE_4K_SECTORS to enable 4K small sector
support. Use that instead of MTD_SPI_NOR_USE_4K_SECTORS.

Reported-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 drivers/mtd/spi/spi-nor-core.c | 2 +-
 drivers/mtd/spi/spi-nor-ids.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index 22915c23edff..8412e5e8515f 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -1745,7 +1745,7 @@ static int spi_nor_parse_bfpt(struct spi_nor *nor,
 
 		erasesize = 1U << erasesize;
 		opcode = (half >> 8) & 0xff;
-#ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
+#ifdef CONFIG_SPI_FLASH_USE_4K_SECTORS
 		if (erasesize == SZ_4K) {
 			nor->erase_opcode = opcode;
 			mtd->erasesize = erasesize;
diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
index ba154709f880..2e0aebbc44aa 100644
--- a/drivers/mtd/spi/spi-nor-ids.c
+++ b/drivers/mtd/spi/spi-nor-ids.c
@@ -58,7 +58,7 @@
  * All newly added entries should describe *hardware* and should use SECT_4K
  * (or SECT_4K_PMC) if hardware supports erasing 4 KiB sectors. For usage
  * scenarios excluding small sectors there is config option that can be
- * disabled: CONFIG_MTD_SPI_NOR_USE_4K_SECTORS.
+ * disabled: CONFIG_SPI_FLASH_USE_4K_SECTORS.
  * For historical (and compatibility) reasons (before we got above config) some
  * old entries may be missing 4K flag.
  */
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 0/2] spi-nor-core: Fix small sector erase with SFDP
  2019-09-26 13:34 [U-Boot] [PATCH 0/2] spi-nor-core: Fix small sector erase with SFDP Vignesh Raghavendra
  2019-09-26 13:34 ` [U-Boot] [PATCH 1/2] mtd: spi-nor-core: Use dev_err for reporting erase/write failures Vignesh Raghavendra
  2019-09-26 13:34 ` [U-Boot] [PATCH 2/2] mtd: spi-nor-core: Replace MTD_SPI_NOR_USE_4K_SECTORS with SPI_FLASH_USE_4K_SECTORS Vignesh Raghavendra
@ 2019-10-22 18:20 ` Jagan Teki
  2 siblings, 0 replies; 4+ messages in thread
From: Jagan Teki @ 2019-10-22 18:20 UTC (permalink / raw)
  To: u-boot

On Thu, Sep 26, 2019 at 7:04 PM Vignesh Raghavendra <vigneshr@ti.com> wrote:
>
> First patch improves error reporting on erase/write failures
> Second patch makes sure small sector is used even when SFDP is enabled
> and CONFIG_SPI_FLASH_USE_4K_SECTORS is set.
>
> Jagan,
>
> Could you please consider these patches for next -rc?

Applied to u-boot-spi/master

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-22 18:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-26 13:34 [U-Boot] [PATCH 0/2] spi-nor-core: Fix small sector erase with SFDP Vignesh Raghavendra
2019-09-26 13:34 ` [U-Boot] [PATCH 1/2] mtd: spi-nor-core: Use dev_err for reporting erase/write failures Vignesh Raghavendra
2019-09-26 13:34 ` [U-Boot] [PATCH 2/2] mtd: spi-nor-core: Replace MTD_SPI_NOR_USE_4K_SECTORS with SPI_FLASH_USE_4K_SECTORS Vignesh Raghavendra
2019-10-22 18:20 ` [U-Boot] [PATCH 0/2] spi-nor-core: Fix small sector erase with SFDP Jagan Teki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.