public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Osamu Tomita <tomita@cinet.co.jp>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCHSET 13/17] support PC-9800 against 2.5.45-ac1 (PCI)
Date: Thu, 07 Nov 2002 03:48:06 +0900	[thread overview]
Message-ID: <3DC963E6.C3D49AE7@cinet.co.jp> (raw)
In-Reply-To: 3DC94C7B.79DE5EBC@cinet.co.jp

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

This patch includes PCI related files.

diffstat:
 arch/i386/pci/irq.c    |   27 +++++++++++++++++++++++++++
 drivers/pci/quirks.c   |    7 +++++++
 drivers/pcmcia/yenta.c |    6 ++++++
 include/asm-i386/pci.h |    4 ++++
 4 files changed, 44 insertions(+)

-- 
Osamu Tomita

[-- Attachment #2: pci.patch --]
[-- Type: text/plain, Size: 3980 bytes --]

diff -urN linux/arch/i386/pci/irq.c linux98/arch/i386/pci/irq.c
--- linux/arch/i386/pci/irq.c	Sat Oct 12 13:22:46 2002
+++ linux98/arch/i386/pci/irq.c	Sat Oct 12 14:18:52 2002
@@ -5,6 +5,7 @@
  */
 
 #include <linux/config.h>
+#include <linux/pci_ids.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
@@ -25,6 +26,7 @@
 
 static struct irq_routing_table *pirq_table;
 
+#ifndef CONFIG_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_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 -urN linux/drivers/pcmcia/yenta.c linux98/drivers/pcmcia/yenta.c
--- linux/drivers/pcmcia/yenta.c	Sat Oct 12 13:22:10 2002
+++ linux98/drivers/pcmcia/yenta.c	Sun Oct 13 17:29:24 2002
@@ -3,6 +3,7 @@
  *
  * (C) Copyright 1999, 2000 Linus Torvalds
  */
+#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/sched.h>
@@ -505,6 +506,7 @@
 	add_timer(&socket->poll_timer);
 }
 
+#ifndef CONFIG_PC9800
 /*
  * Only probe "regular" interrupts, don't
  * touch dangerous spots like the mouse irq,
@@ -515,6 +517,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 -urN linux/drivers/pci/quirks.c linux98/drivers/pci/quirks.c
--- linux/drivers/pci/quirks.c	Tue Sep 10 02:35:00 2002
+++ linux98/drivers/pci/quirks.c	Tue Sep 10 09:07:50 2002
@@ -54,7 +54,11 @@
 {
 	if (!isa_dma_bridge_buggy) {
 		isa_dma_bridge_buggy=1;
+#ifndef CONFIG_PC9800
 		printk(KERN_INFO "Activating ISA DMA hang workarounds.\n");
+#else
+		printk(KERN_INFO "Activating C-bus DMA hang workarounds.\n");
+#endif
 	}
 }
 
@@ -491,6 +495,9 @@
 	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_0,	quirk_isa_dma_hangs },
 	{ 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 },
+#ifdef CONFIG_PC9800
+	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_NEC,	PCI_DEVICE_ID_NEC_CBUS_1,	quirk_isa_dma_hangs },
+#endif
 	{ 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 -urN linux/include/asm-i386/pci.h linux98/include/asm-i386/pci.h
--- linux/include/asm-i386/pci.h	Sun Jun  9 14:29:24 2002
+++ linux98/include/asm-i386/pci.h	Mon Jun 10 20:49:15 2002
@@ -17,7 +17,11 @@
 #endif
 
 extern unsigned long pci_mem_start;
+#ifndef CONFIG_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);

  parent reply	other threads:[~2002-11-06 18:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-06 17:08 [PATCHSET 0/17] support PC-9800 against 2.5.45-ac1 Osamu Tomita
2002-11-06 17:25 ` [PATCHSET 1/17] support PC-9800 against 2.5.45-ac1 (boot) Osamu Tomita
2002-11-06 17:35 ` [PATCHSET 2/17] support PC-9800 against 2.5.45-ac1 Osamu Tomita
2002-11-06 17:40 ` [PATCHSET 3/17] support PC-9800 against 2.5.45-ac1 (core) Osamu Tomita
2002-11-06 17:52 ` [PATCHSET 5/17] support PC-9800 against 2.5.45-ac1 (apm) Osamu Tomita
     [not found]   ` <1036600885.19924.6.camel@localhost.localdomain>
2002-11-07 15:05     ` Osamu Tomita
2002-11-06 17:59 ` [PATCHSET 4/17] support PC-9800 against 2.5.45-ac1 (console) Osamu Tomita
2002-11-11 17:18   ` Osamu Tomita
2002-11-06 18:06 ` [PATCHSET 6/17] support PC-9800 against 2.5.45-ac1 (network device) Osamu Tomita
2002-11-06 18:19 ` [PATCHSET 7/17] support PC-9800 against 2.5.45-ac1 (FS) Osamu Tomita
2002-11-06 18:22 ` [PATCHSET 8/17] support PC-9800 against 2.5.45-ac1 (IDE) Osamu Tomita
2002-11-06 18:26 ` [PATCHSET 9/17] support PC-9800 against 2.5.45-ac1 (core#2) Osamu Tomita
2002-11-06 18:31 ` [PATCHSET 10/17] support PC-9800 against 2.5.45-ac1 (input) Osamu Tomita
2002-11-08 22:24   ` Osamu Tomita
2002-11-06 18:36 ` [PATCHSET 11/17] support PC-9800 against 2.5.45-ac1 (kernel) Osamu Tomita
2002-11-06 18:42 ` [PATCHSET 12/17] support PC-9800 against 2.5.45-ac1 (parport) Osamu Tomita
2002-11-06 18:48 ` Osamu Tomita [this message]
2002-11-06 18:50 ` [PATCHSET 14/17] support PC-9800 against 2.5.45-ac1 (PNP) Osamu Tomita
2002-11-06 18:53 ` [PATCHSET 15/17] support PC-9800 against 2.5.45-ac1 (SCSI) Osamu Tomita
2002-11-06 18:56 ` [PATCHSET 16/17] support PC-9800 against 2.5.45-ac1 (serial) Osamu Tomita
2002-11-06 18:58 ` [PATCHSET 17/17] support PC-9800 against 2.5.45-ac1 (SMP) Osamu Tomita

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=3DC963E6.C3D49AE7@cinet.co.jp \
    --to=tomita@cinet.co.jp \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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