Lines Matching +full:reg +full:- +full:names

4  * Module Name: hwregs - Read/write access functions for the various ACPI
10 * Copyright (C) 2000 - 2012, Intel Corp.
24 * 3. Neither the names of the above-listed copyright holders nor the names
69 * PARAMETERS: Reg - GAS register structure
70 * max_bit_width - Max bit_width supported (32 or 64)
71 * Address - Pointer to where the gas->address
82 acpi_hw_validate_register(struct acpi_generic_address *reg, in acpi_hw_validate_register() argument
88 if (!reg) { in acpi_hw_validate_register()
97 ACPI_MOVE_64_TO_64(address, &reg->address); in acpi_hw_validate_register()
104 if ((reg->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) && in acpi_hw_validate_register()
105 (reg->space_id != ACPI_ADR_SPACE_SYSTEM_IO)) { in acpi_hw_validate_register()
107 "Unsupported address space: 0x%X", reg->space_id)); in acpi_hw_validate_register()
113 if ((reg->bit_width != 8) && in acpi_hw_validate_register()
114 (reg->bit_width != 16) && in acpi_hw_validate_register()
115 (reg->bit_width != 32) && (reg->bit_width != max_bit_width)) { in acpi_hw_validate_register()
118 reg->bit_width)); in acpi_hw_validate_register()
124 if (reg->bit_offset != 0) { in acpi_hw_validate_register()
127 reg->bit_offset)); in acpi_hw_validate_register()
137 * PARAMETERS: Value - Where the value is returned
138 * Reg - GAS register structure
142 * DESCRIPTION: Read from either memory or IO space. This is a 32-bit max
144 * 64-bit values is not needed.
154 acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg) in acpi_hw_read() argument
163 status = acpi_hw_validate_register(reg, 32, &address); in acpi_hw_read()
168 /* Initialize entire 32-bit return value to zero */ in acpi_hw_read()
176 if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { in acpi_hw_read()
178 address, value, reg->bit_width); in acpi_hw_read()
182 address, value, reg->bit_width); in acpi_hw_read()
187 *value, reg->bit_width, ACPI_FORMAT_UINT64(address), in acpi_hw_read()
188 acpi_ut_get_region_name(reg->space_id))); in acpi_hw_read()
197 * PARAMETERS: Value - Value to be written
198 * Reg - GAS register structure
202 * DESCRIPTION: Write to either memory or IO space. This is a 32-bit max
204 * 64-bit values is not needed.
208 acpi_status acpi_hw_write(u32 value, struct acpi_generic_address *reg) in acpi_hw_write() argument
217 status = acpi_hw_validate_register(reg, 32, &address); in acpi_hw_write()
226 if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { in acpi_hw_write()
228 address, value, reg->bit_width); in acpi_hw_write()
232 address, value, reg->bit_width); in acpi_hw_write()
237 value, reg->bit_width, ACPI_FORMAT_UINT64(address), in acpi_hw_write()
238 acpi_ut_get_region_name(reg->space_id))); in acpi_hw_write()
290 * PARAMETERS: register_id - Index of ACPI Register to access
315 * PARAMETERS: pm1a_control - Value to be written to PM1A control
316 * pm1b_control - Value to be written to PM1B control
352 * PARAMETERS: register_id - ACPI Register ID
353 * return_value - Where the register value is returned
369 case ACPI_REGISTER_PM1_STATUS: /* PM1 A/B: 16-bit access each */ in acpi_hw_register_read()
376 case ACPI_REGISTER_PM1_ENABLE: /* PM1 A/B: 16-bit access each */ in acpi_hw_register_read()
383 case ACPI_REGISTER_PM1_CONTROL: /* PM1 A/B: 16-bit access each */ in acpi_hw_register_read()
392 * Zero the write-only bits. From the ACPI specification, "Hardware in acpi_hw_register_read()
393 * Write-Only Bits": "Upon reads to registers with write-only bits, in acpi_hw_register_read()
394 * software masks out all write-only bits." in acpi_hw_register_read()
399 case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ in acpi_hw_register_read()
405 case ACPI_REGISTER_PM_TIMER: /* 32-bit access */ in acpi_hw_register_read()
410 case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */ in acpi_hw_register_read()
433 * PARAMETERS: register_id - ACPI Register ID
434 * Value - The value to write
463 case ACPI_REGISTER_PM1_STATUS: /* PM1 A/B: 16-bit access each */ in acpi_hw_register_write()
481 case ACPI_REGISTER_PM1_ENABLE: /* PM1 A/B: 16-bit access */ in acpi_hw_register_write()
488 case ACPI_REGISTER_PM1_CONTROL: /* PM1 A/B: 16-bit access each */ in acpi_hw_register_write()
517 case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ in acpi_hw_register_write()
539 case ACPI_REGISTER_PM_TIMER: /* 32-bit access */ in acpi_hw_register_write()
544 case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */ in acpi_hw_register_write()
566 * PARAMETERS: Value - Where the register value is returned
567 * register_a - First ACPI register (required)
568 * register_b - Second ACPI register (optional)
572 * DESCRIPTION: Read from the specified two-part ACPI register (such as PM1 A/B)
594 if (register_b->address) { in acpi_hw_read_multiple()
619 * PARAMETERS: Value - The value to write
620 * register_a - First ACPI register (required)
621 * register_b - Second ACPI register (optional)
625 * DESCRIPTION: Write to the specified two-part ACPI register (such as PM1 A/B)
655 if (register_b->address) { in acpi_hw_write_multiple()