[uClinux-dev] [PATCH 3/3] m68knommu: Add ethernet driver for MCF547x/MCF548x

Philippe De Muyter phdm at macqel.be
Tue Sep 25 16:20:07 EDT 2012


Hello Stany

[CCing uclinux-dev]

On Tue, Sep 25, 2012 at 06:07:45PM +0200, Stany MARCEL wrote:
> Hello Philippe,
> 
> I have to do the following modification to compile your drivers with MMU enabled :
> 
> diff --git a/drivers/net/ethernet/freescale/fec_m54xx.c b/drivers/net/ethernet/freescale/fec_m54xx.c
> index 4204a14..f6cafc6 100644
> --- a/drivers/net/ethernet/freescale/fec_m54xx.c
> +++ b/drivers/net/ethernet/freescale/fec_m54xx.c
> @@ -41,6 +41,10 @@
>   */
>  #define flush_and_invalidate_dcache() flush_cache_all()
>  
> +#ifdef CONFIG_MMU
> +#define        flush_dcache_range(A, L) flush_cf_dcache(A, L)
> +#endif
> +
>  #include "fec_m54xx.h"
>  #include <linux/phy.h>

Unfortunately, that's wromg.  Read the comment in
arch/m68k/include/asm/cacheflush_mm.h :

/*
 * Use the ColdFire cpushl instruction to push (and invalidate) cache lines.
 * The start and end addresses are cache line numbers not memory addresses.
 */

So IIRC flush_cf_icache, flush_cf_dcache and flush_cf_bcache seemed uselesss
to me.

You should rather use 'mcf_cache_push'.
> 
> 
> 
> I'll keep you informed of my results.

Thanks

Philippe


More information about the uClinux-dev mailing list