Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 17 Feb 2003 09:40:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 17 Feb 2003 09:36:59 -0500 Received: from chii.cinet.co.jp ([61.197.228.217]:29568 "EHLO yuzuki.cinet.co.jp") by vger.kernel.org with ESMTP id ; Mon, 17 Feb 2003 09:08:53 -0500 Date: Mon, 17 Feb 2003 23:17:28 +0900 From: Osamu Tomita To: Linux Kernel Mailing List Cc: Alan Cox Subject: [PATCHSET] PC-9800 subarch. support for 2.5.61 (18/26) PCI Message-ID: <20030217141728.GR4799@yuzuki.cinet.co.jp> References: <20030217134333.GA4734@yuzuki.cinet.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030217134333.GA4734@yuzuki.cinet.co.jp> User-Agent: Mutt/1.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4337 Lines: 126 This is patchset to support NEC PC-9800 subarchitecture against 2.5.61 (18/26). Small changes for PCI support. Fix for difference of IRQ numbers and IO addresses. diff -Nru linux/arch/i386/pci/irq.c linux98/arch/i386/pci/irq.c --- linux/arch/i386/pci/irq.c 2002-10-12 13:22:46.000000000 +0900 +++ linux98/arch/i386/pci/irq.c 2002-10-12 14:18:52.000000000 +0900 @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -25,6 +26,7 @@ static struct irq_routing_table *pirq_table; +#ifndef CONFIG_X86_PC9800 /* * Never use: 0, 1, 2 (timer, keyboard, and cascade) * Avoid using: 13, 14 and 15 (FP error and IDE). @@ -36,6 +38,20 @@ 1000000, 1000000, 1000000, 1000, 1000, 0, 1000, 1000, 0, 0, 0, 0, 1000, 100000, 100000, 100000 }; +#else +/* + * Never use: 0, 1, 2, 7 (timer, keyboard, CRT VSYNC and cascade) + * Avoid using: 8, 9 and 15 (FP error and IDE). + * Penalize: 4, 5, 11, 12, 13, 14 (known ISA uses: serial, floppy, sound, mouse + * and parallel) + */ +unsigned int pcibios_irq_mask = 0xff78; + +static int pirq_penalty[16] = { + 1000000, 1000000, 1000000, 0, 1000, 1000, 0, 1000000, + 100000, 100000, 0, 1000, 1000, 1000, 1000, 100000 +}; +#endif struct irq_router { char *name; @@ -612,6 +628,17 @@ r->set(pirq_router_dev, dev, pirq, 11); } +#ifdef CONFIG_X86_PC9800 + if ((dev->class >> 8) == PCI_CLASS_BRIDGE_CARDBUS) { + if (pci_find_device(PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_INTEL_82439TX, NULL) != NULL) { + if (mask & 0x0040) { + mask &= 0x0040; /* assign IRQ 6 only */ + printk("pci-irq: Use IRQ6 for CardBus controller\n"); + } + } + } +#endif /* * Find the best IRQ to assign: use the one * reported by the device if possible. diff -Nru linux-2.5.61/drivers/pci/quirks.c linux98-2.5.61/drivers/pci/quirks.c --- linux-2.5.61/drivers/pci/quirks.c 2003-02-15 08:51:07.000000000 +0900 +++ linux98-2.5.61/drivers/pci/quirks.c 2003-02-16 17:19:03.000000000 +0900 @@ -551,6 +551,8 @@ { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596, quirk_isa_dma_hangs }, { PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, quirk_isa_dma_hangs }, { PCI_FIXUP_FINAL, PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_1, quirk_isa_dma_hangs }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_dma_hangs }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_S3, PCI_DEVICE_ID_S3_868, quirk_s3_64M }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_S3, PCI_DEVICE_ID_S3_968, quirk_s3_64M }, { PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437, quirk_triton }, diff -Nru linux/drivers/pcmcia/yenta.c linux98/drivers/pcmcia/yenta.c --- linux/drivers/pcmcia/yenta.c 2002-11-18 13:29:48.000000000 +0900 +++ linux98/drivers/pcmcia/yenta.c 2002-11-19 11:02:09.000000000 +0900 @@ -8,6 +8,7 @@ * Dynamically adjust the size of the bridge resource * */ +#include #include #include #include @@ -510,6 +511,7 @@ add_timer(&socket->poll_timer); } +#ifndef CONFIG_X86_PC9800 /* * Only probe "regular" interrupts, don't * touch dangerous spots like the mouse irq, @@ -520,6 +522,10 @@ * Default to 11, 10, 9, 7, 6, 5, 4, 3. */ static u32 isa_interrupts = 0x0ef8; +#else +/* Default to 12, 10, 6, 5, 3. */ +static u32 isa_interrupts = 0x1468; +#endif static unsigned int yenta_probe_irq(pci_socket_t *socket, u32 isa_irq_mask) { diff -Nru linux/include/asm-i386/pci.h linux98/include/asm-i386/pci.h --- linux/include/asm-i386/pci.h 2002-06-09 14:29:24.000000000 +0900 +++ linux98/include/asm-i386/pci.h 2002-06-10 20:49:15.000000000 +0900 @@ -17,7 +17,11 @@ #endif extern unsigned long pci_mem_start; +#ifndef CONFIG_X86_PC9800 #define PCIBIOS_MIN_IO 0x1000 +#else +#define PCIBIOS_MIN_IO 0x4000 +#endif #define PCIBIOS_MIN_MEM (pci_mem_start) void pcibios_config_init(void); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/