[U-Boot] [PATCH] generic-board: show model name in board_init_f() too

Simon Glass sjg at chromium.org
Tue Jan 13 15:45:07 CET 2015


Hi Masahiro,

On 27 November 2014 at 10:14, Simon Glass <sjg at chromium.org> wrote:
> Hi Masahiro,
>
> On 27 November 2014 at 10:03, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
>> The common/board_r.c has show_model_r() to display the model name
>> if the DTB has a "model" property.  It sounds useful to have a similar
>> function in common/board_f.c too because most of the boards show
>> their board name before relocation.
>>
>> Instead of implementing the same function in both common/board_f.c
>> and common/board_r.c, let's split it up into common/show_board_info.c.
>>
>> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
>> ---
>>
>>  common/Makefile     |  2 ++
>>  common/board_f.c    |  2 +-
>>  common/board_info.c | 34 ++++++++++++++++++++++++++++++++++
>>  common/board_r.c    | 18 +-----------------
>>  include/common.h    | 13 +++++++------
>>  5 files changed, 45 insertions(+), 24 deletions(-)
>>  create mode 100644 common/board_info.c
>
> This is a change of behaviour in show_model_r() but I think it is OK.
>
> Acked-by: Simon Glass <sjg at chromium.org>
>
> I'd also suggest adding a comment to checkboard() in the header file -
> it is only allowed to print the board name, and cannot do any init,
> etc. That way we can retain the flexibility to drop it one day.

This breaks these boards:

02: generic-board: show model name in board_init_f() too
       arm: +   apalis_t30 venice2 ventana whistler s5pc210_universal
smdkc100 smdkv310 s5p_goni seaboard trimslice paz00 origen beaver
colibri_t20_iris dalmore colibri_t30 trats jetson-tk1 harmony cardhu
trats2

e.g.:

01: Prepare v2015.01
02: generic-board: show model name in board_init_f() too
       arm: +   whistler
w+../common/board_info.c: In function ‘show_board_info’:
w+../common/board_info.c:25:2: warning: implicit declaration of
function ‘fdt_getprop’ [-Wimplicit-function-declaration]
w+../common/board_info.c:25:8: warning: assignment makes pointer from
integer without a cast [enabled by default]

Regards,
Simon


More information about the U-Boot mailing list