Fwd: Patch 2/2: Add Xilinx ML510 reference design support [attempt2]

2009-05-15 Thread Roderick Colenbrander
Hi,

As requested here the same patch but now with a signed-off line which I forgot.

Regards,
Roderick Colenbrander

Signed-off-by: Roderick Colenbrander 


>From f46fa90e4d066767cc4fc1c5b8dc2f9ee013ea0a Mon Sep 17 00:00:00 2001
From: Roderick Colenbrander 
Date: Tue, 14 Apr 2009 15:49:32 +0200
Subject: [PATCH] Add Xilinx ML510 reference design support.

---
 arch/powerpc/boot/dts/virtex440-ml510.dts |  453 +
 arch/powerpc/platforms/44x/Kconfig        |   10 +
 arch/powerpc/platforms/44x/Makefile       |    1 +
 arch/powerpc/platforms/44x/ml510.c        |  161 ++
 4 files changed, 625 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/virtex440-ml510.dts
 create mode 100644 arch/powerpc/platforms/44x/ml510.c

diff --git a/arch/powerpc/boot/dts/virtex440-ml510.dts
b/arch/powerpc/boot/dts/virtex440-ml510.dts
new file mode 100644
index 000..7ded73c
--- /dev/null
+++ b/arch/powerpc/boot/dts/virtex440-ml510.dts
@@ -0,0 +1,453 @@
+/*
+ * Xilinx ML510 Reference Design support
+ * This DTS file was created for the ml510_bsb1_pcores_ppc440 reference design.
+ * The reference design contains a bug which prevent PCI DMA from
working properly.
+ * A description of the bug is given in the plbv46_pci section. It
needs to be fixed
+ * by the user until Xilinx updates their reference design.
+ *
+ * Copyright 2009, Roderick Colenbrander
+ */
+
+/dts-v1/;
+/ {
+       #address-cells = <1>;
+       #size-cells = <1>;
+       compatible = "xlnx,ml510-ref-design";
+       dcr-parent = <&ppc440_0>;
+       model = "testing";
+       DDR2_SDRAM_DIMM0: mem...@0 {
+               device_type = "memory";
+               reg = < 0x0 0x2000 >;
+       } ;
+       alias {
+               ethernet0 = &Hard_Ethernet_MAC;
+               serial0 = &RS232_Uart_1;
+       } ;
+       chosen {
+                bootargs = "console=ttyS0 root=/dev/xsa2 init=/etc/preinit";
+//                bootargs = "console=ttyS0 root=/dev/ram";
+                linux,stdout-path = "/p...@0/ser...@83e0";
+       } ;
+       cpus {
+               #address-cells = <1>;
+               #cpus = <0x1>;
+               #size-cells = <0>;
+               ppc440_0: c...@0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       clock-frequency = <3>;
+                       compatible = "PowerPC,440", "ibm,ppc440";
+                       d-cache-line-size = <0x20>;
+                       d-cache-size = <0x8000>;
+                       dcr-access-method = "native";
+                       dcr-controller ;
+                       device_type = "cpu";
+                       i-cache-line-size = <0x20>;
+                       i-cache-size = <0x8000>;
+                       model = "PowerPC,440";
+                       reg = <0>;
+                       timebase-frequency = <3>;
+                       xlnx,apu-control = <0x2000>;
+                       xlnx,apu-udi-0 = <0x0>;
+                       xlnx,apu-udi-1 = <0x0>;
+                       xlnx,apu-udi-10 = <0x0>;
+                       xlnx,apu-udi-11 = <0x0>;
+                       xlnx,apu-udi-12 = <0x0>;
+                       xlnx,apu-udi-13 = <0x0>;
+                       xlnx,apu-udi-14 = <0x0>;
+                       xlnx,apu-udi-15 = <0x0>;
+                       xlnx,apu-udi-2 = <0x0>;
+                       xlnx,apu-udi-3 = <0x0>;
+                       xlnx,apu-udi-4 = <0x0>;
+                       xlnx,apu-udi-5 = <0x0>;
+                       xlnx,apu-udi-6 = <0x0>;
+                       xlnx,apu-udi-7 = <0x0>;
+                       xlnx,apu-udi-8 = <0x0>;
+                       xlnx,apu-udi-9 = <0x0>;
+                       xlnx,dcr-autolock-enable = <0x1>;
+                       xlnx,dcu-rd-ld-cache-plb-prio = <0x0>;
+                       xlnx,dcu-rd-noncache-plb-prio = <0x0>;
+                       xlnx,dcu-rd-touch-plb-prio = <0x0>;
+                       xlnx,dcu-rd-urgent-plb-prio = <0x0>;
+                       xlnx,dcu-wr-flush-plb-prio = <0x0>;
+                       xlnx,dcu-wr-store-plb-prio = <0x0>;
+                       xlnx,dcu-wr-urgent-plb-prio = <0x0>;
+                       xlnx,dma0-control = <0x0>;
+                       xlnx,dma0-plb-prio = <0x0>;
+                       xlnx,dma0-rxchannelctrl = <0x101>;
+                       xlnx,dma0-rxirqtimer = <0x3ff>;
+                       xlnx,dma0-txchannelctrl = <0x101>;
+                       xlnx,dma0-txirqtimer = <0x3ff>;
+                       xlnx,dma1-control = <0x0>;
+                       xlnx,dma1-plb-prio = <0x0>;
+                       xlnx,dma1-rxchannelctrl = <0x101>;
+                       xlnx,dma1-rxirqtimer = <0x3ff>;
+                       xlnx,dma1-txchannelctrl = <0x101>;
+                       xlnx,dma1-txirqtimer = <0x3ff>;
+                       xlnx,dma2-control = <0x0>;
+                       xlnx,dma2-p

Patch 2/2: Add Xilinx ML510 reference design support [attempt2]

2009-04-15 Thread Roderick Colenbrander
Hi,

This is an updated version of my patch from yesterday it contains some fixes. I 
had some c++ style comments
left in my previous version of this patch and there was a small error in the 
dts file.

Regards,
Roderick Colenbrander

>From 018041061bc233c09340eff20fcd4e8bc75da1d3 Mon Sep 17 00:00:00 2001
From: Roderick Colenbrander 
Date: Tue, 14 Apr 2009 15:49:32 +0200
Subject: [PATCH] Add Xilinx ML510 reference design support.

---
 arch/powerpc/boot/dts/virtex440-ml510.dts |  452 +
 arch/powerpc/platforms/44x/Kconfig|   10 +
 arch/powerpc/platforms/44x/Makefile   |1 +
 arch/powerpc/platforms/44x/ml510.c|  165 +++
 4 files changed, 628 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/virtex440-ml510.dts
 create mode 100644 arch/powerpc/platforms/44x/ml510.c

diff --git a/arch/powerpc/boot/dts/virtex440-ml510.dts 
b/arch/powerpc/boot/dts/virtex440-ml510.dts
new file mode 100644
index 000..908517a
--- /dev/null
+++ b/arch/powerpc/boot/dts/virtex440-ml510.dts
@@ -0,0 +1,452 @@
+/*
+ * Xilinx ML510 Reference Design support
+ * This DTS file was created for the ml510_bsb1_pcores_ppc440 reference design.
+ * The reference design contains a bug which prevent PCI DMA from working 
properly.
+ * A description of the bug is given in the plbv46_pci section. It needs to be 
fixed
+ * by the user until Xilinx updates their reference design.
+ *
+ * Copyright 2009, Roderick Colenbrander
+ */
+
+/dts-v1/;
+/ {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "xlnx,ml510-ref-design";
+   dcr-parent = <&ppc440_0>;
+   model = "testing";
+   DDR2_SDRAM_DIMM0: mem...@0 {
+   device_type = "memory";
+   reg = < 0x0 0x2000 >;
+   } ;
+   alias {
+   ethernet0 = &Hard_Ethernet_MAC;
+   serial0 = &RS232_Uart_1;
+   } ;
+   chosen {
+   bootargs = "console=ttyS0 root=/dev/ram";
+   linux,stdout-path = "/p...@0/ser...@83e0";
+   } ;
+   cpus {
+   #address-cells = <1>;
+   #cpus = <0x1>;
+   #size-cells = <0>;
+   ppc440_0: c...@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   clock-frequency = <3>;
+   compatible = "PowerPC,440", "ibm,ppc440";
+   d-cache-line-size = <0x20>;
+   d-cache-size = <0x8000>;
+   dcr-access-method = "native";
+   dcr-controller ;
+   device_type = "cpu";
+   i-cache-line-size = <0x20>;
+   i-cache-size = <0x8000>;
+   model = "PowerPC,440";
+   reg = <0>;
+   timebase-frequency = <3>;
+   xlnx,apu-control = <0x2000>;
+   xlnx,apu-udi-0 = <0x0>;
+   xlnx,apu-udi-1 = <0x0>;
+   xlnx,apu-udi-10 = <0x0>;
+   xlnx,apu-udi-11 = <0x0>;
+   xlnx,apu-udi-12 = <0x0>;
+   xlnx,apu-udi-13 = <0x0>;
+   xlnx,apu-udi-14 = <0x0>;
+   xlnx,apu-udi-15 = <0x0>;
+   xlnx,apu-udi-2 = <0x0>;
+   xlnx,apu-udi-3 = <0x0>;
+   xlnx,apu-udi-4 = <0x0>;
+   xlnx,apu-udi-5 = <0x0>;
+   xlnx,apu-udi-6 = <0x0>;
+   xlnx,apu-udi-7 = <0x0>;
+   xlnx,apu-udi-8 = <0x0>;
+   xlnx,apu-udi-9 = <0x0>;
+   xlnx,dcr-autolock-enable = <0x1>;
+   xlnx,dcu-rd-ld-cache-plb-prio = <0x0>;
+   xlnx,dcu-rd-noncache-plb-prio = <0x0>;
+   xlnx,dcu-rd-touch-plb-prio = <0x0>;
+   xlnx,dcu-rd-urgent-plb-prio = <0x0>;
+   xlnx,dcu-wr-flush-plb-prio = <0x0>;
+   xlnx,dcu-wr-store-plb-prio = <0x0>;
+   xlnx,dcu-wr-urgent-plb-prio = <0x0>;
+   xlnx,dma0-control = <0x0>;
+   xlnx,dma0-plb-prio = <0x0>;
+   xlnx,dma0-rxchannelctrl = <0x101>;
+   xlnx,dma0-rxirqtimer = <0x3ff>;
+   xlnx,dma0-txchannelctrl = <0x101>;
+   xlnx,dma0-txirqtimer = <0x3ff>;
+   xlnx,dma1-control = <0x0>;
+   xlnx,dma1-plb-prio = <0x0>;
+   xlnx,dma1-rxchannelctrl = <0x101>;
+   xlnx,dma1-rxirqtimer = <0x3ff>;
+   xlnx,dma1-txchannelctrl = <0x101>;
+   xlnx,dma1-txirqtimer = <0x3ff>;
+   xlnx,dma2-control = <0x0>;
+   xlnx,dma2-pl

Patch 2/2: Add Xilinx ML510 reference design support

2009-04-14 Thread Roderick Colenbrander
>From f46fa90e4d066767cc4fc1c5b8dc2f9ee013ea0a Mon Sep 17 00:00:00 2001
From: Roderick Colenbrander 
Date: Tue, 14 Apr 2009 15:49:32 +0200
Subject: [PATCH] Add Xilinx ML510 reference design support.

---
 arch/powerpc/boot/dts/virtex440-ml510.dts |  453 +
 arch/powerpc/platforms/44x/Kconfig|   10 +
 arch/powerpc/platforms/44x/Makefile   |1 +
 arch/powerpc/platforms/44x/ml510.c|  161 ++
 4 files changed, 625 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/virtex440-ml510.dts
 create mode 100644 arch/powerpc/platforms/44x/ml510.c

diff --git a/arch/powerpc/boot/dts/virtex440-ml510.dts 
b/arch/powerpc/boot/dts/virtex440-ml510.dts
new file mode 100644
index 000..7ded73c
--- /dev/null
+++ b/arch/powerpc/boot/dts/virtex440-ml510.dts
@@ -0,0 +1,453 @@
+/*
+ * Xilinx ML510 Reference Design support
+ * This DTS file was created for the ml510_bsb1_pcores_ppc440 reference design.
+ * The reference design contains a bug which prevent PCI DMA from working 
properly.
+ * A description of the bug is given in the plbv46_pci section. It needs to be 
fixed
+ * by the user until Xilinx updates their reference design.
+ *
+ * Copyright 2009, Roderick Colenbrander
+ */
+
+/dts-v1/;
+/ {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "xlnx,ml510-ref-design";
+   dcr-parent = <&ppc440_0>;
+   model = "testing";
+   DDR2_SDRAM_DIMM0: mem...@0 {
+   device_type = "memory";
+   reg = < 0x0 0x2000 >;
+   } ;
+   alias {
+   ethernet0 = &Hard_Ethernet_MAC;
+   serial0 = &RS232_Uart_1;
+   } ;
+   chosen {
+bootargs = "console=ttyS0 root=/dev/xsa2 init=/etc/preinit";
+//bootargs = "console=ttyS0 root=/dev/ram";
+linux,stdout-path = "/p...@0/ser...@83e0";
+   } ;
+   cpus {
+   #address-cells = <1>;
+   #cpus = <0x1>;
+   #size-cells = <0>;
+   ppc440_0: c...@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   clock-frequency = <3>;
+   compatible = "PowerPC,440", "ibm,ppc440";
+   d-cache-line-size = <0x20>;
+   d-cache-size = <0x8000>;
+   dcr-access-method = "native";
+   dcr-controller ;
+   device_type = "cpu";
+   i-cache-line-size = <0x20>;
+   i-cache-size = <0x8000>;
+   model = "PowerPC,440";
+   reg = <0>;
+   timebase-frequency = <3>;
+   xlnx,apu-control = <0x2000>;
+   xlnx,apu-udi-0 = <0x0>;
+   xlnx,apu-udi-1 = <0x0>;
+   xlnx,apu-udi-10 = <0x0>;
+   xlnx,apu-udi-11 = <0x0>;
+   xlnx,apu-udi-12 = <0x0>;
+   xlnx,apu-udi-13 = <0x0>;
+   xlnx,apu-udi-14 = <0x0>;
+   xlnx,apu-udi-15 = <0x0>;
+   xlnx,apu-udi-2 = <0x0>;
+   xlnx,apu-udi-3 = <0x0>;
+   xlnx,apu-udi-4 = <0x0>;
+   xlnx,apu-udi-5 = <0x0>;
+   xlnx,apu-udi-6 = <0x0>;
+   xlnx,apu-udi-7 = <0x0>;
+   xlnx,apu-udi-8 = <0x0>;
+   xlnx,apu-udi-9 = <0x0>;
+   xlnx,dcr-autolock-enable = <0x1>;
+   xlnx,dcu-rd-ld-cache-plb-prio = <0x0>;
+   xlnx,dcu-rd-noncache-plb-prio = <0x0>;
+   xlnx,dcu-rd-touch-plb-prio = <0x0>;
+   xlnx,dcu-rd-urgent-plb-prio = <0x0>;
+   xlnx,dcu-wr-flush-plb-prio = <0x0>;
+   xlnx,dcu-wr-store-plb-prio = <0x0>;
+   xlnx,dcu-wr-urgent-plb-prio = <0x0>;
+   xlnx,dma0-control = <0x0>;
+   xlnx,dma0-plb-prio = <0x0>;
+   xlnx,dma0-rxchannelctrl = <0x101>;
+   xlnx,dma0-rxirqtimer = <0x3ff>;
+   xlnx,dma0-txchannelctrl = <0x101>;
+   xlnx,dma0-txirqtimer = <0x3ff>;
+   xlnx,dma1-control = <0x0>;
+   xlnx,dma1-plb-prio = <0x0>;
+   xlnx,dma1-rxchannelctrl = <0x101>;
+   xlnx,dma1-rxirqtimer = <0x3ff>;
+   xlnx,dma1-txchannelctrl = <0x101>;
+   xlnx,dma1-txirqtimer = <0x3ff>;
+   xlnx,dma2-control = <0x0>;
+   xlnx,dma2-plb-prio = <0x0>;
+   xlnx,dma2-rxchannelctrl = <0x101>;
+   xlnx,dma2-rxirqtimer = <0x3ff>;
+