ML507: New board support
Subsystems (2)
PATCH 1/1 ML507: New board support
-Suport for the Xilinx ML507 Development Board
--- Makefile | 3 + board/xilinx/ml507/Makefile | 53 ++++++++++++ board/xilinx/ml507/config.mk | 18 ++++ board/xilinx/ml507/init.S | 45 +++++++++++ board/xilinx/ml507/ml507.c | 57 +++++++++++++ board/xilinx/ml507/u-boot.lds | 149 +++++++++++++++++++++++++++++++++++ board/xilinx/ml507/u-boot.lds.debug | 136 ++++++++++++++++++++++++++++++++ board/xilinx/ml507/xparameters.h | 33 ++++++++ include/configs/ml507.h | 108 +++++++++++++++++++++++++ 9 files changed, 602 insertions(+), 0 deletions(-) create mode 100644 board/xilinx/ml507/Makefile create mode 100644 board/xilinx/ml507/config.mk create mode 100644 board/xilinx/ml507/init.S create mode 100644 board/xilinx/ml507/ml507.c create mode 100644 board/xilinx/ml507/u-boot.lds create mode 100644 board/xilinx/ml507/u-boot.lds.debug create mode 100644 board/xilinx/ml507/xparameters.h create mode 100644 include/configs/ml507.h
Makefile +3 -0
@@ -1337,6 +1337,9 @@ ML2_config: unconfig ml300_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx ml300 xilinx +ml507_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx ml507 xilinx + ocotea_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx ocotea amcc
board/xilinx/ml507/Makefile new file +53 -0
53 lines not on this page · raw message
board/xilinx/ml507/config.mk new file +18 -0
@@ -0,0 +1,18 @@ +# (C) Copyright 2008 +# Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com +# Work supported supported by: Q-Technology http://qtec.com/ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +TEXT_BASE = 0x04000000
board/xilinx/ml507/init.S new file +45 -0
45 lines not on this page · raw message
board/xilinx/ml507/ml507.c new file +57 -0
57 lines not on this page · raw message
board/xilinx/ml507/u-boot.lds new file +149 -0
149 lines not on this page · raw message
board/xilinx/ml507/u-boot.lds.debug new file +136 -0
136 lines not on this page · raw message
board/xilinx/ml507/xparameters.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +(C) Copyright 2008 +Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es +This work has been supported by: QTechnology http://qtec.com/ + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef XPARAMETER_H +#define XPARAMETER_H + +#define XPAR_DDR2_SDRAM_MEM_BASEADDR 0x00000000 +#define XPAR_INTC_0_BASEADDR 0x81800000 +#define XPAR_UARTLITE_0_BASEADDR 0x84000000 +#define XPAR_RS232_UART_1_BASEADDR 0x84000000 +#define XPAR_IIC_EEPROM_BASEADDR 0x81600000 +#define XPAR_LLTEMAC_0_BASEADDR 0x81c00000 +#define XPAR_PLB_CLOCK_FREQ_HZ 100000000 +#define XPAR_CORE_CLOCK_FREQ_HZ 400000000 +#define XPAR_INTC_MAX_NUM_INTR_INPUTS 13 + +#endif
include/configs/ml507.h new file +108 -0
108 lines not on this page · raw message
Signature · 1 line
1.5.6.2
PATCH 1/1 ML507: New board support
my comments are below
-Suport for the Xilinx ML507 Development Board
--- Makefile | 3 + board/xilinx/ml507/Makefile | 53 ++++++++++++ board/xilinx/ml507/config.mk | 18 ++++ board/xilinx/ml507/init.S | 45 +++++++++++ board/xilinx/ml507/ml507.c | 57 +++++++++++++ board/xilinx/ml507/u-boot.lds | 149 +++++++++++++++++++++++++++++++++++ board/xilinx/ml507/u-boot.lds.debug | 136 ++++++++++++++++++++++++++++++++ board/xilinx/ml507/xparameters.h | 33 ++++++++ include/configs/ml507.h | 108 +++++++++++++++++++++++++ 9 files changed, 602 insertions(+), 0 deletions(-) create mode 100644 board/xilinx/ml507/Makefile create mode 100644 board/xilinx/ml507/config.mk create mode 100644 board/xilinx/ml507/init.S create mode 100644 board/xilinx/ml507/ml507.c create mode 100644 board/xilinx/ml507/u-boot.lds create mode 100644 board/xilinx/ml507/u-boot.lds.debug create mode 100644 board/xilinx/ml507/xparameters.h create mode 100644 include/configs/ml507.h
Makefile +3 -0
@@ -1337,6 +1337,9 @@ ML2_config: unconfig ml300_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx ml300 xilinx +ml507_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx ml507 xilinx + ocotea_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx ocotea amcc
I think all makefile had WD copyright
board/xilinx/ml507/Makefile new file +4 -0
@@ -0,0 +1,53 @@ +# (C) Copyright 2008 +# Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es +# Work supported supported by: Q-Technology http://qtec.com/ +# based on Makefile by Wolfgang Denk, DENX Software Engineering,
wd at denx.de.
+# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+include $(TOPDIR)/config.mk
+ifneq ($(OBJTREE),$(SRCTREE))
+endif
+
+INCS :=
+CFLAGS += $(INCS)
+HOST_CFLAGS += $(INCS)
+
+LIB = $(obj)lib$(BOARD).a
+
+COBJS = $(BOARD).o \
+
+SOBJS = init.o
+
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $^
+
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
I know you like two email - but choose only one.
board/xilinx/ml507/config.mk new file +2 -0
@@ -0,0 +1,18 @@ +# (C) Copyright 2008 +# Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es
, ricardo.ribalda<at>gmail.com
+# Work supported supported by: Q-Technology http://qtec.com/
+#
+# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+TEXT_BASE = 0x04000000
board/xilinx/ml507/init.S new file +3 -0
@@ -0,0 +1,45 @@ +/* + (C) Copyright 2008 + Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es ,
ricardo.ribalda<at>gmail.com
+ This work has been supported by: Q-Technology http://qtec.com/
+
+ This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <ppc_asm.tmpl>
+#include <config.h>
+#include <asm-ppc/mmu.h>
+
+.section .bootpg,"ax"
+.globl tlbtab
+
+tlbtab:
+tlbtab_start
+ /* SDRAM */
+tlbentry(XPAR_DDR2_SDRAM_MEM_BASEADDR, SZ_256M, CFG_SDRAM_BASE, 0,
+ AC_R | AC_W | AC_X | SA_G | SA_I)
+ /* UART */
+tlbentry(XPAR_RS232_UART_1_BASEADDR, SZ_64K, XPAR_RS232_UART_1_BASEADDR, 0,
+ AC_R | AC_W | SA_G | SA_I)
+ /* PIC */
+tlbentry(XPAR_INTC_0_BASEADDR, SZ_64K, XPAR_INTC_0_BASEADDR, 0,
+ AC_R | AC_W | SA_G | SA_I)
+ /* I2C */
+tlbentry(XPAR_IIC_EEPROM_BASEADDR, SZ_64K, XPAR_IIC_EEPROM_BASEADDR, 0,
+ AC_R | AC_W | SA_G | SA_I)
+ /* Net */
+tlbentry(XPAR_LLTEMAC_0_BASEADDR, SZ_64K, XPAR_LLTEMAC_0_BASEADDR, 0,
+ AC_R | AC_W | SA_G | SA_I)
+
+tlbtab_end
board/xilinx/ml507/ml507.c new file +33 -0
@@ -0,0 +1,57 @@ +/* +(C) Copyright 2008 +Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es +This work has been supported by: QTechnology http://qtec.com/ + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <config.h> +#include <common.h> +#include <asm/processor.h> + +int board_pre_init (void ) +{ +return 0 ; +} + +int checkboard (void ) +{ + + printf + ("ML507 Board ported by Ricardo Ribalda ricardo.ribalda at uam.es
(http://qtec.com) \n");
+ return (0);
+}
:-)
+
+phys_size_t initdram(int board_type)
+{
+ return 256 * 1024 * 1024;
+}
this is not look like generic code, isn't it?
+
+int testdram(void)
+{
+ printf("test: xxx MB - ok\n");
+
+ return (0);
+}
why is here insensible printf?
+
+void get_sys_info(sys_info_t * sysInfo)
+{
+ sysInfo->freqProcessor = XPAR_CORE_CLOCK_FREQ_HZ;
+ sysInfo->freqPLB = XPAR_PLB_CLOCK_FREQ_HZ;
+ sysInfo->freqPCI = 0;
+
+ return;
+
space here
+}
I understand you use u-boot library for generating parameters but I think this is the right time to change this value to more sensible and compact style.
board/xilinx/ml507/u-boot.lds new file +4 -0
@@ -0,0 +1,149 @@ +/* + * (C) Copyright 2000 + * Wolfgang Denk, DENX Software Engineering, wd at denx.de. + * Modified by: Ricardo Ribalda Delgado ricardo.ribalda<at>gmail.com
ricardo.ribalda<at>uam.es
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+OUTPUT_ARCH(powerpc)
+ENTRY(_start_440)
+/* Do we need any of these for elf?
+ __DYNAMIC = 0; */
+SECTIONS
+{
+ /* Read-only sections, merged into text segment: */
+ . = + SIZEOF_HEADERS;
+ .interp : { *(.interp) }
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+ .rel.text : { *(.rel.text) }
+ .rela.text : { *(.rela.text) }
+ .rel.data : { *(.rel.data) }
+ .rela.data : { *(.rela.data) }
+ .rel.rodata : { *(.rel.rodata) }
+ .rela.rodata : { *(.rela.rodata) }
+ .rel.got : { *(.rel.got) }
+ .rela.got : { *(.rela.got) }
+ .rel.ctors : { *(.rel.ctors) }
+ .rela.ctors : { *(.rela.ctors) }
+ .rel.dtors : { *(.rel.dtors) }
+ .rela.dtors : { *(.rela.dtors) }
+ .rel.bss : { *(.rel.bss) }
+ .rela.bss : { *(.rela.bss) }
+ .rel.plt : { *(.rel.plt) }
+ .rela.plt : { *(.rela.plt) }
+ .init : { *(.init) }
+ .plt : { *(.plt) }
+ .text :
+ {+ /* WARNING - the following is hand-optimized to fit within */
+ /* the sector layout of our flash chips! XXX FIXME XXX */
+/*
+ cpu/ppc4xx/start.o (.text)
+ board/xilinx/ml300/init.o (.text)
weird
+ cpu/ppc4xx/kgdb.o (.text) + cpu/ppc4xx/traps.o (.text) + cpu/ppc4xx/interrupts.o (.text) + cpu/ppc4xx/4xx_uart.o (.text) + cpu/ppc4xx/cpu_init.o (.text) + cpu/ppc4xx/speed.o (.text) + cpu/ppc4xx/4xx_enet.o (.text) + common/dlmalloc.o (.text) + lib_generic/crc32.o (.text) + lib_ppc/extable.o (.text) + lib_generic/zlib.o (.text)
+*/
+/* . = env_offset;*/
+/* common/environment.o(.text)*/
+
+ *(.text)
+ *(.fixup)
+ *(.got1)
+ }
+ _etext = .;
+ PROVIDE (etext = .);
+ .rodata :
+ {
+ *(.rodata)
+ *(.rodata1)
+ *(.rodata.str1.4)
+ *(.eh_frame)
+ }
+ .fini : { *(.fini) } =0
+ .ctors : { *(.ctors) }
+ .dtors : { *(.dtors) }
+
+ /* Read-write section, merged into data segment: */
+ . = (. + 0x00FF) & 0xFFFFFF00;
+ _erotext = .;
+ PROVIDE (erotext = .);
+ .reloc :
+ {
+ *(.got)
+ _GOT2_TABLE_ = .;
+ *(.got2)
+ _FIXUP_TABLE_ = .;
+ *(.fixup)
+ }
+ __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
+ __fixup_entries = (. - _FIXUP_TABLE_)>>2;
+
+ .data :
+ {
+ *(.data)
+ *(.data1)
+ *(.sdata)
+ *(.sdata2)
+ *(.dynamic)
+ CONSTRUCTORS
+ }
+ _edata = .;
+ PROVIDE (edata = .);
+
+ . = .;
+ __u_boot_cmd_start = .;
+ .u_boot_cmd : { *(.u_boot_cmd) }
+ __u_boot_cmd_end = .;
+
+
+ . = .;
+ __start___ex_table = .;
+ __ex_table : { *(__ex_table) }
+ __stop___ex_table = .;
+
+ . = ALIGN(256);
+ __init_begin = .;
+ .text.init : { *(.text.init) }
+ .data.init : { *(.data.init) }
+ . = ALIGN(256);
+ __init_end = .;
+
+ __bss_start = .;
+ .bss (NOLOAD) :
+ {
+ *(.sbss) *(.scommon)
+ *(.dynbss)
+ *(.bss)
+ *(COMMON)
+ }
+ _end = . ;
+ PROVIDE (end = .);+}
(quoted diff) +0 -0
b/board/xilinx/ml507/u-boot.lds.debug
new file mode 100644
index 0000000..0552994
board/xilinx/ml507/u-boot.lds.debug new file +136 -0
136 lines not on this page · raw message
(quoted diff) +0 -0
b/board/xilinx/ml507/xparameters.h
new file mode 100644
index 0000000..ba47349
board/xilinx/ml507/xparameters.h new file +31 -0
@@ -0,0 +1,33 @@ +/* +(C) Copyright 2008 +Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es +This work has been supported by: QTechnology http://qtec.com/ + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef XPARAMETER_H +#define XPARAMETER_H + +#define XPAR_DDR2_SDRAM_MEM_BASEADDR 0x00000000 +#define XPAR_INTC_0_BASEADDR 0x81800000 +#define XPAR_UARTLITE_0_BASEADDR 0x84000000 +#define XPAR_RS232_UART_1_BASEADDR 0x84000000 +#define XPAR_IIC_EEPROM_BASEADDR 0x81600000 +#define XPAR_LLTEMAC_0_BASEADDR 0x81c00000 +#define XPAR_PLB_CLOCK_FREQ_HZ 100000000 +#define XPAR_CORE_CLOCK_FREQ_HZ 400000000 +#define XPAR_INTC_MAX_NUM_INTR_INPUTS 13
I am not lawyer but this seems you only cut generated xparameters.h and change license - this is strange to me.
+#endif
include/configs/ml507.h new file +3 -0
@@ -0,0 +1,108 @@ +/* +(C) Copyright 2008 +Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es ,
ricardo.ribalda<at>gmail.com
+ This work has been supported by: Q-Technology http://qtec.com/
+
+ This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Configuration Options
+ * (easy to change)
+ */
+/*
+#define DEBUG
+#define ET_DEBUG
+*/
+ /*CPU*/
+#define CONFIG_XILINX_ML507 1
+#define CONFIG_440_VIRTEX5 1
+#define CONFIG_440 1
+#define CONFIG_4xx 1
+#include "../board/xilinx/ml507/xparameters.h" +/*Mem Map*/
+#define CFG_SDRAM_BASE 0x0 /* _must_ be 0 */
+#define CFG_MONITOR_BASE 0x04000000 /* Start of U-Boot */
+#define CFG_MONITOR_LEN (192*1024)
+#define CFG_MALLOC_LEN (128*1024) /* Reserved for malloc */
+#define CFG_ISRAM_BASE XPAR_XPS_BRAM_IF_CNTLR_1_BASEADDR
+/*Uart*/
+#define CONFIG_XILINX_UARTLITE 1
+#define CONFIG_BAUDRATE 9600
+#define CFG_BAUDRATE_TABLE {9600}
+#define CONFIG_SERIAL_BASE XPAR_UARTLITE_0_BASEADDR +/*Cmd*/
+#include <config_cmd_default.h>
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_CACHE
+#define CONFIG_CMD_DIAG
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_IRQ
+#define CONFIG_CMD_REGINFO
+#undef CONFIG_CMD_I2C
+#undef CONFIG_CMD_DTT
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_PING
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_EEPROM
+#undef CONFIG_CMD_IMLS
+/*Env*/
+#define CFG_ENV_IS_NOWHERE
+#define CFG_ENV_SIZE 0x200
+#define CFG_ENV_OFFSET 0x100
+/*#define CFG_ENV_ADDR (CFG_MONITOR_BASE - CFG_ENV_SIZE)*/
+/*#define CFG_ENV_ADDR 0x01000000*/
+#define CFG_NO_FLASH
+/*Misc*/
+#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
+#define CFG_LONGHELP /* undef to save memory */
+#define CFG_PROMPT "board:/# " /* Monitor Command Prompt */
+#if defined(CONFIG_CMD_KGDB)
+#define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
+#else
+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
+#endif
+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16)
+#define CFG_MAXARGS 16 /* max number of command args */
+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
+#define CFG_MEMTEST_START 0x0400000 /* memtest works on */
+#define CFG_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */
+#define CFG_LOAD_ADDR 0x400000 /* default load address */
+#define CFG_EXTBDINFO 1 /* To use extended board_into (bd_t) */
+#define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */
+#define CONFIG_CMDLINE_EDITING /* add command line history */
+#define CONFIG_AUTO_COMPLETE /* add autocompletion support */
+#define CONFIG_LOOPW /* enable loopw command */
+#define CONFIG_MX_CYCLIC /* enable mdc/mwc commands */
+#define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */
+#define CONFIG_VERSION_VARIABLE /* include version env variable */
+#define CFG_CONSOLE_INFO_QUIET /* don't print console @ startup */
+#define CFG_HUSH_PARSER /* Use the HUSH parser */
+#define CFG_PROMPT_HUSH_PS2 "> "
why is here tab if you use one space everywhere.
+#define CONFIG_LOADS_ECHO /* echo on for serial download */
+#define CFG_LOADS_BAUD_CHANGE /* allow baudrate change */
+#define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
+#define CONFIG_PREBOOT "echo U-Boot is up and runnining;"
+/*Stack*/
+#define CFG_INIT_RAM_ADDR 0x800000 /* Initial RAM address */ +#define CFG_INIT_RAM_END 0x2000 /* End of used area in RAM */
+#define CFG_GBL_DATA_SIZE 128 /* num bytes initial data */
+#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
+#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
+/*Speed*/
+#define CONFIG_SYS_CLK_FREQ 400000000
+#endif /* __CONFIG_H */
Signature · 17 lines
some free lines would help to read it. M 1.5.6.2 ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ U-Boot-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/u-boot-users
PATCH 1/1 ML507: New board support
In reply to Ricardo Ribalda DelgadoQuoted 1 line · Ricardo Ribalda Delgado
-Suport for the Xilinx ML507 Development Board
Comments below...
Quoted 3 lines
Signed-off-by Ricardo Ribalda Delgado <[email protected]>--- Makefile | 3 +
You forgot to add youself to MAINTAINERS and the board to MAKEALL.
Quoted 18 lines
board/xilinx/ml507/Makefile | 53 ++++++++++++ board/xilinx/ml507/config.mk | 18 ++++ board/xilinx/ml507/init.S | 45 +++++++++++ board/xilinx/ml507/ml507.c | 57 +++++++++++++ board/xilinx/ml507/u-boot.lds | 149 +++++++++++++++++++++++++++++++++++ board/xilinx/ml507/u-boot.lds.debug | 136 ++++++++++++++++++++++++++++++++ board/xilinx/ml507/xparameters.h | 33 ++++++++ include/configs/ml507.h | 108 +++++++++++++++++++++++++ 9 files changed, 602 insertions(+), 0 deletions(-) create mode 100644 board/xilinx/ml507/Makefile create mode 100644 board/xilinx/ml507/config.mk create mode 100644 board/xilinx/ml507/init.S create mode 100644 board/xilinx/ml507/ml507.c create mode 100644 board/xilinx/ml507/u-boot.lds create mode 100644 board/xilinx/ml507/u-boot.lds.debug create mode 100644 board/xilinx/ml507/xparameters.h create mode 100644 include/configs/ml507.h
<snip>
Quoted 39 lines
board/xilinx/ml507/ml507.c new file +33
-0@@ -0,0 +1,57 @@ +/* +(C) Copyright 2008 +Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es +This work has been supported by: QTechnology http://qtec.com/ + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <config.h> +#include <common.h> +#include <asm/processor.h> + +int board_pre_init (void ) +{ +return 0 ; +} + +int checkboard (void ) +{ + + printf + ("ML507 Board ported by Ricardo Ribalda ricardo.ribalda at uam.es
Quoted 1 line
(http://qtec.com) \n"); + return (0);
Hmmm. Do you really need to print your name in the U-Boot log each time the board boots? I wouldn't do this.
board/xilinx/ml507/ml507.c line 47
Quoted 13 lines
board/xilinx/ml507/ml507.c new file +13
-0+} + +phys_size_t initdram (int board_type) +{ +return 256 *1024 *1024 ; +} + +int testdram (void ) +{ +printf ("test: xxx MB - ok\n" ); + +return (0 ); +}
Remove testdram() please.
Quoted 80 lines
board/xilinx/ml507/ml507.c new file +9
-0+void get_sys_info (sys_info_t * sysInfo) +{ + sysInfo->freqProcessor =XPAR_CORE_CLOCK_FREQ_HZ ; + sysInfo->freqPLB =XPAR_PLB_CLOCK_FREQ_HZ ; + sysInfo->freqPCI =0 ; + +return ; + +}board/xilinx/ml507/u-boot.lds new file +4
-0@@ -0,0 +1,149 @@ +/* + * (C) Copyright 2000 + * Wolfgang Denk, DENX Software Engineering, wd at denx.de. + * Modified by: Ricardo Ribalda Delgado ricardo.ribalda<at>gmail.comricardo.ribalda<at>uam.es + *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */board/xilinx/ml507/u-boot.lds new file +42
-0+ +OUTPUT_ARCH(powerpc) +ENTRY(_start_440) +/* Do we need any of these for elf? + __DYNAMIC = 0; */ +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = + SIZEOF_HEADERS; + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .rel.text : { *(.rel.text) } + .rela.text : { *(.rela.text) } + .rel.data : { *(.rel.data) } + .rela.data : { *(.rela.data) } + .rel.rodata : { *(.rel.rodata) } + .rela.rodata : { *(.rela.rodata) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.bss : { *(.rel.bss) } + .rela.bss : { *(.rela.bss) } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + .init : { *(.init) } + .plt : { *(.plt) } + .text : + { + /* WARNING - the following is hand-optimized to fit within */ + /* the sector layout of our flash chips! XXX FIXME XXX */ +/* + cpu/ppc4xx/start.o (.text) + board/xilinx/ml300/init.o (.text) + cpu/ppc4xx/kgdb.o (.text) + cpu/ppc4xx/traps.o (.text) + cpu/ppc4xx/interrupts.o (.text) + cpu/ppc4xx/4xx_uart.o (.text)
board/xilinx/ml507/u-boot.lds line 75
Quoted 10 lines
board/xilinx/ml507/u-boot.lds new file +10
-0+ cpu/ppc4xx/cpu_init.o (.text) + cpu/ppc4xx/speed.o (.text) + cpu/ppc4xx/4xx_enet.o (.text) + common/dlmalloc.o (.text) + lib_generic/crc32.o (.text) + lib_ppc/extable.o (.text) + lib_generic/zlib.o (.text) +*/ +/* . = env_offset;*/ +/* common/environment.o(.text)*/
Remove those lines above that are commented out.
board/xilinx/ml507/u-boot.lds.debug
Quoted 78 lines
board/xilinx/ml507/u-boot.lds new file +73
-0+ *(.text) + *(.fixup) + *(.got1) + } + _etext = .; + PROVIDE (etext = .); + .rodata : + { + *(.rodata) + *(.rodata1) + *(.rodata.str1.4) + *(.eh_frame) + } + .fini : { *(.fini) } =0 + .ctors : { *(.ctors) } + .dtors : { *(.dtors) } + + /* Read-write section, merged into data segment: */ + . = (. + 0x00FF) & 0xFFFFFF00; + _erotext = .; + PROVIDE (erotext = .); + .reloc : + { + *(.got) + _GOT2_TABLE_ = .; + *(.got2) + _FIXUP_TABLE_ = .; + *(.fixup) + } + __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; + __fixup_entries = (. - _FIXUP_TABLE_)>>2; + + .data : + { + *(.data) + *(.data1) + *(.sdata) + *(.sdata2) + *(.dynamic) + CONSTRUCTORS + } + _edata = .; + PROVIDE (edata = .); + + . = .; + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; + + + . = .; + __start___ex_table = .; + __ex_table : { *(__ex_table) } + __stop___ex_table = .; + + . = ALIGN(256); + __init_begin = .; + .text.init : { *(.text.init) } + .data.init : { *(.data.init) } + . = ALIGN(256); + __init_end = .; + + __bss_start = .; + .bss (NOLOAD) : + { + *(.sbss) *(.scommon) + *(.dynbss) + *(.bss) + *(COMMON) + } + _end = . ; + PROVIDE (end = .); +}(quoted diff) +0
-0b/board/xilinx/ml507/u-boot.lds.debug new file mode 100644 index 0000000..0552994
board/xilinx/ml507/u-boot.lds.debug new file +0
-0
Do you really need this u-boot.lds.debug? If not please remove it.
Quoted 218 lines
board/xilinx/ml507/u-boot.lds.debug new file +136
-0@@ -0,0 +1,136 @@ +/* + * (C) Copyright 2000 + * Wolfgang Denk, DENX Software Engineering, wd at denx.de. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +OUTPUT_ARCH(powerpc) +/* Do we need any of these for elf? + __DYNAMIC = 0; */ +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = + SIZEOF_HEADERS; + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .rel.text : { *(.rel.text) } + .rela.text : { *(.rela.text) } + .rel.data : { *(.rel.data) } + .rela.data : { *(.rela.data) } + .rel.rodata : { *(.rel.rodata) } + .rela.rodata : { *(.rela.rodata) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.bss : { *(.rel.bss) } + .rela.bss : { *(.rela.bss) } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + .init : { *(.init) } + .plt : { *(.plt) } + .text : + { + /* WARNING - the following is hand-optimized to fit within */ + /* the sector layout of our flash chips! XXX FIXME XXX */ + + mpc8xx/start.o (.text) + common/dlmalloc.o (.text) + lib_generic/vsprintf.o (.text) + lib_generic/crc32.o (.text) + lib_ppc/extable.o (.text) + + common/environment.o(.text) + + *(.text) + *(.fixup) + *(.got1) + } + _etext = .; + PROVIDE (etext = .); + .rodata : + { + *(.rodata) + *(.rodata1) + *(.rodata.str1.4) + *(.eh_frame) + } + .fini : { *(.fini) } =0 + .ctors : { *(.ctors) } + .dtors : { *(.dtors) } + + /* Read-write section, merged into data segment: */ + . = (. + 0x0FFF) & 0xFFFFF000; + _erotext = .; + PROVIDE (erotext = .); + .reloc : + { + *(.got) + _GOT2_TABLE_ = .; + *(.got2) + _FIXUP_TABLE_ = .; + *(.fixup) + } + __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; + __fixup_entries = (. - _FIXUP_TABLE_)>>2; + + .data : + { + *(.data) + *(.data1) + *(.sdata) + *(.sdata2) + *(.dynamic) + CONSTRUCTORS + } + _edata = .; + PROVIDE (edata = .); + + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; + + + __start___ex_table = .; + __ex_table : { *(__ex_table) } + __stop___ex_table = .; + + . = ALIGN(4096); + __init_begin = .; + .text.init : { *(.text.init) } + .data.init : { *(.data.init) } + . = ALIGN(4096); + __init_end = .; + + __bss_start = .; + .bss : + { + *(.sbss) *(.scommon) + *(.dynbss) + *(.bss) + *(COMMON) + } + _end = . ; + PROVIDE (end = .); +}(quoted diff) +0
-0
b/board/xilinx/ml507/xparameters.hnew file mode 100644 index 0000000..ba47349board/xilinx/ml507/xparameters.h new file +33
-0@@ -0,0 +1,33 @@ +/* +(C) Copyright 2008 +Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es +This work has been supported by: QTechnology http://qtec.com/ + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef XPARAMETER_H +#define XPARAMETER_H + +#define XPAR_DDR2_SDRAM_MEM_BASEADDR 0x00000000 +#define XPAR_INTC_0_BASEADDR 0x81800000 +#define XPAR_UARTLITE_0_BASEADDR 0x84000000 +#define XPAR_RS232_UART_1_BASEADDR 0x84000000 +#define XPAR_IIC_EEPROM_BASEADDR 0x81600000 +#define XPAR_LLTEMAC_0_BASEADDR 0x81c00000 +#define XPAR_PLB_CLOCK_FREQ_HZ 100000000 +#define XPAR_CORE_CLOCK_FREQ_HZ 400000000 +#define XPAR_INTC_MAX_NUM_INTR_INPUTS 13 + +#endif include/configs/ml507.h new file +3
-0@@ -0,0 +1,108 @@ +/* +(C) Copyright 2008 +Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com + This work has
been supported by: Q-Technology http://qtec.com/ +include/configs/ml507.h new file +31
-0+This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* +* High Level Configuration Options +* (easy to change) +*/ +/* +#define DEBUG +#define ET_DEBUG +*/ +/*CPU*/ +#define CONFIG_XILINX_ML507 1 +#define CONFIG_440_VIRTEX5 1 +#define CONFIG_440 1 +#define CONFIG_4xx 1 +#include "../board/xilinx/ml507/xparameters.h"
include/configs/ml507.h line 46
Quoted 10 lines
include/configs/ml507.h new file +10
-0+/*Mem Map*/ +#define CFG_SDRAM_BASE 0x0/* _must_ be 0 */ +#define CFG_MONITOR_BASE 0x04000000/* Start of U-Boot */ +#define CFG_MONITOR_LEN (192*1024) +#define CFG_MALLOC_LEN (128*1024)/* Reserved for malloc */ +#define CFG_ISRAM_BASE XPAR_XPS_BRAM_IF_CNTLR_1_BASEADDR +/*Uart*/ +#define CONFIG_XILINX_UARTLITE 1 +#define CONFIG_BAUDRATE 9600 +#define CFG_BAUDRATE_TABLE {9600}
Only one baudrate is supported?
Quoted 12 lines
include/configs/ml507.h new file +12
-0+#define CONFIG_SERIAL_BASE XPAR_UARTLITE_0_BASEADDR +/*Cmd*/ +#include <config_cmd_default.h> +#define CONFIG_CMD_ASKENV +#define CONFIG_CMD_CACHE +#define CONFIG_CMD_DIAG +#define CONFIG_CMD_ELF +#define CONFIG_CMD_IRQ +#define CONFIG_CMD_REGINFO +#undef CONFIG_CMD_I2C +#undef CONFIG_CMD_DTT +#undef CONFIG_CMD_NET
include/configs/ml507.h line 68
Quoted 10 lines
include/configs/ml507.h new file +10
-0+#undef CONFIG_CMD_PING +#undef CONFIG_CMD_DHCP +#undef CONFIG_CMD_EEPROM +#undef CONFIG_CMD_IMLS +/*Env*/ +#define CFG_ENV_IS_NOWHERE +#define CFG_ENV_SIZE 0x200 +#define CFG_ENV_OFFSET 0x100 +/*#define CFG_ENV_ADDR (CFG_MONITOR_BASE - CFG_ENV_SIZE)*/ +/*#define CFG_ENV_ADDR 0x01000000*/
Remove the lines above that are commented out.
Please fix and resubmit.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
PATCH 1/1 ML507: New board support
In reply to Ricardo Ribalda DelgadoQuoted 1 line · In message <[email protected]> you wrote:
-Suport for the Xilinx ML507 Development Board
There are some coding stylke issues: trailing white space, aliglnment not by TAB, etc.
board/xilinx/ml507/init.S line 3
Quoted 5 lines
+++
b/board/xilinx/ml507/init.Sboard/xilinx/ml507/init.S new file +3
-0@@ -0,0 +1,45 @@ +/* + (C) Copyright 2008 + Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
Line too long.
board/xilinx/ml507/ml507.c line 33
Quoted 5 lines
board/xilinx/ml507/ml507.c new file +5
-0+int checkboard (void ) +{ + +printf + ("ML507 Board ported by Ricardo Ribalda ricardo.ribalda at uam.es (http://qtec.com) \n" );
Line too long. And please print only SHORT messages!
board/xilinx/ml507/ml507.c line 39
Quoted 3 lines
board/xilinx/ml507/ml507.c new file +3
-0+phys_size_t initdram (int board_type) +{ +return 256 *1024 *1024 ;
Please use memsize() to autodetect the size of your RAM instead of hard-wiring it.
board/xilinx/ml507/ml507.c line 47
Quoted 6 lines
board/xilinx/ml507/ml507.c new file +6
-0+int testdram (void ) +{ +printf ("test: xxx MB - ok\n" ); + +return (0 ); +}
Please remove.
board/xilinx/ml507/u-boot.lds line 4
Quoted 9 lines
new file mode 100644
index 0000000..054661cboard/xilinx/ml507/u-boot.lds new file +4
-0@@ -0,0 +1,149 @@ +/* + * (C) Copyright 2000 + * Wolfgang Denk, DENX Software Engineering, wd at denx.de. + * Modified by: Ricardo Ribalda Delgado ricardo.ribalda<at>gmail.com ricardo.ribalda<at>uam.es
Line too long.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de It became apparent that one reason why the Ice Giants were known as the Ice Giants was because they were, well, giants. The other was that they were made of ice. -Terry Pratchett, _Sourcery_