From: "Sune Mølgaard" <sune@molgaard.org>
To: linux-kernel@vger.kernel.org
Cc: mj@ucw.cz
Subject: Re: [PATCH] 2.4.30 PicoPower IRQ router
Date: Sat, 30 Apr 2005 14:34:06 +0200 [thread overview]
Message-ID: <42737B3E.9000804@molgaard.org> (raw)
In-Reply-To: <Pine.LNX.4.62.0504272250300.2481@dragon.hyggekrogen.localhost>
One final but critical change. I accidentally used vendor ID for USR
instead of Picopower in pci_ids.h. Plus I didn't refer to it properly in
pci-irq.c
Signed-off-by: Sune Mølgaard <sune@molgaard.org>
--Begin patch--
diff -Npru linux-2.4.30/arch/i386/kernel/pci-irq.c \
linux/arch/i386/kernel/pci-irq.c
--- linux-2.4.30/arch/i386/kernel/pci-irq.c 2005-04-04
03:42:19.000000000 +0200
+++ linux/arch/i386/kernel/pci-irq.c 2005-04-28 12:31:34.999771672 +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.
@@ -609,6 +628,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)
{
@@ -814,6 +851,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 },
diff -Npru linux-2.4.30/include/linux/pci_ids.h \
linux/include/linux/pci_ids.h
--- linux-2.4.30/include/linux/pci_ids.h 2005-04-04
03:42:20.000000000 +0200
+++ linux/include/linux/pci_ids.h 2005-04-27 20:04:12.195597128 +0200
@@ -119,6 +119,10 @@
/* Vendors and devices. Sort key: vendor first, device next. */
+#define PCI_VENDOR_ID_PICOPOWER 0x104c
+#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
--End patch--
Best regards,
Sune Mølgaard
--
Now, suddenly, dynamic HTML makes the Web as interactive as my old Apple
IIc.
- Peter Merholz
prev parent reply other threads:[~2005-04-30 12:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-25 7:36 [PATCH] 2.4.30 PicoPower IRQ router Sune Mølgaard
2005-04-26 15:40 ` Alessandro Amici
2005-04-26 19:00 ` Sune Mølgaard
2005-04-27 11:28 ` Domen Puncer
2005-04-27 18:24 ` Sune Mølgaard
2005-04-27 21:00 ` Jesper Juhl
2005-04-28 10:36 ` Sune Mølgaard
2005-04-30 12:34 ` Sune Mølgaard [this message]
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=42737B3E.9000804@molgaard.org \
--to=sune@molgaard.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mj@ucw.cz \
/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