Revisión | c902e7d5fb7d15a58541187f451838827f78e757 (tree) |
---|---|
Tiempo | 2016-03-20 23:10:22 |
Autor | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
sh: SPL support.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -13,7 +13,9 @@ | ||
13 | 13 | |
14 | 14 | int checkcpu(void) |
15 | 15 | { |
16 | +#ifndef CONFIG_SPL_BUILD | |
16 | 17 | puts("CPU: SH4\n"); |
18 | +#endif | |
17 | 19 | return 0; |
18 | 20 | } |
19 | 21 |
@@ -0,0 +1,12 @@ | ||
1 | +/* | |
2 | + * (C) Copyright 2012 | |
3 | + * Texas Instruments, <www.ti.com> | |
4 | + * | |
5 | + * SPDX-License-Identifier: GPL-2.0+ | |
6 | + */ | |
7 | +#ifndef _ASM_SPL_H_ | |
8 | +#define _ASM_SPL_H_ | |
9 | + | |
10 | +#define BOOT_DEVICE_IDE 0 | |
11 | + | |
12 | +#endif |
@@ -14,6 +14,8 @@ | ||
14 | 14 | #include <net.h> |
15 | 15 | #include <mmc.h> |
16 | 16 | #include <environment.h> |
17 | +#include <spl.h> | |
18 | +#include <asm/io.h> | |
17 | 19 | |
18 | 20 | #ifdef CONFIG_BITBANGMII |
19 | 21 | #include <miiphy.h> |
@@ -64,7 +66,9 @@ extern int watchdog_disable(void); | ||
64 | 66 | #include <pci.h> |
65 | 67 | static int sh_pci_init(void) |
66 | 68 | { |
69 | +#ifndef CONFIG_SPL_BUILD | |
67 | 70 | pci_init(); |
71 | +#endif | |
68 | 72 | return 0; |
69 | 73 | } |
70 | 74 | # define INIT_FUNC_PCI_INIT sh_pci_init, |
@@ -74,10 +78,12 @@ static int sh_pci_init(void) | ||
74 | 78 | |
75 | 79 | static int sh_mem_env_init(void) |
76 | 80 | { |
81 | +#ifndef CONFIG_SPL_BUILD | |
77 | 82 | mem_malloc_init(CONFIG_SYS_TEXT_BASE - GENERATED_GBL_DATA_SIZE - |
78 | 83 | CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN - 16); |
79 | 84 | env_relocate(); |
80 | 85 | jumptable_init(); |
86 | +#endif | |
81 | 87 | return 0; |
82 | 88 | } |
83 | 89 |
@@ -98,12 +104,14 @@ init_fnc_t *init_sequence[] = | ||
98 | 104 | board_init, /* basic board dependent setup */ |
99 | 105 | interrupt_init, /* set up exceptions */ |
100 | 106 | env_init, /* event init */ |
107 | +#ifndef CONFIG_SPL_BUILD | |
101 | 108 | serial_init, /* SCIF init */ |
102 | 109 | INIT_FUNC_WATCHDOG_INIT /* watchdog init */ |
103 | 110 | console_init_f, |
104 | 111 | display_options, |
105 | 112 | checkcpu, |
106 | 113 | checkboard, /* Check support board */ |
114 | +#endif | |
107 | 115 | dram_init, /* SDRAM init */ |
108 | 116 | timer_init, /* SuperH Timer (TCNT0 only) init */ |
109 | 117 | sh_mem_env_init, |
@@ -112,6 +120,7 @@ init_fnc_t *init_sequence[] = | ||
112 | 120 | #endif |
113 | 121 | INIT_FUNC_NAND_INIT/* Flash memory (NAND) init */ |
114 | 122 | INIT_FUNC_PCI_INIT /* PCI init */ |
123 | +#ifndef CONFIG_SPL_BUILD | |
115 | 124 | stdio_init, |
116 | 125 | console_init_r, |
117 | 126 | interrupt_init, |
@@ -121,6 +130,7 @@ init_fnc_t *init_sequence[] = | ||
121 | 130 | #if defined(CONFIG_CMD_MMC) |
122 | 131 | sh_mmc_init, |
123 | 132 | #endif |
133 | +#endif | |
124 | 134 | NULL /* Terminate this list */ |
125 | 135 | }; |
126 | 136 |
@@ -166,7 +176,7 @@ void sh_generic_init(void) | ||
166 | 176 | } |
167 | 177 | #endif /* CONFIG_WATCHDOG*/ |
168 | 178 | |
169 | - | |
179 | +#ifndef CONFIG_SPL_BUILD | |
170 | 180 | #ifdef CONFIG_BITBANGMII |
171 | 181 | bb_miiphy_init(); |
172 | 182 | #endif |
@@ -179,4 +189,10 @@ void sh_generic_init(void) | ||
179 | 189 | WATCHDOG_RESET(); |
180 | 190 | main_loop(); |
181 | 191 | } |
192 | +#else | |
193 | +#ifdef COFIG_SPL_IDE_SUPPORT | |
194 | + ide_init(); | |
195 | +#endif | |
196 | + board_init_r(gd, 0); | |
197 | +#endif | |
182 | 198 | } |