From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Fri, 6 Nov 2015 08:41:40 -0700 Subject: [U-Boot] [PATCH] dm: core: Kconfig: set OF_TRANSLATE default value to n In-Reply-To: <563C9AE0.9000904@denx.de> References: <1446647115-22615-1-git-send-email-mugunthanvnm@ti.com> <563C9AE0.9000904@denx.de> Message-ID: <563CCA34.1080301@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 11/06/2015 05:19 AM, Stefan Roese wrote: > +Stephan Warren & Thomas Chou > > On 06.11.2015 13:08, Simon Glass wrote: >> +Stefan >> >> Hi Mugunthan, >> >> On 4 November 2015 at 07:25, Mugunthan V N wrote: >>> Based on the OF_TRANSLATE Kconfig description, this is required >>> only on platforms with complex "ranges" in the DT nodes. For >>> simpler platforms using SIMPLE_BUS should be sufficient. Since >>> this a set to default y, simple bus is never used in any >>> platform. So make the default value as "n" and enable >>> OF_TRANSLATE only on required platform. >> >> How do you know it is not used? This is surprising because Stefan >> presumably added it to fix something. > > I assume Mugunthan meant, that simple bus is never used. This > is not quite correct, as its at least used per default in the > SPL (because of size reasons). > > And yes, this translation via fdt_translate_address() is needed. > At least for some platforms, like mvebu & nios2 (IIRC). Stephen > also made some quite striking comments about this a few weeks > ago. And I really think that we should make use of this function > per default. Platforms that know for sure that they don't need > this functionality can always disable it selectively. > > Mugunthan, why do you want to disable this functionality? Does > it cause problems on your platform? If yes, which ones? Processing of ranges is a fundamental part of handling DT in general. It should be enabled by default. If there are well-researched cases where (a) including the code is problematic (e.g. due to code size restrictions) and (b) someone is watching the DTs processed on those platforms like a hawk to ensure no ranges properties are introduced into the DT, *then* we could make a special-case exception to disable the feature in those specific cases. As such, I think enable-by-default, disable-when-chosen is the appropriate default.