From: Matthias Brugger <mbrugger@suse.com>
To: u-boot@lists.denx.de
Subject: Bug: qemu_arm64: Cannot access the second flash bank
Date: Wed, 8 Apr 2020 10:54:12 +0200 [thread overview]
Message-ID: <08367cd7-e24f-c142-a6e2-04bf99396718@suse.com> (raw)
In-Reply-To: <ae8f4b766e244888307a36fc8661e1d134d26221.camel@arm.com>
Hi Robin,
On 09/01/2020 16:21, Robin Randhawa wrote:
> On Thu, 2020-01-09 at 15:57 +0100, Matthias Brugger wrote:
>
> [...]
>
>> The property expects size-cells to be two, but U-Boot will use one
>> cell if no
>> size-cells are defined in the device node (which is not the case) and
>> therefor
>> will see
>>
>> Bank1: Flashbase 0x0 0x0 Flashsize 0x4000000
>> Bank2: Flashbase 0x4000000 0x0 Flashsize 0x4000000
>
> My knowledge of DT is superficial. However, looking at the following
> lines from the spec:
>
> - A |spec|-compliant boot program shall supply #address-cells and
> #size-cells on all nodes that have children.
>
> - If missing, a client program should assume a default value of 2 for
> #address-cells, and a value of 1 for #size-cells.
>
> .. and contrasting with the root node and device node in question from
> the DTS for this platform:
>
> / {
> interrupt-parent = <0x8001>;
> #size-cells = <0x2>;
> #address-cells = <0x2>;
> compatible = "linux,dummy-virt";
> .
> .
>
> flash at 0 {
> bank-width = <0x4>;
> reg = <0x0 0x0 0x0 0x4000000 0x0 0x4000000 0x0 0x4000000>;
> compatible = "cfi-flash";
> };
>
> .. it seems to me that while the flash node is missing #size-cells,
> given that #size-cells _is_ defined in the parent node ("the node that
> has children") then that value (0x2) is the one u-boot should have used
> but didn't.
>
> Maybe the u-boot DT interpreting logic needs to check if the parent
> node also does not specify #size-cells before making the assumption
> that the value 1 is to be used ?
>
Sorry for taking so long. Yes you are correct, I found the issue in U-Boot and
I'm working on a patch. Please stay tuned.
Regards,
Matthias
next prev parent reply other threads:[~2020-04-08 8:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-01 18:20 Bug: qemu_arm64: Cannot access the second flash bank Robin Randhawa
2020-01-09 11:12 ` Matthias Brugger
2020-01-09 13:11 ` Robin Randhawa
2020-01-09 14:57 ` Matthias Brugger
2020-01-09 15:21 ` Robin Randhawa
2020-04-08 8:54 ` Matthias Brugger [this message]
2020-01-09 19:13 ` Peter Maydell
2021-09-13 9:30 ` Matthias Brugger
2021-09-13 9:40 ` Peter Maydell
2021-09-13 13:30 ` Matthias Brugger
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=08367cd7-e24f-c142-a6e2-04bf99396718@suse.com \
--to=mbrugger@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox