• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisiónc902e7d5fb7d15a58541187f451838827f78e757 (tree)
Tiempo2016-03-20 23:10:22
AutorYoshinori Sato <ysato@user...>
CommiterYoshinori Sato

Log Message

sh: SPL support.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

Cambiar Resumen

Diferencia incremental

--- a/arch/sh/cpu/sh4/cpu.c
+++ b/arch/sh/cpu/sh4/cpu.c
@@ -13,7 +13,9 @@
1313
1414 int checkcpu(void)
1515 {
16+#ifndef CONFIG_SPL_BUILD
1617 puts("CPU: SH4\n");
18+#endif
1719 return 0;
1820 }
1921
--- /dev/null
+++ b/arch/sh/include/asm/spl.h
@@ -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
--- a/arch/sh/lib/board.c
+++ b/arch/sh/lib/board.c
@@ -14,6 +14,8 @@
1414 #include <net.h>
1515 #include <mmc.h>
1616 #include <environment.h>
17+#include <spl.h>
18+#include <asm/io.h>
1719
1820 #ifdef CONFIG_BITBANGMII
1921 #include <miiphy.h>
@@ -64,7 +66,9 @@ extern int watchdog_disable(void);
6466 #include <pci.h>
6567 static int sh_pci_init(void)
6668 {
69+#ifndef CONFIG_SPL_BUILD
6770 pci_init();
71+#endif
6872 return 0;
6973 }
7074 # define INIT_FUNC_PCI_INIT sh_pci_init,
@@ -74,10 +78,12 @@ static int sh_pci_init(void)
7478
7579 static int sh_mem_env_init(void)
7680 {
81+#ifndef CONFIG_SPL_BUILD
7782 mem_malloc_init(CONFIG_SYS_TEXT_BASE - GENERATED_GBL_DATA_SIZE -
7883 CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN - 16);
7984 env_relocate();
8085 jumptable_init();
86+#endif
8187 return 0;
8288 }
8389
@@ -98,12 +104,14 @@ init_fnc_t *init_sequence[] =
98104 board_init, /* basic board dependent setup */
99105 interrupt_init, /* set up exceptions */
100106 env_init, /* event init */
107+#ifndef CONFIG_SPL_BUILD
101108 serial_init, /* SCIF init */
102109 INIT_FUNC_WATCHDOG_INIT /* watchdog init */
103110 console_init_f,
104111 display_options,
105112 checkcpu,
106113 checkboard, /* Check support board */
114+#endif
107115 dram_init, /* SDRAM init */
108116 timer_init, /* SuperH Timer (TCNT0 only) init */
109117 sh_mem_env_init,
@@ -112,6 +120,7 @@ init_fnc_t *init_sequence[] =
112120 #endif
113121 INIT_FUNC_NAND_INIT/* Flash memory (NAND) init */
114122 INIT_FUNC_PCI_INIT /* PCI init */
123+#ifndef CONFIG_SPL_BUILD
115124 stdio_init,
116125 console_init_r,
117126 interrupt_init,
@@ -121,6 +130,7 @@ init_fnc_t *init_sequence[] =
121130 #if defined(CONFIG_CMD_MMC)
122131 sh_mmc_init,
123132 #endif
133+#endif
124134 NULL /* Terminate this list */
125135 };
126136
@@ -166,7 +176,7 @@ void sh_generic_init(void)
166176 }
167177 #endif /* CONFIG_WATCHDOG*/
168178
169-
179+#ifndef CONFIG_SPL_BUILD
170180 #ifdef CONFIG_BITBANGMII
171181 bb_miiphy_init();
172182 #endif
@@ -179,4 +189,10 @@ void sh_generic_init(void)
179189 WATCHDOG_RESET();
180190 main_loop();
181191 }
192+#else
193+#ifdef COFIG_SPL_IDE_SUPPORT
194+ ide_init();
195+#endif
196+ board_init_r(gd, 0);
197+#endif
182198 }