[PATCH] PowerPC: Add NEW EMAC driver support to 440EPx Sequoia board.

STALE6858d

21 messages, 5 authors, 2007-10-24 · open the first message on its own page

[PATCH] PowerPC: Add NEW EMAC driver support to 440EPx Sequoia board.

From: Valentine Barshak <hidden>
Date: 2007-10-12 13:04:19

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 [off-list ref]

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <redacted>

---
 arch/powerpc/platforms/44x/Kconfig |    7 ++----
 drivers/net/ibm_newemac/phy.c      |   39 +++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 4 deletions(-)
--- linux.orig/arch/powerpc/platforms/44x/Kconfig	2007-07-30 15:05:50.000000000 +0400
+++ linux/arch/powerpc/platforms/44x/Kconfig	2007-07-30 17:59:05.000000000 +0400
@@ -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
--- 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
 };

Re: [PATCH] PowerPC: Add NEW EMAC driver support to 440EPx Sequoia board.

From: Valentine Barshak <hidden>
Date: 2007-10-12 13:08:31

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.

Re: [PATCH] PowerPC: Add NEW EMAC driver support to 440EPx Sequoia board.

From: Josh Boyer <hidden>
Date: 2007-10-12 14:41:15

On Fri, 2007-10-12 at 17:07 +0400, Valentine Barshak wrote:
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

Re: [PATCH] PowerPC: Add NEW EMAC driver support to 440EPx Sequoia board.

From: Josh Boyer <hidden>
Date: 2007-10-15 17:27:58

On Fri, 12 Oct 2007 17:03:05 +0400
Valentine Barshak [off-list ref] wrote:
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 [off-list ref]
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] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.

From: Valentine Barshak <hidden>
Date: 2007-10-15 18:00:32

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 [off-list ref]

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <redacted>
---
 drivers/net/ibm_newemac/phy.c |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+)
--- 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
 };

[PATCH] PowerPC: Enable NEW EMAC support for Sequoia 440EPx.

From: Valentine Barshak <hidden>
Date: 2007-10-15 18:15:08

This patch enables NEW EMAC support for PowerPC 440EPx Sequoia board.

Signed-off-by: Valentine Barshak <redacted>
---
 arch/powerpc/platforms/44x/Kconfig |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
--- linux.orig/arch/powerpc/platforms/44x/Kconfig	2007-07-30 15:05:50.000000000 +0400
+++ linux/arch/powerpc/platforms/44x/Kconfig	2007-07-30 17:59:05.000000000 +0400
@@ -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

Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.

From: Jeff Garzik <hidden>
Date: 2007-10-15 18:27:42

Valentine Barshak wrote:
quoted hunk
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 [off-list ref]

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <redacted>
---
 drivers/net/ibm_newemac/phy.c |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+)
--- 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,
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.

From: Josh Boyer <hidden>
Date: 2007-10-15 18:48:24

On Mon, 15 Oct 2007 14:27:23 -0400
Jeff Garzik [off-list ref] wrote:
Valentine Barshak wrote:
quoted
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 [off-list ref]

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <redacted>
---
 drivers/net/ibm_newemac/phy.c |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+)
--- 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,
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

Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.

From: Jeff Garzik <hidden>
Date: 2007-10-15 18:53:39

Josh Boyer wrote:
On Mon, 15 Oct 2007 14:27:23 -0400
Jeff Garzik [off-list ref] wrote:
quoted
Valentine Barshak wrote:
quoted
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 [off-list ref]

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <redacted>
---
 drivers/net/ibm_newemac/phy.c |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+)
--- 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,
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

vbarshak@ru.mvista.com (1):
       Fix typo in new EMAC driver.

Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.

From: Josh Boyer <hidden>
Date: 2007-10-15 19:00:07

On Mon, 15 Oct 2007 14:53:26 -0400
Jeff Garzik [off-list ref] wrote:
quoted
quoted
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.
vbarshak@ru.mvista.com (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.

From: Jeff Garzik <hidden>
Date: 2007-10-15 19:04:52

Josh Boyer wrote:
On Mon, 15 Oct 2007 14:53:26 -0400
Jeff Garzik [off-list ref] wrote:
quoted
quoted
quoted
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
Al Viro (3):
       typo in ibm_newemac/rgmii.c
Val sent this as well.  Either one works.
quoted
       skb->tail in ibm_newemac should be skb_tail_pointer()
       ibm_newemac annotations (iomem, NULL noise)
Ack on those.
quoted
David Gibson (1):
       Device tree aware EMAC driver
That's the initial commit :)
quoted
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.
quoted
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.
quoted
vbarshak@ru.mvista.com (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

Re: [PATCH] PowerPC: Add NEW EMAC driver support to 440EPx Sequoia board.

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-10-15 21:01:08

On Fri, 2007-10-12 at 17:03 +0400, Valentine Barshak wrote:
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 [off-list ref]

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <redacted>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
quoted hunk
---
 arch/powerpc/platforms/44x/Kconfig |    7 ++----
 drivers/net/ibm_newemac/phy.c      |   39 +++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 4 deletions(-)
--- linux.orig/arch/powerpc/platforms/44x/Kconfig	2007-07-30 15:05:50.000000000 +0400
+++ linux/arch/powerpc/platforms/44x/Kconfig	2007-07-30 17:59:05.000000000 +0400
@@ -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
--- 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

Re: [PATCH] PowerPC: Add NEW EMAC driver support to 440EPx Sequoia board.

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-10-15 21:01:08

On Mon, 2007-10-15 at 12:26 -0500, Josh Boyer wrote:
On Fri, 12 Oct 2007 17:03:05 +0400
Valentine Barshak [off-list ref] wrote:
quoted
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 [off-list ref]
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.
Oh and please CC me :-)

Ben.

Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-10-15 21:05:32

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.

Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-10-15 21:11:35

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.

Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.

From: Josh Boyer <hidden>
Date: 2007-10-15 22:56:31

On Tue, 2007-10-16 at 07:05 +1000, Benjamin Herrenschmidt wrote:
On Mon, 2007-10-15 at 15:04 -0400, Jeff Garzik wrote:
quoted
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

Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.

From: Josh Boyer <hidden>
Date: 2007-10-23 15:21:05

On Mon, 15 Oct 2007 14:27:23 -0400
Jeff Garzik [off-list ref] wrote:
Valentine Barshak wrote:
quoted
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 [off-list ref]

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <redacted>
---
 drivers/net/ibm_newemac/phy.c |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+)
--- 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,
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

Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.

From: Kumar Gala <hidden>
Date: 2007-10-23 16:15:12

On Oct 23, 2007, at 10:20 AM, Josh Boyer wrote:
On Mon, 15 Oct 2007 14:27:23 -0400
Jeff Garzik [off-list ref] wrote:
quoted
Valentine Barshak wrote:
quoted
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  
[off-list ref]

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <redacted>
---
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.

From: Josh Boyer <hidden>
Date: 2007-10-23 16:29:23

On Tue, 23 Oct 2007 11:13:48 -0500
Kumar Gala [off-list ref] wrote:
On Oct 23, 2007, at 10:20 AM, Josh Boyer wrote:
quoted
On Mon, 15 Oct 2007 14:27:23 -0400
Jeff Garzik [off-list ref] wrote:
quoted
Valentine Barshak wrote:
quoted
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  
[off-list ref]

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <redacted>
---
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.

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-10-24 03:33:24

On Tue, 2007-10-23 at 20:57 -0500, Valentine Barshak wrote:
+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.
+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.

From: Valentine Barshak <hidden>
Date: 2007-10-24 19:25:21

Benjamin Herrenschmidt wrote:
On Tue, 2007-10-23 at 20:57 -0500, Valentine Barshak wrote:
quoted
+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.
Thanks !
Ben.
quoted
+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
 };
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help