From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: netdev@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
Nicolas Pitre <nico@fluxnic.net>,
Herbert Valerio Riedel <hvr@gnu.org>
Subject: [PATCH] phy/marvell: Add special settings for D-Link DNS-323 rev C1
Date: Mon, 17 May 2010 10:27:38 +1000 [thread overview]
Message-ID: <1274056058.21352.697.camel@pasglop> (raw)
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
if (err < 0)
return err;
next reply other threads:[~2010-05-17 0:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 0:27 Benjamin Herrenschmidt [this message]
2010-05-17 0:59 ` [PATCH] phy/marvell: Add special settings for D-Link DNS-323 rev C1 Wolfram Sang
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=1274056058.21352.697.camel@pasglop \
--to=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).