Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 10 Dec 2000 21:17:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 10 Dec 2000 21:17:33 -0500 Received: from r1922.muc.dial.surf-callino.de ([213.21.8.144]:1540 "EHLO notebook.diehl.home") by vger.kernel.org with ESMTP id ; Sun, 10 Dec 2000 21:17:23 -0500 Date: Mon, 11 Dec 2000 02:46:34 +0100 (CET) From: Martin Diehl To: Linus Torvalds cc: Martin Mares , Kernel Mailing List Subject: [PATCH] VLSI irq router (was: PCI irq routing..) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463786495-223338545-976498884=:506" Content-ID: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---1463786495-223338545-976498884=:506 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: On Thu, 7 Dec 2000, Linus Torvalds wrote: > > btw, I'm thinking I could guess the routing from the VLSI config space, > > but I don't have any doc's. Would it be worth to try to add some specific > > Please do. You might leave them commented out right now, but this is Ok. Apparently it's the "pirq is nibble index in config space" kind of routing which makes guessing a change bios and lspci procedure. patch vs. 2.4.0-t12p8 below. Tested as (in)complete as my bios permits. Works fine for several days and correctly assigns IRQ's when unassigned due to "pnp os". So I feel confident enough to not leave it commented out. Test example attached. Regards Martin ----- diff -Nur linux-2.4.0-t12p8/arch/i386/kernel/pci-irq.c linux-2.4.0-t12p8-md/arch/i386/kernel/pci-irq.c --- linux-2.4.0-t12p8/arch/i386/kernel/pci-irq.c Mon Dec 11 00:29:42 2000 +++ linux-2.4.0-t12p8-md/arch/i386/kernel/pci-irq.c Mon Dec 11 00:58:48 2000 @@ -298,6 +298,33 @@ return 1; } +/* + * VLSI: nibble offset 0x74 - educated guess due to routing table and + * config space of VLSI 82C534 PCI-bridge/router (1004:0102) + * Tested on HP OmniBook 800 covering PIRQ 1, 2, 4, 8 for onboard + * devices, PIRQ 3 for non-pci(!) soundchip and (untested) PIRQ 6 + * for the busbridge to the docking station. + */ + +static int pirq_vlsi_get(struct pci_dev *router, struct pci_dev *dev, int pirq) +{ + if (pirq > 8) { + printk("VLSI router pirq escape (%d)\n", pirq); + return 0; + } + return read_config_nybble(router, 0x74, pirq-1); +} + +static int pirq_vlsi_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) +{ + if (pirq > 8) { + printk("VLSI router pirq escape (%d)\n", pirq); + return 0; + } + write_config_nybble(router, 0x74, pirq-1, irq); + return 1; +} + #ifdef CONFIG_PCI_BIOS static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) @@ -329,6 +356,7 @@ { "NatSemi", PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520, pirq_cyrix_get, pirq_cyrix_set }, { "SIS", PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, pirq_sis_get, pirq_sis_set }, + { "VLSI 82C534", PCI_VENDOR_ID_VLSI, PCI_DEVICE_ID_VLSI_82C534, pirq_vlsi_get, pirq_vlsi_set }, { "default", 0, 0, NULL, NULL } }; ---1463786495-223338545-976498884=:506 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=vlsi_debug Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: vlsi_debug Content-Disposition: ATTACHMENT; FILENAME=vlsi_debug UENJOiBCSU9TMzIgU2VydmljZSBEaXJlY3Rvcnkgc3RydWN0dXJlIGF0IDB4 YzAwZWMwNjANClBDSTogQklPUzMyIFNlcnZpY2UgRGlyZWN0b3J5IGVudHJ5 IGF0IDB4ZWVmYjANClBDSTogQklPUyBwcm9iZSByZXR1cm5lZCBzPTAwIGh3 PTExIHZlcj0wMi4xMCBsPTAxDQpQQ0k6IFBDSSBCSU9TIHJldmlzaW9uIDIu MTAgZW50c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USAxMA0KCUkv TyBwb3J0cyBhdCAzMDAwIFtzaXplPTMyXQ0KDQo= ---1463786495-223338545-976498884=:506-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/