Skip to contentSkip to conversation

powerpc: Add a virtex5 ml507 refdesign board (v2)

PATCH In review Edgar E. Iglesias 3 participants 8 messages Sep 29, 2010 – Oct 2, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

cover powerpc: Add a virtex5 ml507 refdesign board (v2)

v2:
* Address review comments from A. Graf.

Edgar E. Iglesias (2):
powerpc: Add a ppc-440x5 Xilinx model
powerpc: Add a virtex5 ml507 refdesign board

 Makefile.target                    |    8 +
 default-configs/ppc-softmmu.mak    |    2 +
 default-configs/ppc64-softmmu.mak  |    2 +
 default-configs/ppcemb-softmmu.mak |    2 +
 hw/virtex_ml507.c                  |  278 ++++++++++++++++++++++++++++++++++++
 target-ppc/cpu.h                   |    4 +
 target-ppc/translate_init.c        |    6 +-
 7 files changed, 300 insertions(+), 2 deletions(-)
 create mode 100644 hw/virtex_ml507.c
#1 lore raw

PATCH 1/2 powerpc: Add a ppc-440x5 Xilinx model

Add a powerpc 440x5 with the model ID on the Xilinx virtex5. Connect the 440x5 to the 40x interrupt logic.

---
 target-ppc/translate_init.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
target-ppc/translate_init.c +4 -2
index 2bd8b00..05ffe95 100644
@@ -3596,7 +3596,6 @@ static void init_proc_440x4 (CPUPPCState *env)
                               POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
 #define check_pow_440x5      check_pow_nocheck
 
-__attribute__ (( unused ))
 static void init_proc_440x5 (CPUPPCState *env)
 {
     /* Time base */
@@ -3656,7 +3655,7 @@ static void init_proc_440x5 (CPUPPCState *env)
     init_excp_BookE(env);
     env->dcache_line_size = 32;
     env->icache_line_size = 32;
-    /* XXX: TODO: allocate internal IRQ controller */
+    ppc40x_irq_init(env);
 }
 
 /* PowerPC 460 (guessed)                                                     */
@@ -6536,6 +6535,7 @@ enum {
 #if 0
     CPU_POWERPC_440A4              = xxx,
 #endif
+    CPU_POWERPC_440_XILINX         = 0x7ff21910,
 #if 0
     CPU_POWERPC_440A5              = xxx,
 #endif
@@ -7464,6 +7464,8 @@ static const ppc_def_t ppc_defs[] = {
     /* PowerPC 440 A4                                                        */
     POWERPC_DEF("440A4",         CPU_POWERPC_440A4,                  440x4),
 #endif
+    /* PowerPC 440 Xilinx 5                                                  */
+    POWERPC_DEF("440-Xilinx",    CPU_POWERPC_440_XILINX,             440x5),
 #if defined (TODO)
     /* PowerPC 440 A5                                                        */
     POWERPC_DEF("440A5",         CPU_POWERPC_440A5,                  440x5),
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 powerpc: Add a virtex5 ml507 refdesign board

In reply to Edgar E. Iglesias
---
 Makefile.target                    |    8 +
 default-configs/ppc-softmmu.mak    |    2 +
 default-configs/ppc64-softmmu.mak  |    2 +
 default-configs/ppcemb-softmmu.mak |    2 +
 hw/virtex_ml507.c                  |  278 ++++++++++++++++++++++++++++++++++++
 target-ppc/cpu.h                   |    4 +
 6 files changed, 296 insertions(+), 0 deletions(-)
 create mode 100644 hw/virtex_ml507.c
Makefile.target +8 -0
index a4e80b1..91d0381 100644
@@ -217,9 +217,17 @@ obj-ppc-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
 obj-ppc-y += ppc440.o ppc440_bamboo.o
 # PowerPC E500 boards
 obj-ppc-y += ppce500_mpc8544ds.o
+# PowerPC 440 Xilinx ML507 reference board.
+obj-ppc-y += virtex_ml507.o
 obj-ppc-$(CONFIG_KVM) += kvm_ppc.o
 obj-ppc-$(CONFIG_FDT) += device_tree.o
 
+# Xilinx PPC peripherals
+obj-ppc-y += xilinx_intc.o
+obj-ppc-y += xilinx_timer.o
+obj-ppc-y += xilinx_uartlite.o
+obj-ppc-y += xilinx_ethlite.o
+
 obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
 obj-mips-y += mips_addr.o mips_timer.o mips_int.o
 obj-mips-y += vga.o i8259.o
default-configs/ppc-softmmu.mak +2 -0
index c026bbb..940f4bf 100644
@@ -32,4 +32,6 @@ CONFIG_IDE_MACIO=y
 CONFIG_NE2000_ISA=y
 CONFIG_SOUND=y
 CONFIG_VIRTIO_PCI=y
+CONFIG_PFLASH_CFI01=y
 CONFIG_PFLASH_CFI02=y
+CONFIG_PTIMER=y
default-configs/ppc64-softmmu.mak +2 -0
index 0101a28..e1bc6b8 100644
@@ -32,4 +32,6 @@ CONFIG_IDE_MACIO=y
 CONFIG_NE2000_ISA=y
 CONFIG_SOUND=y
 CONFIG_VIRTIO_PCI=y
+CONFIG_PFLASH_CFI01=y
 CONFIG_PFLASH_CFI02=y
+CONFIG_PTIMER=y
default-configs/ppcemb-softmmu.mak +2 -0
index 8ba9ac1..8f1cc09 100644
@@ -32,4 +32,6 @@ CONFIG_IDE_MACIO=y
 CONFIG_NE2000_ISA=y
 CONFIG_SOUND=y
 CONFIG_VIRTIO_PCI=y
+CONFIG_PFLASH_CFI01=y
 CONFIG_PFLASH_CFI02=y
+CONFIG_PTIMER=y
hw/virtex_ml507.c new file +278 -0

278 lines not on this page · raw message

target-ppc/cpu.h +4 -0
index dc1f4b8..bf81941 100644
@@ -702,6 +702,10 @@ struct CPUPPCState {
 
     /* temporary hack to handle OSI calls (only used if non NULL) */
     int (*osi_call)(struct CPUPPCState *env);
+
+#if !defined(CONFIG_USER_ONLY)
+    void *load_info;    /* Holds boot loading state.  */
+#endif
 };
 
 #if !defined(CONFIG_USER_ONLY)
Signature · 1 line
1.7.1
#3 lore raw
In reply to Edgar E. Iglesias
Quoted 7 lines · Edgar E. Iglesias

v2:
* Address review comments from A. Graf.

Edgar E. Iglesias (2):
powerpc: Add a ppc-440x5 Xilinx model
powerpc: Add a virtex5 ml507 refdesign board

Quoted 12 lines
 Makefile.target                    |    8 +
 default-configs/ppc-softmmu.mak    |    2 +
 default-configs/ppc64-softmmu.mak  |    2 +
 default-configs/ppcemb-softmmu.mak |    2 +
 hw/virtex_ml507.c                  |  278 ++++++++++++++++++++++++++++++++++++
 target-ppc/cpu.h                   |    4 +
 target-ppc/translate_init.c        |    6 +-
 7 files changed, 300 insertions(+), 2 deletions(-)
 create mode 100644 hw/virtex_ml507.c

No complaints from me. Feel free to apply them.

Alex

author Applied
#4 lore raw
Quoted 20 lines · Alexander Graf
Quoted 7 lines · Edgar E. Iglesias

v2:
* Address review comments from A. Graf.

Edgar E. Iglesias (2):
powerpc: Add a ppc-440x5 Xilinx model
powerpc: Add a virtex5 ml507 refdesign board

Quoted 12 lines
 Makefile.target                    |    8 +
 default-configs/ppc-softmmu.mak    |    2 +
 default-configs/ppc64-softmmu.mak  |    2 +
 default-configs/ppcemb-softmmu.mak |    2 +
 hw/virtex_ml507.c                  |  278 ++++++++++++++++++++++++++++++++++++
 target-ppc/cpu.h                   |    4 +
 target-ppc/translate_init.c        |    6 +-
 7 files changed, 300 insertions(+), 2 deletions(-)
 create mode 100644 hw/virtex_ml507.c
Quoted 3 lines

No complaints from me. Feel free to apply them.

Applied, thanks.

Cheers

#5 lore raw

Am 30.09.2010 19:12, schrieb Edgar E. Iglesias:

Quoted 21 lines · Alexander Graf
Quoted 20 lines
Quoted 19 lines · Edgar E. Iglesias

v2:
* Address review comments from A. Graf.

Edgar E. Iglesias (2):
powerpc: Add a ppc-440x5 Xilinx model
powerpc: Add a virtex5 ml507 refdesign board

Makefile.target | 8 + default-configs/ppc-softmmu.mak | 2 + default-configs/ppc64-softmmu.mak | 2 + default-configs/ppcemb-softmmu.mak | 2 + hw/virtex_ml507.c | 278 ++++++++++++++++++++++++++++++++++++ target-ppc/cpu.h | 4 +
target-ppc/translate_init.c | 6 +-

7 files changed, 300 insertions(+), 2 deletions(-)

create mode 100644 hw/virtex_ml507.c

Quoted 9 lines
Quoted 3 lines

No complaints from me. Feel free to apply them.

Applied, thanks.

Cheers

What about coding conventions?
New source files should comply with CODING_STYLE (block structure).

virtex_ml507.c:

+ if (!fdt)
+ return 0;

Cheers,

#6 lore raw
Quoted 32 lines · Stefan Weil

Am 30.09.2010 19:12, schrieb Edgar E. Iglesias:

Quoted 21 lines · Alexander Graf
Quoted 20 lines
Quoted 19 lines · Edgar E. Iglesias

v2:
* Address review comments from A. Graf.

Edgar E. Iglesias (2):
powerpc: Add a ppc-440x5 Xilinx model
powerpc: Add a virtex5 ml507 refdesign board

Makefile.target | 8 + default-configs/ppc-softmmu.mak | 2 + default-configs/ppc64-softmmu.mak | 2 + default-configs/ppcemb-softmmu.mak | 2 + hw/virtex_ml507.c | 278 ++++++++++++++++++++++++++++++++++++ target-ppc/cpu.h | 4 +
target-ppc/translate_init.c | 6 +-

7 files changed, 300 insertions(+), 2 deletions(-)

create mode 100644 hw/virtex_ml507.c

Quoted 9 lines
Quoted 3 lines

No complaints from me. Feel free to apply them.

Applied, thanks.

Cheers

Quoted 7 lines

What about coding conventions?
New source files should comply with CODING_STYLE (block structure).

virtex_ml507.c:

+ if (!fdt)
+ return 0;

*shrug* I personally dislike the brace rule anyways and edgar has commit rights, so there was no reason to worry about it.

Alex

#7 lore raw
In reply to Stefan Weil
Quoted 32 lines · Stefan Weil

Am 30.09.2010 19:12, schrieb Edgar E. Iglesias:

Quoted 21 lines · Alexander Graf
Quoted 20 lines
Quoted 19 lines · Edgar E. Iglesias

v2:
* Address review comments from A. Graf.

Edgar E. Iglesias (2):
powerpc: Add a ppc-440x5 Xilinx model
powerpc: Add a virtex5 ml507 refdesign board

Makefile.target | 8 + default-configs/ppc-softmmu.mak | 2 + default-configs/ppc64-softmmu.mak | 2 + default-configs/ppcemb-softmmu.mak | 2 + hw/virtex_ml507.c | 278 ++++++++++++++++++++++++++++++++++++ target-ppc/cpu.h | 4 +
target-ppc/translate_init.c | 6 +-

7 files changed, 300 insertions(+), 2 deletions(-)

create mode 100644 hw/virtex_ml507.c

Quoted 9 lines
Quoted 3 lines

No complaints from me. Feel free to apply them.

Applied, thanks.

Cheers

Quoted 7 lines

What about coding conventions?
New source files should comply with CODING_STYLE (block structure).

virtex_ml507.c:

+ if (!fdt)
+ return 0;

Fixed, thanks.