From: Stefan Roese <sr@denx.de>
To: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2/6] ibm_newemac: Add ET1011c PHY support
Date: Thu, 8 Nov 2007 09:41:46 +0100 [thread overview]
Message-ID: <200711080941.46894.sr@denx.de> (raw)
In-Reply-To: <20071108080729.E09F7DDDFB@ozlabs.org>
On Thursday 08 November 2007, Benjamin Herrenschmidt wrote:
> This adds support for the ET1011c PHY as found on the taishan
> board.
>
> The code comes from the kernel distributed with the board by
> AMCC and developped by DENX.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> And don't ask me about using phylib, it's in plan :-)
>
> 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
> 15:11:30.000000000 +1100 +++
> linux-work/drivers/net/ibm_newemac/phy.c 2007-11-08 15:11:54.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
> +};
> +
> +
> +
> +
> +
Nitpicking: Too many empty lines for my taste.
Other then that:
Acked-by: Stefan Roese <sr@denx.de>
Thanks.
Best regards,
Stefan
next prev parent reply other threads:[~2007-11-08 8:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-08 8:06 [PATCH 0/6] ibm_newemac: Pending patches for review Benjamin Herrenschmidt
2007-11-08 8:06 ` [PATCH 1/6] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support Benjamin Herrenschmidt
2007-11-08 8:06 ` [PATCH 2/6] ibm_newemac: Add ET1011c " Benjamin Herrenschmidt
2007-11-08 8:41 ` Stefan Roese [this message]
2007-11-08 8:42 ` Benjamin Herrenschmidt
2007-11-08 12:08 ` Josh Boyer
2007-11-08 20:55 ` Benjamin Herrenschmidt
2007-11-09 5:44 ` Stefan Roese
2007-11-08 8:06 ` [PATCH 4/6] ibm_newemac: Workaround reset timeout when no link Benjamin Herrenschmidt
2007-11-08 8:44 ` Stefan Roese
2007-11-08 8:06 ` [PATCH 3/6] ibm_newemac: Fix ZMII refcounting bug Benjamin Herrenschmidt
2007-11-08 8:43 ` Stefan Roese
2007-11-08 8:07 ` [PATCH 5/6] ibm_newemac: Cleanup/Fix RGMII MDIO support detection Benjamin Herrenschmidt
2007-11-08 9:24 ` Stefan Roese
2007-11-08 8:07 ` [PATCH 6/6] ibm_newemac: Cleanup/fix support for STACR register variants Benjamin Herrenschmidt
2007-11-08 9:38 ` Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200711080941.46894.sr@denx.de \
--to=sr@denx.de \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.