aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/hwregs.c
diff options
context:
space:
mode:
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)