Linux-2.6.9 - MPC8260 FCC/MDIO improvements (I hope !)

miguel.valero at axxessit.no miguel.valero at axxessit.no
Wed Nov 10 03:04:18 EST 2004


I send it again, this time to the right list address, hopefuly.

Miguel

----- Forwarded by Miguel Valero/AxxessIT on 09.11.04 16:55 -----


Miguel Valero
28.10.04 14:11

 
        To:     paulus at samba.org, trini at kernel.crashing.org
        cc:     linuxppc-dev at lists.linuxppc.org, linuxppc-embedded at lists.linuxppc.org, 
Morten Banzon/AxxessIT at AXXESSIT
        Subject:        Linux-2.6.9 - MPC8260 FCC/MDIO improvements (I hope !)

Paul and Tom,
I would like to make my first contribution to the linux kernel. Find patch 
linux-2.6.9-fcc-mdio.patch enclosed.

It is not sure that I chose the best possible way to introduce (what I 
think are) my improvements, and I will below try to explain what I have 
done.

The headlines are:

1.- I have removed platform dependent code from fcc_enet.c and replaced it 
by CONFIG_ definitions that I have added to the arch/ppc/8260_io/Kconfig 
file

Basically, the configurable parameters that I have introduced are 
-> For each enabled FCCx_ENET, which internal clocks out of the possible 
ones are used for TX and RX

2.- I have added flexibility to place the MDIO and MDCK lines and the PHY 
interrupt line at will, also as CONFIG_ in the same Kconfig (in the 
current implementation, MDIO and MDCK could only be on port C)

-> For both, MDIO and MDCK, on which parallell IO port, and pin (may be 
allocated on different IO ports)
-> Whether PHY interrupt is used or not, and if so, on which interrupt 
source
-> Also, in the case of several FCC's being used, it is assumed that all 
PHYs can be managed over the same MDIO/MDCK, and that the PHY addresses 
increase with one for each FCC
-> The PHY interrupt is requested only once (today it would be requested 
once for each FCC in use), and linked to the first FCC device in use

3.- I have connected the FCC device to the generic MII driver, so that one 
can perform ioctl SIOCxMIIxxx

I have tried the mii-tool with success.
What I have not done here is to protect the PHY access against concurrent 
accesses from user space.

4.- I have added default handling of the Marvell 88E6060 low power 6 port 
switch. The management of this ethernet switch is done through MDIO.

5.- I have also added the possibility to configure the PHY address (would 
be for FCC1) manually and disable the autodiscovery.


I have tested that on a custom board with MPC8280.


I hope you guys find this interesting enough as to have it included in the 
kernel. 
However, I was very much in doubt about whether the necessary definitions 
to add the required flexibility actually belong in the platform specific 
header file. Of course, a lot of work is then required to add the 
definitions in many of these files. I guess you will decide what is best.

In addition, I have seen that there has been a major change in linux-2.6.9 
concerning the MPC8260 serial driver, that has been moved to 
drivers/serial/cpm_uart.
I was wondering whether the FCC driver will also be moved soon. If this is 
the case, I would appreciate that the improvements I implemented be 
introduced before the moving !

Best regards
Miguel A. Valero
R & D Engineer
------------------------------------------------------------------------------------------------------
AXXESSIT ASA
PB 219 Økern
Risløkkveien 2 N-0510 Oslo
------------------------------------------------------------------------------------------------------
Tel. +47 69707746
Fax. +47 69707702
Mob. +47 93033827
------------------------------------------------------------------------------------------------------




-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-2.6.9-fcc-mdio.patch
Type: application/octet-stream
Size: 45110 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20041109/26822a94/attachment.obj 


More information about the Linuxppc-embedded mailing list