| .. | .. |
|---|
| 3 | 3 | * |
|---|
| 4 | 4 | * Module Name: hwvalid - I/O request validation |
|---|
| 5 | 5 | * |
|---|
| 6 | | - * Copyright (C) 2000 - 2018, Intel Corp. |
|---|
| 6 | + * Copyright (C) 2000 - 2020, Intel Corp. |
|---|
| 7 | 7 | * |
|---|
| 8 | 8 | *****************************************************************************/ |
|---|
| 9 | 9 | |
|---|
| .. | .. |
|---|
| 292 | 292 | |
|---|
| 293 | 293 | return (AE_OK); |
|---|
| 294 | 294 | } |
|---|
| 295 | + |
|---|
| 296 | +/****************************************************************************** |
|---|
| 297 | + * |
|---|
| 298 | + * FUNCTION: acpi_hw_validate_io_block |
|---|
| 299 | + * |
|---|
| 300 | + * PARAMETERS: Address Address of I/O port/register blobk |
|---|
| 301 | + * bit_width Number of bits (8,16,32) in each register |
|---|
| 302 | + * count Number of registers in the block |
|---|
| 303 | + * |
|---|
| 304 | + * RETURN: Status |
|---|
| 305 | + * |
|---|
| 306 | + * DESCRIPTION: Validates a block of I/O ports/registers. |
|---|
| 307 | + * |
|---|
| 308 | + ******************************************************************************/ |
|---|
| 309 | + |
|---|
| 310 | +acpi_status acpi_hw_validate_io_block(u64 address, u32 bit_width, u32 count) |
|---|
| 311 | +{ |
|---|
| 312 | + acpi_status status; |
|---|
| 313 | + |
|---|
| 314 | + while (count--) { |
|---|
| 315 | + status = acpi_hw_validate_io_request((acpi_io_address)address, |
|---|
| 316 | + bit_width); |
|---|
| 317 | + if (ACPI_FAILURE(status)) |
|---|
| 318 | + return_ACPI_STATUS(status); |
|---|
| 319 | + |
|---|
| 320 | + address += ACPI_DIV_8(bit_width); |
|---|
| 321 | + } |
|---|
| 322 | + |
|---|
| 323 | + return_ACPI_STATUS(AE_OK); |
|---|
| 324 | +} |
|---|