From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 1 Sep 2015 08:25:30 +0200 Subject: [U-Boot] DM: Problem with DT bus translation dev_get_addr() Message-ID: <55E544DA.9010608@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, I'm currently enabling DM support for the Marvell MVEBU SoC's I've been working lately on (Armada XP and 38x right now). A problem I'm facing here is the bus translation, as this is quite complex for these SoC's. With multiple levels of translation ranges (multiple simple-bus nodes to walk through). The current implementation in dev_get_addr() does not work. This has 2 reasons: a) It only translates 1 simple-bus node - we need to walk the complete DT to get the correct address. b) The "ranges" property can have different sizes for "address" and "size" in all these busses / nodes. And also multiple ranges tuples are allowed and used in these dts files. Of course this can be solved in the current implementation (device.c / simple_bus.c). But especially b) is not that trivial to solve in a generic way. So my main question is, why don't you use fdt_translate_address() from fdt_support.c instead of implementing your own translation function simple_bus_translate()? Is this a size question because this may be used in SPL as well? Thanks, Stefan