From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Date: Tue, 4 Aug 2015 17:27:56 +0200 Subject: [U-Boot] [PATCH] Revert "fdt: Fix fdtdec_get_addr_size() for 64-bit" In-Reply-To: <1438560830-31221-1-git-send-email-sjg@chromium.org> References: <1438560830-31221-1-git-send-email-sjg@chromium.org> Message-ID: <20150804152755.GE3812@ulmo.nvidia.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 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: