From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Tue, 19 Aug 2014 13:27:59 -0700 Subject: [U-Boot] [Patch v2 2/5] fdt_support: Make of_bus_default_count_cells non static In-Reply-To: <1408480082-4617-1-git-send-email-yorksun@freescale.com> References: <1408480082-4617-1-git-send-email-yorksun@freescale.com> Message-ID: <1408480082-4617-2-git-send-email-yorksun@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Arnab Basu of_bus_default_count_cells can be used to get the #address-cells and #size-cells defined by the current node's parent node. This is required when using of_read_number to read from FDT nodes that can be 32 or 64 bytes depending on values defined by the parent. Signed-off-by: Arnab Basu CC: Scott Wood --- Change log v2: new patch common/fdt_support.c | 2 +- include/fdt_support.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index 7ec7d4f..3f64156 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -963,7 +963,7 @@ struct of_bus { }; /* Default translator (generic bus) */ -static void of_bus_default_count_cells(void *blob, int parentoffset, +void of_bus_default_count_cells(void *blob, int parentoffset, int *addrc, int *sizec) { const fdt32_t *prop; diff --git a/include/fdt_support.h b/include/fdt_support.h index 649fbd6..c3d1fbc 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -142,6 +142,9 @@ static inline u64 of_read_number(const fdt32_t *cell, int size) return r; } +void of_bus_default_count_cells(void *blob, int parentoffset, + int *addrc, int *sizec); + #endif /* ifdef CONFIG_OF_LIBFDT */ #ifdef USE_HOSTCC -- 1.7.9.5