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 v2] mtd: nand: allow to skip BBT scanning during NAND inititialization
Date: Tue, 4 Nov 2014 23:45:44 -0600	[thread overview]
Message-ID: <1415166344.23458.354.camel@snotra.buserror.net> (raw)
In-Reply-To: <20141105123945.CB20.AA925319@jp.panasonic.com>

On Wed, 2014-11-05 at 12:39 +0900, Masahiro Yamada wrote:
> [2] There is no good place to insert a callback to an SoC file.
> I need to write parameters such as page_size to hardware registers.
> (You can see my code, nand_denali_fixup() in arch/arm/cpu/armv7/uniphier/board_late_init.c)
> 
>    The NAND init procedure of U-Boot is like this:
> 
>    (1) board_nand_init()   (drivers/mtd/nand/denali.c)
>    (2) nand_scan_ident()   (drivers/mtd/nand/nand_base.c)
>    (3) nand_scan_tail()    (drivers/mtd/nand/nand_base.c)
> 
> 
> 
>   (2) detects the device size and set mtd->write_size,
>    mtd->erase_size, mtd->oob_size.
>   I need to set these values to the Denali hardware, but
>   the Denali driver code is called at (1) which is called
>   before the detection of the device size.
> 
>    In Linux, nand_scan_ident() and nand_scan_tail() are called
>    from each of NAND drivers, so we can use the values which
>    have been set during nand_scan_ident().
> 
>    In U-Boot, I think it is impossible.

If you use CONFIG_SYS_NAND_SELF_INIT you can insert code between
nand_scan_ident() and nand_scan_tail(), just like in Linux.

-Scott

  reply	other threads:[~2014-11-05  5:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 12:25 [U-Boot] [PATCH v2] mtd: nand: allow to skip BBT scanning during NAND inititialization Masahiro Yamada
2014-11-03 21:40 ` Scott Wood
2014-11-03 21:47   ` Scott Wood
2014-11-05  3:39   ` Masahiro Yamada
2014-11-05  5:45     ` Scott Wood [this message]
2014-11-11 13:10       ` Masahiro Yamada

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=1415166344.23458.354.camel@snotra.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