Rizwan Qureshi has uploaded this change for review. ( https://review.coreboot.org/21730
Change subject: acpi: [TESTONLY] add debug print to SSDT ......................................................................
acpi: [TESTONLY] add debug print to SSDT
Change-Id: I8e85c41999bd8c93bcc67b17a914cba6ac57ad9e Signed-off-by: Rizwan Qureshi rizwan.qureshi@intel.corp-partner.google.com --- M src/arch/x86/acpi_device.c M src/arch/x86/include/arch/acpi_device.h M src/drivers/i2c/generic/chip.h M src/drivers/i2c/generic/generic.c M src/drivers/spi/acpi/acpi.c M src/drivers/spi/acpi/chip.h M src/mainboard/google/poppy/variants/soraka/devicetree.cb 7 files changed, 13 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/21730/1
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c index 31e59ea..afd95ab 100644 --- a/src/arch/x86/acpi_device.c +++ b/src/arch/x86/acpi_device.c @@ -470,6 +470,7 @@
/* PowerResource() with Enable and/or Reset control */ void acpi_device_add_power_res( + u8 debug, struct acpi_gpio *reset, unsigned int reset_delay_ms, struct acpi_gpio *enable, unsigned int enable_delay_ms, struct acpi_gpio *stop, unsigned int stop_delay_ms) @@ -491,6 +492,8 @@
/* Method (_ON, 0, Serialized) */ acpigen_write_method_serialized("_ON", 0); + if (debug) + acpigen_write_debug_string("ACPI _ON method entry"); if (reset_gpio) acpigen_enable_tx_gpio(reset); if (enable_gpio) { @@ -512,6 +515,8 @@
/* Method (_OFF, 0, Serialized) */ acpigen_write_method_serialized("_OFF", 0); + if (debug) + acpigen_write_debug_string("ACPI _OFF method entry"); if (stop_gpio) acpigen_enable_tx_gpio(stop); if (reset_gpio) diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h index d4d82fc..279a362 100644 --- a/src/arch/x86/include/arch/acpi_device.h +++ b/src/arch/x86/include/arch/acpi_device.h @@ -316,6 +316,7 @@ * Stop - Stop / start operation of device. */ void acpi_device_add_power_res( + u8 debug, struct acpi_gpio *reset, unsigned int reset_delay_ms, struct acpi_gpio *enable, unsigned int enable_delay_ms, struct acpi_gpio *stop, unsigned int stop_delay_ms); diff --git a/src/drivers/i2c/generic/chip.h b/src/drivers/i2c/generic/chip.h index 037a800..acba22e 100644 --- a/src/drivers/i2c/generic/chip.h +++ b/src/drivers/i2c/generic/chip.h @@ -66,6 +66,8 @@ /* Delay to be inserted after disabling stop. */ unsigned stop_delay_ms;
+ u8 power_res_debug; + /* Generic properties for exporting device-specific data to the OS */ struct acpi_dp property_list[MAX_GENERIC_PROPERTY_LIST]; int property_count; diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index 13f8393..9ed74c4 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -144,6 +144,7 @@ /* Power Resource */ if (config->has_power_resource) acpi_device_add_power_res( + config->power_res_debug, &config->reset_gpio, config->reset_delay_ms, &config->enable_gpio, config->enable_delay_ms, &config->stop_gpio, config->stop_delay_ms); diff --git a/src/drivers/spi/acpi/acpi.c b/src/drivers/spi/acpi/acpi.c index d36a03a..fd21ca1 100644 --- a/src/drivers/spi/acpi/acpi.c +++ b/src/drivers/spi/acpi/acpi.c @@ -167,6 +167,7 @@ /* Power Resource */ if (config->has_power_resource) acpi_device_add_power_res( + config->power_res_debug, &config->reset_gpio, config->reset_delay_ms, &config->enable_gpio, config->enable_delay_ms, &config->stop_gpio, config->stop_delay_ms); diff --git a/src/drivers/spi/acpi/chip.h b/src/drivers/spi/acpi/chip.h index 35341d3..a334ca9 100644 --- a/src/drivers/spi/acpi/chip.h +++ b/src/drivers/spi/acpi/chip.h @@ -48,6 +48,8 @@ /* Delay to be inserted after device is enabled. */ unsigned enable_delay_ms;
+ u8 power_res_debug; + /* GPIO used to stop operation of device. */ struct acpi_gpio stop_gpio; /* Delay to be inserted after disabling stop. */ diff --git a/src/mainboard/google/poppy/variants/soraka/devicetree.cb b/src/mainboard/google/poppy/variants/soraka/devicetree.cb index 6d4e8a5..d011924 100644 --- a/src/mainboard/google/poppy/variants/soraka/devicetree.cb +++ b/src/mainboard/google/poppy/variants/soraka/devicetree.cb @@ -288,6 +288,7 @@ register "generic.has_power_resource" = "1" register "generic.disable_gpio_export_in_crs" = "1" register "hid_desc_reg_offset" = "0x1" + register "generic.power_res_debug" = "1" device i2c 0xA on end end end # I2C #0