All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy/marvell: Add special settings for D-Link DNS-323 rev C1
@ 2010-05-17  0:27 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 12+ messages in thread
From: Benjamin Herrenschmidt @ 2010-05-17  0:27 UTC (permalink / raw)
  To: linux-arm-kernel

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;
 

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-05-17 12:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-17  0:27 [PATCH] phy/marvell: Add special settings for D-Link DNS-323 rev C1 Benjamin Herrenschmidt
2010-05-17  0:27 ` Benjamin Herrenschmidt
2010-05-17  0:59 ` Wolfram Sang
2010-05-17  0:59   ` Wolfram Sang
2010-05-17  1:07   ` Benjamin Herrenschmidt
2010-05-17  1:07     ` Benjamin Herrenschmidt
2010-05-17 11:36     ` Benjamin Herrenschmidt
2010-05-17 11:36       ` Benjamin Herrenschmidt
2010-05-17 12:00       ` Wolfram Sang
2010-05-17 12:00         ` Wolfram Sang
2010-05-17 12:08         ` Benjamin Herrenschmidt
2010-05-17 12:08           ` Benjamin Herrenschmidt

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.