public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] dm: core: Kconfig: set OF_TRANSLATE default value to n
@ 2015-11-04 14:25 Mugunthan V N
  2015-11-06 12:08 ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Mugunthan V N @ 2015-11-04 14:25 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---

Tested this patch on TI DRA72 platform.

---
 drivers/core/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index 15681df..74e0caf 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -123,7 +123,7 @@ config SPL_SIMPLE_BUS
 config OF_TRANSLATE
 	bool "Translate addresses using fdt_translate_address"
 	depends on DM && OF_CONTROL
-	default y
+	default n
 	help
 	  If this option is enabled, the reg property will be translated
 	  using the fdt_translate_address() function. This is necessary
-- 
2.6.2.280.g74301d6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] dm: core: Kconfig: set OF_TRANSLATE default value to n
  2015-11-04 14:25 [U-Boot] [PATCH] dm: core: Kconfig: set OF_TRANSLATE default value to n Mugunthan V N
@ 2015-11-06 12:08 ` Simon Glass
  2015-11-06 12:19   ` Stefan Roese
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2015-11-06 12:08 UTC (permalink / raw)
  To: u-boot

+Stefan

Hi Mugunthan,

On 4 November 2015 at 07:25, Mugunthan V N <mugunthanvnm@ti.com> 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.

>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
>
> Tested this patch on TI DRA72 platform.
>
> ---
>  drivers/core/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
> index 15681df..74e0caf 100644
> --- a/drivers/core/Kconfig
> +++ b/drivers/core/Kconfig
> @@ -123,7 +123,7 @@ config SPL_SIMPLE_BUS
>  config OF_TRANSLATE
>         bool "Translate addresses using fdt_translate_address"
>         depends on DM && OF_CONTROL
> -       default y
> +       default n
>         help
>           If this option is enabled, the reg property will be translated
>           using the fdt_translate_address() function. This is necessary
> --
> 2.6.2.280.g74301d6
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] dm: core: Kconfig: set OF_TRANSLATE default value to n
  2015-11-06 12:08 ` Simon Glass
@ 2015-11-06 12:19   ` Stefan Roese
  2015-11-06 15:41     ` Stephen Warren
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Roese @ 2015-11-06 12:19 UTC (permalink / raw)
  To: u-boot

+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 <mugunthanvnm@ti.com> 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?

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] dm: core: Kconfig: set OF_TRANSLATE default value to n
  2015-11-06 12:19   ` Stefan Roese
@ 2015-11-06 15:41     ` Stephen Warren
  2015-11-12  9:38       ` Mugunthan V N
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2015-11-06 15:41 UTC (permalink / raw)
  To: u-boot

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 <mugunthanvnm@ti.com> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] dm: core: Kconfig: set OF_TRANSLATE default value to n
  2015-11-06 15:41     ` Stephen Warren
@ 2015-11-12  9:38       ` Mugunthan V N
  0 siblings, 0 replies; 5+ messages in thread
From: Mugunthan V N @ 2015-11-12  9:38 UTC (permalink / raw)
  To: u-boot

On Friday 06 November 2015 09:11 PM, Stephen Warren wrote:
> 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 <mugunthanvnm@ti.com> 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.

In the Kconfig help it is mentioned that this is needed only on some
platforms which uses complex ranges, so when I tried disabling
OF_TRANSLATE on omap platform it still works.

Since OF_TRANSLATE is defined as 'y' as default, SIMPLE_BUS is never
used until OF_TRANSLATE is set to 'n' in defconfig. So I thought of
making the default kconfig option as 'n' and select this which ever
platform needs it like mvebu and nios2.

But if community wants OF_TRANSLATE to be used by default, I am okay to
drop this patch.

Regards
Mugunthan V N

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-12  9:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-04 14:25 [U-Boot] [PATCH] dm: core: Kconfig: set OF_TRANSLATE default value to n Mugunthan V N
2015-11-06 12:08 ` Simon Glass
2015-11-06 12:19   ` Stefan Roese
2015-11-06 15:41     ` Stephen Warren
2015-11-12  9:38       ` Mugunthan V N

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox