aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/hwregs.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2012-02-14 05:29:55 -0500
committerLen Brown <len.brown@intel.com>2012-03-22 01:44:54 -0400
commit653f4b538f66d37db560e0f56af08117136d29b7 (patch)
tree1728249946368a4befa5ade048bafeba9d9fddce /drivers/acpi/acpica/hwregs.c
parent33620c5419e8a11814dd11e02a80e6ef77a43407 (diff)
ACPICA: Expand OSL memory read/write interfaces to 64 bits
This change expands acpi_os_read_memory and acpi_os_write_memory to a full 64 bits. This allows 64 bit transfers via the acpi_read and acpi_write interfaces. Note: The internal acpi_hw_read and acpi_hw_write interfaces remain at 32 bits, because 64 bits is not needed to access the standard ACPI registers. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/hwregs.c')
-rw-r--r--drivers/acpi/acpica/hwregs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
index 17a78e5ef175..6b6c83b87b52 100644
--- a/drivers/acpi/acpica/hwregs.c
+++ b/drivers/acpi/acpica/hwregs.c
@@ -157,6 +157,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,
157acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg) 157acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg)
158{ 158{
159 u64 address; 159 u64 address;
160 u64 value64;
160 acpi_status status; 161 acpi_status status;
161 162
162 ACPI_FUNCTION_NAME(hw_read); 163 ACPI_FUNCTION_NAME(hw_read);
@@ -178,7 +179,9 @@ acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg)
178 */ 179 */
179 if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { 180 if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
180 status = acpi_os_read_memory((acpi_physical_address) 181 status = acpi_os_read_memory((acpi_physical_address)
181 address, value, reg->bit_width); 182 address, &value64, reg->bit_width);
183
184 *value = (u32)value64;
182 } else { /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ 185 } else { /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
183 186
184 status = acpi_hw_read_port((acpi_io_address) 187 status = acpi_hw_read_port((acpi_io_address)
@@ -228,7 +231,8 @@ acpi_status acpi_hw_write(u32 value, struct acpi_generic_address *reg)
228 */ 231 */
229 if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { 232 if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
230 status = acpi_os_write_memory((acpi_physical_address) 233 status = acpi_os_write_memory((acpi_physical_address)
231 address, value, reg->bit_width); 234 address, (u64)value,
235 reg->bit_width);
232 } else { /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ 236 } else { /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
233 237
234 status = acpi_hw_write_port((acpi_io_address) 238 status = acpi_hw_write_port((acpi_io_address)