From: Maxime Bizon Date: Sat, 30 Jan 2010 17:34:58 +0000 (+0100) Subject: MIPS: BCM63xx: Initialize gpio_out_low & out_high to current value at boot. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9538ca636f2fa28ae1514327328e2869f0215981;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Maxime Bizon To: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/903/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/bcm63xx/gpio.c b/arch/mips/bcm63xx/gpio.c index 37253452d396..315bc7f79ce1 100644 --- a/arch/mips/bcm63xx/gpio.c +++ b/arch/mips/bcm63xx/gpio.c @@ -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);