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

Greg Ungerer gerg at snapgear.com
Wed Sep 26 08:07:53 EDT 2012


On 09/26/2012 06:20 AM, Philippe De Muyter wrote:
> 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)

Drivers shouldn't be calling these architecture flush functions at all.
They must use the DMA API and the functions it defines. See

   Documentation/DMA-API.txt

For example look at the use of dma_map_single()/dma_unmap_single()
in drivers/net/ethernet/freescale/fec.c. (Ignore the almost certainly
bogus cache_flush_all() for CONFIG_M532x).

Regards
Greg



------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg at snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close,                            FAX:         +61 7 3891 3630
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com



More information about the uClinux-dev mailing list