diff options
author | Myron Stowe <mstowe@redhat.com> | 2011-11-07 18:23:34 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-01-17 04:35:20 -0500 |
commit | 6f68c91c55ea3576d366797fa8d45e31c4aa79f8 (patch) | |
tree | c896013c1a5d63a6a20c8cc4b68eee53ce24844a /drivers/acpi/osl.c | |
parent | bc9ffce27962c0c5fdc6adf74790ea0fcbe4a99c (diff) |
ACPI: Export interfaces for ioremapping/iounmapping ACPI registers
Export remapping and unmapping interfaces - acpi_os_map_generic_address()
and acpi_os_unmap_generic_address() - for ACPI generic registers that are
backed by memory mapped I/O (MMIO).
The acpi_os_map_generic_address() and acpi_os_unmap_generic_address()
declarations may more properly belong in include/acpi/acpiosxf.h next to
acpi_os_read_memory() but I believe that would require the ACPI CA making
them an official part of the ACPI CA - OS interface.
ACPI Generic Address Structure (GAS) reference (ACPI's fixed/generic
hardware registers use the GAS format):
ACPI Specification, Revision 4.0, Section 5.2.3.1, "Generic Address
Structure"
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r-- | drivers/acpi/osl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 2e285cdbefb1..b11f2676f7c9 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -431,7 +431,7 @@ void __init early_acpi_os_unmap_memory(void __iomem *virt, acpi_size size) | |||
431 | __acpi_unmap_table(virt, size); | 431 | __acpi_unmap_table(virt, size); |
432 | } | 432 | } |
433 | 433 | ||
434 | static int acpi_os_map_generic_address(struct acpi_generic_address *gas) | 434 | int acpi_os_map_generic_address(struct acpi_generic_address *gas) |
435 | { | 435 | { |
436 | u64 addr; | 436 | u64 addr; |
437 | void __iomem *virt; | 437 | void __iomem *virt; |
@@ -450,8 +450,9 @@ static int acpi_os_map_generic_address(struct acpi_generic_address *gas) | |||
450 | 450 | ||
451 | return 0; | 451 | return 0; |
452 | } | 452 | } |
453 | EXPORT_SYMBOL(acpi_os_map_generic_address); | ||
453 | 454 | ||
454 | static void acpi_os_unmap_generic_address(struct acpi_generic_address *gas) | 455 | void acpi_os_unmap_generic_address(struct acpi_generic_address *gas) |
455 | { | 456 | { |
456 | u64 addr; | 457 | u64 addr; |
457 | struct acpi_ioremap *map; | 458 | struct acpi_ioremap *map; |
@@ -475,6 +476,7 @@ static void acpi_os_unmap_generic_address(struct acpi_generic_address *gas) | |||
475 | 476 | ||
476 | acpi_os_map_cleanup(map); | 477 | acpi_os_map_cleanup(map); |
477 | } | 478 | } |
479 | EXPORT_SYMBOL(acpi_os_unmap_generic_address); | ||
478 | 480 | ||
479 | #ifdef ACPI_FUTURE_USAGE | 481 | #ifdef ACPI_FUTURE_USAGE |
480 | acpi_status | 482 | acpi_status |