[Top][All Lists]

[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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]