diff options
author | Kapil Porwal <kapilporwal@google.com> | 2022-11-26 02:34:58 +0530 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2022-11-29 19:50:59 +0000 |
commit | 4c2c2c43d0c37765aef73ecd1223f8bea0e7f1fd (patch) | |
tree | 2ccd7b0f68e243e218c9a963279282f40acc0a94 /src/drivers/net | |
parent | 8c56ad116ddf9866ce651a17f036f29e05ae7c97 (diff) |
drivers/net/r8168: Add support for ACPI DmaProperty
BUG=b:259716145
TEST=Verified SSDT on google/osiris.
Before:
Scope (\_SB.PCI0.RP01)
{
Device (RLTK)
{
Name (_HID, "R8168") // _HID: Hardware ID
Name (_UID, 0xD0E889DD) // _UID: Unique ID
Name (_DDN, "Realtek r8168") // _DDN: DOS Device Name
Name (_ADR, 0x00000000) // _ADR: Address
Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake
{
0x07,
0x03
})
}
}
After:
Scope (\_SB.PCI0.RP01)
{
Device (RLTK)
{
Name (_HID, "R8168") // _HID: Hardware ID
Name (_UID, 0xD0E889DD) // _UID: Unique ID
Name (_DDN, "Realtek r8168") // _DDN: DOS Device Name
Name (_ADR, 0x00000000) // _ADR: Address
Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake
{
0x07,
0x03
})
Name (_DSD, Package (0x02) // _DSD: Device-Specific Data
{
ToUUID ("70d24161-6dd5-4c9e-8070-705531292865"),
Package (0x01)
{
Package (0x02)
{
"DmaProperty",
One
}
}
})
}
}
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Change-Id: I647230082362b1093b63793a201eba23a6289121
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70016
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/net')
-rw-r--r-- | src/drivers/net/chip.h | 4 | ||||
-rw-r--r-- | src/drivers/net/r8168.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/net/chip.h b/src/drivers/net/chip.h index f253cae005..203707c436 100644 --- a/src/drivers/net/chip.h +++ b/src/drivers/net/chip.h @@ -34,6 +34,10 @@ struct drivers_net_config { /* Allow kernel driver to enable ASPM L1.2. */ bool enable_aspm_l1_2; + + /* When set to true, this will add a _DSD which contains a single + property, `DmaProperty`, set to 1, under the ACPI Device. */ + bool add_acpi_dma_property; }; #endif /* __DRIVERS_R8168_CHIP_H__ */ diff --git a/src/drivers/net/r8168.c b/src/drivers/net/r8168.c index 32e02759c1..5d19d69519 100644 --- a/src/drivers/net/r8168.c +++ b/src/drivers/net/r8168.c @@ -400,6 +400,9 @@ static void r8168_net_fill_ssdt(const struct device *dev) if (config->wake) acpigen_write_PRW(config->wake, 3); + if (config->add_acpi_dma_property) + acpi_device_add_dma_property(NULL); + acpigen_pop_len(); /* Device */ acpigen_pop_len(); /* Scope */ |