acpi, arch/x86/smp/mpspec,soc/amd/common: Move MP_IRQ_ flags into acpi.h
The MP_IRQ flags can be used in the MP table and the ACPI MADT table. Move them into acpi.h to avoid pulling in the full mpspec.h which is only available on x86. BUG=b:218874489, b:160595155 TEST=Build Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I4f1091b7629a6446fa399720b0270556a926401a Reviewed-on: https://review.coreboot.org/c/coreboot/+/63845 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
		
				
					committed by
					
						
						Felix Held
					
				
			
			
				
	
			
			
			
						parent
						
							bae8498486
						
					
				
				
					commit
					169302aa7f
				
			@@ -3,6 +3,7 @@
 | 
				
			|||||||
#ifndef __ASM_MPSPEC_H
 | 
					#ifndef __ASM_MPSPEC_H
 | 
				
			||||||
#define __ASM_MPSPEC_H
 | 
					#define __ASM_MPSPEC_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <acpi/acpi.h>
 | 
				
			||||||
#include <device/device.h>
 | 
					#include <device/device.h>
 | 
				
			||||||
#include <cpu/x86/lapic_def.h>
 | 
					#include <cpu/x86/lapic_def.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -120,15 +121,6 @@ enum mp_irq_source_types {
 | 
				
			|||||||
	mp_ExtINT = 3
 | 
						mp_ExtINT = 3
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define MP_IRQ_POLARITY_DEFAULT	0x0
 | 
					 | 
				
			||||||
#define MP_IRQ_POLARITY_HIGH	0x1
 | 
					 | 
				
			||||||
#define MP_IRQ_POLARITY_LOW	0x3
 | 
					 | 
				
			||||||
#define MP_IRQ_POLARITY_MASK    0x3
 | 
					 | 
				
			||||||
#define MP_IRQ_TRIGGER_DEFAULT	0x0
 | 
					 | 
				
			||||||
#define MP_IRQ_TRIGGER_EDGE	0x4
 | 
					 | 
				
			||||||
#define MP_IRQ_TRIGGER_LEVEL	0xc
 | 
					 | 
				
			||||||
#define MP_IRQ_TRIGGER_MASK     0xc
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct mpc_config_lintsrc {
 | 
					struct mpc_config_lintsrc {
 | 
				
			||||||
	u8 mpc_type;
 | 
						u8 mpc_type;
 | 
				
			||||||
	u8 mpc_irqtype;
 | 
						u8 mpc_irqtype;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -636,6 +636,15 @@ typedef struct acpi_madt_ioapic {
 | 
				
			|||||||
	u32 gsi_base;			/* Global system interrupt base */
 | 
						u32 gsi_base;			/* Global system interrupt base */
 | 
				
			||||||
} __packed acpi_madt_ioapic_t;
 | 
					} __packed acpi_madt_ioapic_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define MP_IRQ_POLARITY_DEFAULT		0x0
 | 
				
			||||||
 | 
					#define MP_IRQ_POLARITY_HIGH		0x1
 | 
				
			||||||
 | 
					#define MP_IRQ_POLARITY_LOW		0x3
 | 
				
			||||||
 | 
					#define MP_IRQ_POLARITY_MASK		0x3
 | 
				
			||||||
 | 
					#define MP_IRQ_TRIGGER_DEFAULT		0x0
 | 
				
			||||||
 | 
					#define MP_IRQ_TRIGGER_EDGE		0x4
 | 
				
			||||||
 | 
					#define MP_IRQ_TRIGGER_LEVEL		0xc
 | 
				
			||||||
 | 
					#define MP_IRQ_TRIGGER_MASK		0xc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* MADT: Interrupt Source Override Structure */
 | 
					/* MADT: Interrupt Source Override Structure */
 | 
				
			||||||
typedef struct acpi_madt_irqoverride {
 | 
					typedef struct acpi_madt_irqoverride {
 | 
				
			||||||
	u8 type;			/* Type (2) */
 | 
						u8 type;			/* Type (2) */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -34,7 +34,7 @@ struct soc_amd_common_config {
 | 
				
			|||||||
	 */
 | 
						 */
 | 
				
			||||||
	struct {
 | 
						struct {
 | 
				
			||||||
		uint8_t irq;
 | 
							uint8_t irq;
 | 
				
			||||||
		/* See MP_IRQ_* from mpspec.h */
 | 
							/* See MP_IRQ_* from acpi.h */
 | 
				
			||||||
		uint8_t flags;
 | 
							uint8_t flags;
 | 
				
			||||||
	} irq_override[16];
 | 
						} irq_override[16];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user