summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-2.6.33/210-init_gpio_out_low_high_current_value_at_boot.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2010-02-28 21:24:34 +0000
committerFlorian Fainelli <florian@openwrt.org>2010-02-28 21:24:34 +0000
commit4f4066d3e057567c0f78a3069ef967fd787ac94a (patch)
tree4ea6a7d116f34e4ea56f5a234060d3c59bd0dd8e /target/linux/brcm63xx/patches-2.6.33/210-init_gpio_out_low_high_current_value_at_boot.patch
parent9fc22cd0328f840ea4e8e85cc5b86aa3eb8c0423 (diff)
downloadmaster-31e0f0ae-4f4066d3e057567c0f78a3069ef967fd787ac94a.tar.gz
master-31e0f0ae-4f4066d3e057567c0f78a3069ef967fd787ac94a.tar.bz2
master-31e0f0ae-4f4066d3e057567c0f78a3069ef967fd787ac94a.zip
add support for 2.6.33
SVN-Revision: 19921
Diffstat (limited to 'target/linux/brcm63xx/patches-2.6.33/210-init_gpio_out_low_high_current_value_at_boot.patch')
-rw-r--r--target/linux/brcm63xx/patches-2.6.33/210-init_gpio_out_low_high_current_value_at_boot.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-2.6.33/210-init_gpio_out_low_high_current_value_at_boot.patch b/target/linux/brcm63xx/patches-2.6.33/210-init_gpio_out_low_high_current_value_at_boot.patch
new file mode 100644
index 0000000000..902840b39b
--- /dev/null
+++ b/target/linux/brcm63xx/patches-2.6.33/210-init_gpio_out_low_high_current_value_at_boot.patch
@@ -0,0 +1,19 @@
+To avoid glitch during gpio initialisation, fetch gpio output
+registers values left by bootloader.
+
+Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
+---
+ arch/mips/bcm63xx/gpio.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+--- a/arch/mips/bcm63xx/gpio.c
++++ b/arch/mips/bcm63xx/gpio.c
+@@ -125,6 +125,8 @@ static struct gpio_chip bcm63xx_gpio_chi
+
+ 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);
+