[U-Boot] [PATCH] [ARM] Move machine specific code to board at s3c64xx
Wolfgang Denk
wd at denx.de
Thu Oct 23 10:49:59 CEST 2008
Dear Guennadi Liakhovetski,
In message <Pine.LNX.4.64.0810230954380.4977 at axis700.grange> you wrote:
>
> > > + /* Xm0CSn[2] = OneNANDC CS0 or NFCON CS0, Xm0CSn[3] = SROMC CS3 */
> >
> > Right, and also add OneNAND & NFCON is depends on XNANDSEL.
>
> In the datasheet this signal is called XSELNAND. And I don't think we have
> to quote this in the comment. This is a hardware configuration issue, not
> software, and we are not explaining the complete NAND configuration here,
> otherwise we would have to mention OM signals too, maybe more.
Hey, actually I do think that describing which hardware configurations
the software performs is a Good Thing (TM).
I do NOT want to have to look up each and every bit in the reference
manual when reading the source code.
Meaningful names are a good thing, also - much better than cryptic
numbers everywhere.
> > In OneNAND board, it should be set as 0x1002
>
> Sorry, do not understand what "it." If you mean the MEM_SYS_CFG then I
> also don't understand this. As I quoted from the datasheet above, bit 1
> set to 0 (0 << 1) is for _both_ - NAND or OneNAND. You suggest to set it
> to 1, which is SROMC CS2. And (1 << 12) is the data bus width, which also
> doesn't seem to be directly related to the NAND / OneNAND selection. Or
> did you mean another register?
Get rid of these magic numbers. Use readable constants everywhere!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Suffocating together ... would create heroic camaraderie.
-- Khan Noonian Singh, "Space Seed", stardate 3142.8
More information about the U-Boot
mailing list