Hi Wolfgang, On Wed, Nov 9, 2011 at 11:12 AM, Wolfgang Denk <w...@denx.de> wrote: > In message <1320830586-19124-1-git-send-email-christian.rie...@omicron.at> > you wrote: >> This patch allows replacing arch_cpu_init() if a custom initialization >> is required. >> >> Signed-off-by: Christian Riesch <christian.rie...@omicron.at> >> Cc: Sandeep Paulraj <s-paul...@ti.com> >> Cc: Heiko Schocher <h...@denx.de> >> --- >> arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 1 + >> 1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c >> b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c >> index 327ff97..fe142dc 100644 >> --- a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c >> +++ b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c >> @@ -263,6 +263,7 @@ void nand_boot(void) >> #if defined(CONFIG_NAND_SPL) >> void board_init_f(ulong bootflag) >> #else >> +__attribute__ ((weak)) >> int arch_cpu_init(void) >> #endif > > Stop please. > > This whole code is crap and needs to be changed. > > > 281 asm("mrc p15, 0, r0, c1, c0, 0"); > 282 /* clear bits 13, 9:8 (--V- --RS) */ > 283 asm("bic r0, r0, #0x00002300"); > 284 /* clear bits 7, 2:0 (B--- -CAM) */ > 285 asm("bic r0, r0, #0x00000087"); > 286 /* set bit 2 (A) Align */ > 287 asm("orr r0, r0, #0x00000002"); > 288 /* set bit 12 (I) I-Cache */ > 289 asm("orr r0, r0, #0x00001000"); > 290 asm("mcr p15, 0, r0, c1, c0, 0"); > > What is #0x00002300? #0x00000087? #0x00000002? #0x00001000? > > 293 writel(0x83e70b13, &davinci_syscfg_regs->kick0); > 294 writel(0x95a4f1e0, &davinci_syscfg_regs->kick1); > > What is 0x83e70b13? 0x95a4f1e0? > > 296 dv_maskbits(&davinci_syscfg_regs->suspsrc, > 297 ((1 << 27) | (1 << 22) | (1 << 20) | (1 << 5) | (1 << > 16))); > > What is ((1 << 27) | (1 << 22) | (1 << 20) | (1 << 5) | (1 << 16))) ? > > 336 /* > 337 * Fix Power and Emulation Management Register > 338 * see sprufw3a.pdf page 37 Table 24 > 339 */ > 340 writel(readl((CONFIG_SYS_NS16550_COM1 + 0x30)) | 0x00006001, > 341 (CONFIG_SYS_NS16550_COM1 + 0x30)); > > What is CONFIG_SYS_NS16550_COM1 + 0x30 ???? don't we have proper > NS16550 register definitions? And what is 0x00006001 ?? > > > All this needs a _thorough_ cleanup before I'm willing to accept this > for mainline.
This is already in mainline, see commit 310ae55efe14aa7923b16c718cbdb22ec364b18b Author: Heiko Schocher <h...@denx.de> Date: Wed Sep 14 19:59:38 2011 +0000 arm, davinci, am1808: add lowlevel functions for booting from NOR Regards, Christian > > > Heiko, Christian: please negotiate who performs which part of the > cleanup. But I expect that with proper symbolic names instead of the > hardwired constants the need for a wek function will go away. > > Albert, please make sure to block this current code. I do not want to > see this in mainline as is. > > > Thanks. > > 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: w...@denx.de > Another megabytes the dust. > _______________________________________________ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot