Make file names aligned with CONFIG_QFW
Signed-off-by: Miao Yan
---
arch/x86/cpu/mp_init.c | 2 +-
arch/x86/cpu/qemu/acpi_table.c | 2 +-
arch/x86/cpu/qemu/cpu.c| 2 +-
arch/x86/cpu/qemu/qemu.c | 2 +-
cmd/cmd_qfw.c | 2 +-
drivers/misc/Makefile | 2 +-
drivers/misc/qemu_fw_cfg.c | 181 -
drivers/misc/qfw.c | 181 +
include/qemu_fw_cfg.h | 176 ---
include/qfw.h | 176 +++
10 files changed, 363 insertions(+), 363 deletions(-)
delete mode 100644 drivers/misc/qemu_fw_cfg.c
create mode 100644 drivers/misc/qfw.c
delete mode 100644 include/qemu_fw_cfg.h
create mode 100644 include/qfw.h
diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c
index 109b3d7..54285fa 100644
--- a/arch/x86/cpu/mp_init.c
+++ b/arch/x86/cpu/mp_init.c
@@ -12,7 +12,7 @@
#include
#include
#ifdef CONFIG_QFW
-#include
+#include
#endif
#include
#include
diff --git a/arch/x86/cpu/qemu/acpi_table.c b/arch/x86/cpu/qemu/acpi_table.c
index 4584fc7..0c54b80 100644
--- a/arch/x86/cpu/qemu/acpi_table.c
+++ b/arch/x86/cpu/qemu/acpi_table.c
@@ -9,7 +9,7 @@
#include
#include
#ifdef CONFIG_QFW
-#include
+#include
#endif
#include
#include
diff --git a/arch/x86/cpu/qemu/cpu.c b/arch/x86/cpu/qemu/cpu.c
index 4d2989a..b1a965e 100644
--- a/arch/x86/cpu/qemu/cpu.c
+++ b/arch/x86/cpu/qemu/cpu.c
@@ -8,7 +8,7 @@
#include
#include
#include
-#include
+#include
#include
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
index 716a0ac..35cd107 100644
--- a/arch/x86/cpu/qemu/qemu.c
+++ b/arch/x86/cpu/qemu/qemu.c
@@ -7,7 +7,7 @@
#include
#include
#ifdef CONFIG_QFW
-#include
+#include
#endif
#include
#include
diff --git a/cmd/cmd_qfw.c b/cmd/cmd_qfw.c
index eefaf65..aeb576b 100644
--- a/cmd/cmd_qfw.c
+++ b/cmd/cmd_qfw.c
@@ -7,7 +7,7 @@
#include
#include
#include
-#include
+#include
/*
* This function prepares kernel for zboot. It loads kernel data
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 4893086..98704f2 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -43,4 +43,4 @@ obj-$(CONFIG_PCA9551_LED) += pca9551_led.o
obj-$(CONFIG_RESET) += reset-uclass.o
obj-$(CONFIG_FSL_DEVICE_DISABLE) += fsl_devdis.o
obj-$(CONFIG_WINBOND_W83627) += winbond_w83627.o
-obj-$(CONFIG_QFW) += qemu_fw_cfg.o
+obj-$(CONFIG_QFW) += qfw.o
diff --git a/drivers/misc/qemu_fw_cfg.c b/drivers/misc/qemu_fw_cfg.c
deleted file mode 100644
index 0700641..000
--- a/drivers/misc/qemu_fw_cfg.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * (C) Copyright 2015 Miao Yan
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-static bool fwcfg_present;
-static bool fwcfg_dma_present;
-static struct fw_cfg_arch_ops *fwcfg_arch_ops;
-
-static LIST_HEAD(fw_list);
-
-/* Read configuration item using fw_cfg PIO interface */
-static void qemu_fwcfg_read_entry_pio(uint16_t entry,
- uint32_t size, void *address)
-{
- debug("qemu_fwcfg_read_entry_pio: entry 0x%x, size %u address %p\n",
- entry, size, address);
-
- return fwcfg_arch_ops->arch_read_pio(entry, size, address);
-}
-
-/* Read configuration item using fw_cfg DMA interface */
-static void qemu_fwcfg_read_entry_dma(uint16_t entry,
- uint32_t size, void *address)
-{
- struct fw_cfg_dma_access dma;
-
- dma.length = cpu_to_be32(size);
- dma.address = cpu_to_be64((uintptr_t)address);
- dma.control = cpu_to_be32(FW_CFG_DMA_READ);
-
- /*
-* writting FW_CFG_INVALID will cause read operation to resume at
-* last offset, otherwise read will start at offset 0
-*/
- if (entry != FW_CFG_INVALID)
- dma.control |= cpu_to_be32(FW_CFG_DMA_SELECT | (entry << 16));
-
- barrier();
-
- debug("qemu_fwcfg_read_entry_dma: entry 0x%x, size %u address %p,
control 0x%x\n",
- entry, size, address, be32_to_cpu(dma.control));
-
- fwcfg_arch_ops->arch_read_dma();
-}
-
-bool qemu_fwcfg_present(void)
-{
- return fwcfg_present;
-}
-
-bool qemu_fwcfg_dma_present(void)
-{
- return fwcfg_dma_present;
-}
-
-void qemu_fwcfg_read_entry(uint16_t entry, uint32_t length, void *address)
-{
- if (fwcfg_dma_present)
- qemu_fwcfg_read_entry_dma(entry, length, address);
- else
- qemu_fwcfg_read_entry_pio(entry, length, address);
-}
-
-int qemu_fwcfg_online_cpus(void)
-{
- uint16_t nb_cpus;
-
- if (!fwcfg_present)
- return -ENODEV;
-
- qemu_fwcfg_read_entry(FW_CFG_NB_CPUS, 2, _cpus);
-
- return le16_to_cpu(nb_cpus);
-}
-
-int