* [PATCH 2/11] ibm_newemac: Add ET1011c 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 14:29 ` Olof Johansson
0 siblings, 1 reply; 6+ 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 adds support for the Agere ET1011c PHY as found on the AMCC Taishan
board.
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/net/ibm_newemac/phy.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
Index: linux-work/drivers/net/ibm_newemac/phy.c
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/phy.c 2007-11-08 18:54:12.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/phy.c 2007-11-08 18:54:13.000000000 +1100
@@ -327,6 +327,42 @@ static int m88e1111_init(struct mii_phy
return 0;
}
+static int et1011c_init(struct mii_phy *phy)
+{
+ u16 reg_short;
+
+ reg_short = (u16)(phy_read(phy,0x16));
+ reg_short &= ~(0x7);
+ reg_short |= 0x6; /* RGMII Trace Delay*/
+ phy_write(phy, 0x16, reg_short);
+
+ reg_short = (u16)(phy_read(phy, 0x17));
+ reg_short &= ~(0x40);
+ phy_write(phy, 0x17, reg_short);
+
+ phy_write(phy,0x1c,0x74f0);
+ return 0;
+}
+
+static struct mii_phy_ops et1011c_phy_ops = {
+ .init = et1011c_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 et1011c_phy_def = {
+ .phy_id = 0x0282f000,
+ .phy_id_mask = 0x0fffff00,
+ .name = "ET1011C Gigabit Ethernet",
+ .ops = &et1011c_phy_ops
+};
+
+
+
+
+
static struct mii_phy_ops m88e1111_phy_ops = {
.init = m88e1111_init,
.setup_aneg = genmii_setup_aneg,
@@ -344,6 +380,7 @@ static struct mii_phy_def m88e1111_phy_d
};
static struct mii_phy_def *mii_phy_table[] = {
+ &et1011c_phy_def,
&cis8201_phy_def,
&bcm5248_phy_def,
&m88e1111_phy_def,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/11] ibm_newemac: Add ET1011c PHY support
2007-11-30 5:40 ` [PATCH 2/11] ibm_newemac: Add ET1011c PHY support Benjamin Herrenschmidt
@ 2007-11-30 14:29 ` Olof Johansson
2007-11-30 20:59 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 6+ messages in thread
From: Olof Johansson @ 2007-11-30 14:29 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: netdev, jgarzik, linuxppc-dev
Hi,
On Fri, Nov 30, 2007 at 04:40:24PM +1100, Benjamin Herrenschmidt wrote:
> This adds support for the Agere ET1011c PHY as found on the AMCC Taishan
> board.
The whole patch has whitespace messed up (tabs vs spaces).
-Olof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/11] ibm_newemac: Add ET1011c PHY support
2007-11-30 14:29 ` Olof Johansson
@ 2007-11-30 20:59 ` Benjamin Herrenschmidt
2007-11-30 21:30 ` Olof Johansson
2007-11-30 21:56 ` Kumar Gala
0 siblings, 2 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-30 20:59 UTC (permalink / raw)
To: Olof Johansson; +Cc: netdev, jgarzik, linuxppc-dev
On Fri, 2007-11-30 at 08:29 -0600, Olof Johansson wrote:
> Hi,
>
> On Fri, Nov 30, 2007 at 04:40:24PM +1100, Benjamin Herrenschmidt wrote:
>
> > This adds support for the Agere ET1011c PHY as found on the AMCC Taishan
> > board.
>
> The whole patch has whitespace messed up (tabs vs spaces).
Thanks for noticing it on the ...3rd time those are sent to the list...
Ben.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/11] ibm_newemac: Add ET1011c PHY support
2007-11-30 20:59 ` Benjamin Herrenschmidt
@ 2007-11-30 21:30 ` Olof Johansson
2007-11-30 21:56 ` Kumar Gala
1 sibling, 0 replies; 6+ messages in thread
From: Olof Johansson @ 2007-11-30 21:30 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: netdev, jgarzik, linuxppc-dev
On Sat, Dec 01, 2007 at 07:59:16AM +1100, Benjamin Herrenschmidt wrote:
>
> On Fri, 2007-11-30 at 08:29 -0600, Olof Johansson wrote:
> > Hi,
> >
> > On Fri, Nov 30, 2007 at 04:40:24PM +1100, Benjamin Herrenschmidt wrote:
> >
> > > This adds support for the Agere ET1011c PHY as found on the AMCC Taishan
> > > board.
> >
> > The whole patch has whitespace messed up (tabs vs spaces).
>
> Thanks for noticing it on the ...3rd time those are sent to the list...
Yeah, sorry about that. Should have caught it sooner.
Anyway, can be fixed up with incremental patch, doesn't need to hold up
the whole series.
-Olof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/11] ibm_newemac: Add ET1011c PHY support
2007-11-30 20:59 ` Benjamin Herrenschmidt
2007-11-30 21:30 ` Olof Johansson
@ 2007-11-30 21:56 ` Kumar Gala
1 sibling, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2007-11-30 21:56 UTC (permalink / raw)
To: benh; +Cc: Olof Johansson, netdev, jgarzik, linuxppc-dev
On Nov 30, 2007, at 2:59 PM, Benjamin Herrenschmidt wrote:
>
> On Fri, 2007-11-30 at 08:29 -0600, Olof Johansson wrote:
>> Hi,
>>
>> On Fri, Nov 30, 2007 at 04:40:24PM +1100, Benjamin Herrenschmidt
>> wrote:
>>
>>> This adds support for the Agere ET1011c PHY as found on the AMCC
>>> Taishan
>>> board.
>>
>> The whole patch has whitespace messed up (tabs vs spaces).
>
> Thanks for noticing it on the ...3rd time those are sent to the
> list...
Clearly if you used checkpatch.pl you'd have noticed this by now. :)
- k
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/11] ibm_newemac: Add ET1011c PHY support
@ 2007-12-05 0:14 Benjamin Herrenschmidt
0 siblings, 0 replies; 6+ 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 adds support for the Agere ET1011c PHY as found on the AMCC Taishan
board.
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/net/ibm_newemac/phy.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
Index: linux-work/drivers/net/ibm_newemac/phy.c
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/phy.c 2007-12-03 11:58:16.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/phy.c 2007-12-03 11:59:53.000000000 +1100
@@ -327,6 +327,42 @@ static int m88e1111_init(struct mii_phy
return 0;
}
+static int et1011c_init(struct mii_phy *phy)
+{
+ u16 reg_short;
+
+ reg_short = (u16)(phy_read(phy, 0x16));
+ reg_short &= ~(0x7);
+ reg_short |= 0x6; /* RGMII Trace Delay*/
+ phy_write(phy, 0x16, reg_short);
+
+ reg_short = (u16)(phy_read(phy, 0x17));
+ reg_short &= ~(0x40);
+ phy_write(phy, 0x17, reg_short);
+
+ phy_write(phy, 0x1c, 0x74f0);
+ return 0;
+}
+
+static struct mii_phy_ops et1011c_phy_ops = {
+ .init = et1011c_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 et1011c_phy_def = {
+ .phy_id = 0x0282f000,
+ .phy_id_mask = 0x0fffff00,
+ .name = "ET1011C Gigabit Ethernet",
+ .ops = &et1011c_phy_ops
+};
+
+
+
+
+
static struct mii_phy_ops m88e1111_phy_ops = {
.init = m88e1111_init,
.setup_aneg = genmii_setup_aneg,
@@ -344,6 +380,7 @@ static struct mii_phy_def m88e1111_phy_d
};
static struct mii_phy_def *mii_phy_table[] = {
+ &et1011c_phy_def,
&cis8201_phy_def,
&bcm5248_phy_def,
&m88e1111_phy_def,
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-12-05 0:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05 0:14 [PATCH 2/11] ibm_newemac: Add ET1011c PHY support 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 2/11] ibm_newemac: Add ET1011c PHY support Benjamin Herrenschmidt
2007-11-30 14:29 ` Olof Johansson
2007-11-30 20:59 ` Benjamin Herrenschmidt
2007-11-30 21:30 ` Olof Johansson
2007-11-30 21:56 ` Kumar Gala
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).