From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 1/3] fdtdec: fix parsing 'reg' property with zero value in '#size-cells'
Date: Wed, 30 Sep 2015 10:27:28 +0900 [thread overview]
Message-ID: <560B3A80.8010200@samsung.com> (raw)
In-Reply-To: <CAPnjgZ3b4nGZUVNpL3Ath6Wdb+qVthUfG3ZBDUBYDKg1iQ7-Ag@mail.gmail.com>
On 29/09/15 13:47, Simon Glass wrote:
> On 28 September 2015 at 06:17, Przemyslaw Marczak <p.marczak@samsung.com> 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 <p.marczak@samsung.com>
>> Acked-by: Stephen Warren <swarren@nvidia.com>
>> ---
>> 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 <sjg@chromium.org>
>
> Acked-by: Simon Glass <sjg@chromium.org>
>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
Thanks,
Minkyu Kang.
next prev parent reply other threads:[~2015-09-30 1:27 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-24 15:29 [U-Boot] [PATCH 0/3] Fix fdt 'reg' parsing and unbreak Odroid U3 Przemyslaw Marczak
2015-09-24 15:29 ` [U-Boot] [PATCH 1/3] fix: fdtdec: allow parse 'reg' property with zero value in '#size-cells' Przemyslaw Marczak
2015-09-24 17:14 ` Stephen Warren
2015-09-25 8:35 ` Przemyslaw Marczak
2015-09-25 15:41 ` Stephen Warren
2015-09-24 15:29 ` [U-Boot] [PATCH 2/3] fix: s5p_gpio: call: dev_get_addr() instead of fdtdec_get_addr() Przemyslaw Marczak
2015-09-24 17:29 ` Stephen Warren
2015-09-25 8:36 ` Przemyslaw Marczak
2015-09-25 15:48 ` Stephen Warren
2015-09-29 4:47 ` Simon Glass
2015-09-24 15:29 ` [U-Boot] [PATCH 3/3] fix: mach-exynos: clock: restore calling dead exynos4_get_mmc_clk() Przemyslaw Marczak
2015-09-25 2:40 ` [U-Boot] [PATCH 0/3] Fix fdt 'reg' parsing and unbreak Odroid U3 Jaehoon Chung
2015-09-25 8:59 ` Przemyslaw Marczak
2015-09-25 8:56 ` Przemyslaw Marczak
2015-09-25 10:15 ` Przemyslaw Marczak
2015-09-28 12:17 ` [U-Boot] [PATCH V2 0/3] Fix fdt 'reg' parsing and unbreak few Exynos4 boards Przemyslaw Marczak
2015-09-28 12:17 ` [U-Boot] [PATCH V2 1/3] fdtdec: fix parsing 'reg' property with zero value in '#size-cells' Przemyslaw Marczak
2015-09-29 4:47 ` Simon Glass
2015-09-30 1:27 ` Minkyu Kang [this message]
2015-09-28 12:17 ` [U-Boot] [PATCH V2 2/3] gpio: s5p: call: dev_get_addr() instead of fdtdec_get_addr() Przemyslaw Marczak
2015-09-28 12:17 ` [U-Boot] [PATCH V2 3/3] mach-exynos: clock: restore calling dead exynos4_get_mmc_clk() Przemyslaw Marczak
2015-09-29 4:47 ` Simon Glass
2015-09-30 7:26 ` Przemyslaw Marczak
2015-09-30 8:35 ` Jaehoon Chung
2015-09-30 9:20 ` Przemyslaw Marczak
2015-09-30 11:14 ` [U-Boot] [PATCH V3 0/4] Fix fdt 'reg' parsing and unbreak few Exynos4 boards Przemyslaw Marczak
2015-09-30 11:14 ` [U-Boot] [PATCH V3 1/4] fdtdec: fix parsing 'reg' property with zero value in '#size-cells' Przemyslaw Marczak
2015-10-03 14:28 ` Simon Glass
2015-09-30 11:14 ` [U-Boot] [PATCH V3 2/4] gpio: s5p: call: dev_get_addr() instead of fdtdec_get_addr() Przemyslaw Marczak
2015-10-03 14:44 ` Simon Glass
2015-09-30 11:14 ` [U-Boot] [PATCH V3 3/4] mach-exynos: clock: restore calling dead exynos4_get_mmc_clk() Przemyslaw Marczak
2015-10-03 14:44 ` Simon Glass
2015-09-30 11:14 ` [U-Boot] [PATCH V3 4/4] trats: fdt: disable unused DW MMC Przemyslaw Marczak
2015-10-01 3:37 ` Jaehoon Chung
2015-10-01 7:11 ` Przemyslaw Marczak
2015-10-01 7:22 ` Jaehoon Chung
2015-10-03 14:44 ` Simon Glass
2015-09-30 13:13 ` [U-Boot] [PATCH V3 0/4] Fix fdt 'reg' parsing and unbreak few Exynos4 boards Tom Rini
2015-09-30 13:25 ` Przemyslaw Marczak
2015-09-30 18:30 ` Simon Glass
2015-10-03 13:36 ` Simon Glass
2015-10-05 7:46 ` Przemyslaw Marczak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=560B3A80.8010200@samsung.com \
--to=mk7.kang@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.