[U-Boot] [PATCH] Revert "fdt: Fix fdtdec_get_addr_size() for 64-bit"
Thierry Reding
treding at nvidia.com
Tue Aug 4 17:27:56 CEST 2015
On Sun, Aug 02, 2015 at 06:13:50PM -0600, Simon Glass wrote:
> This reverts commit 5b34436035fc862b5e8d0d2c3eab74ba36f1a7f4.
>
> This function has a few problems. It calls fdt_parent_offset() which as
> mentioned in code review is very slow.
>
> https://patchwork.ozlabs.org/patch/499482/
> https://patchwork.ozlabs.org/patch/452604/
>
> It also happens to break SPI flash on Minnowboard max which is how I noticed
> that this was applied. I can send a patch to tidy that up, but in any case
> I think we should consider a revert until the function is better implemented.
I suspect that what breaks is when you try to parse the "memory-map"
property from this (taken from arch/x86/dts/minnowmax.dts):
spi {
#address-cells = <1>;
#size-cells = <0>;
compatible = "intel,ich-spi";
spi-flash at 0 {
reg = <0>;
compatible = "stmicro,n25q064a", "spi-flash";
memory-map = <0xff800000 0x00800000>;
};
};
That's obviously not going to work because as Stephen and I have pointed
out it specifies an address range in a different address space than that
of the SPI flash. The spi parent node defines #address-cells and
#size-cells, both of which define the layout of the "reg" property (and
some others like "ranges"). I don't see a way around this other than to
read two individual cells from the "memory-map" property. I don't know
of a concept in DT that would allow you to translate from memory-map in
the spi-flash at 0 node to the address space in the parent node of the spi
node (the root node).
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150804/7d1f3bf2/attachment.sig>
More information about the U-Boot
mailing list