drivers/interrupt_controller: Fix command write in VT-D
A surprising issue: while sys_set_bit() on VTD_GCMD_REG work on apollo_lake, it seems to create border effect on elkhart_lake: it may reset some previous bit to 0. So switching to full write of the register at once, which works for both. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
98e22425cf
commit
f44062a8e6
1 changed files with 5 additions and 1 deletions
|
@ -68,8 +68,12 @@ static void vtd_send_cmd(const struct device *dev,
|
|||
uint16_t cmd_bit, uint16_t status_bit)
|
||||
{
|
||||
uintptr_t base_address = DEVICE_MMIO_GET(dev);
|
||||
uint32_t value;
|
||||
|
||||
sys_set_bit((base_address + VTD_GCMD_REG), cmd_bit);
|
||||
value = vtd_read_reg32(dev, VTD_GSTS_REG);
|
||||
value |= BIT(cmd_bit);
|
||||
|
||||
vtd_write_reg32(dev, VTD_GCMD_REG, value);
|
||||
|
||||
while (!sys_test_bit((base_address + VTD_GSTS_REG),
|
||||
status_bit)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue