common/board_f: introduce arch_setup_dest_addr()

In order to move ppc-specific code out of setup_dest_addr(), provide an
arch-specific variant arch_setup_dest_addr(), that can be used by
architecture code to fix up the initial reloc address.

It is called at the end of setup_dest_addr() initcall and the default
implementation is a nop stub.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
This commit is contained in:
Ovidiu Panait 2022-09-13 21:31:28 +03:00 committed by Tom Rini
parent 85e68ae001
commit d63fc99435
3 changed files with 37 additions and 14 deletions

View file

@ -103,6 +103,19 @@ phys_size_t get_effective_memsize(void);
int testdram(void);
/**
* arch_setup_dest_addr() - Fix up initial reloc address
*
* This is called in generic board init sequence in common/board_f.c at the end
* of the setup_dest_addr() initcall. Each architecture could provide this
* function to make adjustments to the initial reloc address.
*
* If an implementation is not provided, it will just be a nop stub.
*
* Return: 0 if OK
*/
int arch_setup_dest_addr(void);
/**
* arch_reserve_stacks() - Reserve all necessary stacks
*