Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9538ca63 authored by Maxime Bizon's avatar Maxime Bizon Committed by Ralf Baechle
Browse files

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: default avatarMaxime Bizon <mbizon@freebox.fr>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/903/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent e23a90eb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -125,6 +125,8 @@ static struct gpio_chip bcm63xx_gpio_chip = {

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();
	pr_info("registering %d GPIOs\n", bcm63xx_gpio_chip.ngpio);