From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mugunthan V N Date: Fri, 11 Sep 2015 16:24:47 +0530 Subject: [U-Boot] [PATCH] fdt: add new fdt address parsing functions In-Reply-To: References: <1438896662-27510-1-git-send-email-swarren@wwwdotorg.org> <55ED494A.3060306@ti.com> Message-ID: <55F2B2F7.2090003@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 09 September 2015 11:38 PM, Simon Glass wrote: > Hi, > > On Monday, 7 September 2015, Mugunthan V N wrote: >> >> On Friday 07 August 2015 03:01 AM, Stephen Warren wrote: >>> From: Stephen Warren >>> >>> fdtdec_get_addr_size() hard-codes the number of cells used to represent >>> an address or size in DT. This is incorrect in many cases depending on >>> the DT binding for a particular node or property (e.g. it is incorrect >>> for the "reg" property). In most cases, DT parsing code must use the >>> properties #address-cells and #size-cells to parse addres properties. >>> >>> This change splits up the implementation of fdtdec_get_addr_size() so >>> that the core logic can be used for both hard-coded and non-hard-coded >>> cases. Various wrapper functions are implemented that support cases >>> where hard-coded cell counts should or should not be used, and where >>> the client does and doesn't know the parent node ID that contains the >>> properties #address-cells and #size-cells. >>> >>> dev_get_addr() is updated to use the new functions. >>> >>> Core functionality in fdtdec_get_addr_size_fixed() is widely tested via >>> fdtdec_get_addr_size(). I tested fdtdec_get_addr_size_auto_noparent() and >>> dev_get_addr() by manually modifying the Tegra I2C driver to invoke them. >>> >>> Much of the core implementation of fdtdec_get_addr_size_fixed(), >>> fdtdec_get_addr_size_auto_parent(), and >>> fdtdec_get_addr_size_auto_noparent() comes from Thierry Reding's >>> previous commit "fdt: Fix fdtdec_get_addr_size() for 64-bit". >> >> Tested this patch for cpsw ethernet dt migration to getting cpsw address >> space. Also dropped *#define DEBUG* in lib/fdtdev.c file. >> >> Tested-by: Mugunthan V N >> > Thanks for testing this. I would like to apply this - are there any > other comments? > There is no other comments apart from removing #define DEBUG Regards Mugunthan V N