OSDN Git Service

hw/sd/sdhci: Move PCI-related code into a separate file
authorThomas Huth <thuth@redhat.com>
Wed, 20 Feb 2019 11:19:14 +0000 (12:19 +0100)
committerThomas Huth <thuth@redhat.com>
Tue, 12 Mar 2019 06:49:04 +0000 (07:49 +0100)
commitce864603443567b8186dc435ebba08338ef4a6d6
tree25b78abc39911375e6870c9b28ff2bf3b394086c
parenta189a9375bfe07549dd506e91bfa8af8165f05e2
hw/sd/sdhci: Move PCI-related code into a separate file

Some machines have an SDHCI device, but no PCI. To be able to
compile hw/sd/sdhci.c without CONFIG_PCI, we must not call functions
like pci_get_address_space() and pci_allocate_irq() there. Thus
move the PCI-related code into a separate file.

This is required for the new Kconfig-like build system, e.g. it is
needed if a user wants to compile a QEMU binary with just one machine
that has SDHCI, but no PCI, like the ARM "raspi" machines for example.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/sd/Kconfig
hw/sd/Makefile.objs
hw/sd/sdhci-internal.h
hw/sd/sdhci-pci.c [new file with mode: 0644]
hw/sd/sdhci.c