aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86/acpi_device.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2017-02-21 13:16:30 -0800
committerFurquan Shaikh <furquan@google.com>2017-02-22 22:19:19 +0100
commit5b9b593f2f888c81cc0af8eb2fc2173c83562003 (patch)
treefb37a6b896196713305ae305e53c1f42d536f209 /src/arch/x86/acpi_device.c
parenteae492657797636d99f8ebef75f46237bd39b56b (diff)
acpi: Add ACPI_ prefix to IRQ enum and struct names
This is done to avoid any conflicts with same IRQ enums defined by other drivers. BUG=None BRANCH=None TEST=Compiles successfully Change-Id: I539831d853286ca45f6c36c3812a6fa9602df24c Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/18444 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/arch/x86/acpi_device.c')
-rw-r--r--src/arch/x86/acpi_device.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c
index 4fe16a138f..323d4f1eab 100644
--- a/src/arch/x86/acpi_device.c
+++ b/src/arch/x86/acpi_device.c
@@ -181,7 +181,7 @@ void acpi_device_write_interrupt(const struct acpi_irq *irq)
return;
/* This is supported by GpioInt() but not Interrupt() */
- if (irq->polarity == IRQ_ACTIVE_BOTH)
+ if (irq->polarity == ACPI_IRQ_ACTIVE_BOTH)
return;
/* Byte 0: Descriptor Type */
@@ -200,13 +200,13 @@ void acpi_device_write_interrupt(const struct acpi_irq *irq)
* [0]: Resource (0=PRODUCER 1=CONSUMER)
*/
flags = 1 << 0; /* ResourceConsumer */
- if (irq->mode == IRQ_EDGE_TRIGGERED)
+ if (irq->mode == ACPI_IRQ_EDGE_TRIGGERED)
flags |= 1 << 1;
- if (irq->polarity == IRQ_ACTIVE_LOW)
+ if (irq->polarity == ACPI_IRQ_ACTIVE_LOW)
flags |= 1 << 2;
- if (irq->shared == IRQ_SHARED)
+ if (irq->shared == ACPI_IRQ_SHARED)
flags |= 1 << 3;
- if (irq->wake == IRQ_WAKE)
+ if (irq->wake == ACPI_IRQ_WAKE)
flags |= 1 << 4;
acpigen_emit_byte(flags);
@@ -262,21 +262,21 @@ void acpi_device_write_gpio(const struct acpi_gpio *gpio)
* [2:1]: Polarity (0=HIGH 1=LOW 2=BOTH)
* [0]: Mode (0=LEVEL 1=EDGE)
*/
- if (gpio->irq.mode == IRQ_EDGE_TRIGGERED)
+ if (gpio->irq.mode == ACPI_IRQ_EDGE_TRIGGERED)
flags |= 1 << 0;
- if (gpio->irq.shared == IRQ_SHARED)
+ if (gpio->irq.shared == ACPI_IRQ_SHARED)
flags |= 1 << 3;
- if (gpio->irq.wake == IRQ_WAKE)
+ if (gpio->irq.wake == ACPI_IRQ_WAKE)
flags |= 1 << 4;
switch (gpio->irq.polarity) {
- case IRQ_ACTIVE_HIGH:
+ case ACPI_IRQ_ACTIVE_HIGH:
flags |= 0 << 1;
break;
- case IRQ_ACTIVE_LOW:
+ case ACPI_IRQ_ACTIVE_LOW:
flags |= 1 << 1;
break;
- case IRQ_ACTIVE_BOTH:
+ case ACPI_IRQ_ACTIVE_BOTH:
flags |= 2 << 1;
break;
}