[U-Boot] [PATCH 4/6] davinci_emac: fix for running with dcache enabled

Ilya Yanok yanok at emcraft.com
Sun Oct 9 12:41:47 CEST 2011


Hi Mike,

On 07.10.2011 21:34, Mike Frysinger wrote:
>> +#ifdef DAVINCI_EMAC_DCACHE
>> +static inline void davinci_flush(void *addr, int size)
>> +{
>> +	flush_dcache_range((unsigned long)addr,
>> +			(unsigned long)addr + size);
>> +}
>> +
>> +static inline void davinci_invalidate(void *addr, int size)
>> +{
>> +	invalidate_dcache_range((unsigned long)addr,
>> +			(unsigned long)addr + size);
>> +}
>> +#else
>> +#define davinci_flush(addr, size)	do {} while (0)
>> +#define davinci_invalidate(addr, size)	do {} while (0)
>> +#endif
> 
> does it really make sense to have this be conditional ?

arm926ejs doesn't have {invalidate,flush}_dcache_range(), so we have to
add this not to break the driver on DaVinci boards (maybe we need to add
empty cache functions on arm926ejs instead?)

Regards, Ilya.



More information about the U-Boot mailing list