diff options
author | Niek Linnenbank <nieklinnenbank@gmail.com> | 2020-03-11 23:18:44 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-03-12 16:27:33 +0000 |
commit | 82e4838249b23c3fe20cee295f9c1b3e6abd68d1 (patch) | |
tree | 74024e6c97b7e6d90ccc64b3cf5ac8c79849526e /include/hw/arm | |
parent | 6556617ce1a3c4a2ad91e5c5d1c936ee9134ed04 (diff) | |
download | qemu-82e4838249b23c3fe20cee295f9c1b3e6abd68d1.zip qemu-82e4838249b23c3fe20cee295f9c1b3e6abd68d1.tar.gz qemu-82e4838249b23c3fe20cee295f9c1b3e6abd68d1.tar.bz2 |
hw/arm/allwinner: add SD/MMC host controller
The Allwinner System on Chip families sun4i and above contain
an integrated storage controller for Secure Digital (SD) and
Multi Media Card (MMC) interfaces. This commit adds support
for the Allwinner SD/MMC storage controller with the following
emulated features:
* DMA transfers
* Direct FIFO I/O
* Short/Long format command responses
* Auto-Stop command (CMD12)
* Insert & remove card detection
The following boards are extended with the SD host controller:
* Cubieboard (hw/arm/cubieboard.c)
* Orange Pi PC (hw/arm/orangepi.c)
Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200311221854.30370-9-nieklinnenbank@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/arm')
-rw-r--r-- | include/hw/arm/allwinner-a10.h | 2 | ||||
-rw-r--r-- | include/hw/arm/allwinner-h3.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h index 8af7245..ae33a84 100644 --- a/include/hw/arm/allwinner-a10.h +++ b/include/hw/arm/allwinner-a10.h @@ -7,6 +7,7 @@ #include "hw/timer/allwinner-a10-pit.h" #include "hw/intc/allwinner-a10-pic.h" #include "hw/net/allwinner_emac.h" +#include "hw/sd/allwinner-sdhost.h" #include "hw/ide/ahci.h" #include "hw/usb/hcd-ohci.h" #include "hw/usb/hcd-ehci.h" @@ -31,6 +32,7 @@ typedef struct AwA10State { AwA10PICState intc; AwEmacState emac; AllwinnerAHCIState sata; + AwSdHostState mmc0; MemoryRegion sram_a; EHCISysBusState ehci[AW_A10_NUM_USB]; OHCISysBusState ohci[AW_A10_NUM_USB]; diff --git a/include/hw/arm/allwinner-h3.h b/include/hw/arm/allwinner-h3.h index 85416d9..d71a491 100644 --- a/include/hw/arm/allwinner-h3.h +++ b/include/hw/arm/allwinner-h3.h @@ -43,6 +43,7 @@ #include "hw/misc/allwinner-cpucfg.h" #include "hw/misc/allwinner-h3-sysctrl.h" #include "hw/misc/allwinner-sid.h" +#include "hw/sd/allwinner-sdhost.h" #include "target/arm/cpu.h" /** @@ -60,6 +61,7 @@ enum { AW_H3_SRAM_A2, AW_H3_SRAM_C, AW_H3_SYSCTRL, + AW_H3_MMC0, AW_H3_SID, AW_H3_EHCI0, AW_H3_OHCI0, @@ -117,6 +119,7 @@ typedef struct AwH3State { AwCpuCfgState cpucfg; AwH3SysCtrlState sysctrl; AwSidState sid; + AwSdHostState mmc0; GICState gic; MemoryRegion sram_a1; MemoryRegion sram_a2; |