From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqaNk-0007JA-In for qemu-devel@nongnu.org; Mon, 17 Nov 2014 23:27:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqaNe-0000Hi-95 for qemu-devel@nongnu.org; Mon, 17 Nov 2014 23:27:12 -0500 Received: from mail-qg0-f54.google.com ([209.85.192.54]:55117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqaNe-0000HZ-4m for qemu-devel@nongnu.org; Mon, 17 Nov 2014 23:27:06 -0500 Received: by mail-qg0-f54.google.com with SMTP id q107so138708qgd.27 for ; Mon, 17 Nov 2014 20:27:05 -0800 (PST) From: Kevin O'Connor Date: Mon, 17 Nov 2014 23:26:36 -0500 Message-Id: <1416284800-2759-1-git-send-email-kevin@koconnor.net> Subject: [Qemu-devel] [RFC][PATCH 0/4] Add support for SDHCI PCI devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mitsyanko , peter.crosthwaite@xilinx.com, Vincent Palatin I'd like to be able to emulate SD cards on x86 machines for testing purposes. I put together a patch series to modify the existing SDHCI code so that it can also be used as a PCI device, and can thus be used on any PCI platform (such as x86). Vincent Palatin had patches to do this a couple of years ago, but his patches no longer apply to the current qemu tree. See: https://lists.nongnu.org/archive/html/qemu-devel/2011-07/msg02833.html This series is not directly based on Vincent's patches, and is instead mainly based on the sdhci code currently in the qemu tree. I've lightly tested this series on x86 and confirmed that a standard linux kernel can find and mount the given device. To test, I add the following to the command line: -device sdhci-pci -sd my-drive Unfortunately, I have not been able to test the existing arm support (which uses sysbus), but I will test if I can find an available qemu arm image. I'm not that familiar with QEMU internals. Comments welcome. -Kevin Kevin O'Connor (4): sdhci: Remove class "virtual" methods sdhci: Add "sysbus" to sdhci QOM types and methods sdhci: Support SDHCI devices on PCI sdhci: Set a default frequency clock default-configs/pci.mak | 2 + hw/sd/sdhci.c | 199 +++++++++++++++++++++++++---------------------- hw/sd/sdhci.h | 39 +++------- include/hw/pci/pci.h | 1 + include/hw/pci/pci_ids.h | 1 + 5 files changed, 120 insertions(+), 122 deletions(-) -- 1.9.3