Skip to content
Snippets Groups Projects
Commit fba3fb04 authored by Benoît Monin's avatar Benoît Monin Committed by Stefan Roese
Browse files

[PATCH] fix gpio setting when using CFG_440_GPIO_TABLE


Set the correct value in GPIOx_TCR when configuring the gpio
with CFG_440_GPIO_TABLE.

Signed-off-by: default avatarBenoit Monin <bmonin@adeneo.eu>
Signed-off-by: default avatarStefan Roese <sr@denx.de>
parent 725671cc
No related branches found
No related tags found
No related merge requests found
...@@ -157,12 +157,12 @@ void gpio_set_chip_configuration(void) ...@@ -157,12 +157,12 @@ void gpio_set_chip_configuration(void)
switch (gpio_tab[gpio_core][i].alt_nb) { switch (gpio_tab[gpio_core][i].alt_nb) {
case GPIO_SEL: case GPIO_SEL:
if (gpio_core == GPIO0) { if (gpio_core == GPIO0) {
reg = in32(GPIO0_TCR) | (0x80000000 >> (j)); reg = in32(GPIO0_TCR) | (0x80000000 >> (i));
out32(GPIO0_TCR, reg); out32(GPIO0_TCR, reg);
} }
if (gpio_core == GPIO1) { if (gpio_core == GPIO1) {
reg = in32(GPIO1_TCR) | (0x80000000 >> (j)); reg = in32(GPIO1_TCR) | (0x80000000 >> (i));
out32(GPIO1_TCR, reg); out32(GPIO1_TCR, reg);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment