[coreboot] [PATCH] cs5536/nand: Allow setting of NAND timing values in the dts.
rminnich at gmail.com
Mon Feb 9 17:35:09 CET 2009
On Mon, Feb 9, 2009 at 8:21 AM, Mart Raudsepp
<mart.raudsepp at artecdesign.ee> wrote:
> Ühel kenal päeval, E, 2009-02-09 kell 08:04, kirjutas ron minnich:
>> nice to see people using the dts now!
> It's a bit hard to use it for the LBAR setup as well (the code in
> chipset_flash_setup() in cs5536.c), as it needs to happen before VSA
> init, and VSA init is done in northbridge domain phase2_fixup - so we
> don't have a phase for NAND device to run before VSA is inited.
> Otherwise I'd use the NAND initialization from chipsetinit() to some
> nand_phase1 as well.
>> Acked-by: Ronald G. Minnich <rminnich at gmail.com>
> I'm going to have to NAK this myself, as it doesn't compile with my gcc
> if there is no NAND device in the mainboard dts, as there is no
> southbridge_amd_cs5536_nand_config in statictree.h then, and gcc
> complains about
> /home/leio/dev/coreboot-v3/southbridge/amd/cs5536/cs5536.c:119: error:
> dereferencing pointer to incomplete type
The problem is that you have to have a separate compilation unit if
you have seperate dts objects.
If you really want to separate out the nand dts, as you have done:
then you need to have a southbridge/amd/cs5536/nand.c. See the other
parts for example.
If you want to keep the code in cs5536.c, then you'll have to put the
settings in the cs5536 dts.
> How should I approach this?
See what I did in the sb600.
> On another note, can we cleanly avoid compiling all this NAND init code
> in for the boards that surely do not have a NAND device as it can't be a
> dynamic device?
Yes. put it in its own file. That's what makefiles are for. Then those
boards that have nand:
add nand.c to the Makefile
use the nand dts you set up.
> important though, as the code footprint is probably negligible.
This is the really key point. We decided in a heated discussion a few
months back that on, e.g., sb600, we'd compile all code in, whether
used or not. But in your case, with this nand stuff, you might as
seperate out the code in nand.c
More information about the coreboot