diff options
Diffstat (limited to 'drivers/firmware/qemu_fw_cfg.c')
-rw-r--r-- | drivers/firmware/qemu_fw_cfg.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c index 45bfc389b226..5de6bb406fb6 100644 --- a/drivers/firmware/qemu_fw_cfg.c +++ b/drivers/firmware/qemu_fw_cfg.c | |||
@@ -32,30 +32,12 @@ | |||
32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/ioport.h> | 34 | #include <linux/ioport.h> |
35 | #include <uapi/linux/qemu_fw_cfg.h> | ||
35 | 36 | ||
36 | MODULE_AUTHOR("Gabriel L. Somlo <somlo@cmu.edu>"); | 37 | MODULE_AUTHOR("Gabriel L. Somlo <somlo@cmu.edu>"); |
37 | MODULE_DESCRIPTION("QEMU fw_cfg sysfs support"); | 38 | MODULE_DESCRIPTION("QEMU fw_cfg sysfs support"); |
38 | MODULE_LICENSE("GPL"); | 39 | MODULE_LICENSE("GPL"); |
39 | 40 | ||
40 | /* selector key values for "well-known" fw_cfg entries */ | ||
41 | #define FW_CFG_SIGNATURE 0x00 | ||
42 | #define FW_CFG_ID 0x01 | ||
43 | #define FW_CFG_FILE_DIR 0x19 | ||
44 | |||
45 | /* size in bytes of fw_cfg signature */ | ||
46 | #define FW_CFG_SIG_SIZE 4 | ||
47 | |||
48 | /* fw_cfg "file name" is up to 56 characters (including terminating nul) */ | ||
49 | #define FW_CFG_MAX_FILE_PATH 56 | ||
50 | |||
51 | /* fw_cfg file directory entry type */ | ||
52 | struct fw_cfg_file { | ||
53 | u32 size; | ||
54 | u16 select; | ||
55 | u16 reserved; | ||
56 | char name[FW_CFG_MAX_FILE_PATH]; | ||
57 | }; | ||
58 | |||
59 | /* fw_cfg device i/o register addresses */ | 41 | /* fw_cfg device i/o register addresses */ |
60 | static bool fw_cfg_is_mmio; | 42 | static bool fw_cfg_is_mmio; |
61 | static phys_addr_t fw_cfg_p_base; | 43 | static phys_addr_t fw_cfg_p_base; |
@@ -616,7 +598,7 @@ MODULE_DEVICE_TABLE(of, fw_cfg_sysfs_mmio_match); | |||
616 | 598 | ||
617 | #ifdef CONFIG_ACPI | 599 | #ifdef CONFIG_ACPI |
618 | static const struct acpi_device_id fw_cfg_sysfs_acpi_match[] = { | 600 | static const struct acpi_device_id fw_cfg_sysfs_acpi_match[] = { |
619 | { "QEMU0002", }, | 601 | { FW_CFG_ACPI_DEVICE_ID, }, |
620 | {}, | 602 | {}, |
621 | }; | 603 | }; |
622 | MODULE_DEVICE_TABLE(acpi, fw_cfg_sysfs_acpi_match); | 604 | MODULE_DEVICE_TABLE(acpi, fw_cfg_sysfs_acpi_match); |