Re: [PATCH 3/3] m68knommu: Add ethernet driver for MCF547x/MCF548x

Greg Ungerer <[email protected]>
Newsgroups gmane.linux.uclinux.devel
Message-ID <[email protected]>
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:     [email protected]
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
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.