Add debugging and _PR3 linkage for RTD3 driver
Change-Id: I243e0d8a65f682b1a68af68fa911c8fb8e000cb0
This commit is contained in:
@@ -80,6 +80,8 @@ pcie_rtd3_acpi_method_on(unsigned int pcie_rp,
|
|||||||
{
|
{
|
||||||
acpigen_write_method_serialized("_ON", 0);
|
acpigen_write_method_serialized("_ON", 0);
|
||||||
|
|
||||||
|
acpigen_write_debug_string("PCIe RTD3 _ON");
|
||||||
|
|
||||||
/* Assert enable GPIO to turn on device power. */
|
/* Assert enable GPIO to turn on device power. */
|
||||||
if (config->enable_gpio.pin_count) {
|
if (config->enable_gpio.pin_count) {
|
||||||
acpigen_enable_tx_gpio(&config->enable_gpio);
|
acpigen_enable_tx_gpio(&config->enable_gpio);
|
||||||
@@ -111,6 +113,8 @@ pcie_rtd3_acpi_method_off(int pcie_rp,
|
|||||||
{
|
{
|
||||||
acpigen_write_method_serialized("_OFF", 0);
|
acpigen_write_method_serialized("_OFF", 0);
|
||||||
|
|
||||||
|
acpigen_write_debug_string("PCIe RTD3 _OFF");
|
||||||
|
|
||||||
/* Trigger L23 ready entry flow unless disabled by config. */
|
/* Trigger L23 ready entry flow unless disabled by config. */
|
||||||
if (!config->disable_l23)
|
if (!config->disable_l23)
|
||||||
pcie_rtd3_acpi_l23_entry();
|
pcie_rtd3_acpi_l23_entry();
|
||||||
@@ -169,7 +173,7 @@ pcie_rtd3_acpi_method_status(int pcie_rp,
|
|||||||
static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev)
|
static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev)
|
||||||
{
|
{
|
||||||
const struct soc_intel_common_block_pcie_rtd3_config *config = config_of(dev);
|
const struct soc_intel_common_block_pcie_rtd3_config *config = config_of(dev);
|
||||||
static const char *const power_res_states[] = {"_PR0"};
|
static const char *const power_res_states[] = {"_PR0", "_PR3"};
|
||||||
const struct device *parent = dev->bus->dev;
|
const struct device *parent = dev->bus->dev;
|
||||||
const char *scope = acpi_device_path(parent);
|
const char *scope = acpi_device_path(parent);
|
||||||
const struct opregion opregion = OPREGION("PXCS", PCI_CONFIG, 0, 0xff);
|
const struct opregion opregion = OPREGION("PXCS", PCI_CONFIG, 0, 0xff);
|
||||||
@@ -216,8 +220,8 @@ static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev)
|
|||||||
/* Port number is 1-based, PMC IPC method expects 0-based. */
|
/* Port number is 1-based, PMC IPC method expects 0-based. */
|
||||||
pcie_rp--;
|
pcie_rp--;
|
||||||
|
|
||||||
printk(BIOS_INFO, "%s: Enable RTD3 for %s (%s)\n", scope, dev_path(parent),
|
printk(BIOS_INFO, "%s: Enable RTD3 for %s (%s) on RP #%d\n", scope, dev_path(parent),
|
||||||
config->desc ?: dev->chip_ops->name);
|
config->desc ?: dev->chip_ops->name, pcie_rp + 1);
|
||||||
|
|
||||||
/* The RTD3 power resource is added to the root port, not the device. */
|
/* The RTD3 power resource is added to the root port, not the device. */
|
||||||
acpigen_write_scope(scope);
|
acpigen_write_scope(scope);
|
||||||
|
Reference in New Issue
Block a user