PowerPC: Add NEW EMAC driver support to 440EPx Sequoia board.
Subsystems (4)
PATCH 1/1 PowerPC: Add NEW EMAC driver support to 440EPx Sequoia board.
This patch enables NEW EMAC support for PowerPC 440EPx Sequoia board and adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver. These PHY chips are used on PowerPC440EPx boards.
The PHY code is based on the previous work by Stefan Roese <[email protected]>
--- arch/powerpc/platforms/44x/Kconfig | 7 ++---- drivers/net/ibm_newemac/phy.c | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-)
arch/powerpc/platforms/44x/Kconfig +3 -4
@@ -48,10 +48,9 @@ config 440EPX bool select PPC_FPU -# Disabled until the new EMAC Driver is merged. -# select IBM_NEW_EMAC_EMAC4 -# select IBM_NEW_EMAC_RGMII -# select IBM_NEW_EMAC_ZMII + select IBM_NEW_EMAC_EMAC4 + select IBM_NEW_EMAC_RGMII + select IBM_NEW_EMAC_ZMII config 440GP bool
drivers/net/ibm_newemac/phy.c +39 -0
@@ -306,8 +306,47 @@ .ops = &cis8201_phy_ops }; +static struct mii_phy_def bcm5248_phy_def = { + + .phy_id =0x0143bc00 , + .phy_id_mask =0x0ffffff0 , + .name ="BCM5248 10/100 SMII Ethernet" , + .ops = &generic_phy_ops +}; + +static int m88e1111_init (struct mii_phy *phy) +{ +printk ("%s: Marvell 88E1111 Ethernet\n" , __FUNCTION__); +phy_write (phy,0x14 ,0x0ce3 ); +phy_write (phy,0x18 ,0x4101 ); +phy_write (phy,0x09 ,0x0e00 ); +phy_write (phy,0x04 ,0x01e1 ); +phy_write (phy,0x00 ,0x9140 ); +phy_write (phy,0x00 ,0x1140 ); + +return 0 ; +} + +static struct mii_phy_ops m88e1111_phy_ops = { + .init = m88e1111_init, + .setup_aneg = genmii_setup_aneg, + .setup_forced = genmii_setup_forced, + .poll_link = genmii_poll_link, + .read_link = genmii_read_link +}; + +static struct mii_phy_def m88e1111_phy_def = { + + .phy_id =0x01410CC0 , + .phy_id_mask =0x0ffffff0 , + .name ="Marvell 88E1111 Ethernet" , + .ops = &m88e1111_phy_ops, +}; +static struct mii_phy_def *mii_phy_table[] = { &cis8201_phy_def, + &bcm5248_phy_def, + &m88e1111_phy_def, &genmii_phy_def,NULL };
This one has to be applied on top of the previously submitted RGMII patch:
http://ozlabs.org/pipermail/linuxppc-dev/2007-October/043435.html
Josh, are these OK, since Paul has NEW EMAC driver in his tree now? Thanks,
Valentine.
Quoted 7 lines · Valentine Barshak
This one has to be applied on top of the previously submitted RGMII patch:
http://ozlabs.org/pipermail/linuxppc-dev/2007-October/043435.html
Josh, are these OK, since Paul has NEW EMAC driver in his tree now? Thanks,
Valentine.
I'll pull the one in the URL soon, yes. This patch, and the RGMII compile fix need to go in through netdev I think. Unless Jeff says otherwise.
josh
Quoted 4 lines · On Fri, 12 Oct 2007 17:03:05 +0400 Valentine Barshak <[email protected]>…
This patch enables NEW EMAC support for PowerPC 440EPx Sequoia board and adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver. These PHY chips are used on PowerPC440EPx boards.
The PHY code is based on the previous work by Stefan Roese <[email protected]>
Could you send the phy part to Jeff Garzik and the netdev list by itself? That way it will get picked up and we'll update the Kconfig with a later patch.
josh
PATCH 1/1 PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
This patch adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver. These PHY chips are used on PowerPC 440EPx boards.
The PHY code is based on the previous work by Stefan Roese <[email protected]>
--- drivers/net/ibm_newemac/phy.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+)
drivers/net/ibm_newemac/phy.c +39 -0
@@ -306,8 +306,47 @@ .ops = &cis8201_phy_ops }; +static struct mii_phy_def bcm5248_phy_def = { + + .phy_id =0x0143bc00 , + .phy_id_mask =0x0ffffff0 , + .name ="BCM5248 10/100 SMII Ethernet" , + .ops = &generic_phy_ops +}; + +static int m88e1111_init (struct mii_phy *phy) +{ +printk ("%s: Marvell 88E1111 Ethernet\n" , __FUNCTION__); +phy_write (phy,0x14 ,0x0ce3 ); +phy_write (phy,0x18 ,0x4101 ); +phy_write (phy,0x09 ,0x0e00 ); +phy_write (phy,0x04 ,0x01e1 ); +phy_write (phy,0x00 ,0x9140 ); +phy_write (phy,0x00 ,0x1140 ); + +return 0 ; +} + +static struct mii_phy_ops m88e1111_phy_ops = { + .init = m88e1111_init, + .setup_aneg = genmii_setup_aneg, + .setup_forced = genmii_setup_forced, + .poll_link = genmii_poll_link, + .read_link = genmii_read_link +}; + +static struct mii_phy_def m88e1111_phy_def = { + + .phy_id =0x01410CC0 , + .phy_id_mask =0x0ffffff0 , + .name ="Marvell 88E1111 Ethernet" , + .ops = &m88e1111_phy_ops, +}; +static struct mii_phy_def *mii_phy_table[] = { &cis8201_phy_def, + &bcm5248_phy_def, + &m88e1111_phy_def, &genmii_phy_def,NULL };
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Quoted 48 lines · Valentine Barshak
This patch adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver. These PHY chips are used on PowerPC 440EPx boards.
The PHY code is based on the previous work by Stefan Roese <[email protected]>Signed-off-by Stefan Roese <[email protected]>Signed-off-by Valentine Barshak <[email protected]>--- drivers/net/ibm_newemac/phy.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+)drivers/net/ibm_newemac/phy.c +32
-0@@ -306,8 +306,47 @@ .ops = &cis8201_phy_ops }; +static struct mii_phy_def bcm5248_phy_def = { + + .phy_id =0x0143bc00 , + .phy_id_mask =0x0ffffff0 , + .name ="BCM5248 10/100 SMII Ethernet" , + .ops = &generic_phy_ops +}; + +static int m88e1111_init (struct mii_phy *phy) +{ +printk ("%s: Marvell 88E1111 Ethernet\n" , __FUNCTION__); +phy_write (phy,0x14 ,0x0ce3 ); +phy_write (phy,0x18 ,0x4101 ); +phy_write (phy,0x09 ,0x0e00 ); +phy_write (phy,0x04 ,0x01e1 ); +phy_write (phy,0x00 ,0x9140 ); +phy_write (phy,0x00 ,0x1140 ); + +return 0 ; +} + +static struct mii_phy_ops m88e1111_phy_ops = { + .init = m88e1111_init, + .setup_aneg = genmii_setup_aneg, + .setup_forced = genmii_setup_forced, + .poll_link = genmii_poll_link, + .read_link = genmii_read_link +}; + +static struct mii_phy_def m88e1111_phy_def = { + + .phy_id =0x01410CC0 ,
drivers/net/ibm_newemac/phy.c line 350
Quoted 10 lines
drivers/net/ibm_newemac/phy.c +7
-0+ .phy_id_mask = 0x0ffffff0, + .name = "Marvell 88E1111 Ethernet", + .ops = &m88e1111_phy_ops, +}; +static struct mii_phy_def *mii_phy_table[] = { &cis8201_phy_def, + &bcm5248_phy_def, + &m88e1111_phy_def, &genmii_phy_def,
Seems sane to me -- ACK -- but we have multiple people sending me patches for a single driver. That's normal for janitorial cleanups across the whole tree, but discouraged when multiple people are actively working on the same driver.
Please coordinate, and have ONE person send me patches...
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Quoted 65 lines · On Mon, 15 Oct 2007 14:27:23 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 48 lines · Valentine Barshak
This patch adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver. These PHY chips are used on PowerPC 440EPx boards.
The PHY code is based on the previous work by Stefan Roese <[email protected]>Signed-off-by Stefan Roese <[email protected]>Signed-off-by Valentine Barshak <[email protected]>--- drivers/net/ibm_newemac/phy.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+)drivers/net/ibm_newemac/phy.c +32
-0@@ -306,8 +306,47 @@ .ops = &cis8201_phy_ops }; +static struct mii_phy_def bcm5248_phy_def = { + + .phy_id =0x0143bc00 , + .phy_id_mask =0x0ffffff0 , + .name ="BCM5248 10/100 SMII Ethernet" , + .ops = &generic_phy_ops +}; + +static int m88e1111_init (struct mii_phy *phy) +{ +printk ("%s: Marvell 88E1111 Ethernet\n" , __FUNCTION__); +phy_write (phy,0x14 ,0x0ce3 ); +phy_write (phy,0x18 ,0x4101 ); +phy_write (phy,0x09 ,0x0e00 ); +phy_write (phy,0x04 ,0x01e1 ); +phy_write (phy,0x00 ,0x9140 ); +phy_write (phy,0x00 ,0x1140 ); + +return 0 ; +} + +static struct mii_phy_ops m88e1111_phy_ops = { + .init = m88e1111_init, + .setup_aneg = genmii_setup_aneg, + .setup_forced = genmii_setup_forced, + .poll_link = genmii_poll_link, + .read_link = genmii_read_link +}; + +static struct mii_phy_def m88e1111_phy_def = { + + .phy_id =0x01410CC0 ,drivers/net/ibm_newemac/phy.c line 350
Quoted 10 lines
drivers/net/ibm_newemac/phy.c +7
-0+ .phy_id_mask = 0x0ffffff0, + .name = "Marvell 88E1111 Ethernet", + .ops = &m88e1111_phy_ops, +}; +static struct mii_phy_def *mii_phy_table[] = { &cis8201_phy_def, + &bcm5248_phy_def, + &m88e1111_phy_def, &genmii_phy_def,Seems sane to me -- ACK -- but we have multiple people sending me patches for a single driver. That's normal for janitorial cleanups across the whole tree, but discouraged when multiple people are actively working on the same driver.
Quoted 1 line
Please coordinate, and have ONE person send me patches...
Who else is sending you patches? Valentine is the only one I've seen send patches recently...
josh
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Quoted 64 lines · Josh Boyer
Quoted 61 lines · On Mon, 15 Oct 2007 14:27:23 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 48 lines · Valentine Barshak
This patch adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver. These PHY chips are used on PowerPC 440EPx boards.
The PHY code is based on the previous work by Stefan Roese <[email protected]>Signed-off-by Stefan Roese <[email protected]>Signed-off-by Valentine Barshak <[email protected]>--- drivers/net/ibm_newemac/phy.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+)drivers/net/ibm_newemac/phy.c +32
-0@@ -306,8 +306,47 @@ .ops = &cis8201_phy_ops }; +static struct mii_phy_def bcm5248_phy_def = { + + .phy_id =0x0143bc00 , + .phy_id_mask =0x0ffffff0 , + .name ="BCM5248 10/100 SMII Ethernet" , + .ops = &generic_phy_ops +}; + +static int m88e1111_init (struct mii_phy *phy) +{ +printk ("%s: Marvell 88E1111 Ethernet\n" , __FUNCTION__); +phy_write (phy,0x14 ,0x0ce3 ); +phy_write (phy,0x18 ,0x4101 ); +phy_write (phy,0x09 ,0x0e00 ); +phy_write (phy,0x04 ,0x01e1 ); +phy_write (phy,0x00 ,0x9140 ); +phy_write (phy,0x00 ,0x1140 ); + +return 0 ; +} + +static struct mii_phy_ops m88e1111_phy_ops = { + .init = m88e1111_init, + .setup_aneg = genmii_setup_aneg, + .setup_forced = genmii_setup_forced, + .poll_link = genmii_poll_link, + .read_link = genmii_read_link +}; + +static struct mii_phy_def m88e1111_phy_def = { + + .phy_id =0x01410CC0 ,drivers/net/ibm_newemac/phy.c line 350
Quoted 10 lines
drivers/net/ibm_newemac/phy.c +7
-0+ .phy_id_mask = 0x0ffffff0, + .name = "Marvell 88E1111 Ethernet", + .ops = &m88e1111_phy_ops, +}; +static struct mii_phy_def *mii_phy_table[] = { &cis8201_phy_def, + &bcm5248_phy_def, + &m88e1111_phy_def, &genmii_phy_def,Seems sane to me -- ACK -- but we have multiple people sending me patches for a single driver. That's normal for janitorial cleanups across the whole tree, but discouraged when multiple people are actively working on the same driver.
Quoted 4 lines
Quoted 1 line
Please coordinate, and have ONE person send me patches...
Who else is sending you patches? Valentine is the only one I've seen send patches recently...
It's a zoo :)
Al Viro (3):
typo in ibm_newemac/rgmii.c
skb->tail in ibm_newemac should be skb_tail_pointer() ibm_newemac annotations (iomem, NULL noise)
David Gibson (1):
Device tree aware EMAC driver
Michael Ellerman (3):
Update ibm_newemac to use dcr_host_t.base Add dcr_host_t.base in dcr_read()/dcr_write() Use dcr_host_t.base in dcr_unmap()
Roland Dreier (2):
ibm_new_emac: Nuke SET_MODULE_OWNER() use
ibm_emac: Convert to use napi_struct independent of struct net_device
[email protected] (1):
Fix typo in new EMAC driver.
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Quoted 11 lines · On Mon, 15 Oct 2007 14:53:26 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 9 lines
Quoted 6 lines
Seems sane to me -- ACK -- but we have multiple people sending me patches for a single driver. That's normal for janitorial cleanups across the whole tree, but discouraged when multiple people are actively working on the same driver.
Please coordinate, and have ONE person send me patches...
Who else is sending you patches? Valentine is the only one I've seen send patches recently...
It's a zoo :)
Wow, indeed.
Quoted 2 lines
Al Viro (3):
typo inibm_newemac/rgmii.c
Val sent this as well. Either one works.
Quoted 2 lines
skb->tailinibm_newemacshould beskb_tail_pointer()ibm_newemacannotations (iomem, NULL noise)
Ack on those.
Quoted 2 lines
David Gibson (1):
Device tree aware EMAC driver
That's the initial commit :)
Quoted 4 lines
Michael Ellerman (3):
Updateibm_newemacto use dcr_host_t.base Add dcr_host_t.base in dcr_read()/dcr_write() Use dcr_host_t.base indcr_unmap()
Missed those, but I see you applied them which is good.
Quoted 3 lines
Roland Dreier (2):
ibm_new_emac: NukeSET_MODULE_OWNER()use
ibm_emac: Convert to usenapi_structindependent of structnet_device
I never saw either of these. I'm also beginning to wonder if one of them broke things because I can't currently get ibm_newemac to work.
Quoted 2 lines
[email protected] (1):
Fix typo in new EMAC driver.
Same fix as Al's.
Anyway, we can queue patches to this through me if you'd like.
josh
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Quoted 40 lines · Josh Boyer
Quoted 9 lines · On Mon, 15 Oct 2007 14:53:26 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 8 lines
Quoted 6 lines
Seems sane to me -- ACK -- but we have multiple people sending me patches for a single driver. That's normal for janitorial cleanups across the whole tree, but discouraged when multiple people are actively working on the same driver.
Please coordinate, and have ONE person send me patches...
Who else is sending you patches? Valentine is the only one I've seen send patches recently...
It's a zoo :)
Wow, indeed.
Quoted 2 lines
Al Viro (3):
typo inibm_newemac/rgmii.cVal sent this as well. Either one works.
Quoted 2 lines
skb->tailinibm_newemacshould beskb_tail_pointer()ibm_newemacannotations (iomem, NULL noise)Ack on those.
Quoted 2 lines
David Gibson (1):
Device tree aware EMAC driverThat's the initial commit :)
Quoted 4 lines
Michael Ellerman (3):
Updateibm_newemacto use dcr_host_t.base Add dcr_host_t.base in dcr_read()/dcr_write() Use dcr_host_t.base indcr_unmap()Missed those, but I see you applied them which is good.
Quoted 3 lines
Roland Dreier (2):
ibm_new_emac: NukeSET_MODULE_OWNER()use
ibm_emac: Convert to usenapi_structindependent of structnet_device
Quoted 7 lines
I never saw either of these. I'm also beginning to wonder if one of them broke things because I can't currently get
ibm_newemacto work.Quoted 2 lines
[email protected] (1):
Fix typo in new EMAC driver.Same fix as Al's.
All those are what's upstream, except for the Michael Ellerman patches.
FWIW it was generated using
git log drivers/net/ibm_newemac | git shortlog
Quoted 1 line
Anyway, we can queue patches to this through me if you'd like.
I would ideally like a single active patch generator (even if they are merely reviewed others work sometimes).
Outside of that, I'm hoping you and the other people listed making changes will self-organize without my help :)
Jeff
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Quoted 6 lines · Jeff Garzik
I would ideally like a single active patch generator (even if they are
merely reviewed others work sometimes).Outside of that, I'm hoping you and the other people listed making changes will self-organize without my help :)
Josh, do you want to be the central point / maintainer for it or do you want me to do it ? There's a lot of code from me in there and I did this fork in the first place so I have a pretty good idea of what's going on in this driver and what still needs to be done :-)
Cheers,
Ben.
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Quoted 5 lines · Benjamin Herrenschmidt
Quoted 4 lines · Jeff Garzik
I would ideally like a single active patch generator (even if they are
merely reviewed others work sometimes).
Quoted 7 lines
Quoted 2 lines
Outside of that, I'm hoping you and the other people listed making changes will self-organize without my help :)
Josh, do you want to be the central point / maintainer for it or do you want me to do it ? There's a lot of code from me in there and I did this fork in the first place so I have a pretty good idea of what's going on in this driver and what still needs to be done :-)
As always, you're welcome to it. You probably don't want to own it long term, but I'd appreciate the help for the time being.
josh
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
In reply to Jeff GarzikQuoted 5 lines · Jeff Garzik
Roland Dreier (2):
ibm_new_emac: NukeSET_MODULE_OWNER()use
ibm_emac: Convert to usenapi_structindependent of structnet_device
Wow, I'd have loved to be CCed at least on the last one since I was about to do just that ... Heh.
Ben.
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
In reply to Jeff GarzikQuoted 65 lines · On Mon, 15 Oct 2007 14:27:23 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 48 lines · Valentine Barshak
This patch adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver. These PHY chips are used on PowerPC 440EPx boards.
The PHY code is based on the previous work by Stefan Roese <[email protected]>Signed-off-by Stefan Roese <[email protected]>Signed-off-by Valentine Barshak <[email protected]>--- drivers/net/ibm_newemac/phy.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+)drivers/net/ibm_newemac/phy.c +32
-0@@ -306,8 +306,47 @@ .ops = &cis8201_phy_ops }; +static struct mii_phy_def bcm5248_phy_def = { + + .phy_id =0x0143bc00 , + .phy_id_mask =0x0ffffff0 , + .name ="BCM5248 10/100 SMII Ethernet" , + .ops = &generic_phy_ops +}; + +static int m88e1111_init (struct mii_phy *phy) +{ +printk ("%s: Marvell 88E1111 Ethernet\n" , __FUNCTION__); +phy_write (phy,0x14 ,0x0ce3 ); +phy_write (phy,0x18 ,0x4101 ); +phy_write (phy,0x09 ,0x0e00 ); +phy_write (phy,0x04 ,0x01e1 ); +phy_write (phy,0x00 ,0x9140 ); +phy_write (phy,0x00 ,0x1140 ); + +return 0 ; +} + +static struct mii_phy_ops m88e1111_phy_ops = { + .init = m88e1111_init, + .setup_aneg = genmii_setup_aneg, + .setup_forced = genmii_setup_forced, + .poll_link = genmii_poll_link, + .read_link = genmii_read_link +}; + +static struct mii_phy_def m88e1111_phy_def = { + + .phy_id =0x01410CC0 ,drivers/net/ibm_newemac/phy.c line 350
Quoted 10 lines
drivers/net/ibm_newemac/phy.c +7
-0+ .phy_id_mask = 0x0ffffff0, + .name = "Marvell 88E1111 Ethernet", + .ops = &m88e1111_phy_ops, +}; +static struct mii_phy_def *mii_phy_table[] = { &cis8201_phy_def, + &bcm5248_phy_def, + &m88e1111_phy_def, &genmii_phy_def,Seems sane to me -- ACK -- but we have multiple people sending me patches for a single driver. That's normal for janitorial cleanups across the whole tree, but discouraged when multiple people are actively working on the same driver.
Quoted 1 line
Please coordinate, and have ONE person send me patches...
Jeff, could you please pull in this patch for 2.6.24? We'll get the coordination down for any further patches.
thx,
josh
Quoted 1 line
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Quoted 11 lines · Josh Boyer
Quoted 8 lines · On Mon, 15 Oct 2007 14:27:23 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 7 lines · Valentine Barshak
This patch adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver. These PHY chips are used on PowerPC 440EPx boards.
The PHY code is based on the previous work by Stefan Roese <[email protected]>Signed-off-by Stefan Roese <[email protected]>Signed-off-by Valentine Barshak <[email protected]>---
You guys should really look at moving emac over to the phylib so we don't have to duplicate drivers for the same phys all over the place :)
- k
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Quoted 13 lines · On Tue, 23 Oct 2007 11:13:48 -0500 Kumar Gala <[email protected]> wrote:
Quoted 10 lines · Josh Boyer
Quoted 7 lines · On Mon, 15 Oct 2007 14:27:23 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 6 lines · Valentine Barshak
This patch adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver.
These PHY chips are used on PowerPC 440EPx boards. The PHY code is based on the previous work by Stefan Roese <[email protected]>
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Signed-off-by Stefan Roese <[email protected]>Signed-off-by Valentine Barshak <[email protected]>---
You guys should really look at moving emac over to the phylib so we don't have to duplicate drivers for the same phys all over the place :)
Yes, we should. It's on the list. Just not for 2.6.24 since it's way too late.
josh
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
In reply to Valentine Barshakdrivers/net/ibm_newemac/phy.c line 328
Quoted 12 lines · Valentine Barshak
drivers/net/ibm_newemac/phy.c +12
-0+static int m88e1111_init (struct mii_phy *phy) +{ +printk ("%s: Marvell 88E1111 Ethernet\n" , __FUNCTION__); +phy_write (phy,0x14 ,0x0ce3 ); +phy_write (phy,0x18 ,0x4101 ); +phy_write (phy,0x09 ,0x0e00 ); +phy_write (phy,0x04 ,0x01e1 ); +phy_write (phy,0x00 ,0x9140 ); +phy_write (phy,0x00 ,0x1140 ); + +return 0 ; +}
Care to put a few comments on why the above is necessary and what it does ?
Thanks !
Ben.
Quoted 23 lines
drivers/net/ibm_newemac/phy.c +18
-0+static struct mii_phy_ops m88e1111_phy_ops = { + .init = m88e1111_init, + .setup_aneg = genmii_setup_aneg, + .setup_forced = genmii_setup_forced, + .poll_link = genmii_poll_link, + .read_link = genmii_read_link +}; + +static struct mii_phy_def m88e1111_phy_def = { + + .phy_id =0x01410CC0 , + .phy_id_mask =0x0ffffff0 , + .name ="Marvell 88E1111 Ethernet" , + .ops = &m88e1111_phy_ops, +}; +static struct mii_phy_def *mii_phy_table[] = { &cis8201_phy_def, + &bcm5248_phy_def, + &m88e1111_phy_def, &genmii_phy_def,NULL };
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Quoted 17 lines · Benjamin Herrenschmidt
drivers/net/ibm_newemac/phy.c line 328
Quoted 12 lines · Valentine Barshak
drivers/net/ibm_newemac/phy.c +12
-0+static int m88e1111_init (struct mii_phy *phy) +{ +printk ("%s: Marvell 88E1111 Ethernet\n" , __FUNCTION__); +phy_write (phy,0x14 ,0x0ce3 ); +phy_write (phy,0x18 ,0x4101 ); +phy_write (phy,0x09 ,0x0e00 ); +phy_write (phy,0x04 ,0x01e1 ); +phy_write (phy,0x00 ,0x9140 ); +phy_write (phy,0x00 ,0x1140 ); + +return 0 ; +}Care to put a few comments on why the above is necessary and what it does ?
I think this set's up Marvell ext control (0x14) and led control (0x18) registers with some default values, Also sets some bits in the
CTRL1000, ADVERTISE and basic mode control registers and resets the phy for the changes to take effect. Unfortunately, I don't have a detailed 88E1111 description and can't tell anything about it. Looks like the code was originally ported from u-boot and is needed to init the phy :) Stefan, do you have any info on this?
Thanks,
Valentine.
Quoted 28 lines
Thanks !
Ben.Quoted 23 lines
drivers/net/ibm_newemac/phy.c +18
-0+static struct mii_phy_ops m88e1111_phy_ops = { + .init = m88e1111_init, + .setup_aneg = genmii_setup_aneg, + .setup_forced = genmii_setup_forced, + .poll_link = genmii_poll_link, + .read_link = genmii_read_link +}; + +static struct mii_phy_def m88e1111_phy_def = { + + .phy_id =0x01410CC0 , + .phy_id_mask =0x0ffffff0 , + .name ="Marvell 88E1111 Ethernet" , + .ops = &m88e1111_phy_ops, +}; +static struct mii_phy_def *mii_phy_table[] = { &cis8201_phy_def, + &bcm5248_phy_def, + &m88e1111_phy_def, &genmii_phy_def,NULL };
PATCH 1/1 PowerPC: Enable NEW EMAC support for Sequoia 440EPx.
In reply to Josh BoyerThis patch enables NEW EMAC support for PowerPC 440EPx Sequoia board.
--- arch/powerpc/platforms/44x/Kconfig | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
arch/powerpc/platforms/44x/Kconfig +3 -4
@@ -48,10 +48,9 @@ config 440EPX bool select PPC_FPU -# Disabled until the new EMAC Driver is merged. -# select IBM_NEW_EMAC_EMAC4 -# select IBM_NEW_EMAC_RGMII -# select IBM_NEW_EMAC_ZMII + select IBM_NEW_EMAC_EMAC4 + select IBM_NEW_EMAC_RGMII + select IBM_NEW_EMAC_ZMII config 440GP bool
Quoted 11 lines · Josh Boyer
Quoted 4 lines · On Fri, 12 Oct 2007 17:03:05 +0400 Valentine Barshak <[email protected]>…
This patch enables NEW EMAC support for PowerPC 440EPx Sequoia board and adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver. These PHY chips are used on PowerPC440EPx boards.
The PHY code is based on the previous work by Stefan Roese <[email protected]>Could you send the phy part to Jeff Garzik and the netdev list by itself? That way it will get picked up and we'll update the
Kconfigwith a later patch.
Oh and please CC me :-)
Ben.
Quoted 7 lines · Valentine Barshak
This patch enables NEW EMAC support for PowerPC 440EPx Sequoia board and adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver. These PHY chips are used on PowerPC440EPx boards.
The PHY code is based on the previous work by Stefan Roese <[email protected]>Signed-off-by Stefan Roese <[email protected]>Signed-off-by Valentine Barshak <[email protected]>
Quoted 76 lines
--- arch/powerpc/platforms/44x/Kconfig | 7 ++---- drivers/net/ibm_newemac/phy.c | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-)arch/powerpc/platforms/44x/Kconfig +3
-4@@ -48,10 +48,9 @@ config 440EPX bool select PPC_FPU -# Disabled until the new EMAC Driver is merged. -# select IBM_NEW_EMAC_EMAC4 -# select IBM_NEW_EMAC_RGMII -# select IBM_NEW_EMAC_ZMII + select IBM_NEW_EMAC_EMAC4 + select IBM_NEW_EMAC_RGMII + select IBM_NEW_EMAC_ZMII config 440GP booldrivers/net/ibm_newemac/phy.c +39
-0@@ -306,8 +306,47 @@ .ops = &cis8201_phy_ops }; +static struct mii_phy_def bcm5248_phy_def = { + + .phy_id =0x0143bc00 , + .phy_id_mask =0x0ffffff0 , + .name ="BCM5248 10/100 SMII Ethernet" , + .ops = &generic_phy_ops +}; + +static int m88e1111_init (struct mii_phy *phy) +{ +printk ("%s: Marvell 88E1111 Ethernet\n" , __FUNCTION__); +phy_write (phy,0x14 ,0x0ce3 ); +phy_write (phy,0x18 ,0x4101 ); +phy_write (phy,0x09 ,0x0e00 ); +phy_write (phy,0x04 ,0x01e1 ); +phy_write (phy,0x00 ,0x9140 ); +phy_write (phy,0x00 ,0x1140 ); + +return 0 ; +} + +static struct mii_phy_ops m88e1111_phy_ops = { + .init = m88e1111_init, + .setup_aneg = genmii_setup_aneg, + .setup_forced = genmii_setup_forced, + .poll_link = genmii_poll_link, + .read_link = genmii_read_link +}; + +static struct mii_phy_def m88e1111_phy_def = { + + .phy_id =0x01410CC0 , + .phy_id_mask =0x0ffffff0 , + .name ="Marvell 88E1111 Ethernet" , + .ops = &m88e1111_phy_ops, +}; +static struct mii_phy_def *mii_phy_table[] = { &cis8201_phy_def, + &bcm5248_phy_def, + &m88e1111_phy_def, &genmii_phy_def,NULL };_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev