From: Osamu Tomita <tomita@cinet.co.jp>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Complete support PC-9800 for 2.5.64-ac4 (8/11) parport
Date: Sun, 16 Mar 2003 10:12:32 +0900 [thread overview]
Message-ID: <20030316011232.GH1592@yuzuki.cinet.co.jp> (raw)
In-Reply-To: <20030316001622.GA1061@yuzuki.cinet.co.jp>
This is the patch to support NEC PC-9800 subarchitecture
against 2.5.64-ac4. (8/11)
Parallel port support.
- Change IO port and IRQ assign.
- Add probing for PC98 parport.
diff -Nru linux-2.5.64-ac2/drivers/parport/parport_pc.c linux98-2.5.64-ac2/drivers/parport/parport_pc.c
--- linux-2.5.64-ac2/drivers/parport/parport_pc.c 2003-03-08 08:25:20.000000000 +0900
+++ linux98-2.5.64-ac2/drivers/parport/parport_pc.c 2003-03-08 10:44:43.000000000 +0900
@@ -1892,6 +1892,9 @@
config & 0x80 ? "Level" : "Pulses");
configb = inb (CONFIGB (pb));
+ if (pc98 && (CONFIGB(pb) == 0x14d) && ((configb & 0x38) == 0x30))
+ configb = (configb & ~0x38) | 0x28; /* IRQ 14 */
+
printk (KERN_DEBUG "0x%lx: ECP port cfgA=0x%02x cfgB=0x%02x\n",
pb->base, config, configb);
printk (KERN_DEBUG "0x%lx: ECP settings irq=", pb->base);
@@ -2032,6 +2035,9 @@
ECR_WRITE (pb, ECR_CNF << 5); /* Configuration MODE */
intrLine = (inb (CONFIGB (pb)) >> 3) & 0x07;
+ if (pc98 && (CONFIGB(pb) == 0x14d) && (intrLine == 6))
+ intrLine = 5; /* IRQ 14 */
+
irq = lookup[intrLine];
ECR_WRITE (pb, oecr);
@@ -2248,7 +2254,7 @@
parport_ECR_present(p);
}
- if (base != 0x3bc) {
+ if (!pc98 && base != 0x3bc) {
EPP_res = request_region(base+0x3, 5, fake_name);
if (EPP_res)
if (!parport_EPP_supported(p))
@@ -3022,6 +3028,26 @@
{
int count = 0;
+ if (pc98) {
+ /* Set default settings for IEEE1284 parport */
+ int base = 0x140;
+ int base_hi = 0x14c;
+ int irq = 14;
+ int dma = PARPORT_DMA_NONE;
+
+ /* Check PC9800 old style parport */
+ outb(inb(0x149) & ~0x10, 0x149); /* disable IEEE1284 */
+ if (!(inb(0x149) & 0x10)) { /* IEEE1284 disabled ? */
+ outb(inb(0x149) | 0x10, 0x149); /* enable IEEE1284 */
+ if (inb(0x149) & 0x10) { /* IEEE1284 enabled ? */
+ if (parport_pc_probe_port(base, base_hi,
+ irq, dma, NULL))
+ count++;
+ }
+ }
+
+ }
+
if (parport_pc_probe_port(0x3bc, 0x7bc, autoirq, autodma, NULL))
count++;
if (parport_pc_probe_port(0x378, 0x778, autoirq, autodma, NULL))
next prev parent reply other threads:[~2003-03-16 1:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-16 0:16 Complete support PC-9800 for 2.5.64-ac4 (0/11) summary Osamu Tomita
2003-03-16 1:02 ` Complete support PC-9800 for 2.5.64-ac4 (1/11) console Osamu Tomita
2003-03-16 1:03 ` Complete support PC-9800 for 2.5.64-ac4 (2/11) misc core Osamu Tomita
2003-03-16 1:04 ` Complete support PC-9800 for 2.5.64-ac4 (3/11) DMA Osamu Tomita
2003-03-16 1:04 ` Complete support PC-9800 for 2.5.64-ac4 (4/11) IDE Osamu Tomita
2003-03-16 1:05 ` Complete support PC-9800 for 2.5.64-ac4 (5/11) kanji Osamu Tomita
2003-03-16 1:06 ` Complete support PC-9800 for 2.5.64-ac4 (6/11) Kconfig Osamu Tomita
2003-03-16 1:11 ` Complete support PC-9800 for 2.5.64-ac4 (7/11) NIC Osamu Tomita
2003-03-16 1:12 ` Osamu Tomita [this message]
2003-03-16 1:13 ` Complete support PC-9800 for 2.5.64-ac4 (9/11) PCI Osamu Tomita
2003-03-16 1:14 ` Complete support PC-9800 for 2.5.64-ac4 (10/11) PCMCIA Osamu Tomita
2003-03-16 1:15 ` Complete support PC-9800 for 2.5.64-ac4 (11/11) SCSI Osamu Tomita
2003-03-16 17:47 ` James Bottomley
2003-03-16 18:36 ` Geert Uytterhoeven
2003-03-16 18:54 ` James Bottomley
2003-03-16 20:00 ` Geert Uytterhoeven
2003-03-16 22:26 ` James Bottomley
2003-03-17 10:25 ` Geert Uytterhoeven
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=20030316011232.GH1592@yuzuki.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
all inboxes | Powered by JetHome®