From patchwork Thu Mar 10 04:59:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Hui X-Patchwork-Id: 482 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:43:02 -0000 Delivered-To: patches@linaro.org Received: by 10.224.67.207 with SMTP id s15cs5816qai; Wed, 9 Mar 2011 21:00:53 -0800 (PST) Received: by 10.43.70.20 with SMTP id ye20mr7613365icb.156.1299733253433; Wed, 09 Mar 2011 21:00:53 -0800 (PST) Received: from mail-iy0-f178.google.com (mail-iy0-f178.google.com [209.85.210.178]) by mx.google.com with ESMTPS id c4si6588864ict.11.2011.03.09.21.00.52 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Mar 2011 21:00:52 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of jason.hui@linaro.org) client-ip=209.85.210.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of jason.hui@linaro.org) smtp.mail=jason.hui@linaro.org Received: by iyj8 with SMTP id 8so1524805iyj.37 for ; Wed, 09 Mar 2011 21:00:52 -0800 (PST) Received: by 10.43.60.133 with SMTP id ws5mr9345462icb.89.1299733251987; Wed, 09 Mar 2011 21:00:51 -0800 (PST) Received: from localhost.localdomain ([116.231.118.83]) by mx.google.com with ESMTPS id vm9sm1910663icb.0.2011.03.09.21.00.43 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Mar 2011 21:00:51 -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 V4 5/5] net/fec: add device tree matching support Date: Thu, 10 Mar 2011 12:59:45 +0800 Message-Id: <1299733185-2172-6-git-send-email-jason.hui@linaro.org> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1299733185-2172-1-git-send-email-jason.hui@linaro.org> References: <1299733185-2172-1-git-send-email-jason.hui@linaro.org> Signed-off-by: Jason Liu 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,