リビジョン | ef8f94832bbe5792d2f1e4f14edefd29ccbbe8d2 (tree) |
---|---|
日時 | 2016-03-23 02:49:56 |
作者 | Yoshinori Sato <ysato@user...> |
コミッター | Yoshinori Sato |
sh: landisk support update.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -115,6 +115,11 @@ config TARGET_SH7785LCR | ||
115 | 115 | bool "SH7785LCR" |
116 | 116 | select CPU_SH4A |
117 | 117 | |
118 | +config TARGET_LANDISK | |
119 | + bool "I/O DATA LANDISK" | |
120 | + select CPU_SH4 | |
121 | + select SPL | |
122 | + | |
118 | 123 | endchoice |
119 | 124 | |
120 | 125 | config SYS_ARCH |
@@ -146,5 +151,6 @@ source "board/renesas/sh7757lcr/Kconfig" | ||
146 | 151 | source "board/renesas/sh7763rdp/Kconfig" |
147 | 152 | source "board/renesas/sh7785lcr/Kconfig" |
148 | 153 | source "board/shmin/Kconfig" |
154 | +source "board/landisk/Kconfig" | |
149 | 155 | |
150 | 156 | endmenu |
@@ -18,6 +18,8 @@ CONFIG_STANDALONE_LOAD_ADDR += -m2a-nofpu | ||
18 | 18 | endif |
19 | 19 | |
20 | 20 | PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__ |
21 | +ifdef CONFIG_SYS_TEXT_BASE | |
21 | 22 | PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(CONFIG_SYS_TEXT_BASE) |
23 | +endif | |
22 | 24 | LDFLAGS_FINAL = --gc-sections |
23 | 25 | PLATFORM_RELFLAGS += -ffixed-r13 |
@@ -7,6 +7,6 @@ | ||
7 | 7 | #ifndef _ASM_SPL_H_ |
8 | 8 | #define _ASM_SPL_H_ |
9 | 9 | |
10 | -#define BOOT_DEVICE_IDE 0 | |
10 | +#define BOOT_DEVICE_IDE 0x0001 | |
11 | 11 | |
12 | 12 | #endif |
@@ -82,6 +82,7 @@ static int sh_mem_env_init(void) | ||
82 | 82 | #ifndef CONFIG_SPL_BUILD |
83 | 83 | mem_malloc_init(CONFIG_SYS_TEXT_BASE - GENERATED_GBL_DATA_SIZE - |
84 | 84 | CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN - 16); |
85 | + gd->flags |= GD_FLG_FULL_MALLOC_INIT; | |
85 | 86 | env_relocate(); |
86 | 87 | jumptable_init(); |
87 | 88 | #endif |
@@ -190,7 +191,11 @@ void sh_generic_init(void) | ||
190 | 191 | main_loop(); |
191 | 192 | } |
192 | 193 | #else |
193 | -#ifdef COFIG_SPL_IDE_SUPPORT | |
194 | + gd->malloc_base = CONFIG_SYS_SPL_MALLOC_START; | |
195 | +#ifdef CONFIG_SPL_SERIAL_SUPPORT | |
196 | + preloader_console_init(); | |
197 | +#endif | |
198 | +#ifdef CONFIG_SPL_IDE_SUPPORT | |
194 | 199 | ide_init(); |
195 | 200 | #endif |
196 | 201 | board_init_r(gd, 0); |
@@ -39,6 +39,7 @@ static struct pci_controller hose; | ||
39 | 39 | void pci_init_board(void) |
40 | 40 | { |
41 | 41 | pci_sh7751_init(&hose); |
42 | + __raw_writel(0xfe240000, 0xfe2001c8); | |
42 | 43 | } |
43 | 44 | |
44 | 45 | int board_late_init(void) |
@@ -55,9 +56,10 @@ int board_eth_init(bd_t *bis) | ||
55 | 56 | } |
56 | 57 | |
57 | 58 | #ifdef CONFIG_SPL_BUILD |
59 | +#include <spl.h> | |
58 | 60 | u32 spl_boot_device(void) |
59 | 61 | { |
60 | - return 0; | |
62 | + return BOOT_DEVICE_IDE; | |
61 | 63 | } |
62 | 64 | |
63 | 65 | const char version_string[] = U_BOOT_VERSION_STRING; |
@@ -85,4 +87,14 @@ void __raw_writesw(unsigned int addr, const void *data, int wordlen) | ||
85 | 87 | void ide_set_reset(int idereset) |
86 | 88 | { |
87 | 89 | } |
90 | +static int do_power_off(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | |
91 | +{ | |
92 | + __raw_writeb(0x01, 0xb0000003); | |
93 | + return 0; | |
94 | +} | |
88 | 95 | |
96 | +U_BOOT_CMD( | |
97 | + poff, 1, 1, do_power_off, | |
98 | + "power off", | |
99 | + "" | |
100 | +); |
@@ -20,7 +20,7 @@ _sh_start: | ||
20 | 20 | |
21 | 21 | mov.l ._load,r15 |
22 | 22 | mov #2,r0 |
23 | - mov #63,r7 | |
23 | + mov #96,r7 | |
24 | 24 | mov.l ._load,r6 |
25 | 25 | mov #1,r5 |
26 | 26 | mov #0x80,r4 |
@@ -19,12 +19,7 @@ | ||
19 | 19 | /* |
20 | 20 | * Command line configuration. |
21 | 21 | */ |
22 | -#include <config_cmd_default.h> | |
23 | -#undef CONFIG_CMD_IMLS | |
24 | -#define CONFIG_CMD_NET | |
25 | 22 | #define CONFIG_CMD_IDE |
26 | -#define CONFIG_FS_FAT | |
27 | -#define CONFIG_CMD_PCI | |
28 | 23 | |
29 | 24 | #define CONFIG_SCIF_CONSOLE 1 |
30 | 25 | #define CONFIG_BAUDRATE 115200 |
@@ -32,7 +27,7 @@ | ||
32 | 27 | #define CONFIG_BOARD_LATE_INIT |
33 | 28 | |
34 | 29 | #define CONFIG_BOOTDELAY -1 |
35 | -#define CONFIG_BOOTARGS "console=ttySC0,38400" | |
30 | +#define CONFIG_BOOTARGS "console=ttySC1,115200" | |
36 | 31 | #define CONFIG_ENV_OVERWRITE 1 |
37 | 32 | |
38 | 33 | /* SDRAM */ |
@@ -52,7 +47,7 @@ | ||
52 | 47 | #define CONFIG_PCI_MEM_BUS 0xFD000000 /* Memory space base addr */ |
53 | 48 | #define CONFIG_PCI_MEM_PHYS CONFIG_PCI_MEM_BUS |
54 | 49 | #define CONFIG_PCI_MEM_SIZE 0x01000000 /* Size of Memory window */ |
55 | -#define CONFIG_PCI_IO_BUS 0x00001000 /* IO space base address */ | |
50 | +#define CONFIG_PCI_IO_BUS 0xfe240000 /* IO space base address */ | |
56 | 51 | #define CONFIG_PCI_IO_PHYS 0xfe240000 |
57 | 52 | #define CONFIG_PCI_IO_SIZE 0x00040000 /* Size of IO window */ |
58 | 53 | #define CONFIG_PCI_SYS_BUS (CONFIG_SYS_SDRAM_BASE & 0x1fffffff) |
@@ -74,12 +69,13 @@ | ||
74 | 69 | #define CONFIG_SYS_MONITOR_LEN (128 * 1024) |
75 | 70 | #define CONFIG_SYS_MALLOC_LEN (256 * 1024) /* Size of DRAM reserved for malloc() use */ |
76 | 71 | |
72 | +#define CONFIG_FS_FAT | |
73 | + | |
77 | 74 | #ifndef CONFIG_SPL_BUILD |
78 | 75 | #define CONFIG_ENV_IS_IN_FAT |
79 | 76 | #define CONFIG_FAT_WRITE |
80 | 77 | #define FAT_ENV_INTERFACE "ide" |
81 | -#define FAT_ENV_DEVICE 0 | |
82 | -#define FAT_ENV_PART 1 | |
78 | +#define FAT_ENV_DEVICE_AND_PART "0:1" | |
83 | 79 | #define FAT_ENV_FILE "u-boot.env" |
84 | 80 | #define CONFIG_ENV_SIZE 4096 |
85 | 81 | #else |
@@ -106,15 +102,15 @@ | ||
106 | 102 | #define CONFIG_SYS_ATA_DATA_OFFSET 0x4400 /* data reg offset */ |
107 | 103 | #define CONFIG_SYS_ATA_REG_OFFSET 0x4400 /* reg offset */ |
108 | 104 | #else |
109 | -#define CONFIG_SYS_ATA_DATA_OFFSET 0x1100 /* data reg offset */ | |
110 | -#define CONFIG_SYS_ATA_REG_OFFSET 0x1100 /* reg offset */ | |
105 | +#define CONFIG_SYS_ATA_DATA_OFFSET 0x00000100 /* data reg offset */ | |
106 | +#define CONFIG_SYS_ATA_REG_OFFSET 0x00000100 /* reg offset */ | |
111 | 107 | #endif |
112 | 108 | #define CONFIG_SYS_ATA_ALT_OFFSET 0x0a /* alternate register offset */ |
113 | 109 | |
114 | 110 | #define CONFIG_NET_MULTI |
115 | 111 | #define CONFIG_RTL8139 |
116 | 112 | |
117 | -#define CONFIG_SPL | |
113 | +#define CONFIG_SPL_ENV_SUPPORT | |
118 | 114 | #define CONFIG_SPL_LDSCRIPT "board/landisk/u-boot-spl.lds" |
119 | 115 | #define CONFIG_SPL_FRAMEWORK |
120 | 116 | #define CONFIG_SPL_LIBGENERIC_SUPPORT |