History | View | Annotate | Download (46 kB)
block: New change_media_cb() parameter load
To let device models distinguish between eject and load.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: Declare qemu_blockalign() in block.h, not block_int.h
Device models should be able to use it without an unclean include ofblock_int.h.
block: Attach non-qdev devices as well
For now, this just protects against programming errors like having thesame drive back multiple non-qdev devices, or untimely bdrv_delete().Later commits will add other interesting uses.
While there, rename BlockDriverState member peer to dev, bdrv_attach()...
block: Generalize change_cb() to BlockDevOps
So we can more easily add device model callbacks.
block: Split change_cb() into change_media_cb(), resize_cb()
Multiplexing callbacks complicates matters needlessly.
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sd: do not add one sector to the disk size
This leads to random off-by-one error.When the size of the SD is exactly 1GB, the emulation was returning awrong SDHC CSD descriptor.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Fix last sector write on sd card
When writing the last sector of an SD card using WRITE_MULTIPLE_BLOCKQEmu throws an error saying that we've run off the end, and leavesitself in the wrong state.
Tested on ARM Vexpress model.
Signed-off-by: Dr. David Alan Gilbert <david.gilbert@linaro.org>...
hw/sd.c: Don't complain about SDIO commands CMD52/CMD53
The SDIO specification introduces new commands 52 and 53.Handle as illegal command but do not complain on stderr,as SDIO-aware OSes (including Linux) may legitimately usethese in their probing for presence of an SDIO card....
hw/sd.c: fix sd_set_cb() crash when bdrv == NULL
sd_set_cb() calls bdrv_is_read_only() and bdrv_is_inserted() even ifno block driver is associated with the card reader.
This patch fixes the issues by not setting the irq in this case, thisfixes ARM versatile crash....
hw/sd.c: Add missing state change for SD_STATUS, SEND_NUM_WR_BLOCKS
The SD_STATUS and SEND_NUM_WR_BLOCKS commands are supposed to causethe card to send data back to the host. However sd.c was missing thestate change to sd_sendingdata_state for these commands, with the effect...
block: tell drivers about an image resize
Extend the change_cb callback with a reason argument, and use itto tell drivers about size changes.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Fix compilation error (missing include statement)
./hw/sd.c: In function ‘sd_init’:./hw/sd.c:443: error: implicit declaration of function ‘qemu_blockalign’./hw/sd.c:443: error: nested extern declaration of ‘qemu_blockalign’./hw/sd.c:443: error: assignment makes pointer from integer without a cast...
use qemu_blockalign consistently
Use qemu_blockalign for all allocations in the block layer. This allowsincreasing the required alignment, which is need to support O_DIRECT ondevices with large block sizes.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
arm: remove dead assignments, spotted by clang analyzer
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
handle SD CMD5 without error messages
From: Juha Riihimäki <juha.riihimaki@nokia.com>Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/sd: Support SDHC size cards
This patch adds SHDC support (-sd sd.img, where sd.img islarger than 1GB) to qemu.
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
Replace gcc variadic macro extension with C99 version
Follow coding conventions
Remove explicit struct qualifiers and rename structure types.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Handle NULL bdrv.
Delete some unused macros detected with -Wp,-Wunused-macros use
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6856 c046a42c-6fe2-441c-8c8c-71466251a162
do not pretend to support low voltage operation
Eliminate "mmc0: SD card claims to support the incompletely defined 'low voltagerange'. This will be ignored." warning. Qemu says the card is a SD card, and SDspec doesn't define low-voltage cards, so do now pretend to be one....
Enable SD card on creation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4640 c046a42c-6fe2-441c-8c8c-71466251a162
Add basic OMAP2 chip support.
Add the OMAP242x (arm1136 core) initialisation with basic on-chipperipherals and update OMAP1 peripherals which are re-used in OMAP2.Make palmte.c and sd.c errors go to stderr.Allow disabling SD chipselect.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4213 c046a42c-6fe2-441c-8c8c-71466251a162
Implement SD CMD8 and R7 from the newer SD Physical Spec Version 2.00.Remove bogus setting of bits 63 of R2 type responses.Make some constants static to allow definitions by the same name for SDIO.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3850 c046a42c-6fe2-441c-8c8c-71466251a162
Add "cache" parameter to "-drive" (Laurent Vivier).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3848 c046a42c-6fe2-441c-8c8c-71466251a162
Don't claim SD card supports voltages linux claims are below defined voltage range.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3772 c046a42c-6fe2-441c-8c8c-71466251a162
Scale TSC2102 touchscreen pressure value more realistically (still could be better).PalmOS 5.2.1 now fully boots.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3741 c046a42c-6fe2-441c-8c8c-71466251a162
Partial SD card SPI mode support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3731 c046a42c-6fe2-441c-8c8c-71466251a162
Add statics and missing #includes for prototypes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
Better STOPINTR bit semantics in the PXA2xx DMA.Don't error out on reading GPCR register, just warn (Thorsten Zitterell).Don't zero a memory that's already zeroed.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3676 c046a42c-6fe2-441c-8c8c-71466251a162
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
sd.c build fix.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3673 c046a42c-6fe2-441c-8c8c-71466251a162
Convert SD cards code to use qemu_irq too.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3671 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
Re-add clearing of the APP_CMD flag that somehow got lost.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3094 c046a42c-6fe2-441c-8c8c-71466251a162
SD card emulation (initial implementation by Andrzei Zaborowski).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2620 c046a42c-6fe2-441c-8c8c-71466251a162