Re: [U-Boot] [PATCH v2 09/30] board_f: Add new function to allow runtime DTB selection

2017-05-26 Thread Franklin S Cooper Jr


On 05/26/2017 03:08 AM, Lothar Waßmann wrote:
> Franklin S Cooper Jr  wrote:
> 
>> Runtime U-boot dtb selection is generally a two step process. First step
>> is to simply use an initial generic dtb. The second step is to select
>> the dtb and perhaps execute additional code ones U-boot knows what board
>>
> s/ones/once/
> 
>> it is running on. Embedded_dtb_select handles the second step by allowing
>> board specific code to run and perform what ever necessary configuration
>> that is needed.
>>
>> Signed-off-by: Franklin S Cooper Jr 
>> ---
>>  common/Kconfig   | 10 ++
>>  common/board_f.c |  3 +++
>>  include/common.h |  4 
>>  3 files changed, 17 insertions(+)
>>
>> diff --git a/common/Kconfig b/common/Kconfig
>> index 2429953..b6327f0 100644
>> --- a/common/Kconfig
>> +++ b/common/Kconfig
>> @@ -421,6 +421,16 @@ config SYS_STDIO_DEREGISTER
>>  
>>  endmenu
>>  
>> +config DTB_RESELECT
>> +bool "Support swapping dtbs at a later point in boot"
>> +depends on FIT_EMBED
>> +default n
>>
> 'default n' is redundant.
> 
> 

Tom mentioned this also in my v1 patch and I forgot to fix it in this
patchset. I've sent a v3 that already drops this.

https://patchwork.ozlabs.org/patch/766537/
> Lothar Waßmann
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 09/30] board_f: Add new function to allow runtime DTB selection

2017-05-26 Thread Lothar Waßmann
Franklin S Cooper Jr  wrote:

> Runtime U-boot dtb selection is generally a two step process. First step
> is to simply use an initial generic dtb. The second step is to select
> the dtb and perhaps execute additional code ones U-boot knows what board
>
s/ones/once/

> it is running on. Embedded_dtb_select handles the second step by allowing
> board specific code to run and perform what ever necessary configuration
> that is needed.
> 
> Signed-off-by: Franklin S Cooper Jr 
> ---
>  common/Kconfig   | 10 ++
>  common/board_f.c |  3 +++
>  include/common.h |  4 
>  3 files changed, 17 insertions(+)
> 
> diff --git a/common/Kconfig b/common/Kconfig
> index 2429953..b6327f0 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -421,6 +421,16 @@ config SYS_STDIO_DEREGISTER
>  
>  endmenu
>  
> +config DTB_RESELECT
> + bool "Support swapping dtbs at a later point in boot"
> + depends on FIT_EMBED
> + default n
>
'default n' is redundant.


Lothar Waßmann
-- 
___

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | i...@karo-electronics.de
___
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 09/30] board_f: Add new function to allow runtime DTB selection

2017-05-24 Thread Franklin S Cooper Jr


On 05/23/2017 12:42 PM, Franklin S Cooper Jr wrote:
> Runtime U-boot dtb selection is generally a two step process. First step
> is to simply use an initial generic dtb. The second step is to select
> the dtb and perhaps execute additional code ones U-boot knows what board
> it is running on. Embedded_dtb_select handles the second step by allowing
> board specific code to run and perform what ever necessary configuration
> that is needed.
> 
> Signed-off-by: Franklin S Cooper Jr 
> ---
>  common/Kconfig   | 10 ++
>  common/board_f.c |  3 +++
>  include/common.h |  4 
>  3 files changed, 17 insertions(+)
> 
> diff --git a/common/Kconfig b/common/Kconfig
> index 2429953..b6327f0 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -421,6 +421,16 @@ config SYS_STDIO_DEREGISTER
>  
>  endmenu
>  
> +config DTB_RESELECT
> + bool "Support swapping dtbs at a later point in boot"
> + depends on FIT_EMBED
> + default n

I will be sending a new rev. I missed dropping the above statement based
on the rev 1 comment.
> + help
> +   It is possible during initial boot you may need to use a generic
> +   dtb until you can fully determine the board your running on. This
> +   config allows boards to implement a function at a later point
> +   during boot to switch to the "correct" dtb.
> +
>  config FIT_EMBED
>   bool "Support a FIT image embedded in the U-boot image"
>   default n
> diff --git a/common/board_f.c b/common/board_f.c
> index a212f2b..b383239 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -759,6 +759,9 @@ static const init_fnc_t init_sequence_f[] = {
>  #if defined(CONFIG_DISPLAY_CPUINFO)
>   print_cpuinfo,  /* display cpu info (and speed) */
>  #endif
> +#if defined(CONFIG_DTB_RESELECT)
> + embedded_dtb_select,
> +#endif
>  #if defined(CONFIG_DISPLAY_BOARDINFO)
>   show_board_info,
>  #endif
> diff --git a/include/common.h b/include/common.h
> index 45f190a..ebc716e 100644
> --- a/include/common.h
> +++ b/include/common.h
> @@ -478,6 +478,10 @@ void pci_init_board(void);
>  #endif
>  #endif
>  
> +#if defined(CONFIG_DTB_RESELECT)
> +int  embedded_dtb_select(void);
> +#endif
> +
>  int  misc_init_f   (void);
>  int  misc_init_r   (void);
>  
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot