soc/amd/common/block/acpi/gpio: add warning for remote GPIO usage
Right now the ACPI code doesn't support accessing the remote GPIO block yet, so don't generate invalid remote GPIO access functions and warn about those being unsupported. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Id364a59c9650bf4e3633b494b01ab23c0bbc50b2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56817 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
This commit is contained in:
parent
b4fe8c5948
commit
7110235902
|
@ -11,6 +11,12 @@ static int acpigen_soc_gpio_op(const char *op, unsigned int gpio_num)
|
|||
" %d\n", gpio_num, SOC_GPIO_TOTAL_PINS);
|
||||
return -1;
|
||||
}
|
||||
if (SOC_GPIO_TOTAL_PINS >= AMD_GPIO_FIRST_REMOTE_GPIO_NUMBER &&
|
||||
gpio_num >= SOC_GPIO_TOTAL_PINS) {
|
||||
printk(BIOS_WARNING, "Warning: Pin %d is a remote GPIO which isn't supported"
|
||||
" yet.\n", gpio_num);
|
||||
return -1;
|
||||
}
|
||||
/* op (gpio_num) */
|
||||
acpigen_emit_namestring(op);
|
||||
acpigen_write_integer(gpio_num);
|
||||
|
@ -24,6 +30,12 @@ static int acpigen_soc_get_gpio_state(const char *op, unsigned int gpio_num)
|
|||
" %d\n", gpio_num, SOC_GPIO_TOTAL_PINS);
|
||||
return -1;
|
||||
}
|
||||
if (SOC_GPIO_TOTAL_PINS >= AMD_GPIO_FIRST_REMOTE_GPIO_NUMBER &&
|
||||
gpio_num >= SOC_GPIO_TOTAL_PINS) {
|
||||
printk(BIOS_WARNING, "Warning: Pin %d is a remote GPIO which isn't supported"
|
||||
" yet.\n", gpio_num);
|
||||
return -1;
|
||||
}
|
||||
/* Store (op (gpio_num), Local0) */
|
||||
acpigen_write_store();
|
||||
acpigen_soc_gpio_op(op, gpio_num);
|
||||
|
|
Loading…
Reference in New Issue