Changelog v2->v3: - PATCH 2/3 splitted into smaller patches 2-4/5. - SDState structure rearrengment dropped.
v1->v2: PATCH 1/3: - .calc_size field replaced with .get_bufsize field in VMStateField; - .size_offset removed completely, macros based on it rewritten to use new .get_bufsize field. PATCH 2/3: - all binary variables in SDState now have bool type; - SDState structure rearranged to ensure alignement; - sd_init(), sd_enable() now receive bool; - new version of PATCH 1/3 now used to save wp_groups array; PATCH 3/3: - DMA transfers modified and now operate with data blocks of BLKSIZE only, like real hardware does; - reset procedure optimized; - new version of PATCH 1/3 now used to save fifo_buffer. First patch of this patch set modifies existing VMStateField interface to ease save/restore functionality implementation for device's dynamically allocated buffers. This modification is used later in second patch to implement SD card's VMStateDescription structure. Third patch adds imlementation of new device: SD host controller fully compliant with "SD host controller specification version 2.00". It also uses first patch modifications. Mitsyanko Igor (5): vmstate: introduce get_bufsize entry in VMStateField hw/sd.c: add SD card save/load support hw/sd.c: convert wp_groups, expecting_acmd and enable to bool hw/sd.c: convert wp_switch and spi to bool hw: Introduce spec. ver. 2.00 compliant SD host controller Makefile.target | 1 + hw/g364fb.c | 7 +- hw/hw.h | 41 +-- hw/m48t59.c | 7 +- hw/mac_nvram.c | 8 +- hw/onenand.c | 7 +- hw/sd.c | 126 +++-- hw/sd.h | 4 +- hw/sdhc_ver2.c | 1569 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/sdhc_ver2.h | 327 ++++++++++++ savevm.c | 10 +- 11 files changed, 2018 insertions(+), 89 deletions(-) create mode 100644 hw/sdhc_ver2.c create mode 100644 hw/sdhc_ver2.h -- 1.7.4.1