drivers/uart/acpi: Drop 'disable_gpio_export_in_crs' flag
Exposing the GPIOs via an ACPI PowerResource and the _CRS results in the OS driver and ACPI thinking they own the GPIO. This can cause timing problems because it's not clear which system should be controlling the GPIO. There's no reason to require explicit disablement however, so drop the superfluous 'disable' flag, and change the _CRS generation to check if the GPIOs will be exported via the 'has_power_resource' flag instead. This mirrors the change made for drivers/i2c/generic. TEST=untested, as no boards selected this option. Change-Id: Icb60502a4a7c5e7a1fcf1ee60e23c77e00d6de7b Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71851 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
ce7b252c4f
commit
cf440b6530
|
@ -11,10 +11,10 @@ static bool uart_acpi_add_gpios_to_crs(struct drivers_uart_acpi_config *config)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Return false if:
|
* Return false if:
|
||||||
* 1. Request to explicitly disable export of GPIOs in CRS, or
|
* 1. GPIOs are exported via a power resource, or
|
||||||
* 2. Both reset and enable GPIOs are not provided.
|
* 2. Both reset and enable GPIOs are not provided.
|
||||||
*/
|
*/
|
||||||
if (config->disable_gpio_export_in_crs ||
|
if (config->has_power_resource ||
|
||||||
((config->reset_gpio.pin_count == 0) &&
|
((config->reset_gpio.pin_count == 0) &&
|
||||||
(config->enable_gpio.pin_count == 0)))
|
(config->enable_gpio.pin_count == 0)))
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -17,9 +17,6 @@ struct drivers_uart_acpi_config {
|
||||||
struct acpi_gpio irq_gpio; /* GPIO to be used instead of PIRQ */
|
struct acpi_gpio irq_gpio; /* GPIO to be used instead of PIRQ */
|
||||||
struct acpi_uart uart; /* UART device information */
|
struct acpi_uart uart; /* UART device information */
|
||||||
|
|
||||||
/* Disable reset and enable GPIO export in _CRS */
|
|
||||||
bool disable_gpio_export_in_crs;
|
|
||||||
|
|
||||||
/* Does the device have a power resource? */
|
/* Does the device have a power resource? */
|
||||||
bool has_power_resource;
|
bool has_power_resource;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue