From: Chee, Tien Fong <tien.fong.chee@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mtd: spi: Add SYS_SPI_BLOCK_SIZE to Kconfig
Date: Fri, 23 Aug 2019 03:29:57 +0000 [thread overview]
Message-ID: <1566530997.13015.1.camel@intel.com> (raw)
In-Reply-To: <2bea79db-ca48-0556-2ac3-0f22ebf8ce1f@denx.de>
On Thu, 2019-08-22 at 09:54 +0200, Marek Vasut wrote:
> On 8/22/19 9:40 AM, Chee, Tien Fong wrote:
> >
> > On Mon, 2019-07-29 at 15:48 +0800, tien.fong.chee at intel.com wrote:
> > >
> > > 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"
> > Any comment?
> UBI is able to obtain underlying media erase block size from the MTD
> subsystem, just let it do that. Besides, any such compile-time config
> would fail the next time you change the SPI NOR (e.g. because it's
> EOL),
> as that would force you to rebuild U-Boot, which might ultimately not
> be
> possible.
Okay, let me check how to get this info from MTD. If you have some
ideas, you can let me know too :) .
next prev parent reply other threads:[~2019-08-23 3:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2019-08-23 7:16 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1566530997.13015.1.camel@intel.com \
--to=tien.fong.chee@intel.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox