public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] mtd: spi: Add SYS_SPI_BLOCK_SIZE to Kconfig
@ 2019-07-29  7:48 tien.fong.chee at intel.com
  2019-07-29  7:48 ` [U-Boot] [PATCH 2/2] drivers: ubi: Adding UBI loader for SPI flash tien.fong.chee at intel.com
  2019-08-22  7:40 ` [U-Boot] [PATCH 1/2] mtd: spi: Add SYS_SPI_BLOCK_SIZE to Kconfig Chee, Tien Fong
  0 siblings, 2 replies; 7+ messages in thread
From: tien.fong.chee at intel.com @ 2019-07-29  7:48 UTC (permalink / raw)
  To: u-boot

From: Tien Fong Chee <tien.fong.chee@intel.com>

Different SPI flash has different block erase size configuration, it can
be configured as block erase size or sub-block erase size, so
SYS_SPI_BLOCK_SIZE is created to provide UBI a consistent block reading.
UBI block reading would be eventually translated to offset
access into SPI regardless how the block erase size is configured on SPI.
This would made the UBI transparent from SPI layer.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
---
 drivers/mtd/spi/Kconfig | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig
index d3b007a731..ea3779c521 100644
--- a/drivers/mtd/spi/Kconfig
+++ b/drivers/mtd/spi/Kconfig
@@ -196,4 +196,11 @@ config SPI_FLASH_MTD
 
 	  If unsure, say N
 
+config SYS_SPI_BLOCK_SIZE
+	hex "SPI chip eraseblock size for UBI reading"
+	depends on SPL_SPI_FLASH_SUPPORT
+	default 65536
+	help
+	  Number of data bytes in a physical eraseblock for UBI reading.
+
 endmenu # menu "SPI Flash Support"
-- 
2.13.0

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

end of thread, other threads:[~2019-08-23  7:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-29  7:48 [U-Boot] [PATCH 1/2] mtd: spi: Add SYS_SPI_BLOCK_SIZE to Kconfig tien.fong.chee at intel.com
2019-07-29  7:48 ` [U-Boot] [PATCH 2/2] drivers: ubi: Adding UBI loader for SPI flash tien.fong.chee at intel.com
2019-08-22  7:41   ` Chee, Tien Fong
2019-08-22  7:40 ` [U-Boot] [PATCH 1/2] mtd: spi: Add SYS_SPI_BLOCK_SIZE to Kconfig Chee, Tien Fong
2019-08-22  7:54   ` Marek Vasut
2019-08-23  3:29     ` Chee, Tien Fong
2019-08-23  7:16       ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox