From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9NK4-0007GD-Ra for qemu-devel@nongnu.org; Wed, 16 Dec 2015 20:25:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9NK3-0001Tw-Ol for qemu-devel@nongnu.org; Wed, 16 Dec 2015 20:25:36 -0500 MIME-Version: 1.0 Sender: alistair23@gmail.com In-Reply-To: <1449851831-4966-1-git-send-email-peter.maydell@linaro.org> References: <1449851831-4966-1-git-send-email-peter.maydell@linaro.org> From: Alistair Francis Date: Wed, 16 Dec 2015 17:25:05 -0800 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 00/10] hw/sd: QOMify sd.c (and pxa2xx_mmci) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Patch Tracking , "qemu-devel@nongnu.org Developers" , Peter Crosthwaite , Markus Armbruster , Alistair Francis , Sai Pavan Boddu , Kevin O'Connor , qemu-arm@nongnu.org, "Edgar E. Iglesias" , Paolo Bonzini +Sai Pavan On Fri, Dec 11, 2015 at 8:37 AM, Peter Maydell wrote: > This series attempts to QOMify sd.c (the actual SD card model), > including a proper QOM bus between the controller and the card. > > This series removes the experimental x-drive property on sdhci-pci; > the syntax for using that device changes: > > instead of using the x-drive property: > > -device sdhci-pci,x-drive=mydrive -drive id=mydrive,[...] > > we create a specific sd device (which is autoplugged into the > sdhci-pci device's "sd-bus" bus if you don't manually connect them): > > -device sdhci-pci -drive id=mydrive,[...] -device sd,drive=mydrive > > > The basic structure of the patch series is: > * QOMify sd.c itself > * Add the QOM bus APIs > * Convert sdhci to use the QOM bus APIs > * QOMify pxa2xx_mmci > * Convert pxa2xx_mmci to use the QOM bus APIs > > > Points worthy of review: > * is the code in "sdhci_sysbus: Create SD card device in users" > for xlnx-ep108.c to connect the SD cards up to the two controllers > inside the SoC doing this in the right way? > * I chose not to try to make the SD card type a subclass of > SSI, because the interface we have at the moment didn't really > seem to line up with what SSI has > * generally do I have the QOM style right? > > > Some notes on compatibility/bisection: > * the old-style non-QOMified controllers (which get their drive > via blk_by_legacy_dinfo() continue to work through the whole series > * the only QOMified controller which doesn't do that is sdhci-pci, > which uses the experimental x-drive property to take a drive. This > support and property is removed in patch 1; support for the new > syntax is added in patch 5. > (Since we're breaking the old syntax anyway I chose to not try to > introduce the new syntax in the same commit as breaking the old one; > I think it makes the patches easier to review.) > > > I don't have any Xilinx test images, so I haven't been able to test > the changes to those boards (beyond confirming that the board doesn't > crash on startup and that 'info qtree' seems to show SD cards > connected to the right things). I have tested sdhci-pci and > the pxa2xx. > > Peter Maydell (10): > hw/sd/sdhci.c: Remove x-drive property > hw/sd/sd.c: QOMify > hw/sd/sd.c: Convert sd_reset() function into Device reset method > hw/sd: Add QOM bus which SD cards plug in to > hw/sd/sdhci.c: Update to use SDBus APIs > sdhci_sysbus: Create SD card device in users, not the device itself > hw/sd/pxa2xx_mmci: convert to SysBusDevice object > hw/sd/pxa2xx_mmci: Update to use new SDBus APIs > hw/sd/pxa2xx_mmci: Convert to VMStateDescription > hw/sd/pxa2xx_mmci: Add reset function > > hw/arm/xilinx_zynq.c | 17 ++- > hw/arm/xlnx-ep108.c | 19 ++++ > hw/sd/Makefile.objs | 2 +- > hw/sd/core.c | 146 ++++++++++++++++++++++++ > hw/sd/pxa2xx_mmci.c | 304 ++++++++++++++++++++++++++++++++------------------ > hw/sd/sd.c | 149 ++++++++++++++++++++----- > hw/sd/sdhci.c | 83 ++++++++------ > include/hw/sd/sd.h | 63 +++++++++++ > include/hw/sd/sdhci.h | 3 +- > 9 files changed, 610 insertions(+), 176 deletions(-) > create mode 100644 hw/sd/core.c > > -- > 1.9.1 > >