Patchwork ACPI on m57sli v1.0

login
register
about
Submitter Harald Gutmann
Date 2009-07-04 09:02:36
Message ID <200907041102.44250.harald.gutmann@gmx.net>
Download mbox | patch
Permalink /patch/4/
State Accepted
Headers show

Comments

Harald Gutmann - 2009-07-04 09:02:36
On Thursday 02 July 2009 23:26:34 Peter Stuge wrote:
> Harald Gutmann wrote:
> > > Is the port interrupt-driven, or polling, on your system, Andreas?
> >
> > Here on my system it says also polling, like on Andreas system.
> > What is the difference between interrupt driven and polling?
>
> Interrupt driven means the port has an interrupt assigned to it, and
> that communication over the port is event based.
>
> Polling means there is a timer running in the kernel which will check
> the port for activity every few milliseconds or something.
>
> > On vendor bios it is interrupt-driven.
> > Is an ACPI part missing to get it interrupt driven?
>
> I think so, yes.
So, I've added the missing ACPI part, but it seems that some more work is 
needed to get parport interrupt driven working.

The dmesg output changes a little bit, and also mentions IRQ7, but lp0 is 
still noticed as polling:
[  745.974254] parport_pc 00:04: reported by Plug and Play ACPI
[  745.974371] parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
[  746.104129] parport0: irq 7 detected
[  751.914593] ppdev: user-space parallel port driver
[  770.953504] lp0: using parport0 (polling).

I think that it is necessary to set some irq bit to get it working fine. This 
idea is from the vendors dsdt.asl [1] and the LPT1 (starting at line 5374) 
section of it.
Looking at that part there is something noticed about INTR which could be the 
IRQ bit I assume that this is needed.

Can anyone help me out here a little bit?

[1] http://coreboot.pastebin.com/f3e965943


Kind regards,
Harald


>
> //Peter

Patch

Index: dsdt.asl
===================================================================
--- dsdt.asl	(revision 4397)
+++ dsdt.asl	(working copy)
@@ -214,12 +214,12 @@ 
 				}
 				Method (_CRS, 0, NotSerialized)
 				{
-					Name (TMP, ResourceTemplate () {
+					Name (TMP0, ResourceTemplate () {
 						IO (Decode16, 0x0060, 0x0060, 0x01, 0x01)
 						IO (Decode16, 0x0064, 0x0064, 0x01, 0x01)
 						IRQNoFlags () {1}
 					})
-					Return (TMP)
+					Return (TMP0)
 				}
 			}
 
@@ -233,12 +233,12 @@ 
 				}
 				Method (_CRS, 0, NotSerialized)
 				{
-					Name (TMP, ResourceTemplate () {
+					Name (TMP1, ResourceTemplate () {
 						IO (Decode16, 0x0060, 0x0060, 0x01, 0x01)
 						IO (Decode16, 0x0064, 0x0064, 0x01, 0x01)
 						IRQNoFlags () {12}
 					})
-					Return (TMP)
+					Return (TMP1)
 				}
 			}
 
@@ -254,13 +254,30 @@ 
 				{
 					Name (BUF0, ResourceTemplate () {
 						IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
-						IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
+						IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
 						IRQNoFlags () {6}
 						DMA (Compatibility, NotBusMaster, Transfer8) {2}
 					})
 					Return (BUF0)
 				}
 			}
+			/* Parallel Port */
+			Device (LPT1)
+			{
+				Name (_HID, EisaId ("PNP0400"))
+				Method (_STA, 0, NotSerialized)
+				{
+					Return (0x0f)
+				}
+				Method (_CRS, 0, NotSerialized)
+				{
+					Name (BUF1, ResourceTemplate () {
+						IO (Decode16, 0x0000, 0x0000, 0x01, 0x08) 
+						IRQNoFlags () {7}
+					})
+					Return (BUF1)
+				}
+			}
 		}
 	}
 }