--- linux-2.4.31/arch/i386/kernel/pci-irq.c	2005-06-01 02:56:56.000000000 +0200
+++ linux/arch/i386/kernel/pci-irq.c	2005-06-18 18:02:22.271038584 +0200
@@ -157,6 +157,25 @@ static void write_config_nybble(struct p
 }
 
 /*
+ * PicoPower PT86C523
+ */
+
+static int pirq_pico_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
+{
+	outb(0x10+((pirq-1)>>1), 0x24);
+	return ((pirq-1)&1) ? (inb(0x26)>>4) : (inb(0x26)&0xf);
+}
+
+static int pirq_pico_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) 
+{ 
+	outb(0x10+((pirq-1)>>1), 0x24);
+	unsigned int x;
+	x = inb(0x26); 
+	x = ((pirq-1)&1) ? ((x&0x0f)|(irq<<4)) : ((x&0xf0)|(irq)); 
+	outb(x,0x26);
+} 
+
+/*
  * ALI pirq entries are damn ugly, and completely undocumented.
  * This has been figured out from pirq tables, and it's not a pretty
  * picture.
@@ -627,6 +646,24 @@ static int pirq_bios_set(struct pci_dev 
 
 #endif
 
+static __init int pico_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
+{
+	switch(device)
+	{
+		case PCI_DEVICE_ID_PICOPOWER_PT86C523:
+			r->name = "PicoPower PT86C523";
+			r->get = pirq_pico_get;
+			r->set = pirq_pico_set;
+			return 1;
+
+		case PCI_DEVICE_ID_PICOPOWER_PT86C523BBP:
+			r->name = "PicoPower PT86C523 rev. BB+";
+			r->get = pirq_pico_get;
+			r->set = pirq_pico_set;
+			return 1;
+	}
+	return 0;
+}
 
 static __init int intel_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
 {
@@ -836,6 +873,7 @@ static __init int amd_router_probe(struc
 }
 		
 static __initdata struct irq_router_handler pirq_routers[] = {
+	{ PCI_VENDOR_ID_PICOPOWER, pico_router_probe },
 	{ PCI_VENDOR_ID_INTEL, intel_router_probe },
 	{ PCI_VENDOR_ID_AL, ali_router_probe },
 	{ PCI_VENDOR_ID_ITE, ite_router_probe },
--- linux-2.4.31/include/linux/pci_ids.h	2005-06-01 02:56:56.000000000 +0200
+++ linux/include/linux/pci_ids.h	2005-06-18 18:02:22.278037520 +0200
@@ -119,6 +119,10 @@
 
 /* Vendors and devices.  Sort key: vendor first, device next. */
 
+#define PCI_VENDOR_ID_PICOPOWER             0x1066
+#define PCI_DEVICE_ID_PICOPOWER_PT86C523    0x0002
+#define PCI_DEVICE_ID_PICOPOWER_PT86C523BBP 0x8002
+
 #define PCI_VENDOR_ID_DYNALINK		0x0675
 #define PCI_DEVICE_ID_DYNALINK_IS64PH	0x1702
 
