arch/acpi.h: Convert MADT APIC type names to all caps

Convert names to all capital in enum acpi_apic_types. Use of these names in
corresponding type assign for I/O APIC Structure.

Change-Id: Iab2f6d8f645677734df753f8bf59fde4205ce714
Signed-off-by: Himanshu Sahdev <himanshusah@hcl.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36197
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c
index e28da53..2f793b4 100644
--- a/src/arch/x86/acpi.c
+++ b/src/arch/x86/acpi.c
@@ -127,7 +127,7 @@
 
 int acpi_create_madt_lapic(acpi_madt_lapic_t *lapic, u8 cpu, u8 apic)
 {
-	lapic->type = 0; /* Local APIC structure */
+	lapic->type = LOCAL_APIC; /* Local APIC structure */
 	lapic->length = sizeof(acpi_madt_lapic_t);
 	lapic->flags = (1 << 0); /* Processor/LAPIC enabled */
 	lapic->processor_id = cpu;
@@ -165,7 +165,7 @@
 int acpi_create_madt_ioapic(acpi_madt_ioapic_t *ioapic, u8 id, u32 addr,
 				u32 gsi_base)
 {
-	ioapic->type = 1; /* I/O APIC structure */
+	ioapic->type = IO_APIC; /* I/O APIC structure */
 	ioapic->length = sizeof(acpi_madt_ioapic_t);
 	ioapic->reserved = 0x00;
 	ioapic->gsi_base = gsi_base;
@@ -178,7 +178,7 @@
 int acpi_create_madt_irqoverride(acpi_madt_irqoverride_t *irqoverride,
 		u8 bus, u8 source, u32 gsirq, u16 flags)
 {
-	irqoverride->type = 2; /* Interrupt source override */
+	irqoverride->type = IRQ_SOURCE_OVERRIDE; /* Interrupt source override */
 	irqoverride->length = sizeof(acpi_madt_irqoverride_t);
 	irqoverride->bus = bus;
 	irqoverride->source = source;
@@ -191,7 +191,7 @@
 int acpi_create_madt_lapic_nmi(acpi_madt_lapic_nmi_t *lapic_nmi, u8 cpu,
 				u16 flags, u8 lint)
 {
-	lapic_nmi->type = 4; /* Local APIC NMI structure */
+	lapic_nmi->type = LOCAL_APIC_NMI; /* Local APIC NMI structure */
 	lapic_nmi->length = sizeof(acpi_madt_lapic_nmi_t);
 	lapic_nmi->flags = flags;
 	lapic_nmi->processor_id = cpu;
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index 9d52995..20c244c 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -390,24 +390,23 @@
 } __packed acpi_dmar_t;
 
 /* MADT: APIC Structure Types */
-/* TODO: Convert to ALLCAPS. */
 enum acpi_apic_types {
-	LocalApic		= 0,	/* Processor local APIC */
-	IOApic			= 1,	/* I/O APIC */
-	IRQSourceOverride	= 2,	/* Interrupt source override */
-	NMIType			= 3,	/* NMI source */
-	LocalApicNMI		= 4,	/* Local APIC NMI */
-	LApicAddressOverride	= 5,	/* Local APIC address override */
-	IOSApic			= 6,	/* I/O SAPIC */
-	LocalSApic		= 7,	/* Local SAPIC */
-	PlatformIRQSources	= 8,	/* Platform interrupt sources */
-	Localx2Apic		= 9,	/* Processor local x2APIC */
-	Localx2ApicNMI		= 10,	/* Local x2APIC NMI */
-	GICC			= 11,	/* GIC CPU Interface */
-	GICD			= 12,	/* GIC Distributor */
-	GIC_MSI_FRAME		= 13,	/* GIC MSI Frame */
-	GICR			= 14,	/* GIC Redistributor */
-	GIC_ITS			= 15,	/* Interrupt Translation Service */
+	LOCAL_APIC,			/* Processor local APIC */
+	IO_APIC,			/* I/O APIC */
+	IRQ_SOURCE_OVERRIDE,		/* Interrupt source override */
+	NMI_TYPE,			/* NMI source */
+	LOCAL_APIC_NMI,			/* Local APIC NMI */
+	LAPIC_ADDRESS_OVERRIDE,		/* Local APIC address override */
+	IO_SAPIC,			/* I/O SAPIC */
+	LOCAL_SAPIC,			/* Local SAPIC */
+	PLATFORM_IRQ_SOURCES,		/* Platform interrupt sources */
+	LOCAL_X2APIC,			/* Processor local x2APIC */
+	LOCAL_X2APIC_NMI,		/* Local x2APIC NMI */
+	GICC,				/* GIC CPU Interface */
+	GICD,				/* GIC Distributor */
+	GIC_MSI_FRAME,			/* GIC MSI Frame */
+	GICR,				/* GIC Redistributor */
+	GIC_ITS,			/* Interrupt Translation Service */
 	/* 0x10-0x7f: Reserved */
 	/* 0x80-0xff: Reserved for OEM use */
 };