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: [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (10/14) parport
Date: Fri, 21 Mar 2003 11:57:37 +0900 [thread overview]
Message-ID: <20030321025737.GJ1847@yuzuki.cinet.co.jp> (raw)
In-Reply-To: <20030321022850.GA1767@yuzuki.cinet.co.jp>
This is the patch to support NEC PC-9800 subarchitecture
against 2.5.65-ac1. (10/14)
Parallel port support.
- Change IO port and IRQ assign.
- Add probing for PC98 parport.
I make this patch simplify by limiting usage bi-directioal only.
Since lp_old98 supports output only parpose.
Regards,
Osamu Tomita
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-21 2:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-21 2:28 [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (0/14) summary Osamu Tomita
2003-03-21 2:38 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (1/14) boot98 update Osamu Tomita
2003-03-21 2:40 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (2/14) console Osamu Tomita
2003-03-21 2:41 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (3/14) misc core Osamu Tomita
2003-03-21 2:44 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (4/14) DMA Osamu Tomita
2003-03-21 2:45 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (5/14) floppy update Osamu Tomita
2003-03-21 2:46 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (6/14) IDE Osamu Tomita
2003-03-21 2:48 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (7/14) kanji Osamu Tomita
2003-03-21 2:50 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (8/14) kconfig Osamu Tomita
2003-03-21 2:51 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (9/14) NIC Osamu Tomita
2003-03-21 4:11 ` Jeff Garzik
2003-03-21 4:35 ` Osamu Tomita
2003-03-21 2:57 ` Osamu Tomita [this message]
2003-03-21 2:59 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (11/14) PCI Osamu Tomita
2003-03-21 3:00 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (12/14) PCMCIA Osamu Tomita
2003-03-21 3:02 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (13/14) SCSI Osamu Tomita
2003-03-21 3:04 ` [PATCH 2.5.65-ac1] Support PC-9800 subarchitecture (14/14) video update 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=20030321025737.GJ1847@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®