diff mbox

[V3,5/5] net/fec: add device tree matching support

Message ID 1299647973-21845-6-git-send-email-jason.hui@linaro.org
State New
Headers show

Commit Message

Jason Hui March 9, 2011, 5:19 a.m. UTC
Signed-off-by: Jason Liu <r64343@freescale.com>
---
 drivers/net/fec.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 02cdd71..fcb9768 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -45,6 +45,9 @@ 
 #include <linux/phy.h>
 #include <linux/fec.h>
 
+#include <linux/of.h>
+#include <linux/of_address.h>
+
 #include <asm/cacheflush.h>
 
 #ifndef CONFIG_ARM
@@ -1523,6 +1526,13 @@  static const struct dev_pm_ops fec_pm_ops = {
 };
 #endif
 
+#ifdef CONFIG_OF
+static struct of_device_id fec_matches[] = {
+	{ .compatible = "fsl,imx-fec" },
+	{},
+};
+#endif
+
 static struct platform_driver fec_driver = {
 	.driver	= {
 		.name	= DRIVER_NAME,
@@ -1530,6 +1540,9 @@  static struct platform_driver fec_driver = {
 #ifdef CONFIG_PM
 		.pm	= &fec_pm_ops,
 #endif
+#ifdef CONFIG_OF
+		.of_match_table = fec_matches,
+#endif
 	},
 	.id_table = fec_devtype,
 	.probe	= fec_probe,