summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2020-11-28 11:43:16 +0300
committerTom Rini <trini@konsulko.com>2021-01-15 22:36:12 +0300
commitce41e735231f350722221b10bb81408f88235d1d (patch)
tree10212ab9eacb8cd42bc97e0213de412999d2065c /api
parent0154858039fd6d184528ed6a294153bd7f4cd3e0 (diff)
downloadu-boot-ce41e735231f350722221b10bb81408f88235d1d.tar.xz
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>
Diffstat (limited to 'api')
-rw-r--r--api/api.c6
-rw-r--r--api/api_private.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/api/api.c b/api/api.c
index 493b77f809..89003c161c 100644
--- a/api/api.c
+++ b/api/api.c
@@ -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,
diff --git a/api/api_private.h b/api/api_private.h
index 07fd50ad3a..bb23821c2c 100644
--- a/api/api_private.h
+++ b/api/api_private.h
@@ -8,7 +8,7 @@
#ifndef _API_PRIVATE_H_
#define _API_PRIVATE_H_
-void api_init(void);
+int api_init(void);
void platform_set_mr(struct sys_info *, unsigned long, unsigned long, int);
int platform_sys_info(struct sys_info *);