From mboxrd@z Thu Jan 1 00:00:00 1970 From: Minkyu Kang Date: Wed, 30 Sep 2015 10:27:28 +0900 Subject: [U-Boot] [PATCH V2 1/3] fdtdec: fix parsing 'reg' property with zero value in '#size-cells' In-Reply-To: References: <1443108590-16871-1-git-send-email-p.marczak@samsung.com> <1443442624-7056-1-git-send-email-p.marczak@samsung.com> <1443442624-7056-2-git-send-email-p.marczak@samsung.com> Message-ID: <560B3A80.8010200@samsung.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 29/09/15 13:47, Simon Glass wrote: > On 28 September 2015 at 06:17, Przemyslaw Marczak wrote: >> After rework of lib/fdtdec.c by: >> >> commit: 02464e3 fdt: add new fdt address parsing functions >> >> 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. >> >> The new API introduced fdtdec_get_addr_size_auto_parent() for the 'reg' >> property parsing, but the implementation assumes, that #size-cells >> can't be less than 1. >> >> This causes that the following children's 'reg' property can't be reached: >> >> parent at 0x100 { >> #address-cells = <1>; >> #size-cells = <0>; >> children at 0x100 { >> reg = < 0x100 >; >> }; >> }; >> >> Change the condition value from '1' to '0', which allows parsing property >> with at least zero #size-cells, fixes the issue. >> >> Now, fdtdec_get_addr_size_auto_parent() works properly. >> >> Signed-off-by: Przemyslaw Marczak >> Acked-by: Stephen Warren >> --- >> Changes V2: >> - cleanup commit message >> - add acked-by >> --- >> lib/fdtdec.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > I'll pick this series up if no one else is planning to. > > Tested on snow > Tested-by: Simon Glass > > Acked-by: Simon Glass > Acked-by: Minkyu Kang Thanks, Minkyu Kang.