[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 08/20] hw/arm/allwinner: add SD/MMC host controller
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v4 08/20] hw/arm/allwinner: add SD/MMC host controller |
Date: |
Sun, 19 Jan 2020 20:01:51 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 1/19/20 1:50 AM, Niek Linnenbank wrote:
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 <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
---
include/hw/arm/allwinner-a10.h | 2 +
include/hw/arm/allwinner-h3.h | 3 +
include/hw/sd/allwinner-sdhost.h | 135 +++++
hw/arm/allwinner-a10.c | 11 +
hw/arm/allwinner-h3.c | 15 +-
hw/arm/cubieboard.c | 15 +
hw/arm/orangepi.c | 16 +
hw/sd/allwinner-sdhost.c | 848 +++++++++++++++++++++++++++++++
hw/sd/Makefile.objs | 1 +
hw/sd/trace-events | 7 +
10 files changed, 1052 insertions(+), 1 deletion(-)
create mode 100644 include/hw/sd/allwinner-sdhost.h
create mode 100644 hw/sd/allwinner-sdhost.c
Failure at build if configured with --without-default-devices:
CC arm-softmmu/hw/sd/allwinner-sdhost.o
CC arm-softmmu/hw/arm/orangepi.o
CC arm-softmmu/hw/arm/allwinner-h3.o
LINK arm-softmmu/qemu-system-arm
/usr/bin/ld: hw/sd/allwinner-sdhost.o: in function
`allwinner_sdhost_send_command':
hw/sd/allwinner-sdhost.c:239: undefined reference to `sdbus_do_command'
/usr/bin/ld: hw/sd/allwinner-sdhost.o: in function `allwinner_sdhost_read':
hw/sd/allwinner-sdhost.c:517: undefined reference to `sdbus_data_ready'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:518: undefined reference to
`sdbus_read_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:519: undefined reference to
`sdbus_read_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:520: undefined reference to
`sdbus_read_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:521: undefined reference to
`sdbus_read_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.o: in function
`allwinner_sdhost_process_desc':
hw/sd/allwinner-sdhost.c:340: undefined reference to `sdbus_read_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:334: undefined reference to
`sdbus_write_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.o: in function `allwinner_sdhost_write':
hw/sd/allwinner-sdhost.c:651: undefined reference to `sdbus_write_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:652: undefined reference to
`sdbus_write_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:653: undefined reference to
`sdbus_write_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:654: undefined reference to
`sdbus_write_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.o: in function `allwinner_sdhost_dma':
hw/sd/allwinner-sdhost.c:372: undefined reference to `sdbus_data_ready'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-arm] Error 1
Fixed by:
-- >8 --
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index bb75c1de17..086241354c 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -302,6 +302,9 @@ config ALLWINNER_H3
select ARM_TIMER
select ARM_GIC
select UNIMP
select USB_OHCI
select USB_EHCI_SYSBUS
+ select SD
config RASPI
bool
---
- [PATCH v4 15/20] tests/boot_linux_console: Add a SD card test for the OrangePi PC board, (continued)
- [PATCH v4 15/20] tests/boot_linux_console: Add a SD card test for the OrangePi PC board, Niek Linnenbank, 2020/01/18
- [PATCH v4 14/20] tests/boot_linux_console: Add initrd test for the Orange Pi PC board, Niek Linnenbank, 2020/01/18
- [PATCH v4 16/20] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC, Niek Linnenbank, 2020/01/18
- [PATCH v4 11/20] hw/arm/allwinner-h3: add SDRAM controller device, Niek Linnenbank, 2020/01/18
- [PATCH v4 12/20] hw/arm/allwinner: add RTC device support, Niek Linnenbank, 2020/01/18
- [PATCH v4 09/20] hw/arm/allwinner-h3: add EMAC ethernet device, Niek Linnenbank, 2020/01/18
- [PATCH v4 20/20] docs: add Orange Pi PC document, Niek Linnenbank, 2020/01/18
- [PATCH v4 19/20] tests/boot_linux_console: Test booting NetBSD via U-Boot on OrangePi PC, Niek Linnenbank, 2020/01/18
- [PATCH v4 08/20] hw/arm/allwinner: add SD/MMC host controller, Niek Linnenbank, 2020/01/18
- Re: [PATCH v4 08/20] hw/arm/allwinner: add SD/MMC host controller,
Philippe Mathieu-Daudé <=
- Re: [PATCH v4 00/20] Add Allwinner H3 SoC and Orange Pi PC Machine, Niek Linnenbank, 2020/01/19