-diff -urN linux-2.6.21.5.old/arch/arm/mach-at91/board-vlink.c linux-2.6.21.5/arch/arm/mach-at91/board-vlink.c\r
---- linux-2.6.21.5.old/arch/arm/mach-at91/board-vlink.c 2007-07-26 12:43:11.000000000 +0200\r
-+++ linux-2.6.21.5/arch/arm/mach-at91/board-vlink.c 2007-08-20 16:56:56.000000000 +0200\r
-@@ -151,31 +151,37 @@\r
- // at91_gpio_leds(vlink_leds, ARRAY_SIZE(vlink_leds));\r
- \r
- /* Other LED's */\r
-- at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1\r
-- at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1\r
-- at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1\r
-- at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1\r
-- at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2\r
-- at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2\r
-+ at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1\r
-+ at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1\r
-+ at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1\r
-+ at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1\r
-+ at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2\r
-+ at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2\r
-+\r
-+/* Test jig presence detection */\r
-+ at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT\r
- \r
- /* SIM Cards */\r
-- at91_set_gpio_output(AT91_PIN_PB9, 1); // ENBSC3\r
-- at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2\r
-- at91_set_gpio_output(AT91_PIN_PB11, 1); // ENBSC1\r
-+ if (at91_get_gpio_value(AT91_PIN_PB8)) {\r
-+ at91_set_gpio_output(AT91_PIN_PB11, 0);\r
-+ at91_set_gpio_output(AT91_PIN_PB9, 1);\r
-+ } else {\r
-+ at91_set_gpio_output(AT91_PIN_PB11, 1);\r
-+ at91_set_gpio_output(AT91_PIN_PB9, 0);\r
-+ }\r
-+ \r
-+ at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2\r
- \r
- /* GSM Module Control */\r
-- at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF\r
--\r
--/* Test jig presence detection */\r
-- at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT\r
-+ at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF\r
- \r
- /* Power indicator */\r
-- at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND\r
-+ at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND\r
- \r
- /* USB Device control */\r
-- at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX\r
-- at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP\r
-- at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive\r
-+ at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX\r
-+ at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP\r
-+ at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive\r
- \r
- }\r
- \r
+Index: linux-2.6.21.7/arch/arm/mach-at91/board-vlink.c
+===================================================================
+--- linux-2.6.21.7.orig/arch/arm/mach-at91/board-vlink.c
++++ linux-2.6.21.7/arch/arm/mach-at91/board-vlink.c
+@@ -150,32 +150,38 @@ static void __init vlink_board_init(void
+ /* LEDs */
+ // at91_gpio_leds(vlink_leds, ARRAY_SIZE(vlink_leds));
+
+-/* Other LED's */
+- at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1
+- at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1
+- at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1
+- at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1
+- at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2
+- at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2
+-
+-/* SIM Cards */
+- at91_set_gpio_output(AT91_PIN_PB9, 1); // ENBSC3
+- at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2
+- at91_set_gpio_output(AT91_PIN_PB11, 1); // ENBSC1
+-
+-/* GSM Module Control */
+- at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF
+-
+-/* Test jig presence detection */
+- at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT
+-
+-/* Power indicator */
+- at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND
+-
+-/* USB Device control */
+- at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX
+- at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP
+- at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive
++ /* Other LED's */
++ at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1
++ at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1
++ at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1
++ at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1
++ at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2
++ at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2
++
++ /* Test jig presence detection */
++ at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT
++
++ /* SIM Cards */
++ if (at91_get_gpio_value(AT91_PIN_PB8)) {
++ at91_set_gpio_output(AT91_PIN_PB11, 0);
++ at91_set_gpio_output(AT91_PIN_PB9, 1);
++ } else {
++ at91_set_gpio_output(AT91_PIN_PB11, 1);
++ at91_set_gpio_output(AT91_PIN_PB9, 0);
++ }
++
++ at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2
++
++ /* GSM Module Control */
++ at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF
++
++ /* Power indicator */
++ at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND
++
++ /* USB Device control */
++ at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX
++ at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP
++ at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive
+
+ }
+