Skip to contentSkip to conversation

ppc4xx: Generic architecture for xilinx ppc405(v3)

PATCH New Ricardo Ribalda Delgado 4 participants 6 messages Oct 21, 2008 – Dec 24, 2010

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

PATCH 1/1 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)

---
v2
Includes changes propossed by Stefan Roese

-Remove unneeded init.S
-PPC404 ->PPC405
v3
rebased to ppc4xx/master

 CREDITS                                            |    1 +
 MAINTAINERS                                        |    1 +
 Makefile                                           |   16 ++
 board/xilinx/ppc405-generic/.gitignore             |    1 +
 board/xilinx/ppc405-generic/Makefile               |   60 ++++++++
 board/xilinx/ppc405-generic/config.mk              |   25 ++++
 board/xilinx/ppc405-generic/u-boot-ram.lds         |  134 ++++++++++++++++++
 board/xilinx/ppc405-generic/u-boot-rom.lds         |  144 ++++++++++++++++++++
 .../xilinx/ppc405-generic/xilinx_ppc405_generic.c  |   59 ++++++++
 board/xilinx/ppc405-generic/xparameters.h          |   36 +++++
 cpu/ppc4xx/start.S                                 |    3 +-
 include/configs/xilinx-ppc405-generic.h            |   58 ++++++++
 include/configs/xilinx-ppc405.h                    |  126 +++++++++++++++++
 13 files changed, 663 insertions(+), 1 deletions(-)
 create mode 100644 board/xilinx/ppc405-generic/.gitignore
 create mode 100644 board/xilinx/ppc405-generic/Makefile
 create mode 100644 board/xilinx/ppc405-generic/config.mk
 create mode 100644 board/xilinx/ppc405-generic/u-boot-ram.lds
 create mode 100644 board/xilinx/ppc405-generic/u-boot-rom.lds
 create mode 100644 board/xilinx/ppc405-generic/xilinx_ppc405_generic.c
 create mode 100644 board/xilinx/ppc405-generic/xparameters.h
 create mode 100644 include/configs/xilinx-ppc405-generic.h
 create mode 100644 include/configs/xilinx-ppc405.h
CREDITS +1 -0
index 3767322..9ddf0d2 100644
@@ -407,6 +407,7 @@ N: Ricardo Ribalda Delgado
 E: ricardo.ribalda at uam.es
 D: PPC440x5 (Virtex5), ML507 Board, eeprom_simul, adt7460, v5fx30teval
 D: Virtex ppc440 generic architecture
+D: Virtex ppc405 generic architecture
 W: http://www.ii.uam.es/~rribalda
 
 N: Stefan Roese
MAINTAINERS +1 -0
index 60cb6a6..a5d1038 100644
@@ -320,6 +320,7 @@ Ricardo Ribalda <[email protected]>
 	ml507 		PPC440x5
 	v5fx30teval	PPC440x5
 	xilinx-pp440-generic	PPC440x5
+	xilinx-pp405-generic	PPC405
 
 Stefan Roese <[email protected]>
 
Makefile +16 -0
index fceb8a2..66922eb 100644
@@ -1518,6 +1518,22 @@ sycamore_config: unconfig
 WUH405_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) ppc ppc4xx wuh405 esd
 
+xilinx-ppc405-generic_flash_config: unconfig
+	@mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic
+	@echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-rom.lds"\
+		> $(obj)board/xilinx/ppc405-generic/config.tmp
+	@echo "TEXT_BASE := 0xFE360000" \
+		>> $(obj)board/xilinx/ppc405-generic/config.tmp
+	@$(MKCONFIG) xilinx-ppc405-generic ppc ppc4xx ppc405-generic xilinx
+
+xilinx-ppc405-generic_config: unconfig
+	@mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic
+	@echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-ram.lds"\
+		> $(obj)board/xilinx/ppc405-generic/config.tmp
+	@echo "TEXT_BASE := 0x04000000" \
+		>> $(obj)board/xilinx/ppc405-generic/config.tmp
+	@$(MKCONFIG) xilinx-ppc405-generic ppc ppc4xx ppc405-generic xilinx
+
 xilinx-ppc440-generic_flash_config: unconfig
 	@mkdir -p $(obj)include $(obj)board/xilinx/ppc440-generic
 	@echo "LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc440-generic/u-boot-rom.lds"\
board/xilinx/ppc405-generic/.gitignore new file +1 -0
new file mode 100644
index 0000000..b644f59
@@ -0,0 +1 @@
+config.tmp
board/xilinx/ppc405-generic/Makefile new file +60 -0

60 lines not on this page · raw message

board/xilinx/ppc405-generic/config.mk new file +25 -0
new file mode 100644
index 0000000..6d76755
@@ -0,0 +1,25 @@
+#
+# (C) Copyright 2008
+# Ricardo Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es
+# Work supported by Qtechnology http://www.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
+#
+
+sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
board/xilinx/ppc405-generic/u-boot-ram.lds new file +134 -0

134 lines not on this page · raw message

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

144 lines not on this page · raw message

board/xilinx/ppc405-generic/xilinx_ppc405_generic.c new file +59 -0

59 lines not on this page · raw message

board/xilinx/ppc405-generic/xparameters.h new file +36 -0
new file mode 100644
index 0000000..e8e8ced
@@ -0,0 +1,36 @@
+/*
+ * (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_SPI_0_BASEADDR             0x83400000
+#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
+#define XPAR_SPI_0_NUM_TRANSFER_BITS	8
+
+#endif
cpu/ppc4xx/start.S +2 -1
index 31902a0..882ef21 100644
@@ -918,7 +918,8 @@ _start:
 	ori	r4, r4, CONFIG_SYS_DCACHE_SACR_VALUE at l
 	mtdccr	r4
 
-#if !(defined(CONFIG_SYS_EBC_PB0AP) && defined(CONFIG_SYS_EBC_PB0CR))
+#if !(defined(CONFIG_SYS_EBC_PB0AP) && defined(CONFIG_SYS_EBC_PB0CR))\
+				&& !defined (CONFIG_XILINX_405)
 	/*----------------------------------------------------------------------- */
 	/* Tune the speed and size for flash CS0  */
 	/*----------------------------------------------------------------------- */
include/configs/xilinx-ppc405-generic.h new file +58 -0

58 lines not on this page · raw message

include/configs/xilinx-ppc405.h new file +126 -0

126 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 ppc4xx: Generic architecture for xilinx ppc405(v3)

Hello Stefan

Since Georg patch for fx12mm needs this patch..... So I have to make
any change to it?

Best regards

Signature · 2 lines
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/
#2 lore raw

PATCH 1/1 ppc4xx: Generic architecture for xilinx ppc405(v3)

Hi Ricardo,

Quoted 2 lines · Ricardo

Since Georg patch for fx12mm needs this patch..... So I have to make
any change to it?

No, I just applied it to 4xx/master. Will ask Wolfgang to pull soon.

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

#3 lore raw

PATCH 1/1 ppc4xx: Generic architecture for xilinx ppc405(v3)

In reply to Ricardo Ribalda Delgado

Dear Ricardo Ribalda Delgado,

Quoted 7 lines · In message <[email protected]> you wrote:

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.

Quoted 6 lines

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)

As it turns out this patch has obviously never been tested with an out-of-tree build. I get for example:

MAKEALL_LOGDIR=/work/wd/tmp-ppc-LOG \
BUILD_DIR=/work/wd/tmp-ppc \
./MAKEALL fx12mm
Configuring for fx12mm - Board: fx12mm, Options:
SYS_TEXT_BASE=0x04000000,RESET_VECTOR_ADDRESS=0x03FFFFFC,INIT_TLB=board/xilinx/ppc405-generic/init.o
Assembler messages:
Fatal error: can't create /work/wd/tmp-ppc/board/avnet/fx12mm/../../xilinx/ppc405-generic/xilinx_ppc405_generic.o: No such file or directory make[1]: *** [/work/wd/tmp-ppc/board/avnet/fx12mm/../../xilinx/ppc405-generic/xilinx_ppc405_generic.o] Error 2 make[1]: *** Waiting for unfinished jobs....
make: *** [/work/wd/tmp-ppc/board/avnet/fx12mm/libfx12mm.o] Error 2
ppc_6xx-size: '/work/wd/tmp-ppc/u-boot': No such file

This happens for all affected boards.

Please provide a fix; alternatively, we can revert that commit.

Thanks.

Best regards,

Wolfgang Denk

Signature · 5 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
The game of life is a game of boomerangs.  Our  thoughts,  deeds  and
words return to us sooner or later with astounding accuracy.
#4 lore raw

PATCH 1/1 ppc4xx: Generic architecture for xilinx ppc405(v3)

Hello

It is weird. just fetch stefan/next from the repository and "make
fx12mm" works with no problem (what is mainly what I use for tests). It is the MAKEALL script that fails. It is quite late now, but I will try to find out the differences tomorrow.

Best regards.

Quoted 50 lines · Wolfgang Denk

Dear Ricardo Ribalda Delgado,

Quoted 7 lines · In message <[email protected]> you wrote:

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.

Quoted 6 lines

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)

As it turns out this patch has obviously never been tested with an out-of-tree build. I get for example:

MAKEALL_LOGDIR=/work/wd/tmp-ppc-LOG \
BUILD_DIR=/work/wd/tmp-ppc \
./MAKEALL fx12mm
Configuring for fx12mm - Board: fx12mm, Options:
SYS_TEXT_BASE=0x04000000,RESET_VECTOR_ADDRESS=0x03FFFFFC,INIT_TLB=board/xilinx/ppc405-generic/init.o
Assembler messages:
Fatal error: can't create /work/wd/tmp-ppc/board/avnet/fx12mm/../../xilinx/ppc405-generic/xilinx_ppc405_generic.o: No such file or directory make[1]: *** [/work/wd/tmp-ppc/board/avnet/fx12mm/../../xilinx/ppc405-generic/xilinx_ppc405_generic.o] Error 2 make[1]: *** Waiting for unfinished jobs....
make: *** [/work/wd/tmp-ppc/board/avnet/fx12mm/libfx12mm.o] Error 2
ppc_6xx-size: '/work/wd/tmp-ppc/u-boot': No such file

This happens for all affected boards.

Please provide a fix; alternatively, we can revert that commit.

Thanks.

Best regards,

Wolfgang Denk

--
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 The game of life is a game of boomerangs. ?Our ?thoughts, ?deeds ?and words return to us sooner or later with astounding accuracy.

Signature · 2 lines
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/
#5 lore raw

PATCH 1/1 ppc4xx: Generic architecture for xilinx ppc405(v3)

Patch is on the mail....

Best regards and Merry Christmas!

Quoted 67 lines · Ricardo Ribalda Delgado

Hello

?It is weird. ?just fetch stefan/next from the repository and "make fx12mm" works with no problem (what is mainly what I use for tests). It is the MAKEALL script that fails. It is quite late now, but I will try to find out the differences tomorrow.

? ? ? Best regards.

Quoted 41 lines · Wolfgang Denk

Dear Ricardo Ribalda Delgado,

Quoted 7 lines · In message <[email protected]> you wrote:

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.

Quoted 6 lines

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)

As it turns out this patch has obviously never been tested with an out-of-tree build. I get for example:

MAKEALL_LOGDIR=/work/wd/tmp-ppc-LOG \
BUILD_DIR=/work/wd/tmp-ppc \
./MAKEALL fx12mm
Configuring for fx12mm - Board: fx12mm, Options:
SYS_TEXT_BASE=0x04000000,RESET_VECTOR_ADDRESS=0x03FFFFFC,INIT_TLB=board/xilinx/ppc405-generic/init.o
Assembler messages:
Fatal error: can't create /work/wd/tmp-ppc/board/avnet/fx12mm/../../xilinx/ppc405-generic/xilinx_ppc405_generic.o: No such file or directory make[1]: *** [/work/wd/tmp-ppc/board/avnet/fx12mm/../../xilinx/ppc405-generic/xilinx_ppc405_generic.o] Error 2 make[1]: *** Waiting for unfinished jobs....
make: *** [/work/wd/tmp-ppc/board/avnet/fx12mm/libfx12mm.o] Error 2
ppc_6xx-size: '/work/wd/tmp-ppc/u-boot': No such file

This happens for all affected boards.

Please provide a fix; alternatively, we can revert that commit.

Thanks.

Best regards,

Quoted 9 lines

Wolfgang Denk

--
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 The game of life is a game of boomerangs. ?Our ?thoughts, ?deeds ?and words return to us sooner or later with astounding accuracy.

--
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

Signature · 2 lines
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/