Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18d508bf authored by Len Brown's avatar Len Brown
Browse files

Pull sci into test branch

parents 384bc8f0 281ea49b
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -332,7 +332,7 @@ acpi_parse_ioapic(acpi_table_entry_header * header, const unsigned long end)
/*
/*
 * Parse Interrupt Source Override for the ACPI SCI
 * Parse Interrupt Source Override for the ACPI SCI
 */
 */
static void acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
static void acpi_sci_ioapic_setup(u32 bus_irq, u32 gsi, u16 polarity, u16 trigger)
{
{
	if (trigger == 0)	/* compatible SCI trigger is level */
	if (trigger == 0)	/* compatible SCI trigger is level */
		trigger = 3;
		trigger = 3;
@@ -352,13 +352,13 @@ static void acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
	 * If GSI is < 16, this will update its flags,
	 * If GSI is < 16, this will update its flags,
	 * else it will create a new mp_irqs[] entry.
	 * else it will create a new mp_irqs[] entry.
	 */
	 */
	mp_override_legacy_irq(gsi, polarity, trigger, gsi);
	mp_override_legacy_irq(bus_irq, polarity, trigger, gsi);


	/*
	/*
	 * stash over-ride to indicate we've been here
	 * stash over-ride to indicate we've been here
	 * and for later update of acpi_fadt
	 * and for later update of acpi_fadt
	 */
	 */
	acpi_sci_override_gsi = gsi;
	acpi_sci_override_gsi = bus_irq;
	return;
	return;
}
}


@@ -376,7 +376,7 @@ acpi_parse_int_src_ovr(acpi_table_entry_header * header,
	acpi_table_print_madt_entry(header);
	acpi_table_print_madt_entry(header);


	if (intsrc->bus_irq == acpi_fadt.sci_int) {
	if (intsrc->bus_irq == acpi_fadt.sci_int) {
		acpi_sci_ioapic_setup(intsrc->global_irq,
		acpi_sci_ioapic_setup(intsrc->bus_irq, intsrc->global_irq,
				      intsrc->flags.polarity,
				      intsrc->flags.polarity,
				      intsrc->flags.trigger);
				      intsrc->flags.trigger);
		return 0;
		return 0;
@@ -879,7 +879,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
	 * pretend we got one so we can set the SCI flags.
	 * pretend we got one so we can set the SCI flags.
	 */
	 */
	if (!acpi_sci_override_gsi)
	if (!acpi_sci_override_gsi)
		acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0);
		acpi_sci_ioapic_setup(acpi_fadt.sci_int, acpi_fadt.sci_int, 0, 0);


	/* Fill in identity legacy mapings where no override */
	/* Fill in identity legacy mapings where no override */
	mp_config_acpi_legacy_irqs();
	mp_config_acpi_legacy_irqs();