Skip to content
Commit 5ac676ad authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Ralf Baechle
Browse files

MIPS: TXx9: tx49xx: Move GPIO setup from .mem_setup() to .arch_init()



txx9_gpio_init() calls gpiochip_add_data(), which fails with -ENOMEM as
it is called too early in the boot process. This causes all subsequent
GPIO operations to fail silently (before commit 54d77198 ("gpio:
bail out silently on NULL descriptors") it printed the error message
"gpiod_direction_output_raw: invalid GPIO" on RBTX49[23]7).

Postpone all GPIO setup to .arch_init() time to fix this.

Suggested-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Cc: linux-mips@linux-mips.org
Cc: linux-gpio@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14237/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 561eca49
Loading
Loading
Loading
Loading
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