blob: fa76dd73c19ed89c58a5f79b65a7f4ab49ec7a06 [file] [log] [blame]
Simon Glass82a5fa02013-03-05 14:39:40 +00001/*
2 * Copyright (c) 2013 The Chromium OS Authors.
3 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Simon Glass82a5fa02013-03-05 14:39:40 +00005 */
6
7#include <common.h>
8#include <initcall.h>
9
10int initcall_run_list(init_fnc_t init_sequence[])
11{
12 init_fnc_t *init_fnc_ptr;
13
14 for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
15 debug("initcall: %p\n", *init_fnc_ptr);
16 if ((*init_fnc_ptr)()) {
17 debug("initcall sequence %p failed at call %p\n",
18 init_sequence, *init_fnc_ptr);
19 return -1;
20 }
21 }
22 return 0;
23}