Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging
QOM infrastructure fixes and device conversions
qdev: Remove hex8/32/64 property types
Replace them with uint8/32/64.
Reviewed-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
sdhci: Drop unnecessary #include
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Fam Zheng <famz@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qdev: Replace no_user by cannot_instantiate_with_device_add_yet
In an ideal world, machines can be built by wiring devices togetherwith configuration, not code. Unfortunately, that's not the world welive in right now. We still have quite a few devices that need to be...
sysbus: Set cannot_instantiate_with_device_add_yet
device_add plugs devices into suitable bus. For "real" buses, thatactually connects the device. For sysbus, the connections need to bemade separately, and device_add can't do that. The device would be...
sd: Avoid access to NULL BlockDriverState
Commit 4f8a066b5fc254eeaabbbde56ba4f5b29cc68fdf (blockdev: Remove IF_*check for read-only blockdev_init) added a usage of bdrv_is_read_only()to sd_init(), which is called for versatilepb, versatileab andxilinx-zynq-a9 machines among others with NULL argument by default,...
blockdev: Remove IF_* check for read-only blockdev_init
IF_NONE allows read-only, which makes forbidding it in this placefor other types pretty much pointless.
Instead, make sure that all devices for which the check would haveerrored out check in their init function that they don't get a read-only...
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api.
Switch the entire code base to using the new timer API.
Note this patch may introduce some line length issues.
Signed-off-by: Alex Bligh <alex@alex.org.uk>...
milkymist-memcard: QOM cast cleanup
Signed-off-by: Andreas Färber <afaerber@suse.de>
pl181: Rename pl181_state to PL181State
pl181: QOM cast cleanup
sd/pl181.c: Avoid undefined shift behaviour in RWORD macro
Add a cast to avoid potentially shifting into the sign bit ofa signed value, which is undefined behaviour in C.
(Detected with clang's -fsanitize=undefined.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
hw/s*: pass owner to memory_region_init* functions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory: add owner argument to initialization functions
sd: pass bool parameter for sd_init
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
dma: eliminate DMAContext
The DMAContext is a simple pointer to an AddressSpace that is now alwaysalready available. Make everyone hold the address space directly,and clean up the DMA API to use the AddressSpace directly.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
sd/sdhci.c: Fix bdata_read DPRINT message
This message was printing out the data in decimal only, which is notvery friendly to the debugging developer. Add hex variant inparenthesis to make it consistent with other similar messages in thismodule.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
sd/sdhci:ADMA: fix interrupt
The end of transfer check was occurring and potentially returning beforethe interrupt flag was checked. This means the interrupt will be missedif it occurs on the last packet. Fix by checking for the interruptbefore checking for the end of transfer....
sd/sd.c: Fix "inquiry" ACMD41
QEMU models two (of the three) ACMD41 has two modes, "inquiry" and"first". The selection logic for which of the two is incorrect - itcompares != 0 for the entire argument value rather than only bits 23:0as per the spec. Fix....
sd/sdhci.c: Only reset data_count on new commands
The data_count variable was being reset on every transfer, includingDMA transfer resumptions. This is incorrect, it should only be seton a new command.
Manifests as a bug when using ADMA and there is a timer delay between...
sd/sdhci: Fix Buffer Write Ready interrupt
This interrupt is not risen after the last block is written to sd. Itis mutually exclusive with the end of transfer conditions. Fix.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Igor Mitsyanko <i.mitsyanko@gmail.com>...
Typo, spelling and grammatical fixes
Minor fixes to documentation and code comments.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw: move private headers to hw/ subdirectories.
Many headers are used only in a single directory. These can bekept in hw/.
hw: move SD/MMC devices to hw/sd/, configure with default-configs/
hw: move target-independent files to subdirectories
This patch tackles all files that are compiled once, movingthem to subdirectories of hw/.
hw: make subdirectories for devices
Prepare the new directory structure.