public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Getting rid of board_mtdparts_default()
@ 2018-11-15 15:57 Boris Brezillon
  2018-11-15 22:18 ` Enric Balletbo Serra
  0 siblings, 1 reply; 5+ messages in thread
From: Boris Brezillon @ 2018-11-15 15:57 UTC (permalink / raw)
  To: u-boot

Hello Enric,

Miquel and I recently reworked drivers/mtd/mtdpart.c to get MTD
partitions exposed as MTD devices (as is done in Linux) instead of
having yet another abstraction to handle them (see what's currently
done in cmd/{mtdparts,nand,sf,...}.c).

This lead us to duplicate the mtdparts/mtdids parsing logic we found in
cmd/mtdparts.c, and while doing that we noticed that one function is
only implemented by igep boards: board_mtdparts_default().

We'd like to get rid of this function if possible in order to simplify
the mtdparts/mtdids retrieval logic, and there might be an easy
solution to do that: use the CONFIG_{MTDPARTS,MTDIDS}_DEFAULT config
options

CONFIG_MTDPARTS_DEFAULT="omap2-nand:512k(SPL),-(UBI);omap2-onenand:512k(SPL),-(UBI)"
CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand,onenand0=omap2-onenand"

It seems those defaults were built at runtime, and the only thing I'm
not sure about is whether 512k for the SPL is always good. Looks like
4 eraseblocks are reserved for the SPL [1], but is the eraseblock size
always 128k? If you don't know about the eraseblock size, maybe you
know which OneNAND/NAND parts are used on these boards?

Regards,

Boris

[1]https://elixir.bootlin.com/u-boot/latest/source/board/isee/igep00x0/igep00x0.c#L254

-- 
Boris Brezillon, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2018-11-17  9:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-15 15:57 [U-Boot] Getting rid of board_mtdparts_default() Boris Brezillon
2018-11-15 22:18 ` Enric Balletbo Serra
2018-11-15 22:40   ` Boris Brezillon
2018-11-16 22:30     ` Enric Balletbo Serra
2018-11-17  9:20       ` Boris Brezillon

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