From: Stefan Roese <stefan.roese@gmail.com>
To: devicetree-discuss@lists.ozlabs.org
Cc: linuxppc-dev@lists.ozlabs.org, Detlev Zundel <dzu@denx.de>
Subject: Question on of_address_to_resource() with offset != 0
Date: Tue, 14 Sep 2010 16:29:06 +0200 [thread overview]
Message-ID: <201009141629.06825.stefan.roese@gmail.com> (raw)
Hi,
I'm stumbling upon a problem noticed on the Ebony (440GP) eval board.
Here the first chip-select is connected to 512KiB of SRAM and 512KiB
NOR flash. The dts part look this way:
small-flash@0,80000 {
compatible = "jedec-flash";
bank-width = <1>;
reg = <0x00000000 0x00080000 0x00080000>;
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "OpenBIOS";
reg = <0x00000000 0x00080000>;
read-only;
};
};
Chip-select 0 has this setup:
base-addr = 0xfff00000, size = 0x100000 (phys addr 0x1fff00000 .. 0x1ffffffff)
The problem/crash happens in the physmap_of driver, when the the driver
calls do_map_probe() with the following range:
base-addr = 0xfff80000, size = 0x100000 (phys addr 0x1fff80000 .. 0x20007ffff)
My question now is, should of_address_to_resource() subtract the
offset (here 0x80000) from the size? Is this is bug here? Or should
the physmap_of driver take care of this issue somehow?
Cheers,
Stefan
next reply other threads:[~2010-09-14 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-14 14:29 Stefan Roese [this message]
2010-09-15 12:59 ` Question on of_address_to_resource() with offset != 0 Stefan Roese
2010-09-15 18:43 ` Grant Likely
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=201009141629.06825.stefan.roese@gmail.com \
--to=stefan.roese@gmail.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dzu@denx.de \
--cc=linuxppc-dev@lists.ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).