From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Tue, 19 Jul 2011 17:21:32 +0530 Subject: [U-Boot] i.MX51: FEC: Cache coherency problem? In-Reply-To: <4E256588.4010301@arcor.de> References: <20110718171836.67bfe605@archvile> <4E245C5C.4030303@ti.com> <4E256588.4010301@arcor.de> Message-ID: <4E256FC4.1030102@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Matthias, On Tuesday 19 July 2011 04:37 PM, Matthias Wei?er wrote: > Dear Aneesh > > Am 18.07.2011 18:16, schrieb Aneesh V: >> commit c2dd0d45540397704de9b13287417d21049d34c6 >> armv7: integrate cache maintenance support >> >> In this patch I added a call to dcache_enable() at the beginning of >> board_init_r() for ARM(i.e. as soon as relocation is over). As a result >> D-cache will be enabled for all ARM platforms now unless >> CONFIG_SYS_DCACHE_OFF is set. > > Is this really a good idea? This will break a couple of boards using > non-cache-aware drivers. And there are a couple of them in u-boot. I > think d-cache should be opt-in rather then opt-out as long as there are > any drivers which didn't handle cached memory regions correct. i-cache > is much less problematic and can be enabled by default. D-cache was always an opt-out in u-boot based on the fact that the flag was CONFIG_SYS_DCACHE_OFF and not something like CONFIG_SYS_DCACHE_ENABLE. I just made the behavior more consistent and predictable. Also, my idea was to enable it(if allowed by the config flag) at the earliest possible time rather than waiting for a random driver or board file to enable it much later. Regarding the question of whether it should be opt-out or opt-in I have no preference myself. best regards, Aneesh