Add fec support for mpc52xx
PATCH 1/1 Add fec support for mpc52xx
Adds fec support, requires bestcom patch. Applies to Sylvains git tree.
Subject: [PATCH] Add fec support for mpc52xx
---
drivers/net/Kconfig | 2 drivers/net/Makefile | 1 drivers/net/fec_mpc52xx/Kconfig | 27 + drivers/net/fec_mpc52xx/Makefile | 12 drivers/net/fec_mpc52xx/fec.c | 1556 ++++++++++++++++++++++++++++++++++++++ drivers/net/fec_mpc52xx/fec.h | 402 ++++++++++ include/asm-ppc/mpc52xx.h | 3 7 files changed, 2003 insertions(+), 0 deletions(-) create mode 100644 drivers/net/fec_mpc52xx/Kconfig create mode 100644 drivers/net/fec_mpc52xx/Makefile create mode 100644 drivers/net/fec_mpc52xx/fec.c create mode 100644 drivers/net/fec_mpc52xx/fec.h
3b40e9de53a92ad8aa8e31ccb1378e9ade350c4e
drivers/net/Kconfig +2 -0
@@ -920,6 +920,8 @@ config NI65 source "drivers/net/tulip/Kconfig" +source "drivers/net/fec_mpc52xx/Kconfig" + config AT1700 tristate "AT1700/1720 support (EXPERIMENTAL)" depends on NET_ETHERNET && (ISA || MCA_LEGACY) && EXPERIMENTAL
drivers/net/Makefile +1 -0
@@ -89,6 +89,7 @@ obj-$(CONFIG_SHAPER) += shaper.o obj-$(CONFIG_HP100) += hp100.o obj-$(CONFIG_SMC9194) += smc9194.o obj-$(CONFIG_FEC) += fec.o +obj-$(CONFIG_PPC_5xxx_FEC) += fec_mpc52xx/ obj-$(CONFIG_68360_ENET) += 68360enet.o obj-$(CONFIG_ARM_ETHERH) += 8390.o obj-$(CONFIG_WD80x3) += wd.o 8390.o
drivers/net/fec_mpc52xx/Kconfig new file +27 -0
@@ -0,0 +1,27 @@ +# +# MPC52xx Communication options +# + +#menu "MPC5xxx I/O Options" +# depends on PPC_MPC52xx + +config PPC_5xxx_FEC + bool "FEC Ethernet on MPC52xx" + depends on NET_ETHERNET + default n + help + Enable Ethernet support via the fast ethernet controller. + +config FEC_USE_MDIO + bool "Use MDIO for PHY configuration" + depends on PPC_5xxx_FEC + +config FEC_GENERIC_PHY + bool "Generic PHY support" + depends on FEC_USE_MDIO + +config FEC_LXT971 + bool "Support LXT971 PHY" + depends on FEC_USE_MDIO + +#endmenu
drivers/net/fec_mpc52xx/Makefile new file +12 -0
@@ -0,0 +1,12 @@ +# +# Makefile for the linux MPC5xxx ppc-specific BestComm +# peripheral controller +# +# Note! Dependencies are done automagically by 'make dep', which also + +EXTRA_CFLAGS += -I$(TOPDIR)/arch/ppc/syslib/bestcomm/include \ + -I$(TOPDIR)/arch/ppc/syslib/bestcomm/capi \ + -I$(TOPDIR)/arch/ppc/syslib/bestcomm/capi/task_api \ + -I$(TOPDIR)/arch/ppc/syslib/bestcomm/code_dma/image_rtos1 + +obj-$(CONFIG_PPC_5xxx_FEC) += fec.o
drivers/net/fec_mpc52xx/fec.c new file +1556 -0
1,556 lines not on this page · raw message
drivers/net/fec_mpc52xx/fec.h new file +402 -0
402 lines not on this page · raw message
include/asm-ppc/mpc52xx.h +3 -0
@@ -100,6 +100,9 @@ enum ppc_sys_devices {#define MPC52xx_XLB_SIZE 0x100#define MPC52xx_PSCx_OFFSET (x) (((x)!=6)?(0x1e00+((x)<<9)):0x2c00)#define MPC52xx_PSC_SIZE 0x0a0 +#define MPC52xx_FEC_OFFSET 0x3000 +#define MPC52xx_FEC_SIZE 0x800 +/* SRAM used for SDMA */ #define MPC52xx_SRAM_OFFSET 0x8000
Signature · 1 line
1.1.3
Quoted 1 line · In article <[email protected]> John Rigby wrote:
Adds fec support, requires bestcom patch. Applies to Sylvains git tree.
Hmm, I thought that fec support was already in Sylvain's git tree.
I'm sure Sylvain intended it to be there.
Quoted 13 lines
From http://ozlabs.org/pipermail/linuxppc-embedded/2005-June/018887.html:
Date: Sun, 19 Jun 2005 00:15:32 +0200
From: Sylvain Munaut <[email protected]>Following the obvious demand for it :
rsync://gitbits.246tNt.com/gitbits/linux-2.6-mpc52xx.git
http://gitbits.246tNt.com/gitweb.cgi?p=linux-2.6-mpc52xx.git;a=summaryHopefully the server is setup correctly ...
It's not _heavily_ tested but it seems to works fine in the few test I made.
Quoted 13 lines
What in there :
- I2C patches that are already sent upstream but not yet in Linus tree
- Change of the mpc52xx uart device name and device ids to a range in the low density serial port major. Also it's now named ttyPSC? so you need to update you kernel command line (else you won't see any console). Note that the ids and names choosed are NOT YET OFFICIAL, I just included it in this release because some people were seeing conflict with the other ids. So the name and ids may change ...
- Some other patches that will soon be sent upstream, just waiting for you to test see if it has any negative impact.
- FEC and BestComm rewrite from Dale, with some improvement. For eg, the FEC task now handle misaligment so the manual alignment code has been removed, ...
I hope Sylvain can resurrect the 2.6 FEC code that he, I and others worked on.
-Dale
Sylvain has not added bestcomm/fec to his latest tree yet:
http://gitbits.246tNt.com/gitbits/linux-2.6-mpc52xx
you need to apply this patch:
http://gitbits.246tNt.com/patches/bcomm-to-split.diff
The patches I sent to the list are just newer bestcomm code from freescale and an fec driver that works with it. I don't make any claims about it being better just newer and different.
(I haven't cleanly splitted it up yet and right now I must go, so it's
probably gonna be in the git tree this week, under the 'bestcomm' head ;)
Quoted 2 lines · Dale Farnsworth
Quoted 1 line · In article <[email protected]> John Rigby wrote:
Adds fec support, requires bestcom patch. Applies to Sylvains git tree=
.
Quoted 13 lines
Hmm, I thought that fec support was already in Sylvain's git tree.
I'm sure Sylvain intended it to be there.
From http://ozlabs.org/pipermail/linuxppc-embedded/2005-June/018887.html:
Quoted 7 lines
Date: Sun, 19 Jun 2005 00:15:32 +0200
From: Sylvain Munaut <[email protected]>Following the obvious demand for it :
rsync://gitbits.246tNt.com/gitbits/linux-2.6-mpc52xx.git
http://gitbits.246tNt.com/gitweb.cgi?p=3Dlinux-2.6-mpc52xx.git;a=3Dsumm=
ary
Quoted 28 lines
Quoted 5 lines
Hopefully the server is setup correctly ...
It's not _heavily_ tested but it seems to works fine in the few test I made.Quoted 13 lines
What in there :
- I2C patches that are already sent upstream but not yet in Linus tree
- Change of the mpc52xx uart device name and device ids to a range in the low density serial port major. Also it's now named ttyPSC? so you need to update you kernel command line (else you won't see any console). Note that the ids and names choosed are NOT YET OFFICIAL, I just included it in this release because some people were seeing conflict with the other ids. So the name and ids may change ...
- Some other patches that will soon be sent upstream, just waiting for you to test see if it has any negative impact.
- FEC and BestComm rewrite from Dale, with some improvement. For eg, the FEC task now handle misaligment so the manual alignment code has been removed, ...I hope Sylvain can resurrect the 2.6 FEC code that he, I and others worked on.
-Dale
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Quoted 8 lines · Dale Farnsworth
Quoted 1 line · In article <[email protected]> John Rigby wrote:
Adds fec support, requires bestcom patch. Applies to Sylvains git tree.
Hmm, I thought that fec support was already in Sylvain's git tree.
I'm sure Sylvain intended it to be there.
Yup, after the recent updates that went upstream, I re-created more cleanly my git tree. To keep it clean, I took my time to try out several git feature and stuff before publishing result. For now the bcomm is available as a patch and I posted the URL recently.
The splitted vesion should be uploaded tomorrow, I'll make sure I use the latest microcode (compare with the one sent by John) but It's getting late here.
If you don't get up too early, it should be done by the time you get up ;)
Sylvain
Quoted 39 lines
From http://ozlabs.org/pipermail/linuxppc-embedded/2005-June/018887.html:
Quoted 12 lines
Date: Sun, 19 Jun 2005 00:15:32 +0200
From: Sylvain Munaut <[email protected]>Following the obvious demand for it :
rsync://gitbits.246tNt.com/gitbits/linux-2.6-mpc52xx.git
http://gitbits.246tNt.com/gitweb.cgi?p=linux-2.6-mpc52xx.git;a=summaryHopefully the server is setup correctly ...
It's not _heavily_ tested but it seems to works fine in the few test I made.Quoted 13 lines
What in there :
- I2C patches that are already sent upstream but not yet in Linus tree
- Change of the mpc52xx uart device name and device ids to a range in the low density serial port major. Also it's now named ttyPSC? so you need to update you kernel command line (else you won't see any console). Note that the ids and names choosed are NOT YET OFFICIAL, I just included it in this release because some people were seeing conflict with the other ids. So the name and ids may change ...
- Some other patches that will soon be sent upstream, just waiting for you to test see if it has any negative impact.
- FEC and BestComm rewrite from Dale, with some improvement. For eg, the FEC task now handle misaligment so the manual alignment code has been removed, ...I hope Sylvain can resurrect the 2.6 FEC code that he, I and others worked on.
-Dale
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded