1
Copyright (C) 2007 Milko Krachounov Under the GNU GPL2
2
See: http://gentoo-wiki.com/HARDWARE_Acer_Aspire_5102WLMi#acerhk
3
diff -bBur acerhk-0.5.35-old/acerhk.c acerhk-0.5.35/acerhk.c
4
--- acerhk-0.5.35-old/acerhk.c 2007-02-10 17:46:23.000000000 +0200
5
+++ acerhk-0.5.35/acerhk.c 2007-04-28 19:18:49.000000000 +0300
8
static asmlinkage void call_bios_6xx(struct register_buffer *buf)
21
static asmlinkage void call_bios_52x(struct register_buffer *buf)
34
#define PRINT_BUFFER(x) \
38
spin_lock_irqsave (&rtc_lock, flags);
40
+/* #ifndef DUMMYHW */
41
+#if !(defined(DUMMYHW) || defined(__x86_64__))
43
c = CMOS_READ(cmos_index);
47
static struct proc_dir_entry *proc_acer_dir;
49
-static unsigned int __init find_hk_area(void)
50
+static unsigned long __init find_hk_area(void)
56
sig = -1; /* offset to signature in io area */
58
fkt = readl(reg1 + sig + 5);
59
/* adjust fkt to address of mapped IO area */
61
- fkt = (unsigned int)reg1 + fkt - 0xf0000;
62
+ fkt = (unsigned long)reg1 + fkt - 0xf0000;
63
else if (fkt >= 0xe0000)
64
- fkt = (unsigned int)reg1 + fkt - 0xe0000;
65
+ fkt = (unsigned long)reg1 + fkt - 0xe0000;
74
/* Aspire 13xx series laptops use dritek hardware, no
76
VolUp and VolDown are managed as normal keys
82
/* Dritek EC, bluetooth, wifi, mail */
83
acerhk_type = TM_dritek;
84
acerhk_model_features = TM_F_MAIL_LED_EC2 | TM_F_WLAN_EC2 | TM_F_BLUE_EC2;
87
case '2': series = 5020; break;
89
+ } else if (str[8] == '1' && str[9] == '0') {
93
printk(KERN_INFO"acerhk: model string indicates unknown Aspire 5xxx series\n");
95
/* polling timer handler */
96
static void acerhk_poll_event(unsigned long save_size)
99
+/* #ifndef DUMMYHW */
100
+#if !(defined(DUMMYHW) || defined(__x86_64__))
101
unsigned int max = MAX_POLLING_LOOPS;
102
/* make sure not to loop more then 32 times */
103
if (!max || max > 32)
104
@@ -2139,7 +2149,8 @@
106
if (acerhk_blueled_blinking != -1) {
107
acerhk_blueled_blinking = !acerhk_blueled_blinking;
109
+/* #ifndef DUMMYHW */
110
+#if !(defined(DUMMYHW) || defined(__x86_64__))
111
wbutton_fct_1(acerhk_blueled_blinking);
113
acerhk_timer_blinking.expires = jiffies + acerhk_blueled_blinking_delay;
114
@@ -2904,7 +2915,8 @@
115
/* attach to input system */
117
memset(acerhk_model_string, 0x00, ACERHK_MODEL_STRLEN);
119
+/* #ifdef DUMMYHW */
120
+#if !(defined(DUMMYHW) || defined(__x86_64__))
121
acerhk_model_addr = (void*)0x12345678;
122
/* copy the string, but not more than 15 characters */
123
strncpy(acerhk_model_string, "TravelmateDummy", ACERHK_MODEL_STRLEN-1);