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 Birje X-Patchwork-Id: 202367 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 668182C0095 for ; Wed, 28 Nov 2012 17:04:28 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6F76A4A09D; Wed, 28 Nov 2012 07:04:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5BJcULwiMosz; Wed, 28 Nov 2012 07:04:20 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5E7624A094; Wed, 28 Nov 2012 07:04:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 85E0B4A0A1 for ; Wed, 28 Nov 2012 07:04:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id adAp8BJyQkBg for ; Wed, 28 Nov 2012 07:03:54 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by theia.denx.de (Postfix) with ESMTP id 81DB14A058 for ; Wed, 28 Nov 2012 07:03:53 +0100 (CET) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0ME6005E5OTY8PN0@mailout3.samsung.com> for u-boot@lists.denx.de; Wed, 28 Nov 2012 15:03:49 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.126]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 7F.D4.12699.549A5B05; Wed, 28 Nov 2012 15:03:49 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-12-50b5a9450ddd Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id DE.D4.12699.549A5B05; 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> for u-boot@lists.denx.de; Wed, 28 Nov 2012 15:03:48 +0900 (KST) From: Rajeshwari Shinde To: u-boot@lists.denx.de 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+NgFrrDLMWRmVeSWpSXmKPExsWyRsSkTtd15dYAg+8HBC3e7u1kd2D0OHtn B2MAYxSXTUpqTmZZapG+XQJXxvLe20wF7zkqWjoOMzYw9rF3MXJySAiYSOya+5UZwhaTuHBv PVsXIxeHkMBSRokbxw8wdTFygBXNuVUKEZ/OKLHp0RUWCGcVk8SsvUdYQLrZBIwktp6cxghi iwhISPzqvwpmMwvESLze/4MNxBYWsJBYdeQCK4jNIqAqcefjXbA4r4C7xIbZy9kgrlCQODb1 K1gNp4CHxL3eRWCXCgHVr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92De/xL1Hya23xOzlxxvsJQpZPnb/X9B1oRxysO+UxeLrXBUorzYrif uKLgvUN8j87xzn61JbDu3ecippJZGTIWUhc/TPz3/Mi/2+wT7t14xsrz84Vpie/xjVvXXzkh 4fe24/Rl/5o6iRVTjWpYT21grN90PzmlwK9/gtaucy8VlkzdV9qnxFKckWioxVxUnAgAlhUh yp4CAAA= X-CFilter-Loop: Reflected Cc: patches@linaro.org Subject: [U-Boot] [PATCH 1/7 V2] FDT: Declare API in header file. X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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