summaryrefslogtreecommitdiff
path: root/hw/net/xilinx_axienet.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-07-04hw/n*: 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_axienet: Fix bit mask codeStefan Weil1-1/+1
Obviously the code wanted to mask the lower bits but failed to do so because of a missing "<". cppcheck detected a conditional expression which was always true (1 < 7). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16stream: Remove app argument hackPeter Crosthwaite1-15/+85
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-3/+25
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-3/+5
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_axienet: Create Proxy object for streamPeter Crosthwaite1-4/+56
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_axienet: converted init->realizePeter Crosthwaite1-13/+11
The prescribed transition from SysBusDevice::init to Device::realize. Im 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> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16xilinx_axienet: Register reset properlyPeter Crosthwaite1-2/+4
Register the reset function and the Device::reset function rather than explicitly call it from the sysbus::init. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16xilinx_axienet: Defined and use type cast macroPeter Crosthwaite1-3/+8
Standard QOM cast macro. Replaces usages of FROM_SYSBUS Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-16xilinx_axienet: typedef XilinxAXIEnet structPeter Crosthwaite1-21/+23
Typedef xilinx_axienets object state struct to shorten the repeated usages of struct XilinxAXIEnet. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Andreas Färber <afaerber@suse.de> 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/+918
This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>