summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/nvidia/tegra/gpio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/nvidia/tegra/gpio.h b/src/soc/nvidia/tegra/gpio.h
index da8a4dad71..2ad3ab3e5f 100644
--- a/src/soc/nvidia/tegra/gpio.h
+++ b/src/soc/nvidia/tegra/gpio.h
@@ -90,7 +90,7 @@ static inline int gpio_index_to_bank(int index)
static inline int gpio_index_to_port(int index)
{
- return (index % GPIO_GPIOS_PER_BANK) / GPIO_PORTS_PER_BANK;
+ return (index % GPIO_GPIOS_PER_BANK) / GPIO_GPIOS_PER_PORT;
}
static inline int gpio_to_bit(int index)