summaryrefslogtreecommitdiff
path: root/hw/dma/xilinx_axidma.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-06hw: Remove assert_no_error usagesPeter Crosthwaite1-9/+4
Replace assert_no_error() usages with the error_abort system. &error_abort is passed into API calls to signal to the Error sub-system that any errors are fatal. Removes need for caller assertions. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-08-30qom: Pass available size to object_initialize()Andreas Färber1-2/+4
To be passed on to object_initialize_with_type(). Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> (virtio-ccw) Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-08-22aio / timers: Untangle include filesAlex Bligh1-0/+1
include/qemu/timer.h has no need to include main-loop.h and doing so causes an issue for the next patch. Unfortunately various files assume including timers.h will pull in main-loop.h. Untangle this mess. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-04hw/d*: pass owner to memory_region_init* functionsPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-04memory: add owner argument to initialization functionsPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-06-10xilinx_axidma: Do not set DMA .notify to NULL after notifyWendy Liang1-1/+2
If a stream notify function is not ready, it may re-populate the notify call- back to indicate it should be re-polled later. This break in this usage, as immediately following the notify() call, .notify is set to NULL. reverse the ordering of the notify call and NULL assignment accordingly. [PC: Reworked commit message] Signed-off-by: Wendy Liang <jliang@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-20qdev: Drop taddr propertiesPeter Maydell1-1/+0
Drop all the infrastructure for taddr properties (ie ones which are 'hwaddr' sized). These are now unused, and any further desired use would be rather questionable since device properties shouldn't generally depend on a type that is conceptually variable based on the target CPU. 32 or 64 bit integer properties should be used instead as appropriate for the specific device. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-04-19Remove unneeded type castsStefan Weil1-2/+2
cpu_physical_memory_read, cpu_physical_memory_write take any pointer as 2nd argument without needing a type cast. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-16stream: Remove app argument hackPeter Crosthwaite1-29/+70
The uint32_t *app argument doesn't exist in real hardware. It was a hack in xilinx_axidma/enet to fake the (secondary) control stream connection. Removed the argument and added the second stream to axienet/dma. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16xilinx_axienet/dma: Implement rx path flow controlPeter Crosthwaite1-8/+41
Implement flow control for the RX data path from xilinx_axienet->xilinx_axidma. On short return from axidma, then ethernet sets up the notify callback to resume transfer from where it left off. This also allows the ethernet to track whether there is an in progress transaction and return false from ethernet can_receive() as appropriate. If the DMA backs up or is disabled it waits for enablement. When the rx stream IO region is touched, the can_push() notify function is called if set. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16stream: Add flow control APIPeter Crosthwaite1-1/+2
Add basic flow control to stream. A stream slave may return short, indicating that it is not capable of accepting any more data at the present time. Polling or a callback can be used via the can_push() function to determine when the slave can receive again. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16xilinx_axidma: Fix rx/tx halted bit.Peter Crosthwaite1-2/+2
If there is no DMA buffer descriptor, the DMA halts, not idles. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16xilinx_axidma: Create Proxy object for streamPeter Crosthwaite1-5/+58
Create a separate child object to proxy the stream slave connection. This is setup for future work where a second stream slave connection is needed. The new child object is created at qdev init time and is linked back to the parent (the ethernet device itself) automatically. Stream slave masters differentiate which slave connection they are connected to by linking to the proxy object rather than the parent. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16xilinx_axidma: converted init->realizePeter Crosthwaite1-13/+13
The prescribed transition from SysBusDevice::init to Device::realize. I'm going with Andreas suggestion to move the sysbus foo to Object::init for early IRQ visibility. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16xilinx_axidma: Register reset properlyPeter Crosthwaite1-1/+11
Register the reset function as the Device::reset function rather than explicitly call it from the sysbus::init. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16xilinx_axidma: Defined and use type cast macroPeter Crosthwaite1-4/+9
Standard QOM cast macro. Replaces usages of FROM_SYSBUS Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16xilinx_axidma: typedef XilinxAXIDMA structPeter Crosthwaite1-7/+9
Typedef xilinx_axidma's object state struct to shorten the repeated usages of struct XilinxAXIDMA. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-08hw: move target-independent files to subdirectoriesPaolo Bonzini1-0/+523
This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>