[U-Boot] [PATCH] [ARM] Move machine specific code to board at s3c64xx

Wolfgang Denk wd at denx.de
Thu Oct 23 10:16:24 CEST 2008


Dear Guennadi Liakhovetski,

In message <Pine.LNX.4.64.0810230927050.4977 at axis700.grange> you wrote:
> 
> 2. While at it, we could fix the value being written to the MEM_SYS_CFG 
>    register too. Currently it writes 0xd = 
> 
>   (1 << 0) - ignored, default 0, so, better set it to 0
> | (0 << 1) - set Xm0CSn[2] to OneNANDC CS0 or NFCON CS0
> | (1 << 2) - ignored, default 0, so, better set it to 0
> | (1 << 3) - set Xm0CSn[3] to SROMC CS3
> 
> So, we should just write an 8 in it:
> 
> +	mov	r1, #0x8
> +	str	r1, [r0]

No, you should not use magic numbers like 0x08 or 0x0d which nobody
can read but use meaningful preprocessor constants here so we actually
understand the code without looking up the bits in the documentation.

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
Death, when unnecessary, is a tragic thing.
	-- Flint, "Requiem for Methuselah", stardate 5843.7


More information about the U-Boot mailing list