On Thu, Dec 3, 2015 at 10:01 PM, Andrew Baumann <andrew.baum...@microsoft.com> wrote: > Signed-off-by: Andrew Baumann <andrew.baum...@microsoft.com> > --- > hw/sd/Makefile.objs | 1 + > hw/sd/bcm2835_emmc.c | 800 > +++++++++++++++++++++++++++++++++++++++++++ > include/hw/sd/bcm2835_emmc.h | 56 +++ > 3 files changed, 857 insertions(+) > create mode 100644 hw/sd/bcm2835_emmc.c > create mode 100644 include/hw/sd/bcm2835_emmc.h > > diff --git a/hw/sd/Makefile.objs b/hw/sd/Makefile.objs > index f1aed83..b9cb9b8 100644 > --- a/hw/sd/Makefile.objs > +++ b/hw/sd/Makefile.objs > @@ -6,3 +6,4 @@ common-obj-$(CONFIG_SDHCI) += sdhci.o > obj-$(CONFIG_MILKYMIST) += milkymist-memcard.o > obj-$(CONFIG_OMAP) += omap_mmc.o > obj-$(CONFIG_PXA2XX) += pxa2xx_mmci.o > +obj-$(CONFIG_RASPI) += bcm2835_emmc.o > diff --git a/hw/sd/bcm2835_emmc.c b/hw/sd/bcm2835_emmc.c > new file mode 100644 > index 0000000..46628b5 > --- /dev/null > +++ b/hw/sd/bcm2835_emmc.c > @@ -0,0 +1,800 @@ > +/* > + * Raspberry Pi emulation (c) 2012 Gregory Estrade > + * This code is licensed under the GNU GPLv2 and later. > + */ > + > +#include "sysemu/blockdev.h" > +#include "hw/sd/bcm2835_emmc.h" > + > +/* > + * Controller registers > + */ > + > +#define SDHCI_DMA_ADDRESS 0x00 > +#define SDHCI_ARGUMENT2 SDHCI_DMA_ADDRESS > +
Is this IP just SDHCI? We already model SDHCI in QEMU, see hw/sd/sdhci.c. If there are RPi specific features to the SDHCI implementation they should be added as optional extensions (probabably via subclassing) to the existing SDHCI model. Regards, Peter