From patchwork Wed Mar 9 05:19:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Hui X-Patchwork-Id: 462 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:42:49 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs48178qah; Tue, 8 Mar 2011 21:22:28 -0800 (PST) Received: by 10.150.104.8 with SMTP id b8mr3369817ybc.358.1299648147931; Tue, 08 Mar 2011 21:22:27 -0800 (PST) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by mx.google.com with ESMTPS id q17si4207647ybk.23.2011.03.08.21.22.26 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 21:22:26 -0800 (PST) Received-SPF: neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of jason.hui@linaro.org) client-ip=209.85.213.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of jason.hui@linaro.org) smtp.mail=jason.hui@linaro.org Received: by ywa8 with SMTP id 8so105465ywa.37 for ; Tue, 08 Mar 2011 21:22:26 -0800 (PST) Received: by 10.101.3.31 with SMTP id f31mr2525880ani.133.1299648146660; Tue, 08 Mar 2011 21:22:26 -0800 (PST) Received: from localhost.localdomain ([116.231.118.83]) by mx.google.com with ESMTPS id e4sm1953950and.18.2011.03.08.21.22.20 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 21:22:26 -0800 (PST) From: Jason Liu To: devicetree-discuss@lists.ozlabs.org Cc: linaro-dev@lists.linaro.org, patches@linaro.org, grant.likely@linaro.org Subject: [PATCH V3 5/5] net/fec: add device tree matching support Date: Wed, 9 Mar 2011 13:19:33 +0800 Message-Id: <1299647973-21845-6-git-send-email-jason.hui@linaro.org> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1299647973-21845-1-git-send-email-jason.hui@linaro.org> References: <1299647973-21845-1-git-send-email-jason.hui@linaro.org> Signed-off-by: Jason Liu --- drivers/net/fec.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) 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 #include +#include +#include + #include #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,