summaryrefslogtreecommitdiffstats
path: root/hw/sd
Commit message (Collapse)AuthorAgeFilesLines
* sd: Avoid access to NULL BlockDriverStateAndreas Färber2013-10-171-1/+1
| | | | | | | | | | | | | | 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 and xilinx-zynq-a9 machines among others with NULL argument by default, causing the new qom-test to fail. Add a check to prevent this. Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* blockdev: Remove IF_* check for read-only blockdev_initKevin Wolf2013-10-117-0/+28
| | | | | | | | | | | | | IF_NONE allows read-only, which makes forbidding it in this place for other types pretty much pointless. Instead, make sure that all devices for which the check would have errored out check in their init function that they don't get a read-only BlockDriverState. This catches even cases where IF_NONE and -device is used. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* aio / timers: Switch entire codebase to the new timer APIAlex Bligh2013-08-221-14/+14
| | | | | | | | | | | 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> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* pl181: QOM cast cleanupAndreas Färber2013-07-291-9/+14
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* pl181: Rename pl181_state to PL181StateAndreas Färber2013-07-291-28/+28
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* milkymist-memcard: QOM cast cleanupAndreas Färber2013-07-291-5/+9
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* sd/pl181.c: Avoid undefined shift behaviour in RWORD macroPeter Maydell2013-07-151-1/+1
| | | | | | | | | | Add a cast to avoid potentially shifting into the sign bit of a signed value, which is undefined behaviour in C. (Detected with clang's -fsanitize=undefined.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1372341831-4264-1-git-send-email-peter.maydell@linaro.org
* hw/s*: pass owner to memory_region_init* functionsPaolo Bonzini2013-07-043-3/+3
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* memory: add owner argument to initialization functionsPaolo Bonzini2013-07-045-6/+6
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* sd: pass bool parameter for sd_initliguang2013-06-216-7/+7
| | | | | Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* dma: eliminate DMAContextPaolo Bonzini2013-06-201-11/+11
| | | | | | | | | The DMAContext is a simple pointer to an AddressSpace that is now always already 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> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* sd/sd.c: Fix "inquiry" ACMD41Peter Crosthwaite2013-06-031-2/+9
| | | | | | | | | | | | QEMU models two (of the three) ACMD41 has two modes, "inquiry" and "first". The selection logic for which of the two is incorrect - it compares != 0 for the entire argument value rather than only bits 23:0 as per the spec. Fix. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 3ef0a7fd1b2f3ebb23b4fdeabcc14caf3fad6d71.1369622254.git.peter.crosthwaite@xilinx.com Reviewed-by: Igor Mitsyanko <i.mitsyanko@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* sd/sdhci:ADMA: fix interruptPeter Crosthwaite2013-06-031-9/+9
| | | | | | | | | | | | The end of transfer check was occurring and potentially returning before the interrupt flag was checked. This means the interrupt will be missed if it occurs on the last packet. Fix by checking for the interrupt before checking for the end of transfer. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Igor Mitsyanko <i.mitsyanko@gmail.com> Message-id: 9969ec154777957ec738fc4e539d68e7494d0081.1369370934.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* sd/sdhci.c: Fix bdata_read DPRINT messagePeter Crosthwaite2013-06-031-1/+2
| | | | | | | | | | | | | This message was printing out the data in decimal only, which is not very friendly to the debugging developer. Add hex variant in parenthesis to make it consistent with other similar messages in this module. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Igor Mitsyanko <i.mitsyanko@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: d624179649137832eaa8caa263ef9589b4395d5e.1369370934.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* sd/sdhci: Fix Buffer Write Ready interruptPeter Crosthwaite2013-06-031-3/+2
| | | | | | | | | | This interrupt is not risen after the last block is written to sd. It is 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> Message-id: 7ca9fd3e03ce1bec94aff08f607c15a0ec3d3371.1369370934.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* sd/sdhci.c: Only reset data_count on new commandsPeter Crosthwaite2013-06-031-1/+1
| | | | | | | | | | | | | | The data_count variable was being reset on every transfer, including DMA transfer resumptions. This is incorrect, it should only be set on a new command. Manifests as a bug when using ADMA and there is a timer delay between ADMA frames where the fifo is left in a non empty state. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Igor Mitsyanko <i.mitsyanko@gmail.com> Message-id: 15a98609cc32315211b0963091a8efd67522e160.1369370934.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Typo, spelling and grammatical fixesPeter Maydell2013-04-121-2/+2
| | | | | | | 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.Paolo Bonzini2013-04-082-1/+313
| | | | | | | Many headers are used only in a single directory. These can be kept in hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move SD/MMC devices to hw/sd/, configure with default-configs/Paolo Bonzini2013-04-084-0/+1501
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move target-independent files to subdirectoriesPaolo Bonzini2013-04-085-0/+3857
| | | | | | | This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: make subdirectories for devicesPaolo Bonzini2013-04-081-0/+0
Prepare the new directory structure. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud