Skip to content

Commit 83ea091

Browse files
committed
soundwire: dmi-quirks: add a global ghost list
Not like other ghost devices, the 0x000000D010010500 ADR doesn't belong to any codec. We should disable it in all devices. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent d214d29 commit 83ea091

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

drivers/soundwire/dmi-quirks.c

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ struct adr_remap {
1515
u64 remapped_adr;
1616
};
1717

18+
static const struct adr_remap global_ghost_adr[] = {
19+
{
20+
0x000000D010010500ull,
21+
0x0000000000000000ull
22+
},
23+
{}
24+
};
25+
1826
/*
1927
* Some TigerLake devices based on an initial Intel BIOS do not expose
2028
* the correct _ADR in the DSDT.
@@ -205,6 +213,7 @@ static const struct dmi_system_id adr_remap_quirk_table[] = {
205213
u64 sdw_dmi_override_adr(struct sdw_bus *bus, u64 addr)
206214
{
207215
const struct dmi_system_id *dmi_id;
216+
int i;
208217

209218
/* check if any address remap quirk applies */
210219
dmi_id = dmi_first_match(adr_remap_quirk_table);
@@ -216,10 +225,20 @@ u64 sdw_dmi_override_adr(struct sdw_bus *bus, u64 addr)
216225
dev_dbg(bus->dev, "remapped _ADR 0x%llx as 0x%llx\n",
217226
addr, map->remapped_adr);
218227
addr = map->remapped_adr;
219-
break;
228+
goto out;
220229
}
221230
}
222231
}
223232

233+
/* remap the ghost ADRs */
234+
for (i = 0; i < ARRAY_SIZE(global_ghost_adr); i++) {
235+
if (global_ghost_adr[i].adr == addr) {
236+
dev_dbg(bus->dev, "remapped _ADR 0x%llx as 0x%llx\n",
237+
addr, global_ghost_adr[i].remapped_adr);
238+
addr = global_ghost_adr[i].remapped_adr;
239+
break;
240+
}
241+
}
242+
out:
224243
return addr;
225244
}

0 commit comments

Comments
 (0)