From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Fri, 25 Sep 2015 09:41:01 -0600 Subject: [U-Boot] [PATCH 1/3] fix: fdtdec: allow parse 'reg' property with zero value in '#size-cells' In-Reply-To: <56050740.5070101@samsung.com> References: <1443108590-16871-1-git-send-email-p.marczak@samsung.com> <1443108590-16871-2-git-send-email-p.marczak@samsung.com> <56042F58.8000003@wwwdotorg.org> <56050740.5070101@samsung.com> Message-ID: <56056B0D.7090307@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/25/2015 02:35 AM, Przemyslaw Marczak wrote: > Hello Stephen, > > On 09/24/2015 07:14 PM, Stephen Warren wrote: >> On 09/24/2015 09:29 AM, Przemyslaw Marczak wrote: >>> After rework of lib/fdtdec.c by commit: >>> >>> commit 02464e386bb5f0a022c121f95ae75cf583759d95 >>> Author: Stephen Warren >>> Date: Thu Aug 6 15:31:02 2015 -0600 >> >> That'd usually be abbreviated as: >> >> Commit 02464e386bb5 "fdt: add new fdt address parsing functions". > > Ok, I will update the commit message. > >> Of course, if you want to shame me that's justified too:-) Tracking down >> regressions sucks:-( > > Oh no no... maybe a little :) > >>> the function fdtdec_get_addr() doesn't work as previous, >>> because the implementation assumes that properties '#address-cells' >>> and '#size-cells' are equal to 1, which can be not true sometimes. >> >> "are equal to" should be "is at least"; the purpose of that rework was >> to support values greater than one. >> > > But it describe the fdtdec_get_addr(), which calls > > fdtdec_get_addr_size_fixed(...) > > and for this call we have: > > na = sizeof(fdt_addr_t) / sizeof(fdt32_t) == 1 > > ns = sizeof(fdt_size_t) / sizeof(fdt32_t) == 1 > > This is consistent with the description for this function in > include/fdtdec.h. Ah yes; I was thinking of the core function fdtdec_get_addr_size_fixed(). The description you gave seems correct.