Xilinx Zynq PL330 support
Subsystems (2)
v2 cover Xilinx Zynq PL330 support
Hi,
These patches add support for the Primcell PL330 DMA controller and add it to the Xilinx Zynq machine model. Patch 1 is the device model. Patch 2 is the machine model update.
The Device model was originally contributed by Kirill Batuzov / Samsung, as indicated by the (C) notice in hw/pl330.c.
Changed from v1:
minor code formatting errors (1/2)
added GPLv2 copyright to 330 model (1/2)
Peter A. G. Crosthwaite (2):
pl330: initial version
xilinx_zynq: added pl330 to machine model
MAINTAINERS | 1 + Makefile.target | 1 + hw/pl330.c | 1403 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/xilinx_zynq.c | 18 + 4 files changed, 1423 insertions(+), 0 deletions(-) create mode 100644 hw/pl330.c
Signature · 1 line
1.7.3.2
PATCH v2 2/2 xilinx_zynq: added pl330 to machine model
--- hw/xilinx_zynq.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
hw/xilinx_zynq.c +18 -0
@@ -61,6 +61,9 @@ static void zynq_init(ram_addr_t ram_size, const char *boot_device,NICInfo *nd;int n;qemu_irq cpu_irq; +int dma_irqs[8 ] = { +46 ,47 ,48 ,49 ,72 ,73 ,74 ,75 + };if (!cpu_model) { cpu_model ="cortex-a9" ;
@@ -130,6 +133,21 @@ static void zynq_init(ram_addr_t ram_size, const char *boot_device, } } + dev =qdev_create (NULL ,"pl330" ); +qdev_prop_set_uint32 (dev,"cfg0" ,0x001e3071 );/* CR0 */ +qdev_prop_set_uint32 (dev,"cfg1" ,0x00000074 );/* CR1 ... */ +qdev_prop_set_uint32 (dev,"cfg2" ,0x00000000 ); +qdev_prop_set_uint32 (dev,"cfg3" ,0x00000000 ); +qdev_prop_set_uint32 (dev,"cfg4" ,0x00000000 );/* ... CR4 */ +qdev_prop_set_uint32 (dev,"cfg5" ,0x07ff7f73 );/* CRD */ +qdev_init_nofail (dev); + busdev =sysbus_from_qdev (dev); +sysbus_mmio_map (busdev,0 ,0xF8003000 ); +sysbus_connect_irq (busdev,0 , pic[45 -IRQ_OFFSET ]);/* abort irq line */ +for (n =0 ; n <8 ; ++n) {/* event irqs */ +sysbus_connect_irq (busdev, n +1 , pic[dma_irqs[n] -IRQ_OFFSET ]); + } + zynq_binfo.ram_size = ram_size; zynq_binfo.kernel_filename = kernel_filename; zynq_binfo.kernel_cmdline = kernel_cmdline;
Signature · 1 line
1.7.3.2
PATCH v2 1/2 pl330: initial version
In reply to Peter A. G. CrosthwaiteDevice model for Primecell PL330 dma controller.
---
changed from v1:
GPLv2 license
some code formatting fixes
MAINTAINERS | 1 + Makefile.target | 1 + hw/pl330.c | 1403 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1405 insertions(+), 0 deletions(-) create mode 100644 hw/pl330.c
MAINTAINERS +1 -0
@@ -257,6 +257,7 @@ S: Maintained F: hw/xilinx_zynq.c F: hw/zynq_slcr.c F: hw/cadence_* +F: hw/pl330.c CRIS Machines -------------
Makefile.target +1 -0
@@ -362,6 +362,7 @@ obj-arm-y += cadence_uart.o obj-arm-y += cadence_ttc.o obj-arm-y += cadence_gem.o obj-arm-y += xilinx_zynq.o zynq_slcr.o +obj-arm-y += pl330.o obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o obj-arm-y += exynos4210_gic.o exynos4210_combiner.o exynos4210.o obj-arm-y += exynos4_boards.o exynos4210_uart.o exynos4210_pwm.o
hw/pl330.c new file +1403 -0
1,403 lines not on this page · raw message
Signature · 1 line
1.7.3.2
Quoted 3 lines · Peter A. G. Crosthwaite
These patches add support for the Primcell PL330 DMA controller and add it to the Xilinx Zynq machine model. Patch 1 is the device model. Patch 2 is the machine model update.
The Device model was originally contributed by Kirill Batuzov / Samsung, as indicated by the (C) notice in
hw/pl330.c.
Ping...
Any obstacles to this going in? Peter has revised according to all feedback received so far, and has sign-off from original authors etc.
Thanks,
John
Re: [Qemu-devel] [PATCH v2 1/2] pl330: initial version
In reply to Peter A. G. CrosthwaiteAm 30.03.2012 09:58, schrieb Peter A. G. Crosthwaite:
Quoted 8 lines
Device model for Primecell PL330 dma controller.
Signed-off-by Peter A. G. Crosthwaite <[email protected]>Signed-off-by Kirill Batuzov <[email protected]>---
changed from v1:
GPLv2 license
some code formatting fixes
[...]
Quoted 9 lines
hw/pl330.c new file +3
-0@@ -0,0 +1,1403 @@ +/* +* ARM PrimeCell PL330 DMA Controller +*
hw/pl330.c line 13
Quoted 10 lines
hw/pl330.c new file +10
-0+* Copyright (c) 2009 Samsung Electronics. +* Contributed by Kirill Batuzov <[email protected]> +* +* 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; version 2. +* +* You should have received a copy of the GNU General Public License along +* with this program; if not, see <http://www.gnu.org/licenses/>. +*/
Is there a specific reason for GPLv2? Can this be changed to GPLv2-or-later please?
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 7 lines · John Williams
Quoted 1 line · Peter A. G. Crosthwaite
These patches add support for the Primcell PL330 DMA controller
Any obstacles to this going in? Peter has revised according to all feedback received so far, and has sign-off from original authors etc.
Sorry, didn't quite get round to reviewing this one this week; I'll try to look at it next week.
(I've just put a bit more structure into my patches-to-review handling process which ought among other things to make it a bit closer to first-in-first-out; this is next on the date-ordered list.)
-- PMM