firmware: qemu config needs I/O ports
authorArnd Bergmann <arnd@arndb.de>
Thu, 11 Feb 2016 14:23:51 +0000 (15:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Feb 2016 04:13:35 +0000 (20:13 -0800)
Not all machines have PCI style I/O port memory, or they do not allow
mapping it using the ioport_map() function, whcih results in a
build error with the newly added qemu firmware code:

drivers/firmware/built-in.o: In function `fw_cfg_io_cleanup':
qemu_fw_cfg.c:(.text+0x144): undefined reference to `ioport_unmap'
drivers/firmware/built-in.o: In function `fw_cfg_sysfs_probe':
qemu_fw_cfg.c:(.text+0xb18): undefined reference to `ioport_map'

This adds a Kconfig dependency to ensure the driver can only
be built on platforms that support it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 75f3e8e47f38 ("firmware: introduce sysfs driver for QEMU's fw_cfg device")
Acked-by: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/Kconfig

index 5130f74ae3bd87d7c32b1f13af5bc78ddfdfa6be..6664f1108c7c2f8c54a3d1d0f32f6c1c7f622bb3 100644 (file)
@@ -164,6 +164,7 @@ config RASPBERRYPI_FIRMWARE
 config FW_CFG_SYSFS
        tristate "QEMU fw_cfg device support in sysfs"
        depends on SYSFS && (ARM || ARM64 || PPC_PMAC || SPARC || X86)
+       depends on HAS_IOPORT_MAP
        default n
        help
          Say Y or M here to enable the exporting of the QEMU firmware