[atheros] remove strange direct usage of dev->priv as well
[openwrt.git] / target / linux / at91 / patches-2.6.21 / 015-simenable.patch
1 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
2 --- linux-2.6.21.5.old/arch/arm/mach-at91/board-vlink.c 2007-07-26 12:43:11.000000000 +0200
3 +++ linux-2.6.21.5/arch/arm/mach-at91/board-vlink.c 2007-08-20 16:56:56.000000000 +0200
4 @@ -151,31 +151,37 @@
5 // at91_gpio_leds(vlink_leds, ARRAY_SIZE(vlink_leds));
6
7 /* Other LED's */
8 - at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1
9 - at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1
10 - at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1
11 - at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1
12 - at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2
13 - at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2
14 + at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1
15 + at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1
16 + at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1
17 + at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1
18 + at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2
19 + at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2
20 +
21 +/* Test jig presence detection */
22 + at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT
23
24 /* SIM Cards */
25 - at91_set_gpio_output(AT91_PIN_PB9, 1); // ENBSC3
26 - at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2
27 - at91_set_gpio_output(AT91_PIN_PB11, 1); // ENBSC1
28 + if (at91_get_gpio_value(AT91_PIN_PB8)) {
29 + at91_set_gpio_output(AT91_PIN_PB11, 0);
30 + at91_set_gpio_output(AT91_PIN_PB9, 1);
31 + } else {
32 + at91_set_gpio_output(AT91_PIN_PB11, 1);
33 + at91_set_gpio_output(AT91_PIN_PB9, 0);
34 + }
35 +
36 + at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2
37
38 /* GSM Module Control */
39 - at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF
40 -
41 -/* Test jig presence detection */
42 - at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT
43 + at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF
44
45 /* Power indicator */
46 - at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND
47 + at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND
48
49 /* USB Device control */
50 - at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX
51 - at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP
52 - at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive
53 + at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX
54 + at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP
55 + at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive
56
57 }
58
This page took 0.045233 seconds and 5 git commands to generate.