[Fwd: [PATCH][RFC] ppc32: TEMAC driver for ML403]

David H. Lynch Jr. dhlii at dlasys.net
Fri Aug 4 02:39:59 EST 2006


Edward Bockhoefer wrote:
> Thank you for the reply David,
> I have started the montavista 10/100 enet port from the xilinx edk
> generated 2.4 driver to the 2.6 driver. Unfortunately, I can't post
> the driver port publicly because it's not GLP'd, as far as I know. We
> only needed a 10/100 mac, so we didn't bother with a TEMAC. I will
> work on this more today. If you want to send me your TEMAC code,
> please do so. I can always use the reference.

    The original message for the GB TEMAC 2.6 patch is below. It is from
Andrei Konovalov.
   
      I think it is just a newer version of the 2.4 Driver. Regardless
it just worked for me. I had to make a very minor change - I added an
"u32 spd" to the private data structure, initialized it to 10 (I am on a
10Mhz Net), and found every reference to 1000Mhz replaced it with
lp->spd; There was one place I needed a switch statement to load the
appropriate value. I think there were only 3 really trivial changes. I
would post my changes but I am not setup to post them as a patch right
now. If you really want them I will just send my adaptor.c and you can
use everything else from the patch referenced below.

    I have also attached my Local Link TEMAC code. That is basically a
single file driver. Again I am not able to provide it as a patch at the
moment. It (much like the PLB TEMAC driver) requires a platform data
entry for the LL TEMAC in your Board support code. Though it could be
fairly trivially changed to work from defines. I beleive there are only
2 critical values - the DCR base address, the TEMAC memory address.
There is an IRQ value, but I can only get the LL TEMAC to generate PHY
interupts, so the driver is polled. It does work albeit with lots of
dropped packets, but that is probably debugging code and optimizing the
poll rate.
    The driver is solely my own work based loosely on several other
drivers, and is GPL'd. According to my client LL TEMAC performance has
tested abysmally in comparision to the PLB TEMAC, however the kicker was
the inability to generate rx interupts. We are working on other OS
ports, and some do not have strictly polled options, so for  now the LL
TEMAC is on the back burner.
   
    Of course I have learned an incredible amount about Linux Network
Drivers as well as now having a reasonable understanding of the
differences between the assorted Xilinx TEMAC's



-------- Original Message --------
Return-Path: 	<linuxppc-embedded-bounces+dhlii=dlasys.net at ozlabs.org>
Received: 	from colinux.fixit1.net (colinux.fixit1.com [216.37.233.220])
by xm.dlasys.net (Cyrus v2.2.12-Debian-2.2.12-4) with LMTPA; Tue, 14 Mar
2006 00:34:38 -0500
X-Sieve: 	CMU Sieve 2.2
Received: 	from ozlabs.org ([203.10.76.45]:45331) by colinux.fixit1.net
with esmtp (Exim 4.50 #1 (Debian)) id 1FIny3-0002KK-J4 for
<dhlii at dlasys.net>; Mon, 13 Mar 2006 09:24:16 -0500
Received: 	from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org
(Postfix) with ESMTP id 628F067B23 for <dhlii at dlasys.net>; Tue, 14 Mar
2006 01:17:33 +1100 (EST)
X-Original-To: 	linuxppc-embedded at ozlabs.org
Delivered-To: 	linuxppc-embedded at ozlabs.org
Received: 	from mail.dev.rtsoft.ru (unknown [85.21.88.2]) by ozlabs.org
(Postfix) with SMTP id A94B7679E2 for <linuxppc-embedded at ozlabs.org>;
Tue, 14 Mar 2006 01:17:21 +1100 (EST)
Received: 	(qmail 31931 invoked from network); 13 Mar 2006 14:17:16 -0000
Received: 	from unknown (HELO ?192.168.1.108?) (192.168.1.108) by
mail.dev.rtsoft.ru with SMTP; 13 Mar 2006 14:17:16 -0000
Message-ID: 	<44157EEF.5000900 at ru.mvista.com>
Date: 	Mon, 13 Mar 2006 17:17:19 +0300
From: 	Andrei Konovalov <akonovalov at ru.mvista.com>
User-Agent: 	Mozilla Thunderbird 1.0.2-6 (X11/20050513)
X-Accept-Language: 	en-us, en
MIME-Version: 	1.0
To: 	linuxppc-embedded list <linuxppc-embedded at ozlabs.org>
Subject: 	[PATCH][RFC] ppc32: TEMAC driver for ML403
X-BeenThere: 	linuxppc-embedded at ozlabs.org
X-Mailman-Version: 	2.1.7
Precedence: 	list
List-Id: 	Linux on Embedded PowerPC Developers Mail List
<linuxppc-embedded.ozlabs.org>
List-Unsubscribe:
<https://ozlabs.org/mailman/listinfo/linuxppc-embedded>,
<mailto:linuxppc-embedded-request at ozlabs.org?subject=unsubscribe>
List-Archive: 	<http://ozlabs.org/pipermail/linuxppc-embedded>
List-Post: 	<mailto:linuxppc-embedded at ozlabs.org>
List-Help: 	<mailto:linuxppc-embedded-request at ozlabs.org?subject=help>
List-Subscribe:
<https://ozlabs.org/mailman/listinfo/linuxppc-embedded>,
<mailto:linuxppc-embedded-request at ozlabs.org?subject=subscribe>
Content-Type: 	text/plain; charset="us-ascii"
Content-Transfer-Encoding: 	7bit
Sender: 	linuxppc-embedded-bounces+dhlii=dlasys.net at ozlabs.org
Errors-To: 	linuxppc-embedded-bounces+dhlii=dlasys.net at ozlabs.org



Here:
   http://source.mvista.com/~ank/paulus-powerpc/20060309/
is an StGIT patchset against
   516450179454de9e689e0a53ed8f34b896e8651c
   branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

virtex-ppc_sys_devices-fix.patch - is the same fix posted by Grant Likely few days ago (only formatting is different),
ppc32_xilinx_edk_temac.patch - the low level code from EDK-7.1i used by the this driver
ppc32_xilinx_edk_temac_mods.patch - few modifications to EDK-7.1i code to get rid of compiling the xparameters.h
   #defines into the driver. These mods should not be needed after EDK-8.1 SP2 is released.
ppc32_xilinx_temac.patch - the linux driver itself
ppc32_xilinx_ml403_temac.patch - modifications to the ML403 platform code to add TEMAC.
temac.paulus-powerpc.20060309.tgz - all the patches put together into a tarball (just in case).
temac.config - .config used.

This is not the final version yet (no MII support; SGDMA is operational, but seems to need some additional work).
And I would probably wait for EDK-8.1 SP2 (up to one month or so) where both the TEMAC IP and the EDK code
should be updated.

But it would be nice to know if there is anything to rework in the current code to get the driver
accepted into linux/kernel/git/paulus/powerpc.git or linux/kernel/git/torvalds/linux-2.6.git tree.

And probably someone could start playing with the current driver now. At least I was able to mount
the root over NFS and to run several netperf tests.


Thanks,
Andrei
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded at ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


-- 
Dave Lynch 					  	    DLA Systems
Software Development:  				         Embedded Linux
717.627.3770 	       dhlii at dlasys.net 	  http://www.dlasys.net
fax: 1.253.369.9244 			           Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.

"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060803/7107ef8c/attachment.htm 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temac.c
Url: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060803/7107ef8c/attachment.txt 


More information about the Linuxppc-embedded mailing list