• 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

Revision4b22789bdd8368068b68d41659b7440521a13246 (tree)
Time2019-07-03 23:55:03
AuthorYoshinori Sato <ysato@user...>
CommiterYoshinori Sato

Log Message

h8300: fix edosk2674

Change Summary

Incremental Difference

--- a/Makefile
+++ b/Makefile
@@ -887,7 +887,7 @@ LDFLAGS_u-boot += $(LDFLAGS_FINAL)
887887 # Avoid 'Not enough room for program headers' error on binutils 2.28 onwards.
888888 LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker)
889889
890-ifeq ($(CONFIG_ARC)$(CONFIG_NIOS2)$(CONFIG_X86)$(CONFIG_XTENSA)$(CONFIG_H8300),)
890+ifeq ($(CONFIG_ARC)$(CONFIG_NIOS2)$(CONFIG_X86)$(CONFIG_XTENSA),)
891891 LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
892892 endif
893893
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -48,6 +48,9 @@ config TIMER_BASE
4848 hex
4949 default 0xffff80
5050
51+config SYS_NON_RELOC
52+ bool
53+
5154 source "board/h8300h_sim/Kconfig"
5255 source "board/h8300s_sim/Kconfig"
5356 source "board/ae3069/Kconfig"
--- a/arch/h8300/cpu/h8300h/start.S
+++ b/arch/h8300/cpu/h8300h/start.S
@@ -19,6 +19,7 @@
1919
2020 #include <config.h>
2121 #include <version.h>
22+#include <asm-offsets.h>
2223
2324 .h8300h
2425
@@ -60,6 +61,8 @@ _start:
6061 relocate_code:
6162 mov.l er1,er0
6263 sub.l er1,er1
64+ mov.l #CONFIG_SYS_DRAM_BASE + CONFIG_SYS_DRAM_SIZE, er2
65+ mov.l er2,@(GD_RELOCADDR,er0)
6366 jmp @board_init_r
6467
6568 .end
--- a/arch/h8300/cpu/h8300s/start.S
+++ b/arch/h8300/cpu/h8300s/start.S
@@ -19,6 +19,7 @@
1919
2020 #include <config.h>
2121 #include <version.h>
22+#include <asm-offsets.h>
2223
2324 .h8300s
2425
@@ -27,7 +28,7 @@
2728 .long __start
2829 vector = 2
2930 .rept 126
30- .long __ram_vec + (vector * 4)
31+ .long _ram_vec + (vector * 4)
3132 vector = vector + 1
3233 .endr
3334
@@ -56,12 +57,18 @@ _start:
5657 bne 1b
5758
5859 mov.l #CONFIG_SYS_TEXT_BASE,sp
60+ mov.l sp,er0
61+ jsr @board_init_f_alloc_reserve
62+ mov.l er0,sp
63+ jsr @board_init_f_init_reserve
64+ sub.l er0,er0 /* boot flags */
5965 jsr @board_init_f
6066 bra .
6167
6268 relocate_code:
6369 mov.l er1,er0
6470 sub.l er1,er1
71+ mov.l er1,@(GD_RELOC_OFF,er0)
6572 jmp @board_init_r
6673
6774 .end
--- a/arch/h8300/dts/edosk2674.dts
+++ b/arch/h8300/dts/edosk2674.dts
@@ -6,7 +6,7 @@
66 interrupt-parent = <&h8intc>;
77
88 chosen {
9- stdout-path = &sci2;
9+ stdout-path = &sci0;
1010 };
1111 aliases {
1212 serial0 = &sci0;
--- a/board/nisshin-tech/kanebebe/Kconfig
+++ b/board/nisshin-tech/kanebebe/Kconfig
@@ -18,4 +18,10 @@ config NETDEVICES
1818 config DM_ETH
1919 default y
2020
21+config SYS_TEXT_BASE
22+ default 0x00000100
23+
24+config SYS_NON_RELOC
25+ default y
26+
2127 endif
--- a/board/renesas/edosk2674/Kconfig
+++ b/board/renesas/edosk2674/Kconfig
@@ -9,4 +9,7 @@ config SYS_VENDOR
99 config SYS_CONFIG_NAME
1010 default "edosk2674"
1111
12+config SYS_TEXT_BASE
13+ default 0x00b00000
14+
1215 endif
--- a/board/renesas/edosk2674/edosk2674.c
+++ b/board/renesas/edosk2674/edosk2674.c
@@ -36,10 +36,17 @@ int board_init(void)
3636 return 0;
3737 }
3838
39-void dram_init_banksize(void)
39+int dram_init(void)
4040 {
41- DECLARE_GLOBAL_DATA_PTR;
42- gd->bd->bi_memsize = gd->ram_size = 8 * 1024 * 1024;
41+ if (fdtdec_setup_mem_size_base() != 0)
42+ return -EINVAL;
43+
44+ return 0;
45+}
46+
47+int dram_init_banksize(void)
48+{
49+ return 0;
4350 }
4451
4552 void led_set_state(unsigned short value)
--- a/board/renesas/edosk2674/lowlevel_init.S
+++ b/board/renesas/edosk2674/lowlevel_init.S
@@ -59,7 +59,7 @@ lowlevel_init:
5959 mov.l #_start,er5
6060 sub.l #4b,er5
6161 add.l er4,er5
62- mov.l #CONFIG_SYS_TEXT_BASE,er6
62+ mov.l #_start,er6
6363 mov.l #__bss_start,er4
6464 sub.l er6,er4
6565 shlr #2,er4
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -269,7 +269,7 @@ static int setup_mon_len(void)
269269 gd->mon_len = (ulong)&_end - (ulong)_init;
270270 #elif defined(CONFIG_NIOS2) || defined(CONFIG_XTENSA)
271271 gd->mon_len = CONFIG_SYS_MONITOR_LEN;
272-#elif defined(CONFIG_NDS32) || defined(CONFIG_SH) || defined(CONFIG_RISCV)
272+#elif defined(CONFIG_NDS32) || defined(CONFIG_SH) || defined(CONFIG_RISCV) || defined(CONFIG_H8300)
273273 gd->mon_len = (ulong)(&__bss_end) - (ulong)(&_start);
274274 #elif defined(CONFIG_SYS_MONITOR_BASE)
275275 /* TODO: use (ulong)&__bss_end - (ulong)&__text_start; ? */
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -126,6 +126,7 @@ static int initr_reloc_global_data(void)
126126 #elif !defined(CONFIG_SANDBOX) && !defined(CONFIG_NIOS2)
127127 monitor_flash_len = (ulong)&__init_end - gd->relocaddr;
128128 #endif
129+#if !defined(CONFIG_SYS_NON_RELOC)
129130 #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
130131 /*
131132 * The gd->cpu pointer is set to an address in flash before relocation.
@@ -164,7 +165,7 @@ static int initr_reloc_global_data(void)
164165
165166 efi_runtime_relocate(gd->relocaddr, NULL);
166167 #endif
167-
168+#endif
168169 return 0;
169170 }
170171
--- a/include/configs/edosk2674.h
+++ b/include/configs/edosk2674.h
@@ -25,11 +25,6 @@
2525 #ifndef __EDOSK2674_H
2626 #define __EDOSK2674_H
2727
28-#define CONFIG_H8300 1
29-#define CONFIG_H8300S 1
30-#define CONFIG_CPU_H8S2678 1
31-#define CONFIG_EDOSK2674 1
32-
3328 #define CONFIG_BAUDRATE 38400
3429 #define CONFIG_BOOTARGS "earlyprintk=sh-sci.2,38400 console=ttySC2,38400"
3530
@@ -41,7 +36,6 @@
4136 #define EDOSK2674_SDRAM_BASE 0x400000
4237
4338 #define CONFIG_SYS_MONITOR_BASE 0xb00000
44-#define CONFIG_SYS_LONGHELP /* undef to save memory */
4539 #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
4640 #define CONFIG_SYS_CBSIZE 256 /* Buffer size for input from the Console */
4741 #define CONFIG_SYS_PBSIZE 256 /* Buffer size for Console output */
@@ -52,24 +46,8 @@
5246 /* List of legal baudrate settings for this board */
5347 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
5448
55-#define CONFIG_OF_LIBFDT
5649 #define CONFIG_LMB
5750
58-/* SCI */
59-#define CONFIG_SCI 1
60-#define CONFIG_SCIF_CONSOLE 1
61-
62-/* TIMER */
63-#define CONFIG_TIMER_BASE 0xffffb0 /* CH0-1 */
64-
65-/* GPIO */
66-#define CONFIG_H8300_GPIO \
67- {0xff,0xff,0x3f,0xff,0xf8,0x3f,0x3f,0x3f,0x00, \
68- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70}
69-#define CONFIG_H8300_INIT_DDR \
70- {0x00,0x00,0x3a,0x00,0x00,0x00,0x00,0x00,0x00, \
71- 0xff,0x00,0x00,0x00,0x00,0xfe,0x0f,0x0f}
72-
7351 /* SDRAM */
7452 #define CONFIG_SYS_MEMTEST_START EDOSK2674_SDRAM_BASE + (1 * 1024 * 1024)
7553 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (7 * 1024 * 1024))
@@ -77,15 +55,12 @@
7755 #define CONFIG_SYS_SDRAM_BASE EDOSK2674_SDRAM_BASE
7856 #define CONFIG_SYS_SDRAM_SIZE (8 * 1024 * 1024)
7957
80-#define CONFIG_SYS_TEXT_BASE 0xb00000
8158 #define CONFIG_SYS_LOAD_ADDR 0x400000
8259
8360 #define CONFIG_SYS_MALLOC_LEN (256 * 1024)
8461 #define CONFIG_SYS_GBL_DATA_SIZE 256
8562
86-#define CONFIG_ENV_SIZE (128 * 1024)
87-#define CONFIG_ENV_IS_IN_FLASH 1
88-#define CONFIG_ENV_ADDR 0x3e0000
63+#define CONFIG_ENV_SIZE 4096
8964
9065 /* Board Clock */
9166 #define CONFIG_SYS_CLK_FREQ 33333333
@@ -99,11 +74,7 @@
9974 #endif
10075
10176 /* Flash */
102-#define CONFIG_SYS_MAX_FLASH_BANKS 1
103-#define CONFIG_SYS_MAX_FLASH_SECT 32
10477 #define CONFIG_SYS_FLASH_BASE EDOSK2674_FLASH_BASE
105-#define CONFIG_SYS_FLASH_CFI 1
106-#define CONFIG_FLASH_CFI_DRIVER 1
107-#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
78+
10879
10980 #endif /* __EDOSK2674_H */