summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Bizon <mbizon@freebox.fr>2010-01-30 17:34:58 (GMT)
committerRalf Baechle <ralf@linux-mips.org>2010-04-12 16:26:19 (GMT)
commit9538ca636f2fa28ae1514327328e2869f0215981 (patch)
tree61e0c7a208cf9519e887d415d0832038be03f94f
parente23a90eb736b18c16fd6d59e8c1fa6a16ac3bc0b (diff)
downloadlinux-9538ca636f2fa28ae1514327328e2869f0215981.tar.xz
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 <mbizon@freebox.fr> To: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/903/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/bcm63xx/gpio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/bcm63xx/gpio.c b/arch/mips/bcm63xx/gpio.c
index 3725345..315bc7f 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);