From: Stephen Warren Date: Fri, 15 Dec 2017 10:06:16 -0700 Subject: [U-Boot] [PATCH v2] drivers: core: Add translation in live tree case In-Reply-To: References: <20171124065140.21722-1-mario.six@gdsys.cc> Message-ID: <0625920c-14fb-bc4f-5a72-1393b36c43ee@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12/15/2017 01:19 AM, Mario Six wrote: > On Fri, Dec 15, 2017 at 9:05 AM, Mario Six wrote: >> Hi Simon, >> >> On Thu, Dec 14, 2017 at 9:36 PM, Simon Glass wrote: >>> +Stephen, Tom >>> >>> Hi Mario, >>> >>> I've had to drop this since it breaks tegra. Stephen feels that this >>> is likely a bug in the patch rather than anything wrong with Tegra. Do >>> you have any thoughts? I can potentially try things out on the Tegra >>> boards I have. >>> >>> Regards, >>> Simon >>> >> >> I think I've found the problem: It's an endianness issue. The >> of_translate_address function seems to return a raw big-endian address, while >> the of_read_number function translates it to CPU endianness before returning >> it. On the MPC8308 I tested on this made no difference, but little-endian >> systems will have problems. When I put a bogus dev_read_addr in the sandbox >> serial driver, I see the effect as well. >> >> Here's a hopefully fixed version (just the diff; I'll post a proper patch when >> your tests succeeded); it corrects the issue on sandbox, so I hope it will work >> on tegra as well: ... > Small correction: Yes, that seems to work. I tested: a) u-boot-dm works fine on Jetson TK1. b) Applying your original patch reproduces the failure. c) Applying this latest patch make everything work again. Thanks.