mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 4/5] net/phy: add driver for LXT PHYs
Date: Wed, 25 Dec 2013 11:50:04 +0400	[thread overview]
Message-ID: <1387957805-1532-5-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1387957805-1532-1-git-send-email-antonynpavlov@gmail.com>

Based on Linux kernel 3.12 driver.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/net/phy/Kconfig  |  5 +++++
 drivers/net/phy/Makefile |  1 +
 drivers/net/phy/lxt.c    | 31 +++++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+)
 create mode 100644 drivers/net/phy/lxt.c

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 83966f9..7ebdaa0 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 47e2b42..451573e 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 0000000..9e5ddbb
--- /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);
-- 
1.8.5.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-12-25  7:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-25  7:50 [PATCH 0/5] miitool patches Antony Pavlov
2013-12-25  7:50 ` [PATCH 1/5] miitool: change behaviour closer to linux' mii-tool Antony Pavlov
2014-01-06  8:52   ` Sascha Hauer
2013-12-25  7:50 ` [PATCH 2/5] miitool: add initial GbE support Antony Pavlov
2013-12-25  7:50 ` [PATCH 3/5] miitool: drop internal table of known MII, use phy drivers instead Antony Pavlov
2013-12-25  7:50 ` Antony Pavlov [this message]
2013-12-25  7:50 ` [PATCH 5/5] net/phy/phy.c: fix whitespace Antony Pavlov

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=1387957805-1532-5-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox