~ubuntu-branches/debian/sid/acerhk/sid

« back to all changes in this revision

Viewing changes to debian/patches/64bits_support_for_aspire5100.patch

  • Committer: Bazaar Package Importer
  • Author(s): Adam Cécile (Le_Vert)
  • Date: 2008-04-28 19:14:16 UTC
  • Revision ID: james.westby@ubuntu.com-20080428191416-8bl3h86g00vxwuuu
Tags: 0.5.35-3
* Add patch for Aspire 5100 series / 64bits mode (Closes: #473671, #478253).
* Improve README.Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
6
@@ -550,6 +550,7 @@
 
7
  */
 
8
 static asmlinkage void call_bios_6xx(struct register_buffer *buf)
 
9
 {
 
10
+#ifndef __x86_64__
 
11
   if (bios_routine) {
 
12
       local_irq_disable();
 
13
        __asm__ __volatile__(
 
14
@@ -578,10 +579,12 @@
 
15
                                                 );
 
16
       local_irq_enable();
 
17
   }
 
18
+#endif
 
19
 }
 
20
 
 
21
 static asmlinkage void call_bios_52x(struct register_buffer *buf)
 
22
 {
 
23
+#ifndef __x86_64__
 
24
   if (bios_routine) {
 
25
       local_irq_disable();
 
26
        __asm__ __volatile__(
 
27
@@ -611,6 +614,7 @@
 
28
                                                 );
 
29
       local_irq_enable();
 
30
   }
 
31
+#endif
 
32
 }
 
33
 
 
34
 #define PRINT_BUFFER(x) \
 
35
@@ -783,7 +787,8 @@
 
36
   unsigned char c = 0;
 
37
 
 
38
   spin_lock_irqsave (&rtc_lock, flags);
 
39
-#ifndef DUMMYHW
 
40
+/* #ifndef DUMMYHW */
 
41
+#if !(defined(DUMMYHW) || defined(__x86_64__))
 
42
   if (cmos_index)
 
43
     c = CMOS_READ(cmos_index);
 
44
   else if (verbose > 3)
 
45
@@ -867,9 +872,9 @@
 
46
 
 
47
 static struct proc_dir_entry *proc_acer_dir;
 
48
 
 
49
-static unsigned int __init find_hk_area(void)
 
50
+static unsigned long __init find_hk_area(void)
 
51
 {
 
52
-  int offset, sig;
 
53
+  long offset, sig;
 
54
   unsigned int fkt;
 
55
   fkt = 0;
 
56
   sig = -1; /* offset to signature in io area */
 
57
@@ -887,9 +892,9 @@
 
58
     fkt = readl(reg1 + sig + 5);
 
59
     /* adjust fkt to address of mapped IO area */
 
60
     if (fkt >= 0xf0000)
 
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;
 
66
     else
 
67
       fkt = 0;
 
68
   }
 
69
@@ -1144,6 +1149,7 @@
 
70
   case 2000:
 
71
   case 2010:
 
72
   case 2020:
 
73
+  case 5100:
 
74
     /* Aspire 13xx series laptops use dritek hardware, no
 
75
        acerhk-mapping needed
 
76
        VolUp and VolDown are managed as normal keys
 
77
@@ -1458,6 +1464,7 @@
 
78
   case 1800:
 
79
   case 2010:
 
80
   case 2020:
 
81
+  case 5100:
 
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;
 
85
@@ -1792,6 +1799,8 @@
 
86
           break;
 
87
         case '2': series = 5020; break;
 
88
         }
 
89
+      } else if (str[8] == '1' && str[9] == '0') {
 
90
+       series = 5100;
 
91
       } else {
 
92
         if (verbose > 1)
 
93
           printk(KERN_INFO"acerhk: model string indicates unknown Aspire 5xxx series\n");
 
94
@@ -2117,7 +2126,8 @@
 
95
 /* polling timer handler */
 
96
 static void acerhk_poll_event(unsigned long save_size)
 
97
 {
 
98
-#ifndef DUMMYHW
 
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 @@
 
105
 {
 
106
   if (acerhk_blueled_blinking != -1) {
 
107
     acerhk_blueled_blinking = !acerhk_blueled_blinking;
 
108
-#ifndef DUMMYHW
 
109
+/* #ifndef DUMMYHW */
 
110
+#if !(defined(DUMMYHW) || defined(__x86_64__))
 
111
     wbutton_fct_1(acerhk_blueled_blinking);
 
112
 #endif
 
113
     acerhk_timer_blinking.expires = jiffies + acerhk_blueled_blinking_delay;
 
114
@@ -2904,7 +2915,8 @@
 
115
     /* attach to input system */
 
116
     init_input();
 
117
     memset(acerhk_model_string, 0x00, ACERHK_MODEL_STRLEN);
 
118
-#ifdef DUMMYHW
 
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);