From patchwork Mon May 16 17:44:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Burton X-Patchwork-Id: 622691 X-Patchwork-Delegate: daniel.schwierzeck@googlemail.com 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 3r7nv56rWSz9t3l for ; Tue, 17 May 2016 03:46:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 847CBA75E9; Mon, 16 May 2016 19:46:08 +0200 (CEST) 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 lyMwlbjgJBPt; Mon, 16 May 2016 19:46:08 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CBBC7A7519; Mon, 16 May 2016 19:46:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 236844B62B for ; Mon, 16 May 2016 19:46:06 +0200 (CEST) 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 kkZrohLnwxbm for ; Mon, 16 May 2016 19:46:06 +0200 (CEST) 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 mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by theia.denx.de (Postfix) with ESMTP id E178E4A01C for ; Mon, 16 May 2016 19:46:05 +0200 (CEST) Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Websense Email with ESMTPS id 01354929A765B; Mon, 16 May 2016 18:46:01 +0100 (IST) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.266.1; Mon, 16 May 2016 18:46:04 +0100 Received: from localhost (192.168.159.103) by LEMAIL01.le.imgtec.org (192.168.152.62) with Microsoft SMTP Server (TLS) id 14.3.266.1; Mon, 16 May 2016 18:46:03 +0100 From: Paul Burton To: , Daniel Schwierzeck Date: Mon, 16 May 2016 18:44:36 +0100 Message-ID: <1463420679-5042-3-git-send-email-paul.burton@imgtec.com> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1463420679-5042-1-git-send-email-paul.burton@imgtec.com> References: <1463420679-5042-1-git-send-email-paul.burton@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.159.103] Cc: Lev Iserovich , Joe Hershberger , Przemyslaw Marczak Subject: [U-Boot] [PATCH v2 2/5] fdt: Document the rest of struct of_bus X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Provide some documentation for the fields of struct of_bus, for consistency with that provided for the new match field. Signed-off-by: Paul Burton Reviewed-by: Simon Glass --- Changes in v2: - New patch. common/fdt_support.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/common/fdt_support.c b/common/fdt_support.c index 96b5d0a..5d8eb12 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -966,10 +966,29 @@ static void of_dump_addr(const char *s, const fdt32_t *addr, int na) { } /** * struct of_bus - Callbacks for bus specific translators + * @name: A string used to identify this bus in debug output. + * @addresses: The name of the DT property from which addresses are + * to be read, typically "reg". * @match: Return non-zero if the node whose parent is at * parentoffset in the FDT blob corresponds to a bus * of this type, otherwise return zero. If NULL a match * is assumed. + * @count_cells:Count how many cells (be32 values) a node whose parent + * is at parentoffset in the FDT blob will require to + * represent its address (written to *addrc) & size + * (written to *sizec). + * @map: Map the address addr from the address space of this + * bus to that of its parent, making use of the ranges + * read from DT to an array at range. na and ns are the + * number of cells (be32 values) used to hold and address + * or size, respectively, for this bus. pna is the number + * of cells used to hold an address for the parent bus. + * Returns the address in the address space of the parent + * bus. + * @translate: Update the value of the address cells at addr within an + * FDT by adding offset to it. na specifies the number of + * cells used to hold the address being translated. Returns + * zero on success, non-zero on error. * * Each bus type will include a struct of_bus in the of_busses array, * providing implementations of some or all of the functions used to