Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion drivers/soundwire/dmi-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ struct adr_remap {
u64 remapped_adr;
};

static const struct adr_remap global_ghost_adr[] = {
{
0x000000D010010500ull,
0x0000000000000000ull
},
{}
};

/*
* Some TigerLake devices based on an initial Intel BIOS do not expose
* the correct _ADR in the DSDT.
Expand Down Expand Up @@ -170,6 +178,7 @@ static const struct dmi_system_id adr_remap_quirk_table[] = {
u64 sdw_dmi_override_adr(struct sdw_bus *bus, u64 addr)
{
const struct dmi_system_id *dmi_id;
int i;

/* check if any address remap quirk applies */
dmi_id = dmi_first_match(adr_remap_quirk_table);
Expand All @@ -181,10 +190,20 @@ u64 sdw_dmi_override_adr(struct sdw_bus *bus, u64 addr)
dev_dbg(bus->dev, "remapped _ADR 0x%llx as 0x%llx\n",
addr, map->remapped_adr);
addr = map->remapped_adr;
break;
goto out;
}
}
}

/* remap the ghost ADRs */
for (i = 0; i < ARRAY_SIZE(global_ghost_adr); i++) {
if (global_ghost_adr[i].adr == addr) {
dev_dbg(bus->dev, "remapped _ADR 0x%llx as 0x%llx\n",
addr, global_ghost_adr[i].remapped_adr);
addr = global_ghost_adr[i].remapped_adr;
break;
}
}
out:
return addr;
}
Loading