From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Reading from NAND
Date: Fri, 18 Feb 2011 12:54:58 -0600 [thread overview]
Message-ID: <20110218125458.62beea47@schlenkerla> (raw)
In-Reply-To: <AANLkTikvgGvhgf-K04mn75EEYXEzwvOFHsy=uZ=1HO77@mail.gmail.com>
On Fri, 18 Feb 2011 08:29:45 -0500
D Kesselring <kesselringd@gmail.com> wrote:
> Hello,
> I am trying to add some code to U-Boot that will read a NAND location
> to determine how to setup some environment variables. I am using a
> LogicPD SOM board with an OMAP3503 (very similar to Zoom). I have
> found the code that handles the user nand commands and am trying to
> use ?nand_read_skip_bad?. This needs a ?nand_info_t*? which I was
> trying to get from the global ?nand_info[]? but it does not seem to be
> initialized. My questions are (1) is the the best way to do this and
> (2) if so, how do I get ?nand_info[]? initialized.
As Wolfgang pointed out, the best way is probably using scripting (and
certainly not by hacking up main_loop()), and thus you won't be calling
nand_raed_skip_bad() directly. But that still requires NAND to have been
initialized.
You need a NAND controller driver. This driver supplies board_nand_init(),
or in some cases may be called by board_nand_init() that platform code
supplies.
I'm not familiar with OMAP chips, but perhaps drivers/mtd/nand/omap_gpmc.c
is the driver you want? In which case your board config file needs to
define CONFIG_NAND_OMAP_GPMC, as well as any driver-specific defines there
may be.
-Scott
next prev parent reply other threads:[~2011-02-18 18:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 13:29 [U-Boot] Reading from NAND D Kesselring
2011-02-18 13:40 ` Wolfgang Denk
[not found] ` <AANLkTik3hq8tUc5-Uh23G=F0Of2q8QNzJ2fO+JCr3wZy@mail.gmail.com>
2011-02-19 19:59 ` Wolfgang Denk
[not found] ` <AANLkTimn1deSepOQOUTVbD=c5-njULYNc=tqAw9TKUBm@mail.gmail.com>
2011-02-19 20:01 ` Wolfgang Denk
2011-02-18 18:54 ` Scott Wood [this message]
2011-02-18 19:48 ` D Kesselring
2011-02-18 19:55 ` Scott Wood
2011-02-18 22:48 ` Wolfgang Denk
2011-02-19 15:57 ` D Kesselring
2011-02-19 19:41 ` Wolfgang Denk
2011-02-21 19:43 ` D Kesselring
2011-02-21 20:48 ` Wolfgang Denk
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=20110218125458.62beea47@schlenkerla \
--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 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.