Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen...
[linux-2.6-block.git] / arch / avr32 / boards / atngw100 / setup.c
index f3085208959f13e01162d138dd50fbf496869ab2..65db3d26696566411f76ea5e660d0384a8860b1d 100644 (file)
@@ -9,6 +9,7 @@
  */
 #include <linux/clk.h>
 #include <linux/etherdevice.h>
+#include <linux/gpio.h>
 #include <linux/irq.h>
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
@@ -207,6 +208,15 @@ postcore_initcall(atngw100_init);
 
 static int __init atngw100_arch_init(void)
 {
+       /* PB30 is the otherwise unused jumper on the mainboard, with an
+        * external pullup; the jumper grounds it.  Use it however you
+        * like, including letting U-Boot or Linux tweak boot sequences.
+        */
+       at32_select_gpio(GPIO_PIN_PB(30), 0);
+       gpio_request(GPIO_PIN_PB(30), "j15");
+       gpio_direction_input(GPIO_PIN_PB(30));
+       gpio_export(GPIO_PIN_PB(30), false);
+
        /* set_irq_type() after the arch_initcall for EIC has run, and
         * before the I2C subsystem could try using this IRQ.
         */