Patchwork ACPI on m57sli v1.0

login
register
about
Submitter Andreas B. Mundt
Date 2009-07-04 06:06:03
Message ID <20090704060603.GA5211@flashgordon>
Download mbox | patch
Permalink /patch/3/
State Superseded
Headers show

Comments

Andreas B. Mundt - 2009-07-04 06:06:03
Hi,

the patch below allows for interrupt driven parport usage (even when
CONFIG_PARPORT_PC_SUPERIO is not set in the kernel config). It has
been prepared with Rudolf's help on IRC. Please test and/or improve!

According to Rudolf, it would be better better to code something in
ACPI code which will get the resource info from hardware, or
alternatively, the superiocode should generate some simple acpi code.

from dmesg:
lp0: using parport0 (interrupt-driven).


Signed-off-by: Anreas B. Mundt <andi.mundt at web.de>

Regards, 
	 Andi

Patch

Index: src/mainboard/gigabyte/m57sli/dsdt.asl
===================================================================
--- src/mainboard/gigabyte/m57sli/dsdt.asl	(revision 4397)
+++ src/mainboard/gigabyte/m57sli/dsdt.asl	(working copy)
@@ -222,6 +222,26 @@ 
 					Return (TMP)
 				}
 			}
+			
+			/* needed to make parport interrupt-driven; the resource info is 
+			 * hard coded and must be in correlation with Config.lb
+			 */			
+			Device (LP0)
+			{
+				Name (_HID, EisaId ("PNP0400")) // "PNP0401" for ECP
+				Method (_STA, 0, NotSerialized)
+				{
+					Return (0x0f)
+				}
+				Method (_CRS, 0, NotSerialized)
+				{
+					Name (TMP, ResourceTemplate () {
+					     FixedIO (0x0378, 0x10)
+					     IRQNoFlags () {7}
+					})
+					Return (TMP)
+				}
+			}
 
 			/* PS/2 mouse */
 			Device (MOU)