• 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

Revisionc2dbc56c789de207d2acf7ac4bfe51bc918ef8fa (tree)
Time2015-06-07 15:22:05
AuthorYoshinori Sato <ysato@user...>
CommiterYoshinori Sato

Log Message

h8300: update AE3096 support

Change Summary

Incremental Difference

--- a/board/ae3069/Makefile
+++ b/board/ae3069/Makefile
@@ -18,31 +18,4 @@
1818 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1919 # MA 02111-1307 USA
2020
21-#include $(TOPDIR)/config.mk
22-
23-LIB = lib$(BOARD).a
24-
25-OBJS := ae3069.o
26-SOBJS := lowlevel_init.o
27-
28-LIB := $(addprefix $(obj),$(LIB))
29-OBJS := $(addprefix $(obj),$(OBJS))
30-SOBJS := $(addprefix $(obj),$(SOBJS))
31-
32-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
33- $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
34-
35-clean:
36- rm -f $(SOBJS) $(OBJS)
37-
38-distclean: clean
39- rm -f $(LIB) core *.bak .depend
40-
41-#########################################################################
42-
43-# defines $(obj).depend target
44-include $(SRCTREE)/rules.mk
45-
46-sinclude $(obj).depend
47-
48-#########################################################################
21+obj-y := ae3069.o lowlevel_init.o
--- a/board/ae3069/ae3069.c
+++ b/board/ae3069/ae3069.c
@@ -19,10 +19,11 @@
1919
2020 #include <common.h>
2121 #include <net.h>
22-#include <netdev.h>
2322 #include <asm/io.h>
2423 #include <asm/processor.h>
2524
25+void h8300_gpio_init(void);
26+
2627 int checkboard(void)
2728 {
2829 puts("BOARD: Akizukidenshi AE-3069\n");
@@ -34,13 +35,19 @@ int board_init(void)
3435 return 0;
3536 }
3637
38+int board_early_init_f(void)
39+{
40+ h8300_gpio_init();
41+ return 0;
42+}
43+
3744 int dram_init(void)
3845 {
3946 DECLARE_GLOBAL_DATA_PTR;
4047
4148 gd->bd->bi_memstart = CONFIG_SYS_DRAM_BASE;
4249 gd->bd->bi_memsize = CONFIG_SYS_DRAM_SIZE;
43- printf("DRAM: %dMB\n", CONFIG_SYS_DRAM_SIZE / (1024 * 1024));
50+ gd->ram_size = CONFIG_SYS_DRAM_SIZE;
4451 return 0;
4552 }
4653
--- a/board/ae3069/lowlevel_init.S
+++ b/board/ae3069/lowlevel_init.S
@@ -26,10 +26,10 @@
2626
2727 _lowlevel_init:
2828 mov.l #init_table,er4
29+ mov.w #0x00fe,e5 /* 0xfexxxx */
2930 1:
30- mov.w @er4,r5
31+ mov.w @er4+,r5
3132 beq 3f
32- mov.w #0x00fe,e5 /* 0xfexxxx */
3333 mov.w @er4+,r0
3434 mov.b r0l,@er5
3535 bra 1b
@@ -37,17 +37,25 @@ _lowlevel_init:
3737 mov.l #420000,er0 /* wait 50ms */
3838 4: dec.l #1,er0
3939 bpl 4b
40+
41+ mov.l #_fdata,er5
42+ mov.l #_ram_data,er6
43+ mov.l #_sizeof_data,er4
44+ eepmov.w
4045 rts
4146
47+ /*
48+ 00FEE020: FF FB FF C8 C6 FF 38 98 B7 05 09 98 7F 00 00 00
49+ */
4250 .align 2
4351 init_table:
4452 .word 0xe02a,9 /* RTCOR */
4553 .word 0xe028,0x30 /* RTMCSR */
4654 .word 0xe027,0x98 /* DRCRB */
47- .word 0xe026,0x38 /* DRCRA */
48- .word 0xe021,0xfb /* ASTCR */
55+ .word 0xe026,0x50 /* DRCRA */
56+ .word 0xe021,0xf3 /* ASTCR */
4957 .word 0xe022,0xff /* WCRH */
50- .word 0xe023,0xc8 /* WCRL */
58+ .word 0xe023,0x08 /* WCRL */
5159 .word 0xe000,0xff /* P1DDR */
5260 .word 0xe001,0xff /* P2DDR */
5361 .word 0xe004,0xf1 /* P5DDR */
--- a/board/ae3069/u-boot.lds
+++ b/board/ae3069/u-boot.lds
@@ -26,19 +26,30 @@ ENTRY(_start)
2626
2727 MEMORY
2828 {
29- irom : ORIGIN = 0x000000, LENGTH = 512K
30- dram : ORIGIN = 0x400000, LENGTH = 2M
31- iram : ORIGIN = 0xffbf20, LENGTH = 16K
29+ vector : ORIGIN = 0x000000, LENGTH = 4K
30+ config : ORIGIN = 0x001000, LENGTH = 28K
31+ irom : ORIGIN = 0x008000, LENGTH = 480K
32+ dram : ORIGIN = 0x7b0000, LENGTH = 320K
33+ /* 0xffbf20 - 0xffc720 using flash writer */
34+ iram : ORIGIN = 0xffcf20, LENGTH = 12K
3235 }
3336
3437 SECTIONS
3538 {
39+
40+ .vector :
41+ {
42+ *(.vector)
43+ } > vector
44+ .config :
45+ {
46+ *(.config)
47+ } > config
3648 PROVIDE (__start = .);
3749 PROVIDE (__ftext = .);
38-
3950 .text :
4051 {
41- cpu/h8300h/start.o (.text)
52+ KEEP(arch/h8300/cpu/h8300h/start.o (.text))
4253 . = ALIGN(4);
4354 *(.text)
4455 . = ALIGN(4);
@@ -49,40 +60,46 @@ SECTIONS
4960 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
5061 . = ALIGN(4);
5162 } > irom
52- PROVIDE (__etext = .);
53-
54- PROVIDE (___u_boot_cmd_start = .);
55- .u_boot_cmd :
56- {
57- *(.u_boot_cmd)
58- . = ALIGN(4);
63+ .u_boot_list : {
64+ KEEP(*(SORT(.u_boot_list*)));
5965 } > irom
60- PROVIDE (___u_boot_cmd_end = .);
66+ PROVIDE (__etext = .);
67+ PROVIDE (_etext = .);
6168
6269 PROVIDE (__fdata = .);
70+ PROVIDE (_fdata = .);
6371 .data :
6472 {
65- PROVIDE (__ram_data = .);
66-
73+ PROVIDE (_ram_data = .);
6774 *(.data)
6875 . = ALIGN(4);
76+ __init_end = .;
6977 } >dram AT>irom
70- PROVIDE (__sizeof_data = SIZEOF(.data));
71- PROVIDE (__edata = .);
78+ PROVIDE (_sizeof_data = SIZEOF(.data));
79+ PROVIDE (_edata = .);
80+ PROVIDE (_iram_text = _fdata + SIZEOF(.data));
7281
73- PROVIDE (_bss_start = .);
74- PROVIDE (___bss_start = .);
82+ PROVIDE (bss_start = .);
83+ PROVIDE (__bss_start = .);
7584 .bss :
7685 {
7786 *(.bss)
7887 . = ALIGN(4);
7988 } > dram
80- PROVIDE (_bss_end = .);
89+ PROVIDE (__bss_end = .);
8190
82- PROVIDE (__end = .);
83- .iram :
91+ PROVIDE (_end = .);
92+ .iram_text :
8493 {
85- }
86- PROVIDE (__ram_vec = 0xfffe20);
87- PROVIDE (__init_stack = 0xffff20);
94+ PROVIDE (_iram_top = .);
95+ *(.text2)
96+ } >iram AT>irom
97+ .iram_bss :
98+ {
99+ *(.bss2)
100+ } >iram AT>irom
101+
102+ PROVIDE (_init_stack = 0xfffe20);
103+ PROVIDE (_ram_vec = 0xfffe20);
104+ PROVIDE (_run_stack = _ram_data);
88105 }
--- a/include/configs/ae3069.h
+++ b/include/configs/ae3069.h
@@ -26,26 +26,19 @@
2626 #define __AE3069_H
2727
2828 #undef DEBUG
29-#define CONFIG_H8300 1
30-#define CONFIG_H8300H 1
3129 #define CONFIG_CPU_H83069 1
32-#define CONFIG_AE3069 1
33-#define CONFIG_H8300_SIM 1
34-
35-#undef CONFIG_CMD_FLASH
36-#undef CONFIG_CMD_NET
37-#undef CONFIG_CMD_NFS
38-#undef CONFIG_CMD_PING
39-#undef CONFIG_CMD_SAVEENV
40-#undef CONFIG_CMD_SDRAM
41-#define CONFIG_CMD_MEMORY
42-#undef CONFIG_CMD_CACHE
30+#define CONFIG_H8300_RELOCATE 0
4331
4432 #define CONFIG_BAUDRATE 38400
45-#define CONFIG_BOOTARGS "console=ttySC0,115200"
33+#define CONFIG_BOOTARGS "console=ttySC0,38400"
4634
47-#define CONFIG_VERSION_VARIABLE
35+#define CONFIG_SYS_TEXT_BASE 0x008000
36+#define CONFIG_SYS_MONITOR_BASE 0x7b0000
37+#define CONFIG_BOARD_EARLY_INIT_F
38+#undef CONFIG_VERSION_VARIABLE
4839 #undef CONFIG_SHOW_BOOT_PROGRESS
40+#define CONFIG_OF_LIBFDT
41+#define CONFIG_LMB
4942
5043 /* MEMORY */
5144 #define AE3069_DRAM_BASE 0x400000
@@ -60,9 +53,13 @@
6053 /* List of legal baudrate settings for this board */
6154 #define CONFIG_SYS_BAUDRATE_TABLE { 38400 }
6255
56+#define CONFIG_SYS_CLK_FREQ 20000000
57+#define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
58+
6359 /* SCI */
64-#define CONFIG_SCI_SERIAL 1
65-#define CONFIG_SCI_BASE 0xffffb8 /* SCI1 */
60+#define CONFIG_SCI 1
61+#define CONFIG_SCIF_CONSOLE 1
62+#define CONFIG_CONS_SCIF1 1
6663
6764 /* TIMER */
6865 #define CONFIG_TIMER_BASE 0xffff80 /* CH0-1 */
@@ -71,9 +68,10 @@
7168 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (2 * 1024 * 1024))
7269
7370 #define CONFIG_SYS_DRAM_BASE AE3069_DRAM_BASE
74-#define CONFIG_SYS_DRAM_SIZE (2 * 1024 * 1024)
71+#define CONFIG_SYS_DRAM_SIZE (4 * 1024 * 1024)
7572
76-#define CONFIG_SYS_LOAD_ADDR 0x500000
73+#define CONFIG_SYS_LOAD_ADDR 0x400000
74+#define CONFIG_STANDALONE_LOAD_ADDR 0x400000
7775
7876 #define CONFIG_SYS_MALLOC_LEN (256 * 1024)
7977 #define CONFIG_SYS_GBL_DATA_SIZE 256
@@ -83,7 +81,10 @@
8381 #define CONFIG_ENV_SIZE 1024
8482 #define CONFIG_ENV_IS_NOWHERE
8583
86-/* Board Clock */
87-#define CONFIG_SYS_HZ 20000000
84+/* GPIO */
85+#define CONFIG_H8300_GPIO \
86+ {0x00,0x00,0x00,0x00,0xff,0x0f,0x87,0xff,0x00,0xff,0xef}
87+#define CONFIG_H8300_INIT_DDR \
88+ {0xff,0xff,0x00,0x00,0x01,0x00,0x00,0x0e,0x00,0xff,0x00}
8889
8990 #endif /* __AE3069_H */