cadence_uart: Handle backend tx errors
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
char/serial: fix copy&paste error (fifo8_is_full vs empty)
Copy&paste error in serial.c causes a crash when attemptingto read from UART (if there is no data to be read)
Signed-off-by: Vladimir Senkov <hangup@gmail.com>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu
char/serial: cosmetic fixes.
Some cosmetic fixes to char/serial fixing some checkpatch errors.
Cc: qemu-trivial@nongnu.org
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
char/serial: Use generic Fifo8
Use the generic Fifo8 helper provided by QEMU, rather than re-implementprivately.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
char/serial: serial_ioport_write: Factor out common code
These three lines are common to both FIFO and regular mode. Just factorthem out to outside the if rather than replicate the same lines insideboth if and else.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
isa: QOM'ify ISADevice
Rename its parent field and use DEVICE where necessary.
Signed-off-by: Andreas Färber <afaerber@suse.de>
isa: Use realizefn for ISADevice
Drop ISADeviceClass::init and the resulting no-op initfn and letchildren implement their own realizefn. Adapt error handling.Split off an instance_init where sensible.
debugcon: fix always print "addr=0x0, val=0x0" bug when use DEBUG_DEBUGCON
when use DEBUG_DEBUGCON, screen spits:debugcon: write addr=0x0000 val=0x00Rdebugcon: write addr=0x0000 val=0x00udebugcon: write addr=0x0000 val=0x00ndebugcon: write addr=0x0000 val=0x00...
debugcon: make debug message more readable
before change:Bdebugcon: write addr=0x0000 val=0x6fodebugcon: write addr=0x0000 val=0x6fodebugcon: write addr=0x0000 val=0x74tdebugcon: write addr=0x0000 val=0x69idebugcon: write addr=0x0000 val=0x6endebugcon: write addr=0x0000 val=0x67...
debugcon: fix compiler warning when open DEBUG_DEBUGCON
compiler warnings: CC hw/char/debugcon.ohw/char/debugcon.c: In function ‘debugcon_ioport_write’:hw/char/debugcon.c:58: warning: format ‘%02x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’...
virtio-serial: fix command line compatibility.
The bus name is wrong since the refactoring.
This keeps the behaviour of the command line.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Message-id: 1367330931-12994-5-git-send-email-fred.konrad@greensocs.com...
serial: QOM'ify ISA serial
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Andreas Färber <afaerber@suse.de>Message-id: 1367093935-29091-16-git-send-email-afaerber@suse.de...
parallel: QOM'ify
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Andreas Färber <afaerber@suse.de>Message-id: 1367093935-29091-11-git-send-email-afaerber@suse.de...
pseries: Convert VIO code to QOM style type safe(ish) casts
Curerntly the pseries VIO device code contains quite a few explicituses of DO_UPCAST and plain C casts. This is (obviously) type unsafe,and not the conventional way of doing things in the QOM model. This...
virtio: cleanup: init and exit function.
This clean the init and the exit functions and rename virtio_common_cleanupto virtio_cleanup.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-7-git-send-email-fred.konrad@greensocs.com...
virtio: remove the function pointer.
This remove the function pointer in VirtIODevice, and use onlyVirtioDeviceClass function pointer.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-5-git-send-email-fred.konrad@greensocs.com...
virtio-console: Also throttle when less was written then requested
This is necessary so that we get properly woken up to write the rest.
This patch also changes the len argument to the have_data callback, toavoid doing an unsigned signed comparison.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>...
virtio-console: Remove any pending watches on close
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Merge remote-tracking branch 'bonzini/hw-dirs' into staging
sysemu: avoid proliferation of include/ subdirectories
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-serial: cleanup: init and exit functions.
This remove old init and exit function as they are no longer needed.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
virtio-serial: cleanup: use QOM casts.
As the virtio-serial-pci and virtio-serial-s390 are switched to the newAPI, we can use QOM casts.
virtio-serial: cleanup: remove qdev field.
The qdev field is no longer needed, just drop it.
virtio-serial: add the virtio-serial device.
Create virtio-serial which extends virtio-device, so it can be connectedon virtio-bus.
hw: move private headers to hw/ subdirectories.
Many headers are used only in a single directory. These can bekept in hw/.
hw: move char devices to hw/char/, configure via default-configs/
hw: move target-independent files to subdirectories
This patch tackles all files that are compiled once, movingthem to subdirectories of hw/.
hw: move virtio devices to hw/ subdirectories
hw: make subdirectories for devices
Prepare the new directory structure.