Commit 1f4d53260ec6f8f122aed75cce7c757d97a551e0
Committed by
Stefan Roese
1 parent
485c00a57f
Exists in
master
and in
55 other branches
ppc4xx: Generic architecture for xilinx ppc405(v3)
As "ppc44x: Unification of virtex5 pp440 boards" did for the xilinx ppc440 boards, this patch presents a common architecture for all the xilinx ppc405 boards. Any custom xilinx ppc405 board can be added very easily with no code duplicity. This patch also adds a simple generic board, that can be used on almost any design with xilinx ppc405 replacing the file ppc405-generic/xparameters.h This patch is prepared to work with the latest version of EDK (10.1) Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es> Signed-off-by: Stefan Roese <sr@denx.de>
Showing 13 changed files with 663 additions and 1 deletions Side-by-side Diff
- CREDITS
- MAINTAINERS
- Makefile
- board/xilinx/ppc405-generic/.gitignore
- board/xilinx/ppc405-generic/Makefile
- board/xilinx/ppc405-generic/config.mk
- board/xilinx/ppc405-generic/u-boot-ram.lds
- board/xilinx/ppc405-generic/u-boot-rom.lds
- board/xilinx/ppc405-generic/xilinx_ppc405_generic.c
- board/xilinx/ppc405-generic/xparameters.h
- cpu/ppc4xx/start.S
- include/configs/xilinx-ppc405-generic.h
- include/configs/xilinx-ppc405.h
CREDITS
... | ... | @@ -407,6 +407,7 @@ |
407 | 407 | E: ricardo.ribalda@uam.es |
408 | 408 | D: PPC440x5 (Virtex5), ML507 Board, eeprom_simul, adt7460, v5fx30teval |
409 | 409 | D: Virtex ppc440 generic architecture |
410 | +D: Virtex ppc405 generic architecture | |
410 | 411 | W: http://www.ii.uam.es/~rribalda |
411 | 412 | |
412 | 413 | N: Stefan Roese |
MAINTAINERS
Makefile
... | ... | @@ -1518,6 +1518,22 @@ |
1518 | 1518 | WUH405_config: unconfig |
1519 | 1519 | @$(MKCONFIG) $(@:_config=) ppc ppc4xx wuh405 esd |
1520 | 1520 | |
1521 | +xilinx-ppc405-generic_flash_config: unconfig | |
1522 | + @mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic | |
1523 | + @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-rom.lds"\ | |
1524 | + > $(obj)board/xilinx/ppc405-generic/config.tmp | |
1525 | + @echo "TEXT_BASE := 0xFE360000" \ | |
1526 | + >> $(obj)board/xilinx/ppc405-generic/config.tmp | |
1527 | + @$(MKCONFIG) xilinx-ppc405-generic ppc ppc4xx ppc405-generic xilinx | |
1528 | + | |
1529 | +xilinx-ppc405-generic_config: unconfig | |
1530 | + @mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic | |
1531 | + @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-ram.lds"\ | |
1532 | + > $(obj)board/xilinx/ppc405-generic/config.tmp | |
1533 | + @echo "TEXT_BASE := 0x04000000" \ | |
1534 | + >> $(obj)board/xilinx/ppc405-generic/config.tmp | |
1535 | + @$(MKCONFIG) xilinx-ppc405-generic ppc ppc4xx ppc405-generic xilinx | |
1536 | + | |
1521 | 1537 | xilinx-ppc440-generic_flash_config: unconfig |
1522 | 1538 | @mkdir -p $(obj)include $(obj)board/xilinx/ppc440-generic |
1523 | 1539 | @echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc440-generic/u-boot-rom.lds"\ |
board/xilinx/ppc405-generic/.gitignore
1 | +config.tmp |
board/xilinx/ppc405-generic/Makefile
1 | +# | |
2 | +# (C) Copyright 2000-2006 | |
3 | +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | +# | |
5 | +# (C) Copyright 2008 | |
6 | +# Ricardo Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es | |
7 | +# Work supported by Qtechnology http://www.qtec.com | |
8 | +# | |
9 | +# See file CREDITS for list of people who contributed to this | |
10 | +# project. | |
11 | +# | |
12 | +# This program is free software; you can redistribute it and/or | |
13 | +# modify it under the terms of the GNU General Public License as | |
14 | +# published by the Free Software Foundation; either version 2 of | |
15 | +# the License, or (at your option) any later version. | |
16 | +# | |
17 | +# This program is distributed in the hope that it will be useful, | |
18 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | +# GNU General Public License for more details. | |
21 | +# | |
22 | +# You should have received a copy of the GNU General Public License | |
23 | +# along with this program; if not, write to the Free Software | |
24 | +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
25 | +# MA 02111-1307 USA | |
26 | +# | |
27 | + | |
28 | +include $(TOPDIR)/config.mk | |
29 | +ifneq ($(OBJTREE),$(SRCTREE)) | |
30 | +endif | |
31 | + | |
32 | +INCS := | |
33 | +CFLAGS += $(INCS) | |
34 | +HOST_CFLAGS += $(INCS) | |
35 | + | |
36 | +LIB = $(obj)lib$(BOARD).a | |
37 | + | |
38 | +COBJS += ../../xilinx/ppc405-generic/xilinx_ppc405_generic.o | |
39 | + | |
40 | +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) | |
41 | +OBJS := $(addprefix $(obj),$(COBJS)) | |
42 | +SOBJS := $(addprefix $(obj),$(SOBJS)) | |
43 | + | |
44 | +$(LIB): $(OBJS) $(SOBJS) | |
45 | + $(AR) $(ARFLAGS) $@ $^ | |
46 | + | |
47 | +clean: | |
48 | + rm -f $(SOBJS) $(OBJS) | |
49 | + | |
50 | +distclean: clean | |
51 | + rm -f $(LIB) core *.bak .depend | |
52 | + | |
53 | +######################################################################### | |
54 | + | |
55 | +# defines $(obj).depend target | |
56 | +include $(SRCTREE)/rules.mk | |
57 | + | |
58 | +sinclude $(obj).depend | |
59 | + | |
60 | +######################################################################### |
board/xilinx/ppc405-generic/config.mk
1 | +# | |
2 | +# (C) Copyright 2008 | |
3 | +# Ricardo Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es | |
4 | +# Work supported by Qtechnology http://www.qtec.com | |
5 | +# | |
6 | +# See file CREDITS for list of people who contributed to this | |
7 | +# project. | |
8 | +# | |
9 | +# This program is free software; you can redistribute it and/or | |
10 | +# modify it under the terms of the GNU General Public License as | |
11 | +# published by the Free Software Foundation; either version 2 of | |
12 | +# the License, or (at your option) any later version. | |
13 | +# | |
14 | +# This program is distributed in the hope that it will be useful, | |
15 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | +# GNU General Public License for more details. | |
18 | +# | |
19 | +# You should have received a copy of the GNU General Public License | |
20 | +# along with this program; if not, write to the Free Software | |
21 | +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
22 | +# MA 02111-1307 USA | |
23 | +# | |
24 | + | |
25 | +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp |
board/xilinx/ppc405-generic/u-boot-ram.lds
1 | +/* | |
2 | + * (C) Copyright 2000-2004 | |
3 | + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | + * | |
5 | + * See file CREDITS for list of people who contributed to this | |
6 | + * project. | |
7 | + * | |
8 | + * This program is free software; you can redistribute it and/or | |
9 | + * modify it under the terms of the GNU General Public License as | |
10 | + * published by the Free Software Foundation; either version 2 of | |
11 | + * the License, or (at your option) any later version. | |
12 | + * | |
13 | + * This program is distributed in the hope that it will be useful, | |
14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + * GNU General Public License for more details. | |
17 | + * | |
18 | + * You should have received a copy of the GNU General Public License | |
19 | + * along with this program; if not, write to the Free Software | |
20 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | + * MA 02111-1307 USA | |
22 | + */ | |
23 | + | |
24 | +OUTPUT_ARCH(powerpc) | |
25 | +ENTRY(_start) | |
26 | + | |
27 | +SECTIONS | |
28 | +{ | |
29 | + /* Read-only sections, merged into text segment: */ | |
30 | + . = + SIZEOF_HEADERS; | |
31 | + .interp : { *(.interp) } | |
32 | + .hash : { *(.hash) } | |
33 | + .dynsym : { *(.dynsym) } | |
34 | + .dynstr : { *(.dynstr) } | |
35 | + .rel.text : { *(.rel.text) } | |
36 | + .rela.text : { *(.rela.text) } | |
37 | + .rel.data : { *(.rel.data) } | |
38 | + .rela.data : { *(.rela.data) } | |
39 | + .rel.rodata : { *(.rel.rodata) } | |
40 | + .rela.rodata : { *(.rela.rodata) } | |
41 | + .rel.got : { *(.rel.got) } | |
42 | + .rela.got : { *(.rela.got) } | |
43 | + .rel.ctors : { *(.rel.ctors) } | |
44 | + .rela.ctors : { *(.rela.ctors) } | |
45 | + .rel.dtors : { *(.rel.dtors) } | |
46 | + .rela.dtors : { *(.rela.dtors) } | |
47 | + .rel.bss : { *(.rel.bss) } | |
48 | + .rela.bss : { *(.rela.bss) } | |
49 | + .rel.plt : { *(.rel.plt) } | |
50 | + .rela.plt : { *(.rela.plt) } | |
51 | + .init : { *(.init) } | |
52 | + .plt : { *(.plt) } | |
53 | + .text : | |
54 | + { | |
55 | + /* WARNING - the following is hand-optimized to fit within */ | |
56 | + /* the sector layout of our flash chips! XXX FIXME XXX */ | |
57 | + | |
58 | + | |
59 | + *(.text) | |
60 | + *(.fixup) | |
61 | + *(.got1) | |
62 | + } | |
63 | + _etext = .; | |
64 | + PROVIDE (etext = .); | |
65 | + .rodata : | |
66 | + { | |
67 | + *(.rodata) | |
68 | + *(.rodata1) | |
69 | + *(.rodata.str1.4) | |
70 | + *(.eh_frame) | |
71 | + } | |
72 | + .fini : { *(.fini) } =0 | |
73 | + .ctors : { *(.ctors) } | |
74 | + .dtors : { *(.dtors) } | |
75 | + | |
76 | + /* Read-write section, merged into data segment: */ | |
77 | + . = (. + 0x00FF) & 0xFFFFFF00; | |
78 | + _erotext = .; | |
79 | + PROVIDE (erotext = .); | |
80 | + .reloc : | |
81 | + { | |
82 | + *(.got) | |
83 | + _GOT2_TABLE_ = .; | |
84 | + *(.got2) | |
85 | + _FIXUP_TABLE_ = .; | |
86 | + *(.fixup) | |
87 | + } | |
88 | + __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; | |
89 | + __fixup_entries = (. - _FIXUP_TABLE_)>>2; | |
90 | + | |
91 | + .data : | |
92 | + { | |
93 | + *(.data) | |
94 | + *(.data1) | |
95 | + *(.sdata) | |
96 | + *(.sdata2) | |
97 | + *(.dynamic) | |
98 | + CONSTRUCTORS | |
99 | + } | |
100 | + _edata = .; | |
101 | + PROVIDE (edata = .); | |
102 | + | |
103 | + . = .; | |
104 | + __u_boot_cmd_start = .; | |
105 | + .u_boot_cmd : { *(.u_boot_cmd) } | |
106 | + __u_boot_cmd_end = .; | |
107 | + | |
108 | + | |
109 | + . = .; | |
110 | + __start___ex_table = .; | |
111 | + __ex_table : { *(__ex_table) } | |
112 | + __stop___ex_table = .; | |
113 | + | |
114 | + . = ALIGN(256); | |
115 | + __init_begin = .; | |
116 | + .text.init : { *(.text.init) } | |
117 | + .data.init : { *(.data.init) } | |
118 | + . = ALIGN(256); | |
119 | + __init_end = .; | |
120 | + | |
121 | + __bss_start = .; | |
122 | + .bss (NOLOAD) : | |
123 | + { | |
124 | + *(.sbss) *(.scommon) | |
125 | + *(.dynbss) | |
126 | + *(.bss) | |
127 | + *(COMMON) | |
128 | + } | |
129 | + | |
130 | + ppcenv_assert = ASSERT(. < 0xFFFFB000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CFG_MONITOR_BASE, CFG_MONITOR_LEN and TEXT_BASE may need to be modified."); | |
131 | + | |
132 | + _end = . ; | |
133 | + PROVIDE (end = .); | |
134 | +} |
board/xilinx/ppc405-generic/u-boot-rom.lds
1 | +/* | |
2 | + * (C) Copyright 2000-2004 | |
3 | + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | + * | |
5 | + * See file CREDITS for list of people who contributed to this | |
6 | + * project. | |
7 | + * | |
8 | + * This program is free software; you can redistribute it and/or | |
9 | + * modify it under the terms of the GNU General Public License as | |
10 | + * published by the Free Software Foundation; either version 2 of | |
11 | + * the License, or (at your option) any later version. | |
12 | + * | |
13 | + * This program is distributed in the hope that it will be useful, | |
14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + * GNU General Public License for more details. | |
17 | + * | |
18 | + * You should have received a copy of the GNU General Public License | |
19 | + * along with this program; if not, write to the Free Software | |
20 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | + * MA 02111-1307 USA | |
22 | + */ | |
23 | + | |
24 | +OUTPUT_ARCH(powerpc) | |
25 | +ENTRY(_start) | |
26 | + | |
27 | +SECTIONS | |
28 | +{ | |
29 | + .resetvec 0xFFFFFFFC : | |
30 | + { | |
31 | + *(.resetvec) | |
32 | + } = 0xffff | |
33 | + | |
34 | + .bootpg 0xFFFFF000 : | |
35 | + { | |
36 | + cpu/ppc4xx/start.o (.bootpg) | |
37 | + } = 0xffff | |
38 | + | |
39 | + /* Read-only sections, merged into text segment: */ | |
40 | + . = + SIZEOF_HEADERS; | |
41 | + .interp : { *(.interp) } | |
42 | + .hash : { *(.hash) } | |
43 | + .dynsym : { *(.dynsym) } | |
44 | + .dynstr : { *(.dynstr) } | |
45 | + .rel.text : { *(.rel.text) } | |
46 | + .rela.text : { *(.rela.text) } | |
47 | + .rel.data : { *(.rel.data) } | |
48 | + .rela.data : { *(.rela.data) } | |
49 | + .rel.rodata : { *(.rel.rodata) } | |
50 | + .rela.rodata : { *(.rela.rodata) } | |
51 | + .rel.got : { *(.rel.got) } | |
52 | + .rela.got : { *(.rela.got) } | |
53 | + .rel.ctors : { *(.rel.ctors) } | |
54 | + .rela.ctors : { *(.rela.ctors) } | |
55 | + .rel.dtors : { *(.rel.dtors) } | |
56 | + .rela.dtors : { *(.rela.dtors) } | |
57 | + .rel.bss : { *(.rel.bss) } | |
58 | + .rela.bss : { *(.rela.bss) } | |
59 | + .rel.plt : { *(.rel.plt) } | |
60 | + .rela.plt : { *(.rela.plt) } | |
61 | + .init : { *(.init) } | |
62 | + .plt : { *(.plt) } | |
63 | + .text : | |
64 | + { | |
65 | + /* WARNING - the following is hand-optimized to fit within */ | |
66 | + /* the sector layout of our flash chips! XXX FIXME XXX */ | |
67 | + | |
68 | + | |
69 | + *(.text) | |
70 | + *(.fixup) | |
71 | + *(.got1) | |
72 | + } | |
73 | + _etext = .; | |
74 | + PROVIDE (etext = .); | |
75 | + .rodata : | |
76 | + { | |
77 | + *(.rodata) | |
78 | + *(.rodata1) | |
79 | + *(.rodata.str1.4) | |
80 | + *(.eh_frame) | |
81 | + } | |
82 | + .fini : { *(.fini) } =0 | |
83 | + .ctors : { *(.ctors) } | |
84 | + .dtors : { *(.dtors) } | |
85 | + | |
86 | + /* Read-write section, merged into data segment: */ | |
87 | + . = (. + 0x00FF) & 0xFFFFFF00; | |
88 | + _erotext = .; | |
89 | + PROVIDE (erotext = .); | |
90 | + .reloc : | |
91 | + { | |
92 | + *(.got) | |
93 | + _GOT2_TABLE_ = .; | |
94 | + *(.got2) | |
95 | + _FIXUP_TABLE_ = .; | |
96 | + *(.fixup) | |
97 | + } | |
98 | + __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; | |
99 | + __fixup_entries = (. - _FIXUP_TABLE_)>>2; | |
100 | + | |
101 | + .data : | |
102 | + { | |
103 | + *(.data) | |
104 | + *(.data1) | |
105 | + *(.sdata) | |
106 | + *(.sdata2) | |
107 | + *(.dynamic) | |
108 | + CONSTRUCTORS | |
109 | + } | |
110 | + _edata = .; | |
111 | + PROVIDE (edata = .); | |
112 | + | |
113 | + . = .; | |
114 | + __u_boot_cmd_start = .; | |
115 | + .u_boot_cmd : { *(.u_boot_cmd) } | |
116 | + __u_boot_cmd_end = .; | |
117 | + | |
118 | + | |
119 | + . = .; | |
120 | + __start___ex_table = .; | |
121 | + __ex_table : { *(__ex_table) } | |
122 | + __stop___ex_table = .; | |
123 | + | |
124 | + . = ALIGN(256); | |
125 | + __init_begin = .; | |
126 | + .text.init : { *(.text.init) } | |
127 | + .data.init : { *(.data.init) } | |
128 | + . = ALIGN(256); | |
129 | + __init_end = .; | |
130 | + | |
131 | + __bss_start = .; | |
132 | + .bss (NOLOAD) : | |
133 | + { | |
134 | + *(.sbss) *(.scommon) | |
135 | + *(.dynbss) | |
136 | + *(.bss) | |
137 | + *(COMMON) | |
138 | + } | |
139 | + | |
140 | + ppcenv_assert = ASSERT(. < 0xFFFFB000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CFG_MONITOR_BASE, CFG_MONITOR_LEN and TEXT_BASE may need to be modified."); | |
141 | + | |
142 | + _end = . ; | |
143 | + PROVIDE (end = .); | |
144 | +} |
board/xilinx/ppc405-generic/xilinx_ppc405_generic.c
1 | +/* | |
2 | + * (C) Copyright 2008 | |
3 | + * Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es | |
4 | + * This work has been supported by: QTechnology http://qtec.com/ | |
5 | + * | |
6 | + * This program is free software: you can redistribute it and/or modify | |
7 | + * it under the terms of the GNU General Public License as published by | |
8 | + * the Free Software Foundation, either version 2 of the License, or | |
9 | + * (at your option) any later version. | |
10 | + * | |
11 | + * This program is distributed in the hope that it will be useful, | |
12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + * GNU General Public License for more details. | |
15 | + * | |
16 | + * You should have received a copy of the GNU General Public License | |
17 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | +*/ | |
19 | + | |
20 | +#include <config.h> | |
21 | +#include <common.h> | |
22 | +#include <asm/processor.h> | |
23 | + | |
24 | +ulong __get_PCI_freq(void) | |
25 | +{ | |
26 | + return 0; | |
27 | +} | |
28 | + | |
29 | +ulong get_PCI_freq(void) __attribute__((weak, alias("__get_PCI_freq"))); | |
30 | + | |
31 | +int __board_pre_init(void) | |
32 | +{ | |
33 | + return 0; | |
34 | +} | |
35 | +int board_pre_init(void) __attribute__((weak, alias("__board_pre_init"))); | |
36 | + | |
37 | +int __checkboard(void) | |
38 | +{ | |
39 | + puts("Xilinx PPC405 Generic Board\n"); | |
40 | + return 0; | |
41 | +} | |
42 | +int checkboard(void) __attribute__((weak, alias("__checkboard"))); | |
43 | + | |
44 | +phys_size_t __initdram(int board_type) | |
45 | +{ | |
46 | + return get_ram_size(XPAR_DDR2_SDRAM_MEM_BASEADDR, | |
47 | + CONFIG_SYS_SDRAM_SIZE_MB * 1024 * 1024); | |
48 | +} | |
49 | +phys_size_t initdram(int) __attribute__((weak, alias("__initdram"))); | |
50 | + | |
51 | +void __get_sys_info(sys_info_t *sysInfo) | |
52 | +{ | |
53 | + sysInfo->freqProcessor = XPAR_CORE_CLOCK_FREQ_HZ; | |
54 | + sysInfo->freqPLB = XPAR_PLB_CLOCK_FREQ_HZ; | |
55 | + sysInfo->freqPCI = 0; | |
56 | + | |
57 | + return; | |
58 | +} | |
59 | +void get_sys_info(sys_info_t *) __attribute__((weak, alias("__get_sys_info"))); |
board/xilinx/ppc405-generic/xparameters.h
1 | +/* | |
2 | + * (C) Copyright 2008 | |
3 | + * Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es | |
4 | + * This work has been supported by: QTechnology http://qtec.com/ | |
5 | + * based on xparameters-ml507.h by Xilinx | |
6 | + * | |
7 | + * This program is free software: you can redistribute it and/or modify | |
8 | + * it under the terms of the GNU General Public License as published by | |
9 | + * the Free Software Foundation, either version 2 of the License, or | |
10 | + * (at your option) any later version. | |
11 | + * | |
12 | + * This program is distributed in the hope that it will be useful, | |
13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | + * GNU General Public License for more details. | |
16 | + * | |
17 | + * You should have received a copy of the GNU General Public License | |
18 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 | +*/ | |
20 | + | |
21 | +#ifndef XPARAMETER_H | |
22 | +#define XPARAMETER_H | |
23 | + | |
24 | +#define XPAR_DDR2_SDRAM_MEM_BASEADDR 0x00000000 | |
25 | +#define XPAR_IIC_EEPROM_BASEADDR 0x81600000 | |
26 | +#define XPAR_INTC_0_BASEADDR 0x81800000 | |
27 | +#define XPAR_SPI_0_BASEADDR 0x83400000 | |
28 | +#define XPAR_UARTLITE_0_BASEADDR 0x84000000 | |
29 | +#define XPAR_FLASH_MEM0_BASEADDR 0xFE000000 | |
30 | +#define XPAR_PLB_CLOCK_FREQ_HZ 100000000 | |
31 | +#define XPAR_CORE_CLOCK_FREQ_HZ 400000000 | |
32 | +#define XPAR_INTC_MAX_NUM_INTR_INPUTS 13 | |
33 | +#define XPAR_UARTLITE_0_BAUDRATE 9600 | |
34 | +#define XPAR_SPI_0_NUM_TRANSFER_BITS 8 | |
35 | + | |
36 | +#endif |
cpu/ppc4xx/start.S
... | ... | @@ -918,7 +918,8 @@ |
918 | 918 | ori r4, r4, CONFIG_SYS_DCACHE_SACR_VALUE@l |
919 | 919 | mtdccr r4 |
920 | 920 | |
921 | -#if !(defined(CONFIG_SYS_EBC_PB0AP) && defined(CONFIG_SYS_EBC_PB0CR)) | |
921 | +#if !(defined(CONFIG_SYS_EBC_PB0AP) && defined(CONFIG_SYS_EBC_PB0CR))\ | |
922 | + && !defined (CONFIG_XILINX_405) | |
922 | 923 | /*----------------------------------------------------------------------- */ |
923 | 924 | /* Tune the speed and size for flash CS0 */ |
924 | 925 | /*----------------------------------------------------------------------- */ |
include/configs/xilinx-ppc405-generic.h
1 | +/* | |
2 | + * | |
3 | + * (C) Copyright 2008 | |
4 | + * Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es | |
5 | + * This work has been supported by: QTechnology http://qtec.com/ | |
6 | + * | |
7 | + * (C) Copyright 2008 | |
8 | + * Georg Schardt <schardt@team-ctech.de> | |
9 | + * | |
10 | + * See file CREDITS for list of people who contributed to this | |
11 | + * project. | |
12 | + * | |
13 | + * This program is free software; you can redistribute it and/or | |
14 | + * modify it under the terms of the GNU General Public License as | |
15 | + * published by the Free Software Foundation; either version 2 of | |
16 | + * the License, or (at your option) any later version. | |
17 | + * | |
18 | + * This program is distributed in the hope that it will be useful, | |
19 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | + * GNU General Public License for more details. | |
22 | + * | |
23 | + * You should have received a copy of the GNU General Public License | |
24 | + * along with this program; if not, write to the Free Software | |
25 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
26 | + * MA 02111-1307 USA | |
27 | + */ | |
28 | +#ifndef __CONFIG_GEN_H | |
29 | +#define __CONFIG_GEN_H | |
30 | + | |
31 | +#include "../board/xilinx/ppc405-generic/xparameters.h" | |
32 | + | |
33 | +/* sdram */ | |
34 | +#define CONFIG_SYS_SDRAM_SIZE_MB 256 | |
35 | + | |
36 | +/* environment */ | |
37 | +#define CONFIG_ENV_IS_IN_FLASH 1 | |
38 | +#define CONFIG_ENV_SIZE 0x10000 | |
39 | +#define CONFIG_ENV_SECT_SIZE 0x10000 | |
40 | +#define CONFIG_SYS_ENV_OFFSET 0x3F0000 | |
41 | +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE+CONFIG_SYS_ENV_OFFSET) | |
42 | +#define CONFIG_ENV_OVERWRITE 1 | |
43 | + | |
44 | +/*Misc*/ | |
45 | +#define CONFIG_SYS_PROMPT "xlx-ppc405:/# " /* Monitor Command Prompt */ | |
46 | +#define CONFIG_PREBOOT "echo U-Boot is up and runnining;" | |
47 | + | |
48 | +/*Flash*/ | |
49 | +#define CONFIG_SYS_FLASH_BASE XPAR_FLASH_MEM0_BASEADDR | |
50 | +#define CONFIG_SYS_FLASH_SIZE (32*1024*1024) | |
51 | +#define CONFIG_SYS_MAX_FLASH_SECT 71 | |
52 | +#define CONFIG_SYS_FLASH_CFI 1 | |
53 | +#define CONFIG_FLASH_CFI_DRIVER 1 | |
54 | +#define MTDIDS_DEFAULT "nor0=ppc405-flash" | |
55 | +#define MTDPARTS_DEFAULT "mtdpartsa=ppc405-flash:-(user)" | |
56 | + | |
57 | +#include <configs/xilinx-ppc405.h> | |
58 | +#endif /* __CONFIG_H */ |
include/configs/xilinx-ppc405.h
1 | +/* | |
2 | + * | |
3 | + * (C) Copyright 2008 | |
4 | + * Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@uam.es | |
5 | + * This work has been supported by: QTechnology http://qtec.com/ | |
6 | + * | |
7 | + * (C) Copyright 2008 | |
8 | + * Georg Schardt <schardt@team-ctech.de> | |
9 | + * | |
10 | + * See file CREDITS for list of people who contributed to this | |
11 | + * project. | |
12 | + * | |
13 | + * This program is free software; you can redistribute it and/or | |
14 | + * modify it under the terms of the GNU General Public License as | |
15 | + * published by the Free Software Foundation; either version 2 of | |
16 | + * the License, or (at your option) any later version. | |
17 | + * | |
18 | + * This program is distributed in the hope that it will be useful, | |
19 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | + * GNU General Public License for more details. | |
22 | + * | |
23 | + * You should have received a copy of the GNU General Public License | |
24 | + * along with this program; if not, write to the Free Software | |
25 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
26 | + * MA 02111-1307 USA | |
27 | + */ | |
28 | + | |
29 | +#ifndef __CONFIG_H | |
30 | +#define __CONFIG_H | |
31 | + | |
32 | +/* cpu parameter */ | |
33 | +#define CONFIG_4xx 1 | |
34 | +#define CONFIG_405 1 | |
35 | +#define CONFIG_XILINX_405 1 | |
36 | + | |
37 | +/* memory map */ | |
38 | +#define CONFIG_SYS_SDRAM_BASE 0x0 | |
39 | +#define CONFIG_SYS_MONITOR_BASE TEXT_BASE | |
40 | +#define CONFIG_SYS_MONITOR_LEN (192 * 1024) | |
41 | +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128 * 1024) | |
42 | + | |
43 | +/* u-boot commands configuration */ | |
44 | +#include <config_cmd_default.h> | |
45 | + | |
46 | +/*Misc*/ | |
47 | +#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ | |
48 | +#define CONFIG_SYS_LONGHELP /* undef to save memory */ | |
49 | +#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | |
50 | +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \ | |
51 | + + sizeof(CONFIG_SYS_PROMPT) + 16) | |
52 | +#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | |
53 | +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE/* Boot Argument Buffer Size */ | |
54 | +#define CONFIG_SYS_MEMTEST_START 0x00400000 /* memtest works on */ | |
55 | +#define CONFIG_SYS_MEMTEST_END 0x00C00000 /* 4 ... 12 MB in DRAM */ | |
56 | +#define CONFIG_SYS_LOAD_ADDR 0x01000000 /* default load address */ | |
57 | +#define CONFIG_SYS_EXTBDINFO 1 /* Extended board_into (bd_t) */ | |
58 | +#define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ | |
59 | +#define CONFIG_CMDLINE_EDITING /* add command line history */ | |
60 | +#define CONFIG_AUTO_COMPLETE /* add autocompletion support */ | |
61 | +#define CONFIG_LOOPW /* enable loopw command */ | |
62 | +#define CONFIG_MX_CYCLIC /* enable mdc/mwc commands */ | |
63 | +#define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ | |
64 | +#define CONFIG_VERSION_VARIABLE /* include version env variable */ | |
65 | +#define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup */ | |
66 | +#define CONFIG_SYS_HUSH_PARSER /* Use the HUSH parser */ | |
67 | +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | |
68 | +#define CONFIG_LOADS_ECHO /* echo on for serial download */ | |
69 | +#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ | |
70 | +#define CONFIG_SYS_BOOTMAPSZ (8 << 20) | |
71 | + /* Initial Memory map for Linux */ | |
72 | +#define CONFIG_SYS_CACHELINE_SIZE 32 | |
73 | +#define CONFIG_SYS_CACHELINE_SHIFT 2 | |
74 | + | |
75 | +/* stack */ | |
76 | +#define CONFIG_SYS_INIT_RAM_ADDR 0x800000 /* inside of SDRAM */ | |
77 | +#define CONFIG_SYS_INIT_RAM_END 0x2000 /* End of used area in RAM */ | |
78 | +#define CONFIG_SYS_GBL_DATA_SIZE 128 | |
79 | +#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - \ | |
80 | + CONFIG_SYS_GBL_DATA_SIZE) | |
81 | +#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | |
82 | + | |
83 | +#define CONFIG_SYS_FLASH_CF 1 | |
84 | +#define CONFIG_FLASH_CFI_DRIVER 1 | |
85 | +#define CONFIG_SYS_FLASH_EMPTY_INFO 1 | |
86 | +#define CONFIG_SYS_MAX_FLASH_BANKS 1 | |
87 | +#define CONFIG_SYS_FLASH_PROTECTION | |
88 | + | |
89 | +/* serial communication */ | |
90 | +#ifdef XPAR_UARTLITE_0_BASEADDR | |
91 | +#define CONFIG_XILINX_UARTLITE | |
92 | +#define CONFIG_SERIAL_BASE XPAR_UARTLITE_0_BASEADDR | |
93 | +#define CONFIG_BAUDRATE XPAR_UARTLITE_0_BAUDRATE | |
94 | +#define CONFIG_SYS_BAUDRATE_TABLE { CONFIG_BAUDRATE } | |
95 | +#else | |
96 | +#ifdef XPAR_UARTNS550_0_BASEADDR | |
97 | +#define CONFIG_SYS_NS16550 | |
98 | +#define CONFIG_SYS_NS16550_SERIAL | |
99 | +#define CONFIG_SYS_NS16550_REG_SIZE 4 | |
100 | +#define CONFIG_CONS_INDEX 1 | |
101 | +#define CONFIG_SYS_NS16550_COM1 XPAR_UARTNS550_0_BASEADDR | |
102 | +#define CONFIG_SYS_NS16550_CLK XPAR_UARTNS550_0_CLOCK_FREQ_HZ | |
103 | +#define CONFIG_BAUDRATE 115200 | |
104 | +#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 115200 } | |
105 | +#endif | |
106 | +#endif | |
107 | + | |
108 | +/* cmd config */ | |
109 | +#define CONFIG_CMD_ASKENV | |
110 | +#define CONFIG_CMD_CACHE | |
111 | +#define CONFIG_CMD_DIAG | |
112 | +#define CONFIG_CMD_ELF | |
113 | +#define CONFIG_CMD_IRQ | |
114 | +#define CONFIG_CMD_REGINFO | |
115 | +#define CONFIG_CMD_JFFS2 | |
116 | +#define CONFIG_JFFS2_CMDLINE | |
117 | +#undef CONFIG_CMD_SPI | |
118 | +#undef CONFIG_CMD_I2C | |
119 | +#undef CONFIG_CMD_DTT | |
120 | +#undef CONFIG_CMD_NET | |
121 | +#undef CONFIG_CMD_PING | |
122 | +#undef CONFIG_CMD_DHCP | |
123 | +#undef CONFIG_CMD_EEPROM | |
124 | +#undef CONFIG_CMD_IMLS | |
125 | + | |
126 | +#endif |