public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] [NAND] Add board_nand_init_tail to give board module a	chance to init after NAND chip is scaned.
Date: Fri, 8 Aug 2008 09:49:33 -0500	[thread overview]
Message-ID: <20080808144933.GB4825@loki.buserror.net> (raw)
In-Reply-To: <1516faed0808071906g118e3bf1ted560f41ad4dec12@mail.gmail.com>

On Fri, Aug 08, 2008 at 10:06:03AM +0800, Hong Xu wrote:
> Sometimes, board module needs to know some information about the NAND
> chip e.g. page size to continue it's initialization. This short patch
> give board module a chance to continue its initialization after the
> NAND chip is scaned.
[snip]
>  	nand->IO_ADDR_R = nand->IO_ADDR_W = (void  __iomem *)base_addr;
>  	if (board_nand_init(nand) == 0) {
> -		if (nand_scan(mtd, 1) == 0) {
> +		if ((nand_scan(mtd, 1) == 0) && (board_nand_init_tail(nand) == 0)) {
>  			if (!mtd->name)
>  				mtd->name = (char *)default_nand_name;
>  		} else

This doesn't give the board driver a chance to run before the bad block
scan, though.  The MTD code itself does (nand_scan_ident and nand_scan_tail,
around which nand_scan is a wrapper), but the u-boot glue code doesn't
currently let board drivers take advantage of that.

I'd like to transition away from having a centralized nand_init(), and
instead have the board drivers call nand_scan*() themselves.

-Scott

      parent reply	other threads:[~2008-08-08 14:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08  2:06 [U-Boot] [PATCH] [NAND] Add board_nand_init_tail to give board module a chance to init after NAND chip is scaned Hong Xu
2008-08-08  2:41 ` Jerry Van Baren
2008-08-08  9:27 ` Wolfgang Denk
2008-08-08 11:39 ` Haavard Skinnemoen
2008-08-08 14:49 ` Scott Wood [this message]

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=20080808144933.GB4825@loki.buserror.net \
    --to=scottwood@freescale.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