On Saturday 04 July 2009 11:02:36 Harald Gutmann wrote:
> 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.
I just did a mistake and set no address in the IO Section.

There's already another patch on the list (which was filtered by my 
spam-filter, 
and therefore I did the job again).
The difference between my patch, and the one from Andreas are minimal, but I 
added the ECP device which is necessary to get Parport full functional 
(hopefully I did everything correct, as I can't test this without Parport 
devices.)

The attached patch activates changes the LPT port from polling to interrupt-
driven, and should be fine.

Signed-off-by: Harald Gutmann <harald.gutm...@gmx.net>

Kind regards,
Harald


> 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
>
>
> >
> > //Peter

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,49 @@
 				{
 					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, 0x0378, 0x0378, 0x01, 0x08) 
+						IRQNoFlags () {7}
+					})
+					Return (BUF1)
+				}
+			}
+			/* Parallel Port ECP */
+			Device (ECP1)
+			{
+				Name (_HID, EisaId ("PNP0401"))
+				Method (_STA, 0, NotSerialized)
+				{
+					Return (0x0f)
+				}
+				Method (_CRS, 0, NotSerialized)
+				{
+					Name (BUF1, ResourceTemplate () {
+						IO (Decode16, 0x0378, 0x0378, 0x01, 0x04) 
+						IO (Decode16, 0x0778, 0x0778, 0x01, 0x04)
+						IRQNoFlags() {7}
+						DMA (Compatibility, NotBusMaster, Transfer8) {0,1,3}
+					})
+					Return (BUF1)
+				}
+			}
 		}
 	}
 }

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to