From patchwork Wed Nov 28 06:10:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Shinde X-Patchwork-Id: 13256 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C00852425E for ; Wed, 28 Nov 2012 06:03:51 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 76831A19327 for ; Wed, 28 Nov 2012 06:03:51 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so6707301iag.11 for ; Tue, 27 Nov 2012 22:03:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :dlp-filter:x-mtr:x-brightmail-tracker:x-brightmail-tracker :x-cfilter-loop:x-gm-message-state; bh=7BP+WA56QBQ2hTvKdjm3M8dOfK93B7PIjcSVVn81/9I=; b=afQ4looXdaEmqu2MIaSaLrFIlAnsLxt3xzLSiBqP9zm97Kh3iqfziJDSA9DUP1cair Lc5eqkymCziJhmPhWTGpp9Fnhisd41z2a/KpQXwJcDInE9nfszE/vd7amRlzAzamIlSz a8RCUt2szhi7qJXwNVeDf4F5nHfCFD7tAZqVq6547smGl3wRzQLMJ+vwcpBpQmGeIVKt j4bTAbo3eYD2TsEXBBvq2skk4hjIsEf+A3KjBJvQvzsb9MGgM7EgTt2fM/Edp949ZhkN CYudBfmPvk3uixX+abTJVgpYQrffEt/3GU/Yss1LynZwHz4RjfI8HYiYQQlhU592o4Al JuWw== Received: by 10.50.187.197 with SMTP id fu5mr17751572igc.70.1354082631229; Tue, 27 Nov 2012 22:03:51 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp594620igt; Tue, 27 Nov 2012 22:03:50 -0800 (PST) Received: by 10.66.78.136 with SMTP id b8mr49518890pax.26.1354082630427; Tue, 27 Nov 2012 22:03:50 -0800 (PST) Received: from mailout2.samsung.com (mailout2.samsung.com. [203.254.224.25]) by mx.google.com with ESMTP id tp3si27607195pbc.265.2012.11.27.22.03.50; Tue, 27 Nov 2012 22:03:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.25 as permitted sender) client-ip=203.254.224.25; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.25 as permitted sender) smtp.mail=rajeshwari.s@samsung.com Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0ME6007O8OTV45L0@mailout2.samsung.com>; Wed, 28 Nov 2012 15:03:49 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.123]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 45.21.01231.549A5B05; Wed, 28 Nov 2012 15:03:49 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-dd-50b5a945af47 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id E4.21.01231.449A5B05; Wed, 28 Nov 2012 15:03:49 +0900 (KST) Received: from rajeshwari-linux.sisodomain.com ([107.108.215.115]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0ME600J1EOU4G930@mmp2.samsung.com>; Wed, 28 Nov 2012 15:03:48 +0900 (KST) From: Rajeshwari Shinde To: u-boot@lists.denx.de Cc: patches@linaro.org, sjg@chromium.org, mk7.kang@samsung.com, chander.kashyap@linaro.org Subject: [PATCH 1/7 V2] FDT: Declare API in header file. Date: Wed, 28 Nov 2012 11:40:07 +0530 Message-id: <1354083013-5213-2-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1354083013-5213-1-git-send-email-rajeshwari.s@samsung.com> References: <1354083013-5213-1-git-send-email-rajeshwari.s@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRmVeSWpSXmKPExsWyRsSkWtd15dYAg73veCwerr/JYjHl8BcW ByaPO9f2sAUwRnHZpKTmZJalFunbJXBlLO+9zVTwnqOipeMwYwNjH3sXIweHhICJxKWZXl2M nECmmMSFe+vZuhi5OIQEljJK9Py4xQyRMJE4cWk9C0RiOqPElIevGCGciUwSO1dOZQOpYhMw kth6chojiC0iICHxq/8qmM0sECPxev8PsBphAQuJVUcusILYLAKqEnc+3gWL8wq4S2yYvZwN YpuCxLGpX8FqOAU8JO71LmIHsYWAalY072aC6BWQ+Db5EAvEB7ISmw4wg9wjIXCdTaLtSQcL xBxJiYMrbrBMYBRewMiwilE0tSC5oDgpPddQrzgxt7g0L10vOT93EyMwHE//eya1g3Flg8Uh RgEORiUeXgfHrQFCrIllxZW5hxglOJiVRHh52oBCvCmJlVWpRfnxRaU5qcWHGH2ALpnILCWa nA+MlbySeENjE3NTY1NLIyMzU1McwkrivM0eKQFCAumJJanZqakFqUUw45g4OKUaGMXmplZ7 2QbxX2Equ+6whFuAsZb7x8E7/aqT+kUEWqYusJ78vPdKiM+2a1mhPK6nCpf+UyiQKtr/Z+q9 46lzK+czM1qY8y1Tezb5udPcR3/u5C4JWxgw90bxEo0HiQ59/x6w/po080V7JHfX34Vb6mYt E6/u14ywOqnAUbr21t24V8tluK69alViKc5INNRiLipOBACuLAJRdAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIIsWRmVeSWpSXmKPExsVy+t9jQV3XlVsDDB41slk8XH+TxWLK4S8s Dkwed67tYQtgjGpgtMlITUxJLVJIzUvOT8nMS7dV8g6Od443NTMw1DW0tDBXUshLzE21VXLx CdB1y8wBmq2kUJaYUwoUCkgsLlbSt8M0ITTETdcCpjFC1zckCK7HyAANJKxhzFjee5up4D1H RUvHYcYGxj72LkZODgkBE4kTl9azQNhiEhfurWfrYuTiEBKYzigx5eErRghnIpPEzpVT2UCq 2ASMJLaenMYIYosISEj86r8KZjMLxEi83v8DrEZYwEJi1ZELrCA2i4CqxJ2Pd8HivALuEhtm L2eD2KYgcWzqV7AaTgEPiXu9i8AuEgKqWdG8m2kCI+8CRoZVjKKpBckFxUnpuYZ6xYm5xaV5 6XrJ+bmbGMHh/kxqB+PKBotDjAIcjEo8vA6OWwOEWBPLiitzDzFKcDArifDytAGFeFMSK6tS i/Lji0pzUosPMfoAXTWRWUo0OR8Yi3kl8YbGJuamxqaWJhYmZpY4hJXEeZs9UgKEBNITS1Kz U1MLUotgxjFxcEo1MJ5fpq2WcKb1qJETa+q9z7vXH7GP2JVhv/76jJdzHz50NFbtSfS6tjFJ PY6zesGitGu/bzkGnAtQnmGyhsn8e751waEt/sVqwZwZ/bkWG9V9aoKeCjmYTOPijakRyv/H 9396YGZQ4csAzkm3YxU+eJ0NWGB04agIY7/a0fh5EbsqW5uibeJ0lFiKMxINtZiLihMBLbvI EaQCAAA= X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQm9utUFyPCTitLMlBKWbQ/F4H7XdtwwlqsqHop3bn2BtnGsFZZTIjNsTICAKCJuq3tu9yta Added fd_dec_lookup function to header file. Signed-off-by: Rajeshwari Shinde --- Changes in V2: - New patch. include/fdtdec.h | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/include/fdtdec.h b/include/fdtdec.h index f9aac31..89030aa 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -389,4 +389,17 @@ int fdtdec_get_byte_array(const void *blob, int node, const char *prop_name, */ const u8 *fdtdec_locate_byte_array(const void *blob, int node, const char *prop_name, int count); + +/** + * Find the compatible ID for a given node. + * + * Generally each node has at least one compatible string attached to it. + * This function looks through our list of known compatible strings and + * returns the corresponding ID which matches the compatible string. + * + * @param blob FDT blob to use + * @param node Node containing compatible string to find + * @return compatible ID, or COMPAT_UNKNOWN if we cannot find a match + */ +enum fdt_compat_id fd_dec_lookup(const void *blob, int node); #endif