public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/7] spl: nand: sunxi: implement auto-detection
@ 2016-06-01 11:23 Boris Brezillon
  2016-06-01 11:23 ` [U-Boot] [PATCH v2 1/7] spl: nand: sunxi: remove support for so-called 'syndrome' mode Boris Brezillon
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Boris Brezillon @ 2016-06-01 11:23 UTC (permalink / raw)
  To: u-boot

Hello,

This patch series aims at adding support for NAND auto-detection to
the sunxi SPL NAND driver.

As explained in patch 7, this auto-detection is nothing more than a
dumb "trial and error" logic, but it allows one to use the same
SPL binary for all kind of sunxi boards booting from NAND.
Of course, this approach might increase a bit the boot-time, but this
is something we could address by adding a "default NAND config",
that would be tested before launching the auto-detection procedure.

Now let's detail a bit what's inside this patch-set.
Patch 1 is a cleanup removing support for BootROM configs, which in
my opinion are not only inefficient but also not reliable (at least
the current implementation does not guarantee that you'll be using
the correct configuration when reading the NAND).

Piotr, Hans, any comment?
Is this a real problem if we get rid of syndrome/BootROM configs?
I mean, are you really using this mode? If that's not the case, I'd
prefer dropping support for this feature. ITOH, if you really
need this mode, then I'd recommend adding Kconfig options to specify
the exact config to be used rather than randomly testing configs
(see my explanation in patch 1).

Patch 2 is renaming the SYS_NAND_U_BOOT_OFFS Kconfig option to make it
usable on all platforms (not only sunxi) and avoid conflicts when
one board is defining CONFIG_SYS_NAND_U_BOOT_OFFS in its
include/configs/<board>.h header.

Patch 3 is adding generic support for redundant u-boot images, which
is particularly useful on modern NANDs where corruptions is likely to
happen.
Patch 4 is just getting rid of the open-coded version of redundant
u-boot image support in the sunxi NAND driver.

Patch 5 is a simple improvement of the NAND controller status polling
loop, which is really important to make the "trial and error"
approach efficient (we try to limit the impact on boot-time here).
Patch 6 and 7 are implementing the auto-detection logic.

Best Regards,

Boris

Changes since v1:
- added Hans ack
- fixed 2 typos in patch 7

Boris Brezillon (7):
  spl: nand: sunxi: remove support for so-called 'syndrome' mode
  spl: nand: rename the SYS_NAND_U_BOOT_OFFS Kconfig option
  spl: nand: support redundant u-boot image
  spl: nand: sunxi: stop guessing the redundant u-boot offset
  spl: nand: sunxi: rework status polling loop
  spl: nand: sunxi: split 'load page' and 'read page' logic
  spl: nand: sunxi: add support for NAND config auto-detection

 common/spl/spl_nand.c             |  12 +
 drivers/mtd/nand/Kconfig          |  15 +-
 drivers/mtd/nand/sunxi_nand_spl.c | 480 ++++++++++++++++++++++++--------------
 3 files changed, 332 insertions(+), 175 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2016-06-06 18:40 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01 11:23 [U-Boot] [PATCH v2 0/7] spl: nand: sunxi: implement auto-detection Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 1/7] spl: nand: sunxi: remove support for so-called 'syndrome' mode Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 2/7] spl: nand: rename the SYS_NAND_U_BOOT_OFFS Kconfig option Boris Brezillon
2016-06-04  1:08   ` Scott Wood
2016-06-04  6:06     ` Boris Brezillon
2016-06-04  7:14       ` Scott Wood
2016-06-04 11:06         ` Boris Brezillon
2016-06-06 17:16           ` Scott Wood
2016-06-06 18:40             ` Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 3/7] spl: nand: support redundant u-boot image Boris Brezillon
2016-06-04  1:15   ` Scott Wood
2016-06-04  6:15     ` Boris Brezillon
2016-06-04  7:17       ` Scott Wood
2016-06-01 11:23 ` [U-Boot] [PATCH v2 4/7] spl: nand: sunxi: stop guessing the redundant u-boot offset Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 5/7] spl: nand: sunxi: rework status polling loop Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 6/7] spl: nand: sunxi: split 'load page' and 'read page' logic Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 7/7] spl: nand: sunxi: add support for NAND config auto-detection Boris Brezillon
2016-06-01 12:35   ` [U-Boot] [linux-sunxi] " Siarhei Siamashka
2016-06-01 13:22     ` Boris Brezillon
2016-06-01 13:22     ` Maxime Ripard

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