summaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r--src/soc/amd/common/block/acpi/gpio.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/acpi/gpio.c b/src/soc/amd/common/block/acpi/gpio.c
index 15ee292e7d..b5167b8743 100644
--- a/src/soc/amd/common/block/acpi/gpio.c
+++ b/src/soc/amd/common/block/acpi/gpio.c
@@ -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);