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: [PATCHSET] PC-9800 subarch. support for 2.5.61 (22/26) reboot
Date: Mon, 17 Feb 2003 23:20:18 +0900	[thread overview]
Message-ID: <20030217142018.GV4799@yuzuki.cinet.co.jp> (raw)
In-Reply-To: <20030217134333.GA4734@yuzuki.cinet.co.jp>

This is patchset to support NEC PC-9800 subarchitecture
against 2.5.61 (22/26).

Support difference of machine reboot method, using mach-* scheme.

diff -Nru linux-2.5.53/arch/i386/kernel/reboot.c linux98-2.5.53/arch/i386/kernel/reboot.c
--- linux-2.5.53/arch/i386/kernel/reboot.c	2002-12-24 14:19:53.000000000 +0900
+++ linux98-2.5.53/arch/i386/kernel/reboot.c	2002-12-26 10:46:08.000000000 +0900
@@ -8,6 +8,7 @@
 #include <linux/interrupt.h>
 #include <linux/mc146818rtc.h>
 #include <asm/uaccess.h>
+#include <mach_reboot.h>
 
 /*
  * Power off function, if any
@@ -125,15 +126,6 @@
 	0xea, 0x00, 0x00, 0xff, 0xff		/*    ljmp  $0xffff,$0x0000  */
 };
 
-static inline void kb_wait(void)
-{
-	int i;
-
-	for (i=0; i<0x10000; i++)
-		if ((inb_p(0x64) & 0x02) == 0)
-			break;
-}
-
 /*
  * Switch to real mode and then execute the code
  * specified by the code and length parameters.
@@ -264,13 +256,7 @@
 		/* rebooting needs to touch the page at absolute addr 0 */
 		*((unsigned short *)__va(0x472)) = reboot_mode;
 		for (;;) {
-			int i;
-			for (i=0; i<100; i++) {
-				kb_wait();
-				udelay(50);
-				outb(0xfe,0x64);         /* pulse reset low */
-				udelay(50);
-			}
+			mach_reboot();
 			/* That didn't work - force a triple fault.. */
 			__asm__ __volatile__("lidt %0": :"m" (no_idt));
 			__asm__ __volatile__("int3");
diff -Nru linux-2.5.53/include/asm-i386/mach-default/mach_reboot.h linux98-2.5.53/include/asm-i386/mach-default/mach_reboot.h
--- linux-2.5.53/include/asm-i386/mach-default/mach_reboot.h	1970-01-01 01:00:00.000000000 +0100
+++ linux98-2.5.53/include/asm-i386/mach-default/mach_reboot.h	2002-10-31 15:05:52.000000000 +0000
@@ -0,0 +1,30 @@
+/*
+ *  include/asm-i386/mach-default/mach_reboot.h
+ *
+ *  Machine specific reboot functions for generic.
+ *  Split out from reboot.c by Osamu Tomita <tomita@cinet.co.jp>
+ */
+#ifndef _MACH_REBOOT_H
+#define _MACH_REBOOT_H
+
+static inline void kb_wait(void)
+{
+	int i;
+
+	for (i = 0; i < 0x10000; i++)
+		if ((inb_p(0x64) & 0x02) == 0)
+			break;
+}
+
+static inline void mach_reboot(void)
+{
+	int i;
+	for (i = 0; i < 100; i++) {
+		kb_wait();
+		udelay(50);
+		outb(0xfe, 0x64);         /* pulse reset low */
+		udelay(50);
+	}
+}
+
+#endif /* !_MACH_REBOOT_H */
diff -Nru linux-2.5.53/include/asm-i386/mach-pc9800/mach_reboot.h linux98-2.5.53/include/asm-i386/mach-pc9800/mach_reboot.h
--- linux-2.5.53/include/asm-i386/mach-pc9800/mach_reboot.h	1970-01-01 01:00:00.000000000 +0100
+++ linux98-2.5.53/include/asm-i386/mach-pc9800/mach_reboot.h	2002-10-31 15:05:52.000000000 +0000
@@ -0,0 +1,21 @@
+/*
+ *  include/asm-i386/mach-pc9800/mach_reboot.h
+ *
+ *  Machine specific reboot functions for PC-9800.
+ *  Written by Osamu Tomita <tomita@cinet.co.jp>
+ */
+#ifndef _MACH_REBOOT_H
+#define _MACH_REBOOT_H
+
+#ifdef CMOS_WRITE
+#undef CMOS_WRITE
+#define CMOS_WRITE(a,b)	do{}while(0)
+#endif
+
+static inline void mach_reboot(void)
+{
+	outb(0, 0xf0);		/* signal CPU reset */
+	mdelay(1);
+}
+
+#endif /* !_MACH_REBOOT_H */

  parent reply	other threads:[~2003-02-17 14:13 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-17 13:43 [PATCHSET] PC-9800 subarch. support for 2.5.61 (0/26) summary Osamu Tomita
2003-02-17 13:48 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (1/26) ALSA Osamu Tomita
2003-02-17 13:49 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (2/26) APM Osamu Tomita
2003-02-18 10:37   ` Christoph Hellwig
2003-02-17 13:51 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (3/26) mach-pc9800 Osamu Tomita
2003-02-17 14:48   ` Sam Ravnborg
2003-02-17 15:35     ` Osamu Tomita
2003-02-18 10:39   ` Christoph Hellwig
2003-02-17 13:54 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (4/26) boot Osamu Tomita
2003-02-17 13:56 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (5/26) char device Osamu Tomita
2003-02-18 10:45   ` Christoph Hellwig
2003-02-17 14:03 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (6/26) console Osamu Tomita
2003-02-17 14:06 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (7/26) misc core Osamu Tomita
2003-02-17 14:07 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (8/26) core Osamu Tomita
2003-02-17 14:58   ` Sam Ravnborg
2003-02-17 14:08 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (9/26) DMA Osamu Tomita
2003-02-17 14:09 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (10/26) floppy #1 Osamu Tomita
2003-02-17 14:09 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (11/26) floppy #2 Osamu Tomita
2003-02-17 14:10 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (12/26) FS Osamu Tomita
2003-02-17 14:11 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (13/26) IDE Osamu Tomita
2003-02-17 14:12 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (14/26) input Osamu Tomita
2003-03-14  8:22   ` Vojtech Pavlik
2003-03-15  6:09     ` Osamu Tomita
2003-03-15  8:01       ` Vojtech Pavlik
2003-02-17 14:13 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (15/26) kanji Osamu Tomita
2003-02-17 14:15 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (16/26) NIC Osamu Tomita
2003-02-17 17:02   ` Jeff Garzik
2003-02-17 18:06     ` Brian Gerst
2003-02-17 18:33       ` Jeff Garzik
2003-02-17 19:02       ` YOSHIFUJI Hideaki / 吉藤英明
2003-02-17 14:16 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (17/26) parport Osamu Tomita
2003-02-17 14:17 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (18/26) PCI Osamu Tomita
2003-02-17 14:18 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (19/26) PCI BIOS Osamu Tomita
2003-02-17 14:18 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (20/26) PCMCIA Osamu Tomita
2003-02-17 14:19 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (21/26) PNP Osamu Tomita
2003-02-17 14:20 ` Osamu Tomita [this message]
2003-02-17 14:21 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (23/26) SCSI Osamu Tomita
2003-02-18 10:54   ` 'Christoph Hellwig'
2003-02-17 14:24 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (24/26) serial Osamu Tomita
2003-02-17 14:25 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (25/26) SMP Osamu Tomita
2003-02-17 14:26 ` [PATCHSET] PC-9800 subarch. support for 2.5.61 (26/26) video card 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=20030217142018.GV4799@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®