Skip to contentSkip to conversation

ppc44x: Unification of virtex5 pp440 boards v4

PATCH New Ricardo Ribalda Delgado 2 participants 2 messages Sep 1, 2008 – Sep 5, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v4

This patch provides an unificated way of handling xilinx v5 ppc440 boards.

It unificates 3 different things:

1) Source code
A new board called ppc440-generic has been created. This board includes a generic tlb initialization (Maps the whole memory into virtual) and defines board_pre_init, checkboard, initdram and get_sys_info weakly, so, they can be replaced by specific functions.

If a new board needs to redefine any of the previous functions (specific initialization) it can create a new directory with the specific initializations needed. (see the example ml507 board).

2) Configuration file
Common configurations are located under configs/xilinx-ppc440.h, this header file interpretes the xparameters file generated by EDK and configurates u-boot in correspondence. Example: if there is a Temac, allows CMD_CONFIG_NET
Specific configuration are located under specific configuration file. (see the example ml507 board)

3) Makefile
Some work has been done in order to not duplicate work in the Main Makefile. Please see the attached code.

In order to support new boards they can be implemented in the next way:

a) Simple Generic Board (90% of the time)
Using EDK generates a new xparameters.h file, replace ppc440-generic/xparameters.h and run make xilinx-ppc440-generic_config && make

b) Simple Boards with special u-boot parameters (9 % of the time) Create a new file under configs for it (use ml507.h as example) and change your paramaters. Create a new Makefile paragraph and compile

c) Complex boards (1% of the time)
Create a new folder for the board, like the ml507

Finally, it adds support for the Avnet FX30T Evaluation board, following the new generic structure:

Cheap board by Avnet for evaluating the Virtex5 FX technology.

This patch adds support for:
- UartLite
- 16MB Flash
- 64MB RAM

Prior using U-boot in this board, read carefully the ERRATA by Avnet to solve some memory initialization issues.

v2 diff:
- Code Styling (Michal Simek)
- Remove unnecesary xparameters lines (Michal Simek)
- Avnet board documentation in patch

v3 diff:
- Description changed (wdenx)
- Copyright issues
- RFC->Patch Propossal

v4 diff:
- MAKEALL gives same output as other boards (stefan)
- Simplify board configuration (wdenx)

---
 CREDITS                                            |    3 +-
 MAINTAINERS                                        |    2 +
 MAKEALL                                            |    4 +
 Makefile                                           |   45 +++++--
 board/avnet/v5fx30teval/.gitignore                 |    1 +
 board/avnet/v5fx30teval/Makefile                   |   27 ++++
 board/avnet/v5fx30teval/v5fx30teval.c              |   28 ++++
 board/avnet/v5fx30teval/xparameters.h              |   33 +++++
 board/xilinx/ml507/.gitignore                      |    1 +
 board/xilinx/ml507/Makefile                        |   41 +-----
 board/xilinx/ml507/config.mk                       |   27 ----
 board/xilinx/ml507/init.S                          |   53 -------
 board/xilinx/ml507/ml507.c                         |   21 +---
 board/xilinx/ml507/u-boot-ram.lds                  |  134 ------------------
 board/xilinx/ml507/u-boot-rom.lds                  |  144 --------------------
 board/xilinx/ml507/xparameters.h                   |   17 +--
 board/xilinx/ppc440-generic/.gitignore             |    1 +
 board/xilinx/ppc440-generic/Makefile               |   62 +++++++++
 board/xilinx/ppc440-generic/init.S                 |   45 ++++++
 board/xilinx/ppc440-generic/u-boot-ram.lds         |  134 ++++++++++++++++++
 board/xilinx/ppc440-generic/u-boot-rom.lds         |  144 ++++++++++++++++++++
 .../xilinx/ppc440-generic/xilinx_ppc440_generic.c  |   52 +++++++
 board/xilinx/ppc440-generic/xparameters.h          |   34 +++++
 include/configs/ml507.h                            |   91 ++-----------
 include/configs/v5fx30teval.h                      |   49 +++++++
 include/configs/xilinx-ppc440-generic.h            |   49 +++++++
 include/configs/xilinx-ppc440.h                    |  106 ++++++++++++++
 27 files changed, 832 insertions(+), 516 deletions(-)
 create mode 100644 board/avnet/v5fx30teval/.gitignore
 create mode 100644 board/avnet/v5fx30teval/Makefile
 create mode 100644 board/avnet/v5fx30teval/v5fx30teval.c
 create mode 100644 board/avnet/v5fx30teval/xparameters.h
 create mode 100644 board/xilinx/ml507/.gitignore
 delete mode 100644 board/xilinx/ml507/config.mk
 delete mode 100644 board/xilinx/ml507/init.S
 delete mode 100644 board/xilinx/ml507/u-boot-ram.lds
 delete mode 100644 board/xilinx/ml507/u-boot-rom.lds
 create mode 100644 board/xilinx/ppc440-generic/.gitignore
 create mode 100644 board/xilinx/ppc440-generic/Makefile
 create mode 100644 board/xilinx/ppc440-generic/init.S
 create mode 100644 board/xilinx/ppc440-generic/u-boot-ram.lds
 create mode 100644 board/xilinx/ppc440-generic/u-boot-rom.lds
 create mode 100644 board/xilinx/ppc440-generic/xilinx_ppc440_generic.c
 create mode 100644 board/xilinx/ppc440-generic/xparameters.h
 create mode 100644 include/configs/v5fx30teval.h
 create mode 100644 include/configs/xilinx-ppc440-generic.h
 create mode 100644 include/configs/xilinx-ppc440.h
CREDITS +2 -1
index 4fe4e63..3767322 100644
@@ -405,7 +405,8 @@ D: Atmel AT91CAP9ADK support
 
 N: Ricardo Ribalda Delgado
 E: ricardo.ribalda at uam.es
-D: PPC440x5 (Virtex5), ML507 Board, eeprom_simul, adt7460
+D: PPC440x5 (Virtex5), ML507 Board, eeprom_simul, adt7460, v5fx30teval
+D: Virtex ppc440 generic architecture
 W: http://www.ii.uam.es/~rribalda
 
 N: Stefan Roese
MAINTAINERS +2 -0
index 31493c2..47220e2 100644
@@ -318,6 +318,8 @@ Daniel Poirot <[email protected]>
 Ricardo Ribalda <[email protected]>
 
 	ml507 		PPC440x5
+	v5fx30teval	PPC440x5
+	xilinx-pp440-generic	PPC440x5
 
 Stefan Roese <[email protected]>
 
MAKEALL +4 -0
index edfee90..6aa1723 100755
@@ -231,12 +231,16 @@ LIST_4xx="		\
 	sequoia_nand	\
 	taihu		\
 	taishan		\
+	v5fx30teval	\
+	v5fx30teval_flash \
 	VOH405		\
 	VOM405		\
 	W7OLMC		\
 	W7OLMG		\
 	walnut		\
 	WUH405		\
+	xilinx-ppc440-generic \
+	xilinx-ppc440-generic_flash \
 	XPEDITE1K	\
 	yellowstone	\
 	yosemite	\
Makefile +35 -10

63 lines not on this page · raw message

board/avnet/v5fx30teval/.gitignore new file +1 -0
new file mode 100644
index 0000000..6896ef6
@@ -0,0 +1 @@
+/config.mk
board/avnet/v5fx30teval/Makefile new file +27 -0
new file mode 100644
index 0000000..de23f29
@@ -0,0 +1,27 @@
+#
+# (C) Copyright 2008
+# Ricardo Ribalda,Universidad Autonoma de Madrid, ricardo.ribalda at uam.es
+# This work has been supported by: Qtechnology http://qtec.com/
+#
+# 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
+#
+
+COBJS	+= $(BOARD).o
+
+include $(SRCTREE)/board/xilinx/ppc440-generic/Makefile
board/avnet/v5fx30teval/v5fx30teval.c new file +28 -0
new file mode 100644
index 0000000..14a1d5d
@@ -0,0 +1,28 @@
+/*
+ * (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 checkboard(void)
+{
+	puts("Avnet Virtex 5 FX30 Evaluation Board\n");
+	return 0;
+}
board/avnet/v5fx30teval/xparameters.h new file +33 -0
new file mode 100644
index 0000000..bb657fc
@@ -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/
+ * based on xparameters.h by Xilinx
+ *
+ * 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_FLASH_MEM0_BASEADDR	0xFF000000
+#define XPAR_PLB_CLOCK_FREQ_HZ		100000000
+#define XPAR_CORE_CLOCK_FREQ_HZ		400000000
+#define XPAR_INTC_MAX_NUM_INTR_INPUTS	13
+#define XPAR_UARTLITE_0_BAUDRATE	9600
+
+#endif
board/xilinx/ml507/.gitignore new file +1 -0
new file mode 100644
index 0000000..6896ef6
@@ -0,0 +1 @@
+/config.mk
board/xilinx/ml507/Makefile +5 -36

49 lines not on this page · raw message

board/xilinx/ml507/config.mk deleted +0 -27
deleted file mode 100644
index e827e8a..0000000
@@ -1,27 +0,0 @@
-#
-# (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
-#
-sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
-
-ifndef TEXT_BASE
-TEXT_BASE = 0x04000000
-endif
board/xilinx/ml507/init.S deleted +0 -53

53 lines not on this page · raw message

board/xilinx/ml507/ml507.c +1 -20
index d499303..f9789cf 100644
@@ -20,28 +20,9 @@
 #include <common.h>
 #include <asm/processor.h>
 
-int board_pre_init(void)
-{
-	return 0;
-}
 
 int checkboard(void)
 {
-	puts("ML507 Board\n");
+	puts("Xilinx ML507 Board\n");
 	return 0;
 }
-
-phys_size_t initdram(int board_type)
-{
-	return get_ram_size(XPAR_DDR2_SDRAM_MEM_BASEADDR,
-			    CFG_SDRAM_SIZE_MB * 1024 * 1024);
-}
-
-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-ram.lds deleted +0 -134

134 lines not on this page · raw message

board/xilinx/ml507/u-boot-rom.lds deleted +0 -144

144 lines not on this page · raw message

board/xilinx/ml507/xparameters.h +8 -9
index 77d2ddf..1992fff 100644
@@ -21,15 +21,14 @@
 #ifndef XPARAMETER_H
 #define XPARAMETER_H
 
-#define XPAR_DDR2_SDRAM_MEM_BASEADDR 	0x00000000
-#define XPAR_IIC_EEPROM_BASEADDR 	0x81600000
-#define XPAR_INTC_0_BASEADDR 		0x81800000
-#define XPAR_LLTEMAC_0_BASEADDR 	0x81C00000
-#define XPAR_UARTLITE_0_BASEADDR 	0x84000000
-#define XPAR_FLASH_MEM0_BASEADDR 	0xFE000000
-#define XPAR_PLB_CLOCK_FREQ_HZ 		100000000
-#define XPAR_CORE_CLOCK_FREQ_HZ 	400000000
-#define XPAR_INTC_MAX_NUM_INTR_INPUTS 	13
+#define XPAR_DDR2_SDRAM_MEM_BASEADDR	0x00000000
+#define XPAR_IIC_EEPROM_BASEADDR	0x81600000
+#define XPAR_INTC_0_BASEADDR		0x81800000
+#define XPAR_UARTLITE_0_BASEADDR	0x84000000
+#define XPAR_FLASH_MEM0_BASEADDR	0xFE000000
+#define XPAR_PLB_CLOCK_FREQ_HZ		100000000
+#define XPAR_CORE_CLOCK_FREQ_HZ		400000000
+#define XPAR_INTC_MAX_NUM_INTR_INPUTS	13
 #define XPAR_UARTLITE_0_BAUDRATE	9600
 
 #endif
board/xilinx/ppc440-generic/.gitignore new file +1 -0
new file mode 100644
index 0000000..6896ef6
@@ -0,0 +1 @@
+/config.mk
board/xilinx/ppc440-generic/Makefile new file +62 -0

62 lines not on this page · raw message

board/xilinx/ppc440-generic/init.S new file +45 -0

45 lines not on this page · raw message

board/xilinx/ppc440-generic/u-boot-ram.lds new file +134 -0

134 lines not on this page · raw message

board/xilinx/ppc440-generic/u-boot-rom.lds new file +144 -0

144 lines not on this page · raw message

board/xilinx/ppc440-generic/xilinx_ppc440_generic.c new file +52 -0

52 lines not on this page · raw message

board/xilinx/ppc440-generic/xparameters.h new file +34 -0
new file mode 100644
index 0000000..1992fff
@@ -0,0 +1,34 @@
+/*
+ * (C) Copyright 2008
+ * Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es
+ * This work has been supported by: QTechnology  http://qtec.com/
+ * based on xparameters-ml507.h by Xilinx
+ *
+ * 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_IIC_EEPROM_BASEADDR	0x81600000
+#define XPAR_INTC_0_BASEADDR		0x81800000
+#define XPAR_UARTLITE_0_BASEADDR	0x84000000
+#define XPAR_FLASH_MEM0_BASEADDR	0xFE000000
+#define XPAR_PLB_CLOCK_FREQ_HZ		100000000
+#define XPAR_CORE_CLOCK_FREQ_HZ		400000000
+#define XPAR_INTC_MAX_NUM_INTR_INPUTS	13
+#define XPAR_UARTLITE_0_BAUDRATE	9600
+
+#endif
include/configs/ml507.h +9 -82

115 lines not on this page · raw message

include/configs/v5fx30teval.h new file +49 -0

49 lines not on this page · raw message

include/configs/xilinx-ppc440-generic.h new file +49 -0

49 lines not on this page · raw message

include/configs/xilinx-ppc440.h new file +106 -0

106 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v4

Quoted 1 line · Ricardo Ribalda Delgado

This patch provides an unificated way of handling xilinx v5 ppc440 boards.

Added to u-boot-ppc4xx repository. Thanks.

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
=====================================================================