[U-Boot] [PATCH v3 10/12] avr32: add generic board support

Andreas Bießmann andreas.devel at googlemail.com
Sun Feb 8 22:21:05 CET 2015


Hi Simon,

On 07.02.15 01:28, Simon Glass wrote:
> On 6 February 2015 at 15:06, Andreas Bießmann
> <andreas.devel at googlemail.com> wrote:
>> Signed-off-by: Andreas Bießmann <andreas.devel at googlemail.com>
>> ---
>> This version still has the mmu_init_r() in common/board_r. Removing this now is
>> not that easy ... I'd love to get it in as is and change it later to the
>> board_init_f_r() sequence.
>>
>> Changes in v3:
>> - remove unnecessary stack implementation for avr32
>> - fix bdinfo output
>>
>> Changes in v2:
>> - remove bootparams allocation, provide as extra patch
>> - use the else path in setup_mon_len()
>> - provide arch_reserve_stacks() for avr32
>> - use the newly introduced dram_init()
>>
>> Changes in v1:
>> - add timer_init in board_r
>> - remove extern declaration of mmu_init_r()
>>
>>  arch/avr32/config.mk            |    3 +++
>>  arch/avr32/cpu/u-boot.lds       |    2 ++
>>  arch/avr32/include/asm/config.h |    1 +
>>  arch/avr32/include/asm/u-boot.h |    7 +++++++
>>  arch/avr32/lib/Makefile         |    2 ++
>>  arch/avr32/lib/interrupts.c     |    5 +++++
>>  common/board_f.c                |    2 +-
>>  common/board_r.c                |   13 ++++++++++---
>>  common/cmd_bdinfo.c             |    4 ++--
>>  include/asm-generic/u-boot.h    |    4 ++++
>>  10 files changed, 37 insertions(+), 6 deletions(-)

>> diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
>> index e6d8a7a..999d026 100644
>> --- a/common/cmd_bdinfo.c
>> +++ b/common/cmd_bdinfo.c
>> @@ -333,8 +333,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>>         bd_t *bd = gd->bd;
>>
>>         print_num("boot_params",        (ulong)bd->bi_boot_params);
>> -       print_num("memstart",           (ulong)bd->bi_memstart);
>> -       print_lnum("memsize",           (u64)bd->bi_memsize);
>> +       print_num("memstart",           (ulong)bd->bi_dram[0].start);
>> +       print_lnum("memsize",           (u64)bd->bi_dram[0].size);
> 
> Can you explain this change please? I'm not sure what is happening here.

avr32 never had bd_t.bi_mem(start|size) members, they where always
defined to bd_t.bi_dram[0].(start|size). Please have a look at
arch/avr32/include/asm/u-boot.h.

When converting to generic board I also have to use the generic bd_t
(which is a mess). Since the current generic board implementation do not
set both bi_mem(start|size) for all architectures I decided to go with
bi_dram[0].(start|size), this will also work with the other boards not
converted yet. To use just the first entry in bi_dram[] and do not loop
over is ok on avr32 since the only SoC available there has just one
SDRAM controller.

If you're Ok with this change I would apply this series with one fix for
'common/board_f: factor out reserve_stacks' and maybe a more descriptive
commit message for 'common/board_r: allocate bootparams' mid of next
week to avr32/master and send a PR. AFAIR the microblaze generic board
conversion depends on at least one patch of this series.

Best regards

Andreas Bießmann


More information about the U-Boot mailing list