All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Getting rid of board_mtdparts_default()
Date: Thu, 15 Nov 2018 16:57:50 +0100	[thread overview]
Message-ID: <20181115165750.02859dbe@bbrezillon> (raw)

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

             reply	other threads:[~2018-11-15 15:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 15:57 Boris Brezillon [this message]
2018-11-15 22:18 ` [U-Boot] Getting rid of board_mtdparts_default() 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

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=20181115165750.02859dbe@bbrezillon \
    --to=boris.brezillon@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.