common: board_r: Drop initr_jumptable wrapper

Add a return value to jumptable_init and use it directly in the
post-relocation init sequence, rather than using a wrapper stub.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Ovidiu Panait 2020-11-28 10:43:15 +02:00 committed by Tom Rini
parent eb2825b79d
commit 0154858039
3 changed files with 12 additions and 10 deletions

View File

@ -490,12 +490,6 @@ static int initr_malloc_bootparams(void)
} }
#endif #endif
static int initr_jumptable(void)
{
jumptable_init();
return 0;
}
#if defined(CONFIG_API) #if defined(CONFIG_API)
static int initr_api(void) static int initr_api(void)
{ {
@ -757,7 +751,7 @@ static init_fnc_t init_sequence_r[] = {
pci_init, pci_init,
#endif #endif
stdio_add_devices, stdio_add_devices,
initr_jumptable, jumptable_init,
#ifdef CONFIG_API #ifdef CONFIG_API
initr_api, initr_api,
#endif #endif

View File

@ -25,8 +25,10 @@ unsigned long get_version(void)
# define miiphy_set_current_dev dummy # define miiphy_set_current_dev dummy
#endif #endif
void jumptable_init(void) int jumptable_init(void)
{ {
gd->jt = malloc(sizeof(struct jt_funcs)); gd->jt = malloc(sizeof(struct jt_funcs));
#include <_exports.h> #include <_exports.h>
return 0;
} }

View File

@ -15,8 +15,14 @@
struct cmd_tbl; struct cmd_tbl;
struct spi_slave; struct spi_slave;
/* Set up the jump table for use by the API */ /**
void jumptable_init(void); * jumptable_init() - Set up the jump table for use by the API
*
* It is called during the generic post-relocation init sequence.
*
* Return: 0 if OK
*/
int jumptable_init(void);
/* These are declarations of exported functions available in C code */ /* These are declarations of exported functions available in C code */
unsigned long get_version(void); unsigned long get_version(void);