From: Wolfram Sang <w.sang@pengutronix.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: netdev@vger.kernel.org, Nicolas Pitre <nico@fluxnic.net>,
linux-arm-kernel@lists.infradead.org,
Herbert Valerio Riedel <hvr@gnu.org>
Subject: Re: [PATCH] phy/marvell: Add special settings for D-Link DNS-323 rev C1
Date: Mon, 17 May 2010 02:59:42 +0200 [thread overview]
Message-ID: <20100517005942.GB27301@pengutronix.de> (raw)
In-Reply-To: <1274056058.21352.697.camel@pasglop>
[-- Attachment #1.1: Type: text/plain, Size: 1453 bytes --]
On Mon, May 17, 2010 at 10:27:38AM +1000, Benjamin Herrenschmidt wrote:
> Without this change, the network LED doesn't work on the device. The
> value itself comes from the vendor kernel.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> drivers/net/phy/marvell.c | 11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> index 64c7fbe..22b1efa 100644
> --- a/drivers/net/phy/marvell.c
> +++ b/drivers/net/phy/marvell.c
> @@ -34,6 +34,10 @@
> #include <asm/irq.h>
> #include <asm/uaccess.h>
>
> +#ifdef CONFIG_ARM
> +#include <asm/mach-types.h>
> +#endif
> +
> #define MII_M1011_IEVENT 0x13
> #define MII_M1011_IEVENT_CLEAR 0x0000
>
> @@ -350,7 +354,14 @@ static int m88e1118_config_init(struct phy_device *phydev)
> return err;
>
> /* Adjust LED Control */
> +#ifdef CONFIG_MACH_DNS323
> + /* The DNS-323 needs a special value in here for the LED to work */
> + if (machine_is_dns323())
> + err = phy_write(phydev, 0x10, 0x1100);
> + else
> +#else
> err = phy_write(phydev, 0x10, 0x021e);
> +#endif
There is a fixup()-callback to prevent boardcode in the drivers. See
Documentation/networking/phy.txt, last chapter.
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2010-05-17 0:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 0:27 [PATCH] phy/marvell: Add special settings for D-Link DNS-323 rev C1 Benjamin Herrenschmidt
2010-05-17 0:59 ` Wolfram Sang [this message]
2010-05-17 1:07 ` Benjamin Herrenschmidt
2010-05-17 11:36 ` Benjamin Herrenschmidt
2010-05-17 12:00 ` Wolfram Sang
2010-05-17 12:08 ` Benjamin Herrenschmidt
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=20100517005942.GB27301@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=benh@kernel.crashing.org \
--cc=hvr@gnu.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=nico@fluxnic.net \
/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 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).