提交 9538ca63 编写于 作者: M Maxime Bizon 提交者: Ralf Baechle

MIPS: BCM63xx: Initialize gpio_out_low & out_high to current value at boot.

To avoid a glitch during GPIO initialisation read GPIO output register
values left by the firmware.
Signed-off-by: NMaxime Bizon <mbizon@freebox.fr>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/903/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 e23a90eb
...@@ -125,6 +125,8 @@ static struct gpio_chip bcm63xx_gpio_chip = { ...@@ -125,6 +125,8 @@ static struct gpio_chip bcm63xx_gpio_chip = {
int __init bcm63xx_gpio_init(void) int __init bcm63xx_gpio_init(void)
{ {
gpio_out_low = bcm_gpio_readl(GPIO_DATA_LO_REG);
gpio_out_high = bcm_gpio_readl(GPIO_DATA_HI_REG);
bcm63xx_gpio_chip.ngpio = bcm63xx_gpio_count(); bcm63xx_gpio_chip.ngpio = bcm63xx_gpio_count();
pr_info("registering %d GPIOs\n", bcm63xx_gpio_chip.ngpio); pr_info("registering %d GPIOs\n", bcm63xx_gpio_chip.ngpio);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册