Hi Albert,

On Sat, Jan 14, 2012 at 1:18 AM, Albert ARIBAUD
<albert.u.b...@aribaud.net> wrote:
> Hi Simon,
>
> Le 07/01/2012 01:24, Simon Glass a écrit :
>
>> This value has no meaning otherwise.
>>
>> Signed-off-by: Simon Glass<s...@chromium.org>
>> ---
>>
>>  common/cmd_bdinfo.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
>> index ac8e78d..cdc595e 100644
>> --- a/common/cmd_bdinfo.c
>> +++ b/common/cmd_bdinfo.c
>> @@ -369,7 +369,9 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
>> char * const argv[])
>>        print_num("reloc off", gd->reloc_off);
>>        print_num("irq_sp", gd->irq_sp);        /* irq stack pointer */
>>        print_num("sp start ", gd->start_addr_sp);
>> +#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO)
>>        print_num("FB base  ", gd->fb_base);
>> +#endif
>>        return 0;
>>  }
>>
>
> I understand the field can have a meaningful value only for those boards
> with a display, but since it apparently exists on all boards, then it should
> be displayed -- or, if you feel it should not exist for boards without
> displays, then you should make its existence conditional as well.

This is the code in the new include/asm-generic/global-data.h:

#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO)
        unsigned long   fb_base;        /* Base address of framebuffer mem */
#endif

So it does not exist in every case.

The reason I add this condition is so that the cmd_bdinfo.c code can
compile both for ARM and for generic board. Whether to use generic
board or not is not a board option (as suggested by Wolfgang) so the
code must compile either way. I cannot really make generic board
always have this field since it is a waste of space, particularly for
platforms with no such concept.

If you like I could make fb_base conditional in ARM's global_data.h also.

Regards,
Simon

>
> Amicalement,
> --
> Albert.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to