core/acerhk/5100.patch

123 lines
3.5 KiB
Diff
Raw Normal View History

2011-07-09 15:51:42 +08:00
diff -bBur acerhk-0.5.35-old/acerhk.c acerhk-0.5.35/acerhk.c
--- acerhk-0.5.35-old/acerhk.c 2007-02-10 17:46:23.000000000 +0200
+++ acerhk-0.5.35/acerhk.c 2007-04-28 19:18:49.000000000 +0300
@@ -550,6 +550,7 @@
*/
static asmlinkage void call_bios_6xx(struct register_buffer *buf)
{
+#ifndef __x86_64__
if (bios_routine) {
local_irq_disable();
__asm__ __volatile__(
@@ -578,10 +579,12 @@
);
local_irq_enable();
}
+#endif
}
static asmlinkage void call_bios_52x(struct register_buffer *buf)
{
+#ifndef __x86_64__
if (bios_routine) {
local_irq_disable();
__asm__ __volatile__(
@@ -611,6 +614,7 @@
);
local_irq_enable();
}
+#endif
}
#define PRINT_BUFFER(x) \
@@ -783,7 +787,8 @@
unsigned char c = 0;
spin_lock_irqsave (&rtc_lock, flags);
-#ifndef DUMMYHW
+/* #ifndef DUMMYHW */
+#if !(defined(DUMMYHW) || defined(__x86_64__))
if (cmos_index)
c = CMOS_READ(cmos_index);
else if (verbose > 3)
@@ -867,9 +872,9 @@
static struct proc_dir_entry *proc_acer_dir;
-static unsigned int __init find_hk_area(void)
+static unsigned long __init find_hk_area(void)
{
- int offset, sig;
+ long offset, sig;
unsigned int fkt;
fkt = 0;
sig = -1; /* offset to signature in io area */
@@ -887,9 +892,9 @@
fkt = readl(reg1 + sig + 5);
/* adjust fkt to address of mapped IO area */
if (fkt >= 0xf0000)
- fkt = (unsigned int)reg1 + fkt - 0xf0000;
+ fkt = (unsigned long)reg1 + fkt - 0xf0000;
else if (fkt >= 0xe0000)
- fkt = (unsigned int)reg1 + fkt - 0xe0000;
+ fkt = (unsigned long)reg1 + fkt - 0xe0000;
else
fkt = 0;
}
@@ -1144,6 +1149,7 @@
case 2000:
case 2010:
case 2020:
+ case 5100:
/* Aspire 13xx series laptops use dritek hardware, no
acerhk-mapping needed
VolUp and VolDown are managed as normal keys
@@ -1458,6 +1464,7 @@
case 1800:
case 2010:
case 2020:
+ case 5100:
/* Dritek EC, bluetooth, wifi, mail */
acerhk_type = TM_dritek;
acerhk_model_features = TM_F_MAIL_LED_EC2 | TM_F_WLAN_EC2 | TM_F_BLUE_EC2;
@@ -1792,6 +1799,8 @@
break;
case '2': series = 5020; break;
}
+ } else if (str[8] == '1' && str[9] == '0') {
+ series = 5100;
} else {
if (verbose > 1)
printk(KERN_INFO"acerhk: model string indicates unknown Aspire 5xxx series\n");
@@ -2117,7 +2126,8 @@
/* polling timer handler */
static void acerhk_poll_event(unsigned long save_size)
{
-#ifndef DUMMYHW
+/* #ifndef DUMMYHW */
+#if !(defined(DUMMYHW) || defined(__x86_64__))
unsigned int max = MAX_POLLING_LOOPS;
/* make sure not to loop more then 32 times */
if (!max || max > 32)
@@ -2139,7 +2149,8 @@
{
if (acerhk_blueled_blinking != -1) {
acerhk_blueled_blinking = !acerhk_blueled_blinking;
-#ifndef DUMMYHW
+/* #ifndef DUMMYHW */
+#if !(defined(DUMMYHW) || defined(__x86_64__))
wbutton_fct_1(acerhk_blueled_blinking);
#endif
acerhk_timer_blinking.expires = jiffies + acerhk_blueled_blinking_delay;
@@ -2904,7 +2915,8 @@
/* attach to input system */
init_input();
memset(acerhk_model_string, 0x00, ACERHK_MODEL_STRLEN);
-#ifdef DUMMYHW
+/* #ifdef DUMMYHW */
+#if !(defined(DUMMYHW) || defined(__x86_64__))
acerhk_model_addr = (void*)0x12345678;
/* copy the string, but not more than 15 characters */
strncpy(acerhk_model_string, "TravelmateDummy", ACERHK_MODEL_STRLEN-1);