On Fri, 18 Feb 2011 08:29:45 -0500
D Kesselring <kesselri...@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

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to