From: <pazke@orbita1.ru>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Intel ICHx PCI quirk
Date: Tue, 19 Jun 2001 15:42:59 +0400 [thread overview]
Message-ID: <20010619154259.A31000@orbita1.ru> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 425 bytes --]
Hi all,
this patch adds quirk for Intel ICHx (I/O Controller Hub) LPC bridge to properly
report ACPI/TCO and GPIO base addresses.
Also quirk_via_acpi() function merged with quirk_vt82c586_acpi(). IMHO it's
not right to have two quirks for one device.
Best regards.
--
Andrey Panin | Embedded systems software engineer
pazke@orbita1.ru | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc
[-- Attachment #1.2: patch-ichx-quirk --]
[-- Type: text/plain, Size: 3771 bytes --]
diff -u linux.vanilla/drivers/pci/quirks.c linux/drivers/pci/quirks.c
--- linux.vanilla/drivers/pci/quirks.c Thu Jun 14 10:12:38 2001
+++ linux/drivers/pci/quirks.c Mon Jun 18 16:11:52 2001
@@ -223,18 +223,38 @@
}
/*
+ * Intel ICHx LPC bridge: Two IO regions pointed to by longwords at
+ * 0x40 (128 bytes of ACPI and TCO registers)
+ * 0x58 (64 bytes of GPIO registers)
+ */
+static void __init quirk_ichx_lpc(struct pci_dev *dev)
+{
+ u32 region;
+
+ pci_read_config_dword(dev, 0x40, ®ion);
+ quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES);
+ pci_read_config_dword(dev, 0x58, ®ion);
+ quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES+1);
+}
+
+/*
* VIA ACPI: One IO region pointed to by longword at
* 0x48 or 0x20 (256 bytes of ACPI registers)
+ * SCI IRQ line in PCI config byte 0x42
*/
static void __init quirk_vt82c586_acpi(struct pci_dev *dev)
{
- u8 rev;
+ u8 rev, irq;
u32 region;
+ pci_read_config_byte(dev, 0x42, &irq);
+ irq &= 0xf;
+ if (irq && (irq != 2))
+ dev->irq = irq;
+
pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev);
if (rev & 0x10) {
pci_read_config_dword(dev, 0x48, ®ion);
- region &= PCI_BASE_ADDRESS_IO_MASK;
quirk_io_region(dev, region, 256, PCI_BRIDGE_RESOURCES);
}
}
@@ -244,6 +264,7 @@
* 0x48 (256 bytes of ACPI registers)
* 0x70 (128 bytes of hardware monitoring register)
* 0x90 (16 bytes of SMB registers)
+ * SCI IRQ line in PCI config byte 0x42
*/
static void __init quirk_vt82c686_acpi(struct pci_dev *dev)
{
@@ -253,11 +274,9 @@
quirk_vt82c586_acpi(dev);
pci_read_config_word(dev, 0x70, &hm);
- hm &= PCI_BASE_ADDRESS_IO_MASK;
quirk_io_region(dev, hm, 128, PCI_BRIDGE_RESOURCES + 1);
pci_read_config_dword(dev, 0x90, &smb);
- smb &= PCI_BASE_ADDRESS_IO_MASK;
quirk_io_region(dev, smb, 16, PCI_BRIDGE_RESOURCES + 2);
}
@@ -313,17 +332,6 @@
* value of the ACPI SCI interrupt is only done for convenience.
* -jgarzik
*/
-static void __init quirk_via_acpi(struct pci_dev *d)
-{
- /*
- * VIA ACPI device: SCI IRQ line in PCI config byte 0x42
- */
- u8 irq;
- pci_read_config_byte(d, 0x42, &irq);
- irq &= 0xf;
- if (irq && (irq != 2))
- d->irq = irq;
-}
static void __init quirk_via_irqpic(struct pci_dev *dev)
{
@@ -421,6 +429,9 @@
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_vt82c586_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_vt82c686_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, quirk_piix4_acpi },
+ { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, quirk_ichx_lpc },
+ { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0, quirk_ichx_lpc },
+ { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, quirk_ichx_lpc },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101, quirk_ali7101_acpi },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_2, quirk_piix3_usb },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_2, quirk_piix3_usb },
@@ -429,8 +440,6 @@
#ifdef CONFIG_X86_IO_APIC
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_ioapic },
#endif
- { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_acpi },
- { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_acpi },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irqpic },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irqpic },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_6, quirk_via_irqpic },
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
reply other threads:[~2001-06-19 11:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010619154259.A31000@orbita1.ru \
--to=pazke@orbita1.ru \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox