mirror of
https://github.com/acpica/acpica/
synced 2025-02-25 01:44:33 +03:00
Divergences: reduce access size definitions
Linux guys start to define access size values for ACPI_RESOURCE_GENERIC_REGISTER, while it should be better to just define the access_size -> access_bit_width algorithm and deply it for both ACPI_RESOURCE_GENERIC_REGISTER and ACPI_GENERIC_ADDRESS types. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
This commit is contained in:
parent
41e7b3575c
commit
cf27b3c988
@ -228,7 +228,7 @@ AcpiHwGetAccessBitWidth (
|
||||
}
|
||||
else if (Reg->AccessWidth)
|
||||
{
|
||||
AccessBitWidth = (1 << (Reg->AccessWidth + 2));
|
||||
AccessBitWidth = ACPI_ACCESS_BIT_WIDTH (Reg->AccessWidth);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -675,6 +675,13 @@ typedef UINT64 ACPI_INTEGER;
|
||||
#define ACPI_VALIDATE_RSDP_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_SIG_RSDP, 8))
|
||||
#define ACPI_MAKE_RSDP_SIG(dest) (memcpy (ACPI_CAST_PTR (char, (dest)), ACPI_SIG_RSDP, 8))
|
||||
|
||||
/*
|
||||
* Algorithm to obtain access bit width.
|
||||
* Can be used with AccessWidth of ACPI_GENERIC_ADDRESS and AccessSize of
|
||||
* ACPI_RESOURCE_GENERIC_REGISTER.
|
||||
*/
|
||||
#define ACPI_ACCESS_BIT_WIDTH(size) (1 << ((size) + 2))
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user