Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Benjamin Herrenschmidt wrote: On Tue, 2007-10-23 at 20:57 -0500, Valentine Barshak wrote: +static int m88e_init(struct mii_phy *phy) +{ + printk(%s: Marvell 88E 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 88E 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. Thanks ! Ben. +static struct mii_phy_ops m88e_phy_ops = { + .init = m88e_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 m88e_phy_def = { + + .phy_id = 0x01410CC0, + .phy_id_mask= 0x0ff0, + .name = Marvell 88E Ethernet, + .ops= m88e_phy_ops, +}; + static struct mii_phy_def *mii_phy_table[] = { cis8201_phy_def, + bcm5248_phy_def, + m88e_phy_def, genmii_phy_def, NULL }; - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
On Mon, 15 Oct 2007 14:27:23 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Valentine Barshak wrote: This patch adds BCM5248 and Marvell 88E 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(+) --- linux.orig/drivers/net/ibm_newemac/phy.c2007-06-15 21:45:18.0 +0400 +++ linux/drivers/net/ibm_newemac/phy.c 2007-06-15 20:45:15.0 +0400 @@ -306,8 +306,47 @@ .ops= cis8201_phy_ops }; +static struct mii_phy_def bcm5248_phy_def = { + + .phy_id = 0x0143bc00, + .phy_id_mask= 0x0ff0, + .name = BCM5248 10/100 SMII Ethernet, + .ops= generic_phy_ops +}; + +static int m88e_init(struct mii_phy *phy) +{ + printk(%s: Marvell 88E 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 m88e_phy_ops = { + .init = m88e_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 m88e_phy_def = { + + .phy_id = 0x01410CC0, + .phy_id_mask= 0x0ff0, + .name = Marvell 88E Ethernet, + .ops= m88e_phy_ops, +}; + static struct mii_phy_def *mii_phy_table[] = { cis8201_phy_def, + bcm5248_phy_def, + m88e_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... Jeff, could you please pull in this patch for 2.6.24? We'll get the coordination down for any further patches. thx, josh - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
On Oct 23, 2007, at 10:20 AM, Josh Boyer wrote: On Mon, 15 Oct 2007 14:27:23 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Valentine Barshak wrote: This patch adds BCM5248 and Marvell 88E 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 - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
On Tue, 23 Oct 2007 11:13:48 -0500 Kumar Gala [EMAIL PROTECTED] wrote: On Oct 23, 2007, at 10:20 AM, Josh Boyer wrote: On Mon, 15 Oct 2007 14:27:23 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Valentine Barshak wrote: This patch adds BCM5248 and Marvell 88E 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 :) Yes, we should. It's on the list. Just not for 2.6.24 since it's way too late. josh - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
On Tue, 2007-10-23 at 20:57 -0500, Valentine Barshak wrote: +static int m88e_init(struct mii_phy *phy) +{ + printk(%s: Marvell 88E 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. +static struct mii_phy_ops m88e_phy_ops = { + .init = m88e_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 m88e_phy_def = { + + .phy_id = 0x01410CC0, + .phy_id_mask= 0x0ff0, + .name = Marvell 88E Ethernet, + .ops= m88e_phy_ops, +}; + static struct mii_phy_def *mii_phy_table[] = { cis8201_phy_def, + bcm5248_phy_def, + m88e_phy_def, genmii_phy_def, NULL }; - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Valentine Barshak wrote: This patch adds BCM5248 and Marvell 88E 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(+) --- linux.orig/drivers/net/ibm_newemac/phy.c2007-06-15 21:45:18.0 +0400 +++ linux/drivers/net/ibm_newemac/phy.c 2007-06-15 20:45:15.0 +0400 @@ -306,8 +306,47 @@ .ops= cis8201_phy_ops }; +static struct mii_phy_def bcm5248_phy_def = { + + .phy_id = 0x0143bc00, + .phy_id_mask= 0x0ff0, + .name = BCM5248 10/100 SMII Ethernet, + .ops= generic_phy_ops +}; + +static int m88e_init(struct mii_phy *phy) +{ + printk(%s: Marvell 88E 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 m88e_phy_ops = { + .init = m88e_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 m88e_phy_def = { + + .phy_id = 0x01410CC0, + .phy_id_mask= 0x0ff0, + .name = Marvell 88E Ethernet, + .ops= m88e_phy_ops, +}; + static struct mii_phy_def *mii_phy_table[] = { cis8201_phy_def, + bcm5248_phy_def, + m88e_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... - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
On Mon, 15 Oct 2007 14:27:23 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Valentine Barshak wrote: This patch adds BCM5248 and Marvell 88E 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(+) --- linux.orig/drivers/net/ibm_newemac/phy.c2007-06-15 21:45:18.0 +0400 +++ linux/drivers/net/ibm_newemac/phy.c 2007-06-15 20:45:15.0 +0400 @@ -306,8 +306,47 @@ .ops= cis8201_phy_ops }; +static struct mii_phy_def bcm5248_phy_def = { + + .phy_id = 0x0143bc00, + .phy_id_mask= 0x0ff0, + .name = BCM5248 10/100 SMII Ethernet, + .ops= generic_phy_ops +}; + +static int m88e_init(struct mii_phy *phy) +{ + printk(%s: Marvell 88E 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 m88e_phy_ops = { + .init = m88e_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 m88e_phy_def = { + + .phy_id = 0x01410CC0, + .phy_id_mask= 0x0ff0, + .name = Marvell 88E Ethernet, + .ops= m88e_phy_ops, +}; + static struct mii_phy_def *mii_phy_table[] = { cis8201_phy_def, + bcm5248_phy_def, + m88e_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... Who else is sending you patches? Valentine is the only one I've seen send patches recently... josh - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Josh Boyer wrote: On Mon, 15 Oct 2007 14:27:23 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Valentine Barshak wrote: This patch adds BCM5248 and Marvell 88E 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(+) --- linux.orig/drivers/net/ibm_newemac/phy.c2007-06-15 21:45:18.0 +0400 +++ linux/drivers/net/ibm_newemac/phy.c 2007-06-15 20:45:15.0 +0400 @@ -306,8 +306,47 @@ .ops= cis8201_phy_ops }; +static struct mii_phy_def bcm5248_phy_def = { + + .phy_id = 0x0143bc00, + .phy_id_mask= 0x0ff0, + .name = BCM5248 10/100 SMII Ethernet, + .ops= generic_phy_ops +}; + +static int m88e_init(struct mii_phy *phy) +{ + printk(%s: Marvell 88E 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 m88e_phy_ops = { + .init = m88e_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 m88e_phy_def = { + + .phy_id = 0x01410CC0, + .phy_id_mask= 0x0ff0, + .name = Marvell 88E Ethernet, + .ops= m88e_phy_ops, +}; + static struct mii_phy_def *mii_phy_table[] = { cis8201_phy_def, + bcm5248_phy_def, + m88e_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... 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. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
On Mon, 15 Oct 2007 14:53:26 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: 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. Al Viro (3): typo in ibm_newemac/rgmii.c Val sent this as well. Either one works. skb-tail in ibm_newemac should be skb_tail_pointer() ibm_newemac annotations (iomem, NULL noise) Ack on those. David Gibson (1): Device tree aware EMAC driver That's the initial commit :) 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() Missed those, but I see you applied them which is good. Roland Dreier (2): ibm_new_emac: Nuke SET_MODULE_OWNER() use ibm_emac: Convert to use napi_struct independent of struct net_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. [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 - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
Josh Boyer wrote: On Mon, 15 Oct 2007 14:53:26 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: 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. Al Viro (3): typo in ibm_newemac/rgmii.c Val sent this as well. Either one works. skb-tail in ibm_newemac should be skb_tail_pointer() ibm_newemac annotations (iomem, NULL noise) Ack on those. David Gibson (1): Device tree aware EMAC driver That's the initial commit :) 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() Missed those, but I see you applied them which is good. Roland Dreier (2): ibm_new_emac: Nuke SET_MODULE_OWNER() use ibm_emac: Convert to use napi_struct independent of struct net_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. [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 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 - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
On Mon, 2007-10-15 at 14:53 -0400, Jeff Garzik wrote: Roland Dreier (2): ibm_new_emac: Nuke SET_MODULE_OWNER() use ibm_emac: Convert to use napi_struct independent of struct net_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. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
On Mon, 2007-10-15 at 15:04 -0400, Jeff Garzik wrote: 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. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
On Tue, 2007-10-16 at 07:05 +1000, Benjamin Herrenschmidt wrote: On Mon, 2007-10-15 at 15:04 -0400, Jeff Garzik wrote: 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 :-) 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 - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html