* [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support
@ 2007-12-05 0:14 Benjamin Herrenschmidt
2007-12-07 20:09 ` Jeff Garzik
0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2007-12-05 0:14 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, linuxppc-dev
From: Stefan Roese <sr@denx.de>
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 <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/net/ibm_newemac/phy.c | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
Index: linux-work/drivers/net/ibm_newemac/phy.c
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/phy.c 2007-12-03 11:50:26.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/phy.c 2007-12-03 11:58:16.000000000 +1100
@@ -306,8 +306,47 @@ static struct mii_phy_def cis8201_phy_de
.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)
+{
+ pr_debug("%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
};
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support
2007-12-05 0:14 [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support Benjamin Herrenschmidt
@ 2007-12-07 20:09 ` Jeff Garzik
2007-12-09 7:08 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 8+ messages in thread
From: Jeff Garzik @ 2007-12-07 20:09 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: netdev, linuxppc-dev
Benjamin Herrenschmidt wrote:
> From: Stefan Roese <sr@denx.de>
>
> 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 <sr@denx.de>
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> drivers/net/ibm_newemac/phy.c | 39 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
applied 1-11 #upstream-fixes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support
2007-12-07 20:09 ` Jeff Garzik
@ 2007-12-09 7:08 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2007-12-09 7:08 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, linuxppc-dev
On Fri, 2007-12-07 at 15:09 -0500, Jeff Garzik wrote:
> Benjamin Herrenschmidt wrote:
> > From: Stefan Roese <sr@denx.de>
> >
> > 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 <sr@denx.de>
> >
> > Signed-off-by: Stefan Roese <sr@denx.de>
> > Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > ---
> >
> > drivers/net/ibm_newemac/phy.c | 39 +++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 39 insertions(+)
>
> applied 1-11 #upstream-fixes
Thanks !
Cheers,
Ben.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/11] ibm_newemac: Candidate patches for 2.6.25
@ 2007-11-30 5:40 Benjamin Herrenschmidt
2007-11-30 5:40 ` [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support Benjamin Herrenschmidt
0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-30 5:40 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, linuxppc-dev
Here are the patches I have pending for EMAC. With those, along with
some other powerpc patches scheduled for 2.6.25 for adding support
for those various boards, I have EMAC now working properly on a
variety of platforms, such as Taishan (440GX), Katmai (440SP),
EP405 (405GP), Bamboo (440EP), etc...
This serie apply on top of the patch:
"ibm_newemac: Fix possible lockup on close"
Which should be on its way to 2.6.24 already.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support
2007-11-30 5:40 [PATCH 0/11] ibm_newemac: Candidate patches for 2.6.25 Benjamin Herrenschmidt
@ 2007-11-30 5:40 ` Benjamin Herrenschmidt
2007-11-30 7:56 ` Christoph Hellwig
2007-11-30 14:27 ` Olof Johansson
0 siblings, 2 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-30 5:40 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, linuxppc-dev
From: Stefan Roese <sr@denx.de>
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 <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
--- linux.orig/drivers/net/ibm_newemac/phy.c 2007-06-15 21:45:18.000000000 +0400
+++ linux/drivers/net/ibm_newemac/phy.c 2007-06-15 20:45:15.000000000 +0400
@@ -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
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support
2007-11-30 5:40 ` [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support Benjamin Herrenschmidt
@ 2007-11-30 7:56 ` Christoph Hellwig
2007-11-30 8:03 ` Benjamin Herrenschmidt
2007-11-30 14:27 ` Olof Johansson
1 sibling, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2007-11-30 7:56 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: netdev, jgarzik, linuxppc-dev
On Fri, Nov 30, 2007 at 04:40:23PM +1100, Benjamin Herrenschmidt wrote:
> From: Stefan Roese <sr@denx.de>
>
> 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 <sr@denx.de>
Is there a reason the emac driver isn't using the generic phy code?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support
2007-11-30 7:56 ` Christoph Hellwig
@ 2007-11-30 8:03 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-30 8:03 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: netdev, jgarzik, linuxppc-dev
On Fri, 2007-11-30 at 07:56 +0000, Christoph Hellwig wrote:
> >
> > 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
> <sr@denx.de>
>
> Is there a reason the emac driver isn't using the generic phy code?
Yes. First, the emac PHY code predates the generic one, and mostly,
in its current shape, the generic PHY code does too violent locking
for me.
I need to be able to use mutexes in the low level PHY read/write, and
the current phylib doesn't allow that as it uses spinlocks all over.
However, I do plan to fix that. I haven't had time yet, but I plan to
convert PHY lib to more task-level operations, which would be a good
thing anyway since PHY communication is fairly slow and some chips can
do it interrupt driven rather than polling loops (and even polling loops
could be preemptible).
So the answer is "not yet" basically.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support
2007-11-30 5:40 ` [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support Benjamin Herrenschmidt
2007-11-30 7:56 ` Christoph Hellwig
@ 2007-11-30 14:27 ` Olof Johansson
2007-11-30 14:30 ` Geert Uytterhoeven
1 sibling, 1 reply; 8+ messages in thread
From: Olof Johansson @ 2007-11-30 14:27 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: netdev, jgarzik, linuxppc-dev
Hi,
On Fri, Nov 30, 2007 at 04:40:23PM +1100, Benjamin Herrenschmidt wrote:
> +static int m88e1111_init(struct mii_phy *phy)
> +{
> + printk("%s: Marvell 88E1111 Ethernet\n", __FUNCTION__);
KERN_ level?
-Olof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support
2007-11-30 14:27 ` Olof Johansson
@ 2007-11-30 14:30 ` Geert Uytterhoeven
0 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2007-11-30 14:30 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, jgarzik, netdev
[-- Attachment #1: Type: TEXT/PLAIN, Size: 865 bytes --]
On Fri, 30 Nov 2007, Olof Johansson wrote:
> On Fri, Nov 30, 2007 at 04:40:23PM +1100, Benjamin Herrenschmidt wrote:
>
> > +static int m88e1111_init(struct mii_phy *phy)
> > +{
> > + printk("%s: Marvell 88E1111 Ethernet\n", __FUNCTION__);
>
> KERN_ level?
pr_
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-12-09 7:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05 0:14 [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support Benjamin Herrenschmidt
2007-12-07 20:09 ` Jeff Garzik
2007-12-09 7:08 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2007-11-30 5:40 [PATCH 0/11] ibm_newemac: Candidate patches for 2.6.25 Benjamin Herrenschmidt
2007-11-30 5:40 ` [PATCH 1/11] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support Benjamin Herrenschmidt
2007-11-30 7:56 ` Christoph Hellwig
2007-11-30 8:03 ` Benjamin Herrenschmidt
2007-11-30 14:27 ` Olof Johansson
2007-11-30 14:30 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).