updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / acerhk / 5100.patch
bloba30ede0b086ae76c5b587b7910f10ca959aa5c8d
1 diff -bBur acerhk-0.5.35-old/acerhk.c acerhk-0.5.35/acerhk.c
2 --- acerhk-0.5.35-old/acerhk.c 2007-02-10 17:46:23.000000000 +0200
3 +++ acerhk-0.5.35/acerhk.c 2007-04-28 19:18:49.000000000 +0300
4 @@ -550,6 +550,7 @@
5 */
6 static asmlinkage void call_bios_6xx(struct register_buffer *buf)
8 +#ifndef __x86_64__
9 if (bios_routine) {
10 local_irq_disable();
11 __asm__ __volatile__(
12 @@ -578,10 +579,12 @@
14 local_irq_enable();
16 +#endif
19 static asmlinkage void call_bios_52x(struct register_buffer *buf)
21 +#ifndef __x86_64__
22 if (bios_routine) {
23 local_irq_disable();
24 __asm__ __volatile__(
25 @@ -611,6 +614,7 @@
27 local_irq_enable();
29 +#endif
32 #define PRINT_BUFFER(x) \
33 @@ -783,7 +787,8 @@
34 unsigned char c = 0;
36 spin_lock_irqsave (&rtc_lock, flags);
37 -#ifndef DUMMYHW
38 +/* #ifndef DUMMYHW */
39 +#if !(defined(DUMMYHW) || defined(__x86_64__))
40 if (cmos_index)
41 c = CMOS_READ(cmos_index);
42 else if (verbose > 3)
43 @@ -867,9 +872,9 @@
45 static struct proc_dir_entry *proc_acer_dir;
47 -static unsigned int __init find_hk_area(void)
48 +static unsigned long __init find_hk_area(void)
50 - int offset, sig;
51 + long offset, sig;
52 unsigned int fkt;
53 fkt = 0;
54 sig = -1; /* offset to signature in io area */
55 @@ -887,9 +892,9 @@
56 fkt = readl(reg1 + sig + 5);
57 /* adjust fkt to address of mapped IO area */
58 if (fkt >= 0xf0000)
59 - fkt = (unsigned int)reg1 + fkt - 0xf0000;
60 + fkt = (unsigned long)reg1 + fkt - 0xf0000;
61 else if (fkt >= 0xe0000)
62 - fkt = (unsigned int)reg1 + fkt - 0xe0000;
63 + fkt = (unsigned long)reg1 + fkt - 0xe0000;
64 else
65 fkt = 0;
67 @@ -1144,6 +1149,7 @@
68 case 2000:
69 case 2010:
70 case 2020:
71 + case 5100:
72 /* Aspire 13xx series laptops use dritek hardware, no
73 acerhk-mapping needed
74 VolUp and VolDown are managed as normal keys
75 @@ -1458,6 +1464,7 @@
76 case 1800:
77 case 2010:
78 case 2020:
79 + case 5100:
80 /* Dritek EC, bluetooth, wifi, mail */
81 acerhk_type = TM_dritek;
82 acerhk_model_features = TM_F_MAIL_LED_EC2 | TM_F_WLAN_EC2 | TM_F_BLUE_EC2;
83 @@ -1792,6 +1799,8 @@
84 break;
85 case '2': series = 5020; break;
87 + } else if (str[8] == '1' && str[9] == '0') {
88 + series = 5100;
89 } else {
90 if (verbose > 1)
91 printk(KERN_INFO"acerhk: model string indicates unknown Aspire 5xxx series\n");
92 @@ -2117,7 +2126,8 @@
93 /* polling timer handler */
94 static void acerhk_poll_event(unsigned long save_size)
96 -#ifndef DUMMYHW
97 +/* #ifndef DUMMYHW */
98 +#if !(defined(DUMMYHW) || defined(__x86_64__))
99 unsigned int max = MAX_POLLING_LOOPS;
100 /* make sure not to loop more then 32 times */
101 if (!max || max > 32)
102 @@ -2139,7 +2149,8 @@
104 if (acerhk_blueled_blinking != -1) {
105 acerhk_blueled_blinking = !acerhk_blueled_blinking;
106 -#ifndef DUMMYHW
107 +/* #ifndef DUMMYHW */
108 +#if !(defined(DUMMYHW) || defined(__x86_64__))
109 wbutton_fct_1(acerhk_blueled_blinking);
110 #endif
111 acerhk_timer_blinking.expires = jiffies + acerhk_blueled_blinking_delay;
112 @@ -2904,7 +2915,8 @@
113 /* attach to input system */
114 init_input();
115 memset(acerhk_model_string, 0x00, ACERHK_MODEL_STRLEN);
116 -#ifdef DUMMYHW
117 +/* #ifdef DUMMYHW */
118 +#if !(defined(DUMMYHW) || defined(__x86_64__))
119 acerhk_model_addr = (void*)0x12345678;
120 /* copy the string, but not more than 15 characters */
121 strncpy(acerhk_model_string, "TravelmateDummy", ACERHK_MODEL_STRLEN-1);