public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/4] Add CONFIG_SPL_NAND_IDENT
@ 2018-01-14 16:14 Jörg Krause
  2018-01-14 16:14 ` [U-Boot] [PATCH 1/4] mtd: nand: export nand_get_flash_type function Jörg Krause
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jörg Krause @ 2018-01-14 16:14 UTC (permalink / raw)
  To: u-boot

When adding SPL support to a custom i.MX6ULL board with Toshiba
TC58NVG0S3 NAND chip the MXS NAND SPL loader failed with "Failed to
identify". This reason is that the SPL MXS NAND driver only supports
ONFi-compliant NAND chips and the mentioned Toshiba NAND chip is
non-ONFi.

This patch set makes `nand_get_flash_type()` from `nand_base.c` public,
so it can be used by any SPL NAND driver, introduced a new config option
`CONFIG_SPL_NAND_IDENT` to enable the lookup for supported NAND chips in
the chip ID list. Finally, the MXS NAND SPL driver is refactored so that
the original ONFi-only identification routine is enabled by default. For
non-ONFi NAND chips the newly introduced config option can be used.

In my setup the binary size of `u-boot-spl.bin` is increased by about
13 kB when `CONFIG_SPL_NAND_IDENT` is enabled. As the i.MX6, as well as
the i.MX28, both have an OCRAM of 128 kB the increase in the binary size
is reasonable.

Jörg Krause (4):
  mtd: nand: export nand_get_flash_type function
  spl, nand: add option CONFIG_SPL_NAND_IDENT to lookup for supported
    NAND chips
  mtd: nand: mxs_nand_spl: refactor mxs_flash_ident
  mtd: nand: mxs_nand_spl: add mxs_flash_full_ident

 README                          |  4 ++++
 drivers/mtd/nand/Makefile       |  1 +
 drivers/mtd/nand/mxs_nand_spl.c | 37 ++++++++++++++++++++++++++++++++++++-
 drivers/mtd/nand/nand_base.c    |  3 ++-
 include/linux/mtd/rawnand.h     | 10 +++++++---
 scripts/config_whitelist.txt    |  1 +
 6 files changed, 51 insertions(+), 5 deletions(-)

-- 
2.15.1

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

end of thread, other threads:[~2018-01-14 18:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-14 16:14 [U-Boot] [PATCH 0/4] Add CONFIG_SPL_NAND_IDENT Jörg Krause
2018-01-14 16:14 ` [U-Boot] [PATCH 1/4] mtd: nand: export nand_get_flash_type function Jörg Krause
2018-01-14 17:55   ` Fabio Estevam
2018-01-14 18:22     ` Jörg Krause
2018-01-14 16:14 ` [U-Boot] [PATCH 2/4] spl, nand: add option CONFIG_SPL_NAND_IDENT to lookup for supported NAND chips Jörg Krause
2018-01-14 16:14 ` [U-Boot] [PATCH 3/4] mtd: nand: mxs_nand_spl: refactor mxs_flash_ident Jörg Krause
2018-01-14 16:14 ` [U-Boot] [PATCH 4/4] mtd: nand: mxs_nand_spl: add mxs_flash_full_ident Jörg Krause

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