summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-at91/bootstrap.c8
-rw-r--r--include/bootstrap.h3
-rw-r--r--lib/bootstrap/common.c4
3 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/mach-at91/bootstrap.c b/arch/arm/mach-at91/bootstrap.c
index 1baf7323fe..47e78965d9 100644
--- a/arch/arm/mach-at91/bootstrap.c
+++ b/arch/arm/mach-at91/bootstrap.c
@@ -51,7 +51,7 @@ static char* is_barebox_to_str(bool is_barebox)
static void at91bootstrap_boot_m25p80(bool is_barebox)
{
char *name = is_barebox_to_str(is_barebox);
- int (*func)(void) = NULL;
+ kernel_entry_func func = NULL;
func = bootstrap_board_read_m25p80();
printf("Boot %s from m25p80\n", name);
@@ -63,7 +63,7 @@ static void at91bootstrap_boot_m25p80(bool is_barebox)
static void at91bootstrap_boot_dataflash(bool is_barebox)
{
char *name = is_barebox_to_str(is_barebox);
- int (*func)(void) = NULL;
+ kernel_entry_func func = NULL;
printf("Boot %s from dataflash\n", name);
func = bootstrap_board_read_dataflash();
@@ -75,7 +75,7 @@ static void at91bootstrap_boot_dataflash(bool is_barebox)
static void at91bootstrap_boot_nand(bool is_barebox)
{
char *name = is_barebox_to_str(is_barebox);
- int (*func)(void) = NULL;
+ kernel_entry_func func = NULL;
printf("Boot %s from nand\n", name);
func = bootstrap_read_devfs("nand0", true, SZ_128K, SZ_256K, SZ_1M);
@@ -86,7 +86,7 @@ static void at91bootstrap_boot_nand(bool is_barebox)
static void at91bootstrap_boot_mmc(void)
{
- int (*func)(void) = NULL;
+ kernel_entry_func func = NULL;
printf("Boot from mmc\n");
func = bootstrap_read_disk("disk0.0", NULL);
diff --git a/include/bootstrap.h b/include/bootstrap.h
index 28852c0cb6..9863ff425e 100644
--- a/include/bootstrap.h
+++ b/include/bootstrap.h
@@ -11,7 +11,8 @@
#define bootstrap_err(fmt, arg...) printf(fmt, ##arg)
-void bootstrap_boot(int (*func)(void), bool barebox);
+typedef void (*kernel_entry_func)(int zero, int arch, void *params);
+void bootstrap_boot(kernel_entry_func func, bool barebox);
#ifdef CONFIG_BOOTSTRAP_DEVFS
void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
diff --git a/lib/bootstrap/common.c b/lib/bootstrap/common.c
index 38ec272129..4a61992179 100644
--- a/lib/bootstrap/common.c
+++ b/lib/bootstrap/common.c
@@ -9,7 +9,7 @@
#include <bootstrap.h>
#include <filetype.h>
-void bootstrap_boot(int (*func)(void), bool barebox)
+void bootstrap_boot(kernel_entry_func func, bool barebox)
{
if (!func)
return;
@@ -18,7 +18,7 @@ void bootstrap_boot(int (*func)(void), bool barebox)
return;
shutdown_barebox();
- func();
+ func(0, 0, NULL);
while (1);
}