qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin O'Connor <kevin@koconnor.net>
To: qemu-devel@nongnu.org
Cc: Igor Mitsyanko <i.mitsyanko@gmail.com>,
	peter.crosthwaite@xilinx.com,
	Vincent Palatin <vpalatin@chromium.org>
Subject: [Qemu-devel] [RFC][PATCH 0/4] Add support for SDHCI PCI devices
Date: Mon, 17 Nov 2014 23:26:36 -0500	[thread overview]
Message-ID: <1416284800-2759-1-git-send-email-kevin@koconnor.net> (raw)

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

             reply	other threads:[~2014-11-18  4:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18  4:26 Kevin O'Connor [this message]
2014-11-18  4:26 ` [Qemu-devel] [PATCH 1/4] sdhci: Remove class "virtual" methods Kevin O'Connor
2014-11-18  4:26 ` [Qemu-devel] [PATCH 2/4] sdhci: Add "sysbus" to sdhci QOM types and methods Kevin O'Connor
2014-11-18  4:26 ` [Qemu-devel] [PATCH 3/4] sdhci: Support SDHCI devices on PCI Kevin O'Connor
2014-11-18  6:27   ` Paolo Bonzini
2014-11-20 17:03     ` Kevin O'Connor
2014-11-21  7:20       ` Gerd Hoffmann
2014-11-21 11:56         ` Paolo Bonzini
2014-11-18  4:26 ` [Qemu-devel] [PATCH 4/4] sdhci: Set a default frequency clock Kevin O'Connor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416284800-2759-1-git-send-email-kevin@koconnor.net \
    --to=kevin@koconnor.net \
    --cc=i.mitsyanko@gmail.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vpalatin@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).