summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2013-12-25 11:50:04 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2014-01-06 09:42:30 +0100
commitce4e4eff35caf8953610131d7c9107a53769f443 (patch)
tree5e96d8acbe62000327877c085ecd8f20473152df /drivers
parent23e0081cfd138e808ccadf7ba2fc46f487a3e965 (diff)
downloadbarebox-ce4e4eff35caf8953610131d7c9107a53769f443.tar.gz
barebox-ce4e4eff35caf8953610131d7c9107a53769f443.tar.xz
net/phy: add driver for LXT PHYs
Based on Linux kernel 3.12 driver. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/Kconfig5
-rw-r--r--drivers/net/phy/Makefile1
-rw-r--r--drivers/net/phy/lxt.c31
3 files changed, 37 insertions, 0 deletions
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 83966f997f..7ebdaa0c01 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -13,6 +13,11 @@ config AT803X_PHY
---help---
Currently supports the AT8030, AT8031 and AT8035 PHYs.
+config LXT_PHY
+ bool "Driver for the Intel LXT PHYs"
+ ---help---
+ Currently supports the lxt971 PHY.
+
config MICREL_PHY
bool "Driver for Micrel PHYs"
---help---
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index 47e2b42331..451573ed83 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -1,4 +1,5 @@
obj-y += phy.o mdio_bus.o
obj-$(CONFIG_AT803X_PHY) += at803x.o
+obj-$(CONFIG_LXT_PHY) += lxt.o
obj-$(CONFIG_MICREL_PHY) += micrel.o
obj-$(CONFIG_SMSC_PHY) += smsc.o
diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c
new file mode 100644
index 0000000000..9e5ddbb426
--- /dev/null
+++ b/drivers/net/phy/lxt.c
@@ -0,0 +1,31 @@
+/*
+ * drivers/net/phy/lxt.c
+ *
+ * Driver for Intel LXT PHYs
+ *
+ * base on Andy Fleming's linux lxt.c driver
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include <common.h>
+#include <init.h>
+#include <linux/phy.h>
+
+static struct phy_driver lxt97x_driver[] = {
+{
+ .phy_id = 0x001378e0,
+ .phy_id_mask = 0xfffffff0,
+ .drv.name = "LXT971",
+ .features = PHY_BASIC_FEATURES,
+} };
+
+static int lxt97x_phy_init(void)
+{
+ return phy_drivers_register(lxt97x_driver,
+ ARRAY_SIZE(lxt97x_driver));
+}
+fs_initcall(lxt97x_phy_init);