aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/qemu_fw_cfg.c
diff options
context:
space:
mode:
authorGabriel Somlo <somlo@cmu.edu>2016-02-22 16:18:18 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-29 10:11:44 -0700
commit00411b7b1e3ec477b75bb83ccd417c7609832db6 (patch)
tree73057a7144dc14712403571ca4be7ed04474712c /drivers/firmware/qemu_fw_cfg.c
parentLinux 4.6-rc1 (diff)
downloadlinux-dev-00411b7b1e3ec477b75bb83ccd417c7609832db6.tar.xz
linux-dev-00411b7b1e3ec477b75bb83ccd417c7609832db6.zip
firmware: fw_cfg register offsets on supported architectures only
Refrain from defining default fw_cfg register offsets on unsupported architectures -- throw an error instead. If QEMU were to add fw_cfg support on additional architectures, we should add them to the FW_CFG_SYSFS depends statement in drivers/firmware/Kconfig, and provide default values for register offsets in drivers/firmware/qemu_fw_cfg.c at that time. Suggested-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/firmware/qemu_fw_cfg.c')
-rw-r--r--drivers/firmware/qemu_fw_cfg.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c
index fedbff55a7f3..7bba76c0206c 100644
--- a/drivers/firmware/qemu_fw_cfg.c
+++ b/drivers/firmware/qemu_fw_cfg.c
@@ -109,9 +109,7 @@ static void fw_cfg_io_cleanup(void)
# define FW_CFG_CTRL_OFF 0x00
# define FW_CFG_DATA_OFF 0x01
# else
-# warning "QEMU FW_CFG may not be available on this architecture!"
-# define FW_CFG_CTRL_OFF 0x00
-# define FW_CFG_DATA_OFF 0x01
+# error "QEMU FW_CFG not available on this architecture!"
# endif
#endif