firmware: qemu_fw_cfg: Do not hard depend on CONFIG_HAS_IOPORT_MAP
PATCH RESEND 1/1 firmware: qemu_fw_cfg: Do not hard depend on CONFIG_HAS_IOPORT_MAP
Some platforms require CONFIG_NO_IOPORT_MAP=y but would also support qemu_fw_cfg over MMIO. Currently the qemu_fw_cfg module can't be built for those as it needs HAS_IOPORT_MAP=y for ioport remapping.
This patch allows to build the qemu_fw_cfg in those cases. If CONFIG_HAS_IOPORT_MAP=n, qemu_fw_cfg is built without support for ioport based access.
Signed-off-by Fabian Vogt <[email protected]>
---
Applies on top of 6c1b980a7e79.
Resent because the first time I somehow lost the "[PATCH]" prefix.
drivers/firmware/Kconfig | 1 - drivers/firmware/qemu_fw_cfg.c | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/firmware/Kconfig +0 -1
@@ -156,7 +156,6 @@ config RASPBERRYPI_FIRMWARE config FW_CFG_SYSFS tristate "QEMU fw_cfg device support in sysfs" depends on SYSFS && (ARM || ARM64 || PARISC || 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
drivers/firmware/qemu_fw_cfg.c +5 -0
@@ -258,6 +258,7 @@ static int fw_cfg_do_platform_probe(struct platform_device *pdev)return -EFAULT ; } }else { +#ifdef CONFIG_HAS_IOPORT_MAP if (!request_region (fw_cfg_p_base, fw_cfg_p_size,"fw_cfg_io" ))return -EBUSY ;
@@ -266,6 +267,10 @@ static int fw_cfg_do_platform_probe(struct platform_device *pdev)release_region (fw_cfg_p_base, fw_cfg_p_size); return -EFAULT; } +#else +dev_err (&pdev->dev,"IO region given but CONFIG_HAS_IOPORT_MAP=n" ); +return -EINVAL ; +#endif }/* were custom register offsets provided (e.g. on the command line)? */
Signature · 1 line
2.41.0