add support for 2.6.32, dropped the SPI patch for now
[openwrt/staging/florian.git] / target / linux / brcm63xx / patches-2.6.32 / 210-init_gpio_out_low_high_current_value_at_boot.patch
1 To avoid glitch during gpio initialisation, fetch gpio output
2 registers values left by bootloader.
3
4 Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
5 ---
6 arch/mips/bcm63xx/gpio.c | 2 ++
7 1 files changed, 2 insertions(+), 0 deletions(-)
8
9 diff --git a/arch/mips/bcm63xx/gpio.c b/arch/mips/bcm63xx/gpio.c
10 index 3725345..315bc7f 100644
11 --- a/arch/mips/bcm63xx/gpio.c
12 +++ b/arch/mips/bcm63xx/gpio.c
13 @@ -125,6 +125,8 @@ static struct gpio_chip bcm63xx_gpio_chip = {
14
15 int __init bcm63xx_gpio_init(void)
16 {
17 + gpio_out_low = bcm_gpio_readl(GPIO_DATA_LO_REG);
18 + gpio_out_high = bcm_gpio_readl(GPIO_DATA_HI_REG);
19 bcm63xx_gpio_chip.ngpio = bcm63xx_gpio_count();
20 pr_info("registering %d GPIOs\n", bcm63xx_gpio_chip.ngpio);
21
22 --
23 1.6.3.3
24
25