xref: /rk3399_rockchip-uboot/arch/arm/include/asm/spl.h (revision 55cdbb8d4e8508dcdb95400f6dfcb928220ffc70)
1*55cdbb8dSTom Rini /*
2*55cdbb8dSTom Rini  * (C) Copyright 2012
3*55cdbb8dSTom Rini  * Texas Instruments, <www.ti.com>
4*55cdbb8dSTom Rini  *
5*55cdbb8dSTom Rini  * See file CREDITS for list of people who contributed to this
6*55cdbb8dSTom Rini  * project.
7*55cdbb8dSTom Rini  *
8*55cdbb8dSTom Rini  * This program is free software; you can redistribute it and/or
9*55cdbb8dSTom Rini  * modify it under the terms of the GNU General Public License as
10*55cdbb8dSTom Rini  * published by the Free Software Foundation; either version 2 of
11*55cdbb8dSTom Rini  * the License, or (at your option) any later version.
12*55cdbb8dSTom Rini  *
13*55cdbb8dSTom Rini  * This program is distributed in the hope that it will be useful,
14*55cdbb8dSTom Rini  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15*55cdbb8dSTom Rini  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16*55cdbb8dSTom Rini  * GNU General Public License for more details.
17*55cdbb8dSTom Rini  *
18*55cdbb8dSTom Rini  * You should have received a copy of the GNU General Public License
19*55cdbb8dSTom Rini  * along with this program; if not, write to the Free Software
20*55cdbb8dSTom Rini  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21*55cdbb8dSTom Rini  * MA 02111-1307 USA
22*55cdbb8dSTom Rini  */
23*55cdbb8dSTom Rini #ifndef	_ASM_SPL_H_
24*55cdbb8dSTom Rini #define	_ASM_SPL_H_
25*55cdbb8dSTom Rini 
26*55cdbb8dSTom Rini /* Platform-specific defines */
27*55cdbb8dSTom Rini #include <asm/arch/spl.h>
28*55cdbb8dSTom Rini 
29*55cdbb8dSTom Rini struct spl_image_info {
30*55cdbb8dSTom Rini 	const char *name;
31*55cdbb8dSTom Rini 	u8 os;
32*55cdbb8dSTom Rini 	u32 load_addr;
33*55cdbb8dSTom Rini 	u32 entry_point;
34*55cdbb8dSTom Rini 	u32 size;
35*55cdbb8dSTom Rini };
36*55cdbb8dSTom Rini 
37*55cdbb8dSTom Rini extern struct spl_image_info spl_image;
38*55cdbb8dSTom Rini extern u32 *boot_params_ptr;
39*55cdbb8dSTom Rini 
40*55cdbb8dSTom Rini /* SPL common functions */
41*55cdbb8dSTom Rini void preloader_console_init(void);
42*55cdbb8dSTom Rini u32 spl_boot_device(void);
43*55cdbb8dSTom Rini u32 spl_boot_mode(void);
44*55cdbb8dSTom Rini void spl_parse_image_header(const struct image_header *header);
45*55cdbb8dSTom Rini void spl_board_prepare_for_linux(void);
46*55cdbb8dSTom Rini int spl_start_uboot(void);
47*55cdbb8dSTom Rini void spl_display_print(void);
48*55cdbb8dSTom Rini 
49*55cdbb8dSTom Rini /* NAND SPL functions */
50*55cdbb8dSTom Rini void spl_nand_load_image(void);
51*55cdbb8dSTom Rini 
52*55cdbb8dSTom Rini /* MMC SPL functions */
53*55cdbb8dSTom Rini void spl_mmc_load_image(void);
54*55cdbb8dSTom Rini 
55*55cdbb8dSTom Rini /* YMODEM SPL functions */
56*55cdbb8dSTom Rini void spl_ymodem_load_image(void);
57*55cdbb8dSTom Rini 
58*55cdbb8dSTom Rini #ifdef CONFIG_SPL_BOARD_INIT
59*55cdbb8dSTom Rini void spl_board_init(void);
60*55cdbb8dSTom Rini #endif
61*55cdbb8dSTom Rini #endif
62