aboutsummaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)Author
2011-08-31tusb6010: Convert to qdevPeter Maydell
Convert the tusb6010 to qdev. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-29Merge branch 'omap-for-upstream' of ↵Edgar E. Iglesias
git://git.linaro.org/people/pmaydell/qemu-arm into pm
2011-08-29Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori
2011-08-29Merge remote-tracking branch 'qemu-kvm/memory/urgent' into stagingAnthony Liguori
2011-08-29Merge remote-tracking branch 'mst/for_anthony' into stagingAnthony Liguori
2011-08-28omap_gpmc: Implement prefetch enginePeter Maydell
This commit implements the prefetch engine feature of the GPMC which can be used for NAND devices. This includes both interrupt driven and DMA-filling modes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap: Wire up the DMA request line to the GPMCPeter Maydell
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: Pull prefetch engine data into sub-structPeter Maydell
Refactor the gpmc state structure so items relating to the prefetch engine are in their own sub-struct and have more useful names. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: Accept a zero mask field on omap3630Juha Riihimäki
OMAP3630 adds an extra bit of address masking, so a mask of 0xb1111 is valid. Unfortunately the GPMC_REVISION is the same as on the OMAP3430 which only has three bits of address masking, so we have to derive this feature directly from the OMAP revision rather than from the GPMC revision. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28hw/omap.h: Add OMAP 3630 to omap_mpu_model enumerationPeter Maydell
Add the OMAP 3630 to the omap_mpu_model enumeration, and add the corresponding cpu_is_omap3630() function. (OMAP3 isn't supported yet but this is useful in upgrading common components to be "OMAP3 ready". We already have this for OMAP3430.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: Support NAND devicesPeter Maydell
Support accesses to NAND devices, both by mapping them into the GPMC address space, and via the NAND_COMMAND, NAND_ADDRESS and NAND_DATA GPMC registers. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: Reindent misindented switch statementsPeter Maydell
Whitespace-only change fixing indentation. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: Calculate revision from OMAP modelJuha Riihimäki
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: Take omap_mpu_state* in omap_gpmc_initJuha Riihimäki
Take a pointer to the omap mpu state struct in omap_gpmc_init. Some details of GPMC behaviour depend on the OMAP version we are a part of. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: Fix handling of FIFOTHRESHOLDSTATUS bitPeter Maydell
The OMAP3 TRM is inconsistent about whether the GPMC FIFOTHRESHOLDSTATUS bit should be set when FIFOPOINTER > FIFOTHRESHOLD or when it is >= FIFOTHRESHOLD. Apparently the underlying functional spec from which the TRM was created states that the behaviour is ">=", and this also makes more conceptual sense. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: Wire up the GPMC IRQ correctlyPeter Maydell
The omap_gpmc wasn't actually wiring up its IRQ, so anything that provoked an interrupt would be using uninitialised data for its IRQ number. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: GPMC_IRQSTATUS is write-one-to-clearPeter Maydell
Fix a bug in the handling of writes to GPMC_IRQSTATUS: it behaves as "write one to clear, writing zero is ignored". Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: Refactor omap_gpmc_cs_map and omap_gpmc_cs_unmapPeter Maydell
Refactor the omap_gpmc_cs_map/unmap functions: * take the omap_gpmc_s* and a chipselect id rather than the omap_gpmc_cs_file_s*, so they have access to the general gpmc member fields * extract the base and mask from the config registers in the functions rather than at every callsite * check for CSVALID in the functions rather than at every callsite Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28omap_gpmc: Clean up omap_gpmc_attach MemoryRegion conversionPeter Maydell
Now that all callers of omap_gpmc_attach pass in a MemoryRegion*, we can remove the base_update and unmap function pointer arguments, and the opaque pointer that was passed into these callbacks. We can also remove the base and size fields from omap_gpmc_cs_file_s as these are no longer necessary (you don't need the base/size to unmap a MemoryRegion the way you did to undo a mapping made with cpu_register_physical_memory()). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28hw/onenand: Minor spacing fixesJuha Riihimäki
Minor whitespace-only cleanup (separated out from the qdevifying patch for clarity). Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28hw/onenand: QdevifyJuha Riihimäki
Qdevify the ONENAND device. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28hw/onenand: Remove unnecessary argument from onenand_command()Juha Riihimäki
Refactor onenand_command() -- since it is essentially a method of the device object, it doesn't make sense to pass in something as an argument which is one of the object's own member fields. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28hw/sysbus: Add sysbus_mmio_get_region()Peter Maydell
Add a sysbus_mmio_get_region() which allows users of sysbus devices to turn a (SysBusDevice*, mmioidx) tuple into a MemoryRegion*. This enables some useful simplifications of devices which pass through another device's mmio region (either directly or by implementing some kind of memory controller device). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-08-28sh_pci: Fix sh_pci memory alias confusionAvi Kivity
The a7 area was set up as an alias of itself, rather than the p4 area. This sent the memory core into infinite recursion. Fix by aliasing the a7 area to the p4 area. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-28Fix disabling interrupts in sun4uArtyom Tarasenko
clear interrupt request if the interrupt priority < CPU pil clear hardware interrupt request if interrupts are disabled Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> [blauwirbel@gmail.com: added a comment about magic 2] Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-08-28xilinx: Convert most xilinx devices to MemoryRegionEdgar E. Iglesias
This converts ethlite, intc, timer and uartlite to use MemoryRegions. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-27g364fb: convert to qdevHervé Poussineau
Extract G364 ROM contents from device emulation to machine emulation, so device emulation can be reused in other machines (Commodore Amiga) Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-08-27g364fb: use trace frameworkHervé Poussineau
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-08-26vhost-net: cleanup host notifiers at last stepMichael S. Tsirkin
When the vhost notifier is disabled, the userspace handler runs immediately: virtio_pci_set_host_notifier_internal might call virtio_queue_notify_vq. Since the VQ state and the tap backend state aren't recovered yet, this causes "Guest moved used index from XXX to YYY" assertions. The solution is to split out host notifier handling from vhost VQ setup and disable notifiers as our last step when we stop vhost-net. For symmetry enable them first thing on start. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-08-25Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"Anthony Liguori
This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversing changes made to 444dc48298c480e42e15a8fe676be737d8a6b2a1. From Avi: Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work this out - it isn't trivial. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-25vga: Silence bogus gcc warning about uninitialized variablesJan Kiszka
Some gcc versions do not properly detect that all possible cases are covered and base and size are always initialized. Please gcc by defining a pseudo default case. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-25block: explicit I/O accountingChristoph Hellwig
Decouple the I/O accounting from bdrv_aio_readv/writev/flush and make the hardware models call directly into the accounting helpers. This means: - we do not count internal requests from image formats in addition to guest originating I/O - we do not double count I/O ops if the device model handles it chunk wise - we only account I/O once it actuall is done - can extent I/O accounting to synchronous or coroutine I/O easily - implement I/O latency tracking easily (see the next patch) I've conveted the existing device model callers to the new model, device models that are using synchronous I/O and weren't accounted before haven't been updated yet. Also scsi hasn't been converted to the end-to-end accounting as I want to defer that after the pending scsi layer overhaul. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-08-25Merge remote-tracking branch 'qemu-kvm/memory/batch' into stagingAnthony Liguori
2011-08-25Merge remote-tracking branch 'aneesh/for-upstream-2' into stagingAnthony Liguori
2011-08-25milkymist: convert to memory APIAvi Kivity
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25milkymist-softusb: convert to memory APIAvi Kivity
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25milkymist-minimac2: convert to memory APIAvi Kivity
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25mcf5208: convert to memory APIAvi Kivity
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25mainstone: convert to memory APIAvi Kivity
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25lm32_boards: convert to memory APIAvi Kivity
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25g364fb: convert to memory APIAvi Kivity
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25dummy_m68k: convert to memory APIAvi Kivity
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25pflash_cfi01/pflash_cfi02: convert to memory APIAvi Kivity
cfi02 is annoying in that is ignores some address bits; we probably want explicit support in the memory API for that. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25piix_pci: wrap memory update in a transactionAvi Kivity
The code will remap all PAMs, even if just one is updated, resulting in reduced performance. Wrap in a transaction to detect that those other PAMs have not changed. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25cirrus: wrap memory update in a transactionAvi Kivity
This prevents spurious unmapping and remapping of the vga windows, which reduces performance. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25leon3: convert to memory APIAvi Kivity
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25integratorcp: convert to memory API (RAM/flash only)Avi Kivity
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25sysbus: add sysbus_add_memory_overlap()Avi Kivity
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25axis_dev88: convert to memory API (RAM only)Avi Kivity
Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25ppc_oldworld, ppc_newworld: fix escc BAR related crashAvi Kivity
ppc maps the escc mmio region both at a fixed offset (as a sysbus area) and as part of a PCI BAR. This crashes, since a MemoryRegion may have only one parent. Use an alias so we have a separate MemoryRegion for the BAR. Signed-off-by: Avi Kivity <avi@redhat.com>