common: board_r: Drop initr_api wrapper

Add a return value to api_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:16 +02:00 committed by Tom Rini
parent 0154858039
commit ce41e73523
4 changed files with 15 additions and 14 deletions

View file

@ -642,7 +642,7 @@ int syscall(int call, int *retval, ...)
return 1;
}
void api_init(void)
int api_init(void)
{
struct api_signature *sig;
@ -679,7 +679,7 @@ void api_init(void)
sig = malloc(sizeof(struct api_signature));
if (sig == NULL) {
printf("API: could not allocate memory for the signature!\n");
return;
return -ENOMEM;
}
env_set_hex("api_address", (unsigned long)sig);
@ -691,6 +691,8 @@ void api_init(void)
sig->checksum = crc32(0, (unsigned char *)sig,
sizeof(struct api_signature));
debugf("syscall entry: 0x%lX\n", (unsigned long)sig->syscall);
return 0;
}
void platform_set_mr(struct sys_info *si, unsigned long start, unsigned long size,