On 01/27/2016 07:39 AM, Ricardo Ribalda Delgado wrote: > Hello Peter > > Thanks for your reply, definitely good reading material :) > > On Tue, Jan 26, 2016 at 1:39 AM, Peter Hurley <peter@xxxxxxxxxxxxxxxxxx> wrote: >> Hi Ricardo, >> >> On 01/15/2016 08:27 AM, Ricardo Ribalda Delgado wrote: >>> From: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx> >> >> Please remove. That's typically only used when someone else has >> actually written the patch, but the actual submitter has some role >> in the patch. Doesn't apply here. >> >> >>> The 8250_fintek driver advertises as the PNP0501 driver; however this >>> conflicts with the standard 16550A uart PNP0501. The conflict causes >>> the 8250_fintek driver to load with _every_ PNP0501, but never probe, >>> and causing the entire 8250 driver stack to unload if the 8250_fintek >>> driver is unloaded (modprobe doesn't know that 8250_pnp rather than >>> 8250_fintek claimed the resource). >>> >>> This patch merges the Fintek driver into the pnp. Thre is a new device >>> flags that tells the pnp driver when to probe the fintek devices. >> >> How is this system doing PNP? BIOS, ACPI or ISA? >> Does this device announce other compatible device ids? > > Through ACPI, > > This is the ACPI table for that particular device. The ACPI device definition block is not right. I mean, the whole point of ACPI is to _define_ the h/w so the OS doesn't h/w probe. Is this in your firmware that you can update? > I cannot find anything that makes it differentiable form a standard > 16550A, but ACPI is definately not my mother tonge :) > > Device (UAR1) > { > Name (_HID, EisaId ("PNP0501") /* 16550A-compatible COM Serial Port */) // _HID: Hardware ID Instead of using an _HID of PNP0501, this device definition should be using a Fintek-specific _HID (Fintek has an assigned PNP prefix of "FIT"). Then it could *also* have a _CID of PNP0501, which allows the OS to "fallback" to generic uart support in the absence of a "FITxxxx" driver. For example, Name (_HID, EisaId ("FITxxxx") /* F81216A LPC to 4 UART */) Name (_CID, EisaId ("PNP0501") /* 16550A-compatible COM Serial Port */) The _CRS() should also describe the super i/o "key" registers, either as the producer (using IO() macro ) or as a consumer (using the extended resource descriptors to ID the producer device; not sure about the ASL syntax for that though). Regards, Peter Hurley > Name (_UID, 0x01) // _UID: Unique ID > Method (_STA, 0, Serialized) // _STA: Status > { > If (0x01) > { > If ((S216 == 0x00)) > { > Return (0x00) > } > > ENFG (0x00) > Local0 = WR30 /* \_SB_.PCI0.LPC0.F216.WR30 */ > Local1 = WR60 /* \_SB_.PCI0.LPC0.F216.WR60 */ > EXFG () > If ((Local0 == 0xFF)) > { > Return (0x00) > } > > If ((Local1 == 0xFF)) > { > Return (0x00) > } > > Local0 &= 0x01 > If (Local0) > { > Return (0x0F) > } > ElseIf (Local1) > { > Return (0x0D) > } > Else > { > Return (0x00) > } > } > > Return (0x00) > } > > Method (_DIS, 0, Serialized) // _DIS: Disable Device > { > ENFG (0x00) > WR30 = 0x00 > EXFG () > } > > Method (_CRS, 0, Serialized) // _CRS: Current Resource Settings > { > Name (BUF0, ResourceTemplate () > { > IO (Decode16, > 0x03F8, // Range Minimum > 0x03F8, // Range Maximum > 0x01, // Alignment > 0x08, // Length > _Y1E) > IRQNoFlags (_Y1F) > {7} > }) > ENFG (0x00) > If (0x01) > { > CreateByteField (BUF0, \_SB.PCI0.LPC0.F216.UAR1._CRS._Y1E._MIN, IOL0) // _MIN: Minimum Base Address > CreateByteField (BUF0, 0x03, IOH0) > CreateByteField (BUF0, \_SB.PCI0.LPC0.F216.UAR1._CRS._Y1E._MAX, IOL1) // _MAX: Maximum Base Address > CreateByteField (BUF0, 0x05, IOH1) > CreateByteField (BUF0, \_SB.PCI0.LPC0.F216.UAR1._CRS._Y1E._LEN, LEN0) // _LEN: Length > CreateWordField (BUF0, \_SB.PCI0.LPC0.F216.UAR1._CRS._Y1F._INT, IRQW) // _INT: Interrupts > IOH0 = WR60 /* \_SB_.PCI0.LPC0.F216.WR60 */ > IOL0 = WR61 /* \_SB_.PCI0.LPC0.F216.WR61 */ > IOH1 = WR60 /* \_SB_.PCI0.LPC0.F216.WR60 */ > IOL1 = WR61 /* \_SB_.PCI0.LPC0.F216.WR61 */ > LEN0 = 0x08 > Local0 = (WR70 & 0x0F) > If (Local0) > { > IRQW = (One << Local0) > } > Else > { > IRQW = Zero > } > } > > EXFG () > Return (BUF0) /* \_SB_.PCI0.LPC0.F216.UAR1._CRS.BUF0 */ > } > > Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings > { > StartDependentFn (0x00, 0x00) > { > IO (Decode16, > 0x03F8, // Range Minimum > 0x03F8, // Range Maximum > 0x01, // Alignment > 0x08, // Length > ) > IRQNoFlags () > {4} > DMA (Compatibility, NotBusMaster, Transfer8, ) > {} > } > StartDependentFnNoPri () > { > IO (Decode16, > 0x03F8, // Range Minimum > 0x03F8, // Range Maximum > 0x01, // Alignment > 0x08, // Length > ) > IRQNoFlags () > {3,4,5,7} > DMA (Compatibility, NotBusMaster, Transfer8, ) > {} > } > StartDependentFnNoPri () > { > IO (Decode16, > 0x02F8, // Range Minimum > 0x02F8, // Range Maximum > 0x01, // Alignment > 0x08, // Length > ) > IRQNoFlags () > {3,4,5,7} > DMA (Compatibility, NotBusMaster, Transfer8, ) > {} > } > StartDependentFnNoPri () > { > IO (Decode16, > 0x03E8, // Range Minimum > 0x03E8, // Range Maximum > 0x01, // Alignment > 0x08, // Length > ) > IRQNoFlags () > {3,4,5,7} > DMA (Compatibility, NotBusMaster, Transfer8, ) > {} > } > StartDependentFnNoPri () > { > IO (Decode16, > 0x02E8, // Range Minimum > 0x02E8, // Range Maximum > 0x01, // Alignment > 0x08, // Length > ) > IRQNoFlags () > {3,4,5,7} > DMA (Compatibility, NotBusMaster, Transfer8, ) > {} > } > EndDependentFn () > }) > Method (_SRS, 1, Serialized) // _SRS: Set Resource Settings > { > CreateByteField (Arg0, 0x02, IOLO) > CreateByteField (Arg0, 0x03, IOHI) > CreateWordField (Arg0, 0x09, IRQW) > ENFG (0x00) > WR30 = 0x00 > WR61 = IOLO /* \_SB_.PCI0.LPC0.F216.UAR1._SRS.IOLO */ > WR60 = IOHI /* \_SB_.PCI0.LPC0.F216.UAR1._SRS.IOHI */ > FindSetRightBit (IRQW, Local0) > If ((IRQW != Zero)) > { > Local0-- > } > > WR70 = Local0 > WR30 = 0x01 > EXFG () > } > > Method (_PS0, 0, Serialized) // _PS0: Power State 0 > { > ENFG (0x00) > WR30 = 0x01 > EXFG () > } > > Method (_PS3, 0, Serialized) // _PS3: Power State 3 > { > ENFG (0x00) > WR30 = 0x00 > EXFG () > } > } > > Shall I just resend the patch removing the From (I used git ammend, > sorry) and Credit? > > Thanks! > -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html