mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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] PC-9800 additional for 2.5.61-ac1 (4/21) misc core
Date: Thu, 20 Feb 2003 21:24:50 +0900	[thread overview]
Message-ID: <20030220122450.GD1657@yuzuki.cinet.co.jp> (raw)
In-Reply-To: <20030220121620.GA1618@yuzuki.cinet.co.jp>

This is additional patch to support NEC PC-9800 subarchitecture
against 2.5.61-ac1. (4/21)

Small core patches for PC98. I think these are small and clean.

diff -Nru linux/include/asm-i386/io.h linux98/include/asm-i386/io.h
--- linux/include/asm-i386/io.h	2002-10-12 13:22:45.000000000 +0900
+++ linux98/include/asm-i386/io.h	2002-10-12 19:25:19.000000000 +0900
@@ -27,6 +27,8 @@
  *		Linus
  */
 
+#include <linux/config.h>
+
  /*
   *  Bit simplified and optimized by Jan Hubicka
   *  Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999.
@@ -288,7 +290,11 @@
 #ifdef SLOW_IO_BY_JUMPING
 #define __SLOW_DOWN_IO "jmp 1f; 1: jmp 1f; 1:"
 #else
+#ifdef CONFIG_X86_PC9800
+#define __SLOW_DOWN_IO "outb %%al,$0x5f;"
+#else
 #define __SLOW_DOWN_IO "outb %%al,$0x80;"
+#endif
 #endif
 
 static inline void slow_down_io(void) {
diff -Nru linux/include/asm-i386/irq.h linux98/include/asm-i386/irq.h
--- linux/include/asm-i386/irq.h	2002-09-21 00:20:16.000000000 +0900
+++ linux98/include/asm-i386/irq.h	2002-09-21 07:17:56.000000000 +0900
@@ -17,7 +17,11 @@
 
 static __inline__ int irq_cannonicalize(int irq)
 {
+#ifdef CONFIG_X86_PC9800
+	return ((irq == 7) ? 11 : irq);
+#else
 	return ((irq == 2) ? 9 : irq);
+#endif
 }
 
 extern void disable_irq(unsigned int);
diff -Nru linux/include/asm-i386/pc9800.h linux98/include/asm-i386/pc9800.h
--- linux/include/asm-i386/pc9800.h	1970-01-01 09:00:00.000000000 +0900
+++ linux98/include/asm-i386/pc9800.h	2002-08-17 21:50:18.000000000 +0900
@@ -0,0 +1,27 @@
+/*
+ *  PC-9800 machine types.
+ *
+ *  Copyright (C) 1999	TAKAI Kosuke <tak@kmc.kyoto-u.ac.jp>
+ *			(Linux/98 Project)
+ */
+
+#ifndef _ASM_PC9800_H_
+#define _ASM_PC9800_H_
+
+#include <asm/pc9800_sca.h>
+#include <asm/types.h>
+
+#define __PC9800SCA(type, pa)	(*(type *) phys_to_virt(pa))
+#define __PC9800SCA_TEST_BIT(pa, n)	\
+	((__PC9800SCA(u8, pa) & (1U << (n))) != 0)
+
+#define PC9800_HIGHRESO_P()	__PC9800SCA_TEST_BIT(PC9800SCA_BIOS_FLAG, 3)
+#define PC9800_8MHz_P()		__PC9800SCA_TEST_BIT(PC9800SCA_BIOS_FLAG, 7)
+
+				/* 0x2198 is 98 21 on memory... */
+#define PC9800_9821_P()		(__PC9800SCA(u16, PC9821SCA_ROM_ID) == 0x2198)
+
+/* Note PC9821_...() are valid only when PC9800_9821_P() was true. */
+#define PC9821_IDEIF_DOUBLE_P()	__PC9800SCA_TEST_BIT(PC9821SCA_ROM_FLAG4, 4)
+
+#endif
diff -Nru linux/include/linux/kernel.h linux98/include/linux/kernel.h
--- linux/include/linux/kernel.h	2003-01-14 14:58:03.000000000 +0900
+++ linux98/include/linux/kernel.h	2003-01-14 23:11:42.000000000 +0900
@@ -224,4 +224,10 @@
 #define __FUNCTION__ (__func__)
 #endif
 
+#ifdef CONFIG_X86_PC9800
+#define pc98 1
+#else
+#define pc98 0
+#endif
+
 #endif

  parent reply	other threads:[~2003-02-20 12:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-20 12:16 [PATCH] PC-9800 additional for 2.5.61-ac1 (0/21) summary Osamu Tomita
2003-02-20 12:22 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (1/21) ALSA Osamu Tomita
2003-02-20 12:22 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (2/21) APM Osamu Tomita
2003-02-20 12:23 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (3/21) console Osamu Tomita
2003-02-20 12:24 ` Osamu Tomita [this message]
2003-02-20 12:25 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (5/21) Osamu Tomita
2003-02-20 12:26 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (6/21) fs/patition Osamu Tomita
2003-02-20 12:28 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (7/21) IDE Osamu Tomita
2003-02-20 12:29 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (8/21) kanji Osamu Tomita
2003-02-20 12:30 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (9/21) kconfig Osamu Tomita
2003-02-20 12:31 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (10/21) network card Osamu Tomita
2003-02-20 12:32 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (11/21) parport Osamu Tomita
2003-02-20 12:33 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (12/21) PCI Osamu Tomita
2003-02-20 12:34 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (13/21) PCMCIA Osamu Tomita
2003-02-20 12:34 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (14/21) PNP Osamu Tomita
2003-02-20 12:35 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (15/21) RTC Osamu Tomita
2003-02-20 12:36 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (17/21) serial Osamu Tomita
2003-02-20 12:37 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (18/21) setup Osamu Tomita
2003-02-20 12:38 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (19/21) SMP Osamu Tomita
2003-02-20 12:38 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (20/21) timer Osamu Tomita
2003-02-20 12:39 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (21/21) traps 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=20030220122450.GD1657@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®