Dear Jason Liu, In message <cab4phkdj0prr3etkkz5psqkpgs69cfzepy83gw-apqkcfky...@mail.gmail.com> you wrote: > > > What about the following change? > > > > #ifndef CONFIG_SYS_DCACHE_OFF > > dcache_enable(); > > #else > > puts("WARNING: Caches not enabled\n"); > > #endif > > Or better: > > #ifdef CONFIG_SYS_DCACHE_ON > dcache_enable(); > #else > puts("WARNING: Caches not enabled\n"); > #endif > > In fact, we can turn on I-cache safely by default, turn-off D-cache by > default, > But give big warning to board-maintainer to fix it later if turn off D-cache.
This is NOT better, it is worse. The rule is that you don't need to #define a specific option if you want default behaviour. Default behaviour should be caches on, so only "broken" boards where this does not work yet should be able to opt out by defining some option. 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 There are some things worth dying for. -- Kirk, "Errand of Mercy", stardate 3201.7 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot