PC-9800 sub-arch (0/29) summary
Subsystems (16)
PATCH 1/1 PC-9800 sub-arch (0/29) summary
This is patchset to support NEC PC-9800 subarchitecture against 2.5.59.
Please download recent patch from following URL.
http://downloads.sourceforge.jp/linux98/2110/linux98-2.5.59.patch.tar.bz2
Comments and test reports are wellcome.
Changes:
- Add new driver for standard serial port.
Description:
- 2.5.50-ac1-merged.patch
PC98 support patch in 2.5.50-ac1 with minimum changes to apply 2.5.59.
arch/i386/boot98/Makefile | 90 arch/i386/boot98/bootsect.S | 397 ++ arch/i386/boot98/compressed/Makefile | 26 arch/i386/boot98/compressed/head.S | 128 arch/i386/boot98/compressed/misc.c | 379 ++ arch/i386/boot98/compressed/vmlinux.scr | 9 arch/i386/boot98/install.sh | 40 arch/i386/boot98/setup.S | 961 +++++ arch/i386/boot98/tools/build.c | 188 + arch/i386/boot98/video.S | 262 + arch/i386/kernel/cpu/proc.c | 2 arch/i386/mach-pc9800/Makefile | 15 arch/i386/mach-pc9800/setup.c | 117 arch/i386/pci/pcbios.c | 15 drivers/block/Makefile | 4 drivers/block/floppy98.c | 4650 +++++++++++++++++++++++++ drivers/char/lp_old98.c | 577 +++ drivers/char/upd4990a.c | 438 ++ drivers/input/keyboard/98kbd.c | 379 ++ drivers/input/keyboard/Kconfig | 12 drivers/input/mouse/98busmouse.c | 201 + drivers/input/mouse/Kconfig | 12 drivers/input/serio/98kbd-io.c | 181 include/asm-i386/gdc.h | 217 + include/asm-i386/pc9800_sca.h | 25 include/asm-i386/serial.h | 7 include/asm-i386/setup.h | 1 include/asm-i386/upd4990a.h | 58 include/linux/upd4990a.h | 140 drivers/video/console/gdccon.c | 834 ++++ drivers/input/keyboard/Makefile | 1 drivers/input/mouse/Makefile | 1 drivers/input/serio/Makefile | 1 arch/i386/kernel/i8259.c | 96 arch/i386/kernel/io_apic.c | 24 arch/i386/kernel/mpparse.c | 2 arch/i386/kernel/reboot.c | 18 arch/i386/kernel/setup.c | 1 include/asm-i386/mach-default/io_ports.h | 30 include/asm-i386/mach-default/irq_vectors.h | 7 include/asm-i386/mach-default/mach_reboot.h | 30 include/asm-i386/mach-default/pci-functions.h | 19 include/asm-i386/mach-pc9800/io_ports.h | 30 include/asm-i386/mach-pc9800/irq_vectors.h | 93 include/asm-i386/mach-pc9800/mach_reboot.h | 21 include/asm-i386/mach-pc9800/pci-functions.h | 20 include/asm-i386/mach-pc9800/setup_arch_post.h | 29 include/asm-i386/mach-pc9800/setup_arch_pre.h | 36 include/asm-i386/mach-visws/irq_vectors.h | 6 include/asm-i386/mach-voyager/irq_vectors.h | 6 arch/i386/kernel/apic.c | 7 drivers/video/console/Makefile | 1 include/asm-i386/processor.h | 2 arch/i386/kernel/vm86.c | 8 arch/i386/kernel/traps.c | 7 drivers/input/serio/Kconfig | 12 drivers/char/Kconfig | 22 arch/i386/Makefile | 1 58 files changed, 10806 insertions(+), 90 deletions(-)
- alsa-pc98.patch
ALSA sound drivers for PC98
Fix bug 2.5.59 and additional driver.
sound/isa/cs423x/pc9801_118_magic.h | 411 +++++++++++++++++++++++++++++++ sound/isa/cs423x/sound_pc9800.h | 23 + sound/drivers/mpu401/Makefile | 1 sound/isa/cs423x/Makefile | 2 sound/core/Makefile | 1 sound/drivers/mpu401/mpu401.c | 9 sound/drivers/opl3/Makefile | 1 sound/isa/Kconfig | 6 sound/isa/cs423x/pc98.c | 466 ++++++++++++++++++++++++++++++++++++ 9 files changed, 917 insertions(+), 3 deletions(-)
- apm.patch
APM support for PC98. Including PC98's BIOS bug fix.
arch/i386/kernel/apm.c | 16 ++++++++++++---- include/linux/apm_bios.h | 24 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-)
- arch-i386.patch
Core patches for PC98 under arch/i386 and include/asm-i386/mach-* directory.
arch/i386/Kconfig | 10 + arch/i386/Makefile | 14 + arch/i386/kernel/setup.c | 99 ------------ arch/i386/kernel/time.c | 115 ++------------ arch/i386/kernel/timers/timer_pit.c | 22 +- arch/i386/kernel/timers/timer_tsc.c | 94 +----------- arch/i386/kernel/traps.c | 12 - include/asm-i386/mach-default/calibrate_tsc.h | 90 +++++++++++ include/asm-i386/mach-default/mach_resources.h | 113 ++++++++++++++ include/asm-i386/mach-default/mach_time.h | 122 +++++++++++++++ include/asm-i386/mach-default/mach_traps.h | 29 +++ include/asm-i386/mach-pc9800/calibrate_tsc.h | 71 +++++++++ include/asm-i386/mach-pc9800/do_timer.h | 80 ++++++++++ include/asm-i386/mach-pc9800/mach_resources.h | 192 +++++++++++++++++++++++++ include/asm-i386/mach-pc9800/mach_time.h | 136 +++++++++++++++++ include/asm-i386/mach-pc9800/mach_traps.h | 27 +++ include/asm-i386/mach-pc9800/smpboot_hooks.h | 33 ++++ 17 files changed, 967 insertions(+), 292 deletions(-)
- console.patch
Support for PC98 Standard console.
drivers/video/console/Kconfig | 14 + drivers/char/Makefile | 9 drivers/char/console_macros.h | 14 + drivers/char/console_pc9800.h | 14 + drivers/char/consolemap.c | 58 ++++- drivers/char/pc9800.uni | 260 +++++++++++++++++++++++ drivers/char/vt.c | 459 +++++++++++++++++++++++++++++++++++------ drivers/char/vt_ioctl.c | 19 + include/linux/console.h | 11 include/linux/console_struct.h | 25 ++ include/linux/consolemap.h | 1 include/linux/tty.h | 4 include/linux/vt.h | 1 include/linux/vt_buffer.h | 4 14 files changed, 822 insertions(+), 71 deletions(-)
- drivers-net.patch
C-bus(PC98's legacy bus like ISA) network cards support.
drivers/net/8390.h | 3 drivers/net/Kconfig | 55 +++++ drivers/net/Makefile | 1 drivers/net/Makefile.lib | 1 drivers/net/ne2k_cbus.h | 481 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/net/at1700.c | 115 +++++++++-- drivers/net/ne.c | 356 +++++++++++++++++++++++++++++++++- drivers/net/3c509.c | 35 +++ drivers/net/Space.c | 2 9 files changed, 1017 insertions(+), 32 deletions(-)
- fs.patch
FAT fs and partition table support.
fs/fat/inode.c | 4 fs/partitions/Kconfig | 7 + fs/partitions/Makefile | 1 fs/partitions/check.c | 4 fs/partitions/msdos.c | 2 fs/partitions/nec98.c | 272 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/partitions/nec98.h | 10 + 7 files changed, 298 insertions(+), 2 deletions(-)
- ide.patch
Support standard IDE I/F of PC98.
drivers/ide/Kconfig | 5 drivers/ide/ide-disk.c | 67 +++ drivers/ide/ide-probe.c | 16 drivers/ide/ide-proc.c | 3 drivers/ide/ide.c | 9 drivers/ide/legacy/Makefile | 5 drivers/ide/legacy/hd98.c | 904 ++++++++++++++++++++++++++++++++++++++++++++ drivers/ide/legacy/pc9800.c | 82 +++ include/asm-i386/ide.h | 18 include/linux/hdreg.h | 19 include/linux/ide.h | 2 11 files changed, 1125 insertions(+), 5 deletions(-)
- include-asm.patch
Core patches for PC98 under include/asm-i386/ directory.
include/asm-i386/dma.h | 7 + include/asm-i386/io.h | 6 + include/asm-i386/irq.h | 4 include/asm-i386/pc9800.h | 27 ++++ include/asm-i386/pc9800_dma.h | 238 +++++++++++++++++++++++++++++++++++++++++ include/asm-i386/pgtable.h | 4 include/asm-i386/scatterlist.h | 6 + include/asm-i386/timex.h | 4 8 files changed, 296 insertions(+)
- input.patch
Beep driver and keyboard support files.
drivers/char/keyboard.c | 4 + drivers/input/misc/98spkr.c | 95 ++++++++++++++++++++++++++++++++++++++++++++ drivers/input/misc/Kconfig | 4 + drivers/input/misc/Makefile | 1 include/linux/kbd_kern.h | 5 +- include/linux/keyboard.h | 1 6 files changed, 108 insertions(+), 2 deletions(-)
- kernel.patch
Misc files for support PC98.
include/linux/kernel.h | 6 ++++++ kernel/dma.c | 3 +++ kernel/timer.c | 5 +++++ 3 files changed, 14 insertions(+)
- parport.patch
Parallel port support.
drivers/parport/parport_pc.c | 66 +++++++++++++++++++++++++++++++++++++++---- include/linux/parport_pc.h | 10 ++++++ 2 files changed, 71 insertions(+), 5 deletions(-)
- pci.patch
PCI support.
arch/i386/pci/irq.c | 27 +++++++++++++++++++++++++++ drivers/pcmcia/yenta.c | 6 ++++++ include/asm-i386/pci.h | 4 ++++ 3 files changed, 37 insertions(+)
- pcmcia.patch
PCMCIA (16bits) support.
drivers/pcmcia/i82365.c | 4 ++++ 1 files changed, 4 insertions(+)
- pnp.patch
Legacy bus PNP support.
drivers/pnp/isapnp/core.c | 5 +++++ 1 files changed, 5 insertions(+)
- scsi.patch
SCSI host adapter support.
drivers/scsi/Kconfig | 7 + drivers/scsi/Makefile | 10 + drivers/scsi/pc980155.c | 263 ++++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/pc980155.h | 47 +++++++ drivers/scsi/pc980155regs.h | 89 ++++++++++++++ drivers/scsi/scsi_scan.c | 1 drivers/scsi/scsi_syms.c | 4 drivers/scsi/scsicam98.c | 192 ++++++++++++++++++++++++++++++++ drivers/scsi/sd.c | 23 +++ drivers/scsi/wd33c93.c | 30 ++++- drivers/scsi/wd33c93.h | 5 11 files changed, 664 insertions(+), 7 deletions(-)
- serial.patch
Serial port driver.
drivers/serial/8250_pnp.c | 5 drivers/serial/Kconfig | 17 drivers/serial/Makefile | 1 drivers/serial/serial98.c | 1125 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/serial_core.h | 8 5 files changed, 1153 insertions(+), 3 deletions(-)
- smp.patch
SMP support.
arch/i386/kernel/mpparse.c | 34 ++++++++++++++++----- arch/i386/kernel/smpboot.c | 14 ++++++++ include/asm-i386/mach-default/bios_ebda.h | 15 +++++++++ include/asm-i386/mach-pc9800/bios_ebda.h | 14 ++++++++ include/asm-i386/mach-pc9800/mach_wakecpu.h | 45 ++++++++++++++++++++++++++++ 5 files changed, 114 insertions(+), 8 deletions(-)
-- *-update.patch are updates for files in 2.5.50-ac1.
- Kconfig-update.patch
drivers/char/Kconfig | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
- boot98-update.patch
arch/i386/boot98/compressed/Makefile | 3 +-- arch/i386/boot98/Makefile | 20 +++----------------- 2 files changed, 4 insertions(+), 19 deletions(-)
- floppy98-update.patch
drivers/block/floppy98.c | 84 +++++++++++++++++++++++++++-------------------- drivers/block/Makefile | 2 - 2 files changed, 50 insertions(+), 36 deletions(-)
- gdc-update.patch
include/asm-i386/gdc.h | 144 ++++++++++++++++++++++------------------- drivers/video/console/gdccon.c | 1 2 files changed, 79 insertions(+), 66 deletions(-)
- i8259.c-update.patch
arch/i386/kernel/i8259.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
- input-update.patch
drivers/input/mouse/98busmouse.c | 7 ++++--- drivers/input/serio/98kbd-io.c | 7 ++++--- drivers/input/keyboard/Kconfig | 2 +- drivers/input/mouse/Kconfig | 2 +- drivers/input/serio/Kconfig | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-)
- lp_old98-update.patch
drivers/char/lp_old98.c | 147 ++++++++++++++++++++++-------------------------- 1 files changed, 69 insertions(+), 78 deletions(-)
- mach-pc9800-update.patch
arch/i386/mach-pc9800/Makefile | 10 ----- arch/i386/mach-pc9800/setup.c | 8 ++-- arch/i386/mach-pc9800/topology.c | 68 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 13 deletions(-)
- pci-quirks-update.patch
drivers/pci/quirks.c | 2 ++ 1 files changed, 2 insertions(+)
- serial.h-update.patch
include/asm-i386/serial.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
- upd4990a.h-update.patch
include/asm-i386/upd4990a.h | 6 ------ 1 files changed, 6 deletions(-)
Thanks,
Osamu Tomita <[email protected]>
PATCH 1/1 PC-9800 sub-arch (2/29) ac-update
This is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (2/29).
Updates drivers/char/Kconfig in 2.5.50-ac1.
drivers/char/Kconfig +3 -3
@@ -577,7 +577,7 @@ config PC9800_OLDLP tristate "NEC PC-9800 old-style printer port support" - depends on PC9800 && !PARPORT + depends on X86_PC9800 && !PARPORT ---help--- If you intend to attach a printer to the parallel port of NEC PC-9801 /PC-9821 with OLD compatibility mode, Say Y.
@@ -785,7 +785,7 @@ config RTC tristate "Enhanced Real Time Clock Support" - depends on !PPC32 && !PARISC && !IA64 && !PC9800 + depends on !PPC32 && !PARISC && !IA64 && !X86_PC9800 ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you
@@ -846,7 +846,7 @@ config RTC98 tristate "NEC PC-9800 Real Time Clock Support" - depends on PC9800 + depends on X86_PC9800 default y ---help--- If you say Y here and create a character special file /dev/rtc with
PATCH 1/1 PC-9800 sub-arch (3/29) alsa
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (3/29).
ALSA sound drivers for PC98
Fix bug in 2.5.59 and additional driver.
sound/isa/Kconfig +6 -0
@@ -39,6 +39,12 @@ Say 'Y' or 'M' to include support for CS4235,CS4236,CS4237B,CS4238B,CS4239 chips from Cirrus Logic - Crystal Semiconductors. +config SND_PC98_CS4232 + tristate "NEC PC9800 CS4232 driver" + depends on SND + help + Say 'Y' or 'M' to include support for NEC PC-9801/PC-9821 sound cards + config SND_ES968 tristate "Generic ESS ES968 driver" depends on SND && ISAPNP
sound/isa/cs423x/Makefile +2 -0
@@ -10,6 +10,7 @@ snd-cs4231-objs := cs4231.o snd-cs4232-objs := cs4232.o snd-cs4236-objs := cs4236.o +snd-pc98-cs4232-objs := pc98.o # Toplevel Module Dependency obj-$(CONFIG_SND_AZT2320) += snd-cs4231-lib.o
@@ -22,5 +23,6 @@ obj-$(CONFIG_SND_INTERWAVE_STB) += snd-cs4231-lib.o obj-$(CONFIG_SND_OPTI92X_CS4231) += snd-cs4231-lib.o obj-$(CONFIG_SND_WAVEFRONT) += snd-cs4231-lib.o +obj-$(CONFIG_SND_PC98_CS4232) += snd-pc98-cs4232.o snd-cs4231-lib.o obj-m := $(sort $(obj-m))
sound/isa/cs423x/pc98.c +466 -0
466 lines not on this page · raw message
sound/isa/cs423x/pc9801_118_magic.h +411 -0
411 lines not on this page · raw message
sound/isa/cs423x/sound_pc9800.h +23 -0
@@ -0,0 +1,23 @@ +#ifndef _SOUND_PC9800_H_ +#define _SOUND_PC9800_H_ + +#include <asm/io.h> + +#define PC9800_SOUND_IO_ID 0xa460 + +/* Sound Functions ID. */ +#define PC9800_SOUND_ID () ((inb(PC9800_SOUND_IO_ID) >> 4) & 0x0f) + +#define PC9800_SOUND_ID_DO 0x0/* PC-98DO+ Internal */ +#define PC9800_SOUND_ID_GS 0x1/* PC-98GS Internal */ +#define PC9800_SOUND_ID_73 0x2/* PC-9801-73 (base 0x18x) */ +#define PC9800_SOUND_ID_73A 0x3/* PC-9801-73/76 (base 0x28x) */ +#define PC9800_SOUND_ID_86 0x4/* PC-9801-86 and compatible (base 0x18x) */ +#define PC9800_SOUND_ID_86A 0x5/* PC-9801-86 (base 0x28x) */ +#define PC9800_SOUND_ID_NF 0x6/* PC-9821Nf/Np Internal */ +#define PC9800_SOUND_ID_XMATE 0x7/* X-Mate Internal and compatible */ +#define PC9800_SOUND_ID_118 0x8/* PC-9801-118 and compatible(CanBe Internal, etc.) */ + +#define PC9800_SOUND_ID_UNKNOWN 0xf/* Unknown (No Sound System or PC-9801-26) */ + +#endif
sound/core/Makefile +1 -0
@@ -96,6 +96,7 @@ obj-$(CONFIG_SND_YMFPCI) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o snd-hwdep.o obj-$(CONFIG_SND_POWERMAC) += snd-pcm.o snd-timer.o snd.o obj-$(CONFIG_SND_SA11XX_UDA1341) += snd-pcm.o snd-timer.o snd.o +obj-$(CONFIG_SND_PC98_CS4232) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o snd-hwdep.o ifeq ($(CONFIG_SND_SB16_CSP),y) obj-$(CONFIG_SND_SB16) += snd-hwdep.o obj-$(CONFIG_SND_SBAWE) += snd-hwdep.o
sound/drivers/mpu401/Makefile +1 -0
@@ -39,5 +39,6 @@ obj-$(CONFIG_SND_ALI5451) += snd-mpu401-uart.o obj-$(CONFIG_SND_TRIDENT) += snd-mpu401-uart.o obj-$(CONFIG_SND_YMFPCI) += snd-mpu401-uart.o +obj-$(CONFIG_SND_PC98_CS4232) += snd-mpu401-uart.o obj-m := $(sort $(obj-m))
sound/drivers/opl3/Makefile +1 -0
@@ -26,6 +26,7 @@ obj-$(CONFIG_SND_OPL3SA2) += $(OPL3_OBJS) obj-$(CONFIG_SND_AD1816A) += $(OPL3_OBJS) obj-$(CONFIG_SND_CS4232) += $(OPL3_OBJS) +obj-$(CONFIG_SND_PC98_CS4232) += $(OPL3_OBJS) obj-$(CONFIG_SND_CS4236) += $(OPL3_OBJS) obj-$(CONFIG_SND_ES1688) += $(OPL3_OBJS) obj-$(CONFIG_SND_GUSEXTREME) += $(OPL3_OBJS)
sound/drivers/mpu401/mpu401.c +6 -3
@@ -40,7 +40,7 @@static int enable[SNDRV_CARDS ] =SNDRV_DEFAULT_ENABLE ;/* Enable this card */ static long port[SNDRV_CARDS ] =SNDRV_DEFAULT_PORT ;/* MPU-401 port number */ static int irq[SNDRV_CARDS ] =SNDRV_DEFAULT_IRQ ;/* MPU-401 IRQ */ -#ifdef CONFIG_PC9800 +#ifdef CONFIG_X86_PC9800 static int pc98ii[SNDRV_CARDS ];/* PC98-II dauther board */ #endif
@@ -59,7 +59,7 @@ MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");MODULE_PARM_DESC (irq,"IRQ # for MPU-401 device." );MODULE_PARM_SYNTAX (irq,SNDRV_IRQ_DESC ); -#ifdef CONFIG_PC9800 +#ifdef CONFIG_X86_PC9800 MODULE_PARM(pc98ii, "1-" __MODULE_STRING(SNDRV_CARDS) "i");MODULE_PARM_DESC (pc98ii,"Roland MPU-PC98II support." );MODULE_PARM_SYNTAX (pc98ii,SNDRV_BOOLEAN_FALSE_DESC );
@@ -85,7 +85,7 @@if (card ==NULL )return -ENOMEM ; if (snd_mpu401_uart_new(card, 0, -#ifdef CONFIG_PC9800 +#ifdef CONFIG_X86_PC9800 pc98ii[dev] ? MPU401_HW_PC98II : #endif MPU401_HW_MPU401,
@@ -154,6 +154,9 @@ (void )(get_option (&str,&enable[nr_dev]) ==2 &&get_option (&str,&index[nr_dev]) ==2 &&get_id (&str,&id[nr_dev]) ==2 && +#ifdef CONFIG_X86_PC9800 +get_option (&str,&pc98ii[nr_dev]) ==2 && +#endifget_option (&str,(int *)&port[nr_dev]) ==2 &&get_option (&str,&irq[nr_dev]) ==2 ); nr_dev++;
PATCH 1/1 PC-9800 sub-arch (4/29) apm
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (4/29).
APM support for PC98. Including PC98's BIOS bug fix.
arch/i386/kernel/apm.c +12 -4
@@ -227,6 +227,8 @@#include <linux/sysrq.h> +#include "io_ports.h" +extern rwlock_t xtime_lock;extern spinlock_t i8253_lock;extern unsigned long get_cmos_time (void );
@@ -623,6 +625,9 @@ __asm__ __volatile__(APM_DO_ZERO_SEGS "pushl %%edi\n\t" "pushl %%ebp\n\t" +#ifdef CONFIG_X86_PC9800 + "pushfl\n\t" +#endif"lcall *%%cs:apm_bios_entry\n\t" "setc %%al\n\t" "popl %%ebp\n\t"
@@ -684,6 +689,9 @@ __asm__ __volatile__(APM_DO_ZERO_SEGS "pushl %%edi\n\t" "pushl %%ebp\n\t" +#ifdef CONFIG_X86_PC9800 + "pushfl\n\t" +#endif"lcall *%%cs:apm_bios_entry\n\t" "setc %%bl\n\t" "popl %%ebp\n\t"
@@ -724,7 +732,7 @@if (apm_bios_call_simple (APM_FUNC_VERSION ,0 , *val, &eax))return (eax >>8 ) &0xff ; - *val = eax; + *val = pc98 ? ((eax &0xff00 ) | ((eax &0x00f0 ) >>4 )) : eax;return APM_SUCCESS ; }
@@ -1237,11 +1245,11 @@ {#ifdef INIT_TIMER_AFTER_SUSPEND /* set the clock to 100 Hz */ -outb_p (0x34 ,0x43 );/* binary, mode 2, LSB/MSB, ch 0 */ +outb_p (0x34 ,PIT_MODE );/* binary, mode 2, LSB/MSB, ch 0 */ udelay (10 ); -outb_p (LATCH &0xff ,0x40 );/* LSB */ +outb_p (LATCH &0xff ,PIT_CH0 );/* LSB */ udelay (10 ); -outb (LATCH >>8 ,0x40 );/* MSB */ +outb (LATCH >>8 ,PIT_CH0 );/* MSB */ udelay (10 );#endif }
include/linux/apm_bios.h +24 -0
@@ -20,6 +20,7 @@typedef unsigned short apm_eventinfo_t ;#ifdef __KERNEL__ +#include <linux/config.h> #define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8)#define APM_CS_16 (APM_CS + 8)
@@ -60,6 +61,7 @@/* * The APM function codes */ +#ifndef CONFIG_X86_PC9800 #define APM_FUNC_INST_CHECK 0x5300#define APM_FUNC_REAL_CONN 0x5301#define APM_FUNC_16BIT_CONN 0x5302
@@ -80,6 +82,28 @@#define APM_FUNC_RESUME_TIMER 0x5311#define APM_FUNC_RESUME_ON_RING 0x5312#define APM_FUNC_TIMER 0x5313 +#else +#define APM_FUNC_INST_CHECK 0x9a00 +#define APM_FUNC_REAL_CONN 0x9a01 +#define APM_FUNC_16BIT_CONN 0x9a02 +#define APM_FUNC_32BIT_CONN 0x9a03 +#define APM_FUNC_DISCONN 0x9a04 +#define APM_FUNC_IDLE 0x9a05 +#define APM_FUNC_BUSY 0x9a06 +#define APM_FUNC_SET_STATE 0x9a07 +#define APM_FUNC_ENABLE_PM 0x9a08 +#define APM_FUNC_RESTORE_BIOS 0x9a09 +#define APM_FUNC_GET_STATUS 0x9a3a +#define APM_FUNC_GET_EVENT 0x9a0b +#define APM_FUNC_GET_STATE 0x9a0c +#define APM_FUNC_ENABLE_DEV_PM 0x9a0d +#define APM_FUNC_VERSION 0x9a3e +#define APM_FUNC_ENGAGE_PM 0x9a3f +#define APM_FUNC_GET_CAP 0x9a10 +#define APM_FUNC_RESUME_TIMER 0x9a11 +#define APM_FUNC_RESUME_ON_RING 0x9a12 +#define APM_FUNC_TIMER 0x9a13 +#endif /* * Function code for APM_FUNC_RESUME_TIMER
PATCH 1/1 PC-9800 sub-arch (5/29) core#1
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (5/29).
Core patches for PC98 under arch/i386 and include/asm-i386/mach-* directory.
arch/i386/Kconfig +8 -2
@@ -75,6 +75,12 @@ If you don't have one of these computers, you should say N here. +config X86_PC9800 + bool "PC-9800 (NEC)" + help + To make kernel for NEC PC-9801/PC-9821 sub-architecture, say Y. + If say Y, kernel works -ONLY- on PC-9800 architecture. + config X86_BIGSMP bool "Support for other sub-arch SMP systems with more than 8 CPUs" help
@@ -1167,7 +1173,7 @@ config EISA bool "EISA support" - depends on ISA + depends on ISA && !X86_PC9800 ---help--- The Extended Industry Standard Architecture (EISA) bus was developed as an open alternative to the IBM MicroChannel bus.
@@ -1185,7 +1191,7 @@ config MCA bool "MCA support" - depends on !(X86_VISWS || X86_VOYAGER) + depends on !(X86_VISWS || X86_VOYAGER || X86_PC9800) help MicroChannel Architecture is found in some IBM PS/2 machines and laptops. It is a bus system similar to PCI or ISA. See
arch/i386/Makefile +11 -3
@@ -65,6 +65,10 @@ mflags-$(CONFIG_X86_NUMAQ) := -Iinclude/asm-i386/mach-numaq mcore-$(CONFIG_X86_NUMAQ) := mach-default +# PC-9800 subarch support +mflags-$(CONFIG_X86_PC9800) := -Iinclude/asm-i386/mach-pc9800 +mcore-$(CONFIG_X86_PC9800) := mach-pc9800 + # BIGSMP subarch support mflags-$(CONFIG_X86_BIGSMP) := -Iinclude/asm-i386/mach-bigsmp mcore-$(CONFIG_X86_BIGSMP) := mach-default
@@ -90,15 +94,19 @@ CFLAGS += $(mflags-y) AFLAGS += $(mflags-y) +ifeq ($(CONFIG_X86_PC9800),y) +boot := arch/i386/boot98 +else boot := arch/i386/boot +endif .PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \ clean archclean archmrproper all: bzImage -BOOTIMAGE=arch/i386/boot/bzImage -zImage zlilo zdisk: BOOTIMAGE=arch/i386/boot/zImage +BOOTIMAGE=$(boot)/bzImage +zImage zlilo zdisk: BOOTIMAGE=$(boot)/zImage zImage bzImage: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE)
@@ -119,7 +127,7 @@ $(Q)$(MAKE) $(clean)=arch/i386/boot98 define archhelp - echo '* bzImage - Compressed kernel image (arch/$(ARCH)/boot/bzImage)' + echo '* bzImage - Compressed kernel image ($(boot)/bzImage)' echo ' install - Install kernel using' echo ' (your) ~/bin/installkernel or' echo ' (distribution) /sbin/installkernel or'
arch/i386/kernel/setup.c +5 -94
132 lines not on this page · raw message
arch/i386/kernel/time.c +17 -98
164 lines not on this page · raw message
arch/i386/kernel/timers/timer_pit.c +15 -7
@@ -16,6 +16,7 @@extern spinlock_t i8259A_lock;extern spinlock_t i8253_lock;#include "do_timer.h" +#include "io_ports.h" static int init_pit (void ) {
@@ -77,7 +78,8 @@ {int count; -static int count_p =LATCH ;/* for the first call after boot */ +static int count_p; +static int is_1st_boot =1 ;/* for the first call after boot */ static unsigned long jiffies_p =0 ;/*
@@ -85,12 +87,18 @@*/ unsigned long jiffies_t; +/* for support LATCH is not constant */ +if (is_1st_boot) { + is_1st_boot =0 ; + count_p =LATCH ; + } +/* gets recalled with irq locally disabled */ spin_lock (&i8253_lock);/* timer count may underflow right here */ -outb_p (0x00 ,0x43 );/* latch the count ASAP */ +outb_p (0x00 ,PIT_MODE );/* latch the count ASAP */ - count =inb_p (0x40 );/* read the latched count */ + count =inb_p (PIT_CH0 );/* read the latched count */ /* * We do this guaranteed double memory access instead of a _p
@@ -98,13 +106,13 @@*/ jiffies_t = jiffies; - count |=inb_p (0x40 ) <<8 ; + count |=inb_p (PIT_CH0 ) <<8 ;/* VIA686a test code... reset the latch if count > max + 1 */ if (count >LATCH ) { -outb_p (0x34 ,0x43 ); -outb_p (LATCH &0xff ,0x40 ); -outb (LATCH >>8 ,0x40 ); +outb_p (0x34 ,PIT_MODE ); +outb_p (LATCH &0xff ,PIT_CH0 ); +outb (LATCH >>8 ,PIT_CH0 ); count =LATCH -1 ; }
arch/i386/kernel/timers/timer_tsc.c +13 -81
127 lines not on this page · raw message
arch/i386/kernel/traps.c +5 -7
@@ -50,6 +50,8 @@#include <linux/irq.h> #include <linux/module.h> +#include "mach_traps.h" + asmlinkage int system_call(void); asmlinkage void lcall7(void); asmlinkage void lcall27(void);
@@ -387,8 +389,7 @@printk ("You probably have a hardware problem with your RAM chips\n" );/* Clear and disable the memory parity error line. */ - reason = (reason &0xf ) |4 ; -outb (reason,0x61 ); +clear_mem_error (reason); }static void io_check_error (unsigned char reason,struct pt_regs * regs)
@@ -425,7 +426,7 @@static void default_do_nmi (struct pt_regs * regs) { -unsigned char reason =inb (0x61 ); +unsigned char reason =get_nmi_reason ();if (!(reason &0xc0 )) {#if CONFIG_X86_LOCAL_APIC
@@ -449,10 +450,7 @@* Reassert NMI in case it became active meanwhile * as it's edge-triggered. */ -outb (0x8f ,0x70 ); -inb (0x71 );/* dummy */ -outb (0x0f ,0x70 ); -inb (0x71 );/* dummy */ +reassert_nmi (); }static int dummy_nmi_callback (struct pt_regs * regs,int cpu)
include/asm-i386/mach-default/calibrate_tsc.h +90 -0
90 lines not on this page · raw message
include/asm-i386/mach-default/mach_resources.h +113 -0
113 lines not on this page · raw message
include/asm-i386/mach-default/mach_time.h +122 -0
122 lines not on this page · raw message
include/asm-i386/mach-default/mach_traps.h +29 -0
@@ -0,0 +1,29 @@ +/* +* include/asm-i386/mach-default/mach_traps.h +* +* Machine specific NMI handling for generic. +* Split out from traps.c by Osamu Tomita <[email protected]> +*/ +#ifndef _MACH_TRAPS_H +#define _MACH_TRAPS_H + +static inline void clear_mem_error (unsigned char reason) +{ + reason = (reason &0xf ) |4 ; +outb (reason,0x61 ); +} + +static inline unsigned char get_nmi_reason (void ) +{ +return inb (0x61 ); +} + +static inline void reassert_nmi (void ) +{ +outb (0x8f ,0x70 ); +inb (0x71 );/* dummy */ +outb (0x0f ,0x70 ); +inb (0x71 );/* dummy */ +} + +#endif /* !_MACH_TRAPS_H */
include/asm-i386/mach-pc9800/calibrate_tsc.h +71 -0
71 lines not on this page · raw message
include/asm-i386/mach-pc9800/do_timer.h +80 -0
80 lines not on this page · raw message
include/asm-i386/mach-pc9800/mach_resources.h +192 -0
192 lines not on this page · raw message
include/asm-i386/mach-pc9800/mach_time.h +136 -0
136 lines not on this page · raw message
include/asm-i386/mach-pc9800/mach_traps.h +27 -0
@@ -0,0 +1,27 @@ +/* +* include/asm-i386/mach-pc9800/mach_traps.h +* +* Machine specific NMI handling for PC-9800. +* Written by Osamu Tomita <[email protected]> +*/ +#ifndef _MACH_TRAPS_H +#define _MACH_TRAPS_H + +static inline void clear_mem_error (unsigned char reason) +{ +outb (0x08 ,0x37 ); +outb (0x09 ,0x37 ); +} + +static inline unsigned char get_nmi_reason (void ) +{ +return (inb (0x33 ) &6 ) ?0x80 :0 ; +} + +static inline void reassert_nmi (void ) +{ +outb (0x09 ,0x50 );/* disable NMI once */ +outb (0x09 ,0x52 );/* re-enable it */ +} + +#endif /* !_MACH_TRAPS_H */
include/asm-i386/mach-pc9800/smpboot_hooks.h +33 -0
@@ -0,0 +1,33 @@ +/* two abstractions specific to kernel/smpboot.c, mainly to cater to visws +* which needs to alter them. */ + +static inline void smpboot_clear_io_apic_irqs (void ) +{ + io_apic_irqs =0 ; +} + +static inline void smpboot_setup_warm_reset_vector (void ) +{ +/* +* Install writable page 0 entry to set BIOS data area. +*/ +local_flush_tlb (); + +/* +* Paranoid: Set warm reset code and vector here back +* to default values. +*/ +outb (0x0f ,0x37 );/* SHUT0 = 1 */ + + *((volatile long *)phys_to_virt (0x404 )) =0 ; +} + +static inline void smpboot_setup_io_apic (void ) +{ +/* +* Here we can be sure that there is an IO-APIC in the system. Let's +* go and set it up: +*/ +if (!skip_ioapic_setup && nr_ioapics) +setup_IO_APIC (); +}
PATCH 1/1 PC-9800 sub-arch (6/29) ac-update
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (6/29).
Updates files under arch/i386/boot98 in 2.5.50-ac1.
arch/i386/boot98/Makefile +3 -17
@@ -32,12 +32,6 @@ host-progs := tools/build -# Default - -boot: bzImage - -include $(TOPDIR)/Rules.make - # --------------------------------------------------------------------------- $(obj)/zImage: IMAGE_OFFSET := 0x1000
@@ -53,6 +47,7 @@ $(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \ $(obj)/vmlinux.bin $(obj)/tools/build FORCE $(call if_changed,image) + @echo 'Kernel: $@ is ready' $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE $(call if_changed,objcopy)
@@ -64,9 +59,8 @@ $(call if_changed,ld) $(obj)/compressed/vmlinux: FORCE - +@$(call descend,$(obj)/compressed,IMAGE_OFFSET=$(IMAGE_OFFSET) \ - $(obj)/compressed/vmlinux) - + $(Q)$(MAKE) -f scripts/Makefile.build obj=$(obj)/compressed \ + IMAGE_OFFSET=$(IMAGE_OFFSET) $@ zdisk: $(BOOTIMAGE) dd bs=8192 if=$(BOOTIMAGE) of=/dev/fd0
@@ -80,11 +74,3 @@ install: $(BOOTIMAGE) sh $(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" - -archhelp: - @echo '* bzImage - Compressed kernel image (arch/$(ARCH)/boot/bzImage)' - @echo ' install - Install kernel using' - @echo ' (your) ~/bin/installkernel or' - @echo ' (distribution) /sbin/installkernel or' - @echo ' install to $$(INSTALL_PATH) and run lilo' -
arch/i386/boot98/compressed/Makefile +1 -2
@@ -7,12 +7,11 @@ EXTRA_TARGETS := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o EXTRA_AFLAGS := -traditional -include $(TOPDIR)/Rules.make - LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32 $(obj)/vmlinux: $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE $(call if_changed,ld) + @: $(obj)/vmlinux.bin: vmlinux FORCE $(call if_changed,objcopy)
PATCH 1/1 PC-9800 sub-arch (7/29) console
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (7/29).
Support for PC98 Standard console.
drivers/char/Makefile +8 -1
@@ -5,7 +5,11 @@ # # This file contains the font map for the default (hardware) font # +ifneq ($(CONFIG_X86_PC9800),y) FONTMAPFILE = cp437.uni +else +FONTMAPFILE = pc9800.uni +endif obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o random.o
@@ -14,7 +18,8 @@ export-objs := busmouse.o vt.o generic_serial.o ip2main.o consolemap.o\ ite_gpio.o keyboard.o misc.o nvram.o random.o rtc.o \ - selection.o sonypi.o sysrq.o tty_io.o tty_ioctl.o + selection.o sonypi.o sysrq.o tty_io.o tty_ioctl.o \ + upd4990a.o obj-$(CONFIG_VT) += vt_ioctl.o vc_screen.o consolemap.o consolemap_deftbl.o selection.o keyboard.o obj-$(CONFIG_HW_CONSOLE) += vt.o defkeymap.o
@@ -51,6 +56,7 @@ obj-$(CONFIG_PRINTER) += lp.o obj-$(CONFIG_TIPAR) += tipar.o +obj-$(CONFIG_PC9800_OLDLP) += lp_old98.o obj-$(CONFIG_BUSMOUSE) += busmouse.o obj-$(CONFIG_DTLK) += dtlk.o
@@ -58,6 +64,7 @@ obj-$(CONFIG_APPLICOM) += applicom.o obj-$(CONFIG_SONYPI) += sonypi.o obj-$(CONFIG_RTC) += rtc.o +obj-$(CONFIG_RTC98) += upd4990a.o obj-$(CONFIG_GEN_RTC) += genrtc.o obj-$(CONFIG_EFI_RTC) += efirtc.o ifeq ($(CONFIG_PPC),)
drivers/char/console_macros.h +14 -0
@@ -55,6 +55,10 @@#define s_reverse (vc_cons[currcons].d->vc_s_reverse)#define ulcolor (vc_cons[currcons].d->vc_ulcolor)#define halfcolor (vc_cons[currcons].d->vc_halfcolor) +#define def_attr (vc_cons[currcons].d->vc_def_attr) +#define ul_attr (vc_cons[currcons].d->vc_ul_attr) +#define half_attr (vc_cons[currcons].d->vc_half_attr) +#define bold_attr (vc_cons[currcons].d->vc_bold_attr)#define tab_stop (vc_cons[currcons].d->vc_tab_stop)#define palette (vc_cons[currcons].d->vc_palette)#define bell_pitch (vc_cons[currcons].d->vc_bell_pitch)
@@ -64,6 +68,16 @@#define complement_mask (vc_cons[currcons].d->vc_complement_mask)#define s_complement_mask (vc_cons[currcons].d->vc_s_complement_mask)#define hi_font_mask (vc_cons[currcons].d->vc_hi_font_mask) +#define kanji_mode (vc_cons[currcons].d->vc_kanji_mode) +#define s_kanji_mode (vc_cons[currcons].d->vc_s_kanji_mode) +#define kanji_char1 (vc_cons[currcons].d->vc_kanji_char1) +#define translate_ex (vc_cons[currcons].d->vc_translate_ex) +#define G0_charset_ex (vc_cons[currcons].d->vc_G0_charset_ex) +#define G1_charset_ex (vc_cons[currcons].d->vc_G1_charset_ex) +#define saved_G0_ex (vc_cons[currcons].d->vc_saved_G0_ex) +#define saved_G1_ex (vc_cons[currcons].d->vc_saved_G1_ex) +#define kanji_jis_mode (vc_cons[currcons].d->vc_kanji_jis_mode) +#define s_kanji_jis_mode (vc_cons[currcons].d->vc_s_kanji_jis_mode)#define vcmode (vt_cons[currcons]->vc_mode)
drivers/char/console_pc9800.h +14 -0
@@ -0,0 +1,14 @@ +#ifndef __CONSOLE_PC9800_H +#define __CONSOLE_PC9800_H + +#define BLANK_ATTR 0x00E1 + +#define JIS_CODE 0x01 +#define EUC_CODE 0x00 +#define SJIS_CODE 0x02 +#define JIS_CODE_ASCII 0x00 +#define JIS_CODE_78 0x01 +#define JIS_CODE_83 0x02 +#define JIS_CODE_90 0x03 + +#endif /* __CONSOLE_PC9800_H */
drivers/char/consolemap.c +55 -3
76 lines not on this page · raw message
drivers/char/pc9800.uni +260 -0
260 lines not on this page · raw message
drivers/char/vt.c +395 -64
708 lines not on this page · raw message
drivers/char/vt_ioctl.c +19 -0
@@ -63,9 +63,11 @@asmlinkage long sys_ioperm (unsigned long from,unsigned long num,int on);#endif +#ifndef CONFIG_X86_PC9800 unsigned int video_font_height;unsigned int default_font_height;unsigned int video_scan_lines; +#endif /* * these are the valid i/o ports we're allowed to change. they map all the
@@ -637,6 +639,17 @@return 0 ; } +#ifdef CONFIG_X86_PC9800 +case VT_GDC_RESIZE : + { +if (!perm) +return -EPERM ; +/* con_adjust_height(0);*/ +update_screen (console); +return 0 ; + } +#endif +case VT_SETMODE : {struct vt_mode tmp;
@@ -830,7 +843,9 @@__get_user (clin, &vtconsize->v_clin);__get_user (vcol, &vtconsize->v_vcol);__get_user (ccol, &vtconsize->v_ccol); +#ifndef CONFIG_X86_PC9800 vlin = vlin ? vlin : video_scan_lines; +#endif if (clin) {if (ll) {if (ll != vlin/clin)
@@ -849,10 +864,12 @@if (clin >32 )return -EINVAL ; +#ifndef CONFIG_X86_PC9800 if (vlin) video_scan_lines = vlin;if (clin) video_font_height = clin; +#endif for (i =0 ; i <MAX_NR_CONSOLES ; i++)vc_resize (i, cc, ll);
@@ -1022,8 +1039,10 @@ vt_cons[new_console]->vt_mode.frsig =0 ; vt_cons[new_console]->vt_pid =-1 ; vt_cons[new_console]->vt_newvt =-1 ; +#ifndef CONFIG_X86_PC9800 if (!in_interrupt ())/* Via keyboard.c:SAK() - akpm */ reset_palette (new_console) ; +#endif }/*
drivers/video/console/Kconfig +13 -1
@@ -6,7 +6,7 @@ config VGA_CONSOLE bool "VGA text console" - depends on !ARCH_ACORN && !ARCH_EBSA110 || !4xx && !8xx + depends on !X86_PC9800 && !ARCH_ACORN && !ARCH_EBSA110 || !4xx && !8xx help Saying Y here will allow you to use Linux in text mode through a display that complies with the generic VGA standard. Virtually
@@ -97,6 +97,18 @@ Say Y to build a console driver for Sun machines that uses the terminal emulation built into their console PROMS. +config GDC_CONSOLE + bool "PC-9800 GDC text console" + depends on X86_PC9800 + default y + help + This enables support for PC-9800 standard text mode console. + If use NEC PC-9801/PC-9821, Say Y. + +config GDC_32BITACCESS + bool "Enable 32-bit access to text video RAM" + depends on GDC_CONSOLE + config DUMMY_CONSOLE bool depends on PROM_CONSOLE!=y || VGA_CONSOLE!=y || SGI_NEWPORT_CONSOLE!=y
include/linux/console.h +10 -1
@@ -17,6 +17,13 @@#include <linux/types.h> #include <linux/kdev_t.h> #include <linux/spinlock.h> +#include <linux/config.h> + +#ifndef CONFIG_X86_PC9800 +typedef __u16 vram_char_t ; +#else +typedef __u32 vram_char_t ; +#endif struct vc_data ;struct console_font_op ;
@@ -32,7 +39,7 @@void (*con_init)(struct vc_data *,int );void (*con_deinit)(struct vc_data *);void (*con_clear)(struct vc_data *,int ,int ,int ,int ); -void (*con_putc)(struct vc_data *,int ,int ,int ); +void (*con_putc)(struct vc_data *,int ,vram_char_t ,int );void (*con_putcs)(struct vc_data *,const unsigned short *,int ,int ,int );void (*con_cursor)(struct vc_data *,int );int (*con_scroll)(struct vc_data *,int ,int ,int ,int );
@@ -49,6 +56,7 @@void (*con_invert_region)(struct vc_data *,u16 *,int );u16 *(*con_screen_pos)(struct vc_data *,int );unsigned long (*con_getxy)(struct vc_data *,unsigned long ,int *,int *); +int (*con_setterm_command)(struct vc_data *); };extern const struct consw *conswitchp;
@@ -56,6 +64,7 @@extern const struct consw dummy_con;/* dummy console buffer */ extern const struct consw fb_con;/* frame buffer based console */ extern const struct consw vga_con;/* VGA text console */ +extern const struct consw gdc_con;/* PC-9800 GDC text console */ extern const struct consw newport_con;/* SGI Newport console */ extern const struct consw prom_con;/* SPARC PROM console */
include/linux/console_struct.h +24 -1
@@ -9,6 +9,9 @@* to achieve effects such as fast scrolling by changing the origin. */ +#include <linux/config.h> +#include <linux/console.h> +#define NPAR 16struct vc_data {
@@ -25,10 +28,14 @@unsigned char vc_s_color;/* Saved foreground & background */ unsigned char vc_ulcolor;/* Color for underline mode */ unsigned char vc_halfcolor;/* Color for half intensity mode */ +unsigned char vc_def_attr;/* Default attributes */ +unsigned char vc_ul_attr;/* Attribute for underline mode */ +unsigned char vc_half_attr;/* Attribute for half intensity mode */ +unsigned char vc_bold_attr;/* Attribute for bold mode */ unsigned short vc_complement_mask;/* [#] Xor mask for mouse pointer */ unsigned short vc_hi_font_mask;/* [#] Attribute set for upper 256 chars of font or 0 if not supported */ struct console_font_op vc_font;/* Current VC font set */ -unsigned short vc_video_erase_char;/* Background erase character */ +vram_char_t vc_video_erase_char;/* Background erase character */ unsigned short vc_s_complement_mask;/* Saved mouse pointer mask */ unsigned int vc_x, vc_y;/* Cursor position */ unsigned int vc_top, vc_bottom;/* Scrolling region */
@@ -83,6 +90,18 @@struct vc_data **vc_display_fg;/* [!] Ptr to var holding fg console for this display */ unsigned long vc_uni_pagedir;unsigned long *vc_uni_pagedir_loc;/* [!] Location of uni_pagedir variable for this console */ +#ifdef CONFIG_KANJI +unsigned char vc_kanji_char1; +unsigned char vc_kanji_mode; +unsigned char vc_kanji_jis_mode; +unsigned char vc_s_kanji_mode; +unsigned char vc_s_kanji_jis_mode; +unsigned int vc_translate_ex; +unsigned char vc_G0_charset_ex; +unsigned char vc_G1_charset_ex; +unsigned char vc_saved_G0_ex; +unsigned char vc_saved_G1_ex; +#endif /* CONFIG_KANJI */ /* additional information is in vt_kern.h */ };
@@ -106,6 +125,10 @@#define CUR_HWMASK 0x0f#define CUR_SWMASK 0xfff0 +#ifndef CONFIG_X86_PC9800 #define CUR_DEFAULT CUR_UNDERLINE +#else +#define CUR_DEFAULT CUR_BLOCK +#endif #define CON_IS_VISIBLE (conp) (*conp->vc_display_fg == conp)
include/linux/consolemap.h +1 -0
@@ -7,6 +7,7 @@#define GRAF_MAP 1#define IBMPC_MAP 2#define USER_MAP 3 +#define JP_MAP 4struct vc_data ;
include/linux/tty.h +4 -0
@@ -123,6 +123,10 @@#define VIDEO_TYPE_PMAC 0x60/* PowerMacintosh frame buffer. */ +#define VIDEO_TYPE_98NORMAL 0xa4/* NEC PC-9800 normal */ +#define VIDEO_TYPE_9840 0xa5/* NEC PC-9800 normal 40 lines */ +#define VIDEO_TYPE_98HIRESO 0xa6/* NEC PC-9800 hireso */ +/* * This character is the same as _POSIX_VDISABLE: it cannot be used as * a c_cc[] character, but indicates that a particular special character
include/linux/vt.h +1 -0
@@ -50,5 +50,6 @@#define VT_RESIZEX 0x560A/* set kernel's idea of screensize + more */ #define VT_LOCKSWITCH 0x560B/* disallow vt switching */ #define VT_UNLOCKSWITCH 0x560C/* allow vt switching */ +#define VT_GDC_RESIZE 0x5698#endif /* _LINUX_VT_H */
include/linux/vt_buffer.h +4 -0
@@ -19,6 +19,10 @@#include <asm/vga.h> #endif +#ifdef CONFIG_GDC_CONSOLE +#include <asm/gdc.h> +#endif +#ifndef VT_BUF_HAVE_RW #define scr_writew (val, addr) (*(addr) = (val))#define scr_readw (addr) (*(addr))
PATCH 1/1 PC-9800 sub-arch (8/29) network cards
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (8/29).
C-bus(PC98's legacy bus like ISA) network cards support.
drivers/net/3c509.c +35 -0
@@ -56,6 +56,10 @@v1.19b 08Nov2002 Marc Zyngier <[email protected]> - Introduce driver model for EISA cards. */ +/* +FIXES for PC-9800: +Shu Iwanaga: 3c569B(PC-9801 C-bus) support +*/ #define DRV_NAME "3c509"#define DRV_VERSION "1.19b"
@@ -178,7 +182,11 @@struct eisa_device *edev;#endif }; +#ifdef CONFIG_X86_PC9800 +static int id_port__initdata =0x71d0 ; +#else static int id_port__initdata =0x110 ;/* Start with 0x110 to avoid new sound cards.*/ +#endif static struct net_device *el3_root_dev;static ushort id_read_eeprom (int index);
@@ -433,6 +441,7 @@ }#endif /* CONFIG_MCA */ +#ifndef CONFIG_X86_PC9800 #ifdef __ISAPNP__if (nopnp ==1 ) goto no_pnp;
@@ -488,6 +497,7 @@printk (" WARNING: No I/O port available for 3c509 activation.\n" ); return -ENODEV; } +#endif /* CONFIG_X86_PC9800 */ /* Next check for all ISA bus boards by sending the ID sequence to the ID_PORT. We find cards past the first by setting the 'current_tag' on cards as they are found. Cards with their tag set will not
@@ -518,6 +528,7 @@ phys_addr[i] =htons (id_read_eeprom (i)); } +#ifndef CONFIG_X86_PC9800 #ifdef __ISAPNP__ if (nopnp == 0) { /* The ISA PnP 3c509 cards respond to the ID sequence.
@@ -539,11 +550,16 @@ } }#endif /* __ISAPNP__ */ +#endif /* !CONFIG_X86_PC9800 */ {unsigned int iobase =id_read_eeprom (8 ); if_port = iobase >>14 ; +#ifndef CONFIG_X86_PC9800 ioaddr =0x200 + ((iobase &0x1f ) <<4 ); +#else + ioaddr =0x40d0 + ((iobase &0x1f ) <<8 ); +#endif } irq =id_read_eeprom (9 ) >>12 ;
@@ -570,7 +586,15 @@outb (0xd0 + ++current_tag, id_port);/* Activate the adaptor at the EEPROM location. */ +#ifndef CONFIG_X86_PC9800 outb ((ioaddr >>4 ) |0xe0 , id_port); +#else +outb ((ioaddr >>8 ) |0xe0 , id_port); +if (irq ==7 ) + irq =6 ; +else if (irq ==15 ) + irq =13 ; +#endif EL3WINDOW (0 );if (inw (ioaddr) !=0x6d50 ) {
@@ -1358,7 +1382,18 @@outw (0x0001 , ioaddr +4 );/* Set the IRQ line. */ +#ifndef CONFIG_X86_PC9800 outw ((dev->irq <<12 ) |0x0f00 , ioaddr +WN0_IRQ ); +#else + { +int irq = dev->irq; +if (irq ==6 ) + irq =7 ; +else if (irq ==13 ) + irq =15 ; +outw ((irq <<12 ) |0x0f00 , ioaddr +WN0_IRQ ); + } +#endif /* Set the station address in window 2 each time opened. */ EL3WINDOW (2 );
drivers/net/8390.h +2 -1
@@ -123,7 +123,8 @@#define inb_p (port) in_8(port)#define outb_p (val,port) out_8(port,val) -#elif defined(CONFIG_ARM_ETHERH ) || defined(CONFIG_ARM_ETHERH_MODULE ) +#elif defined(CONFIG_ARM_ETHERH ) || defined(CONFIG_ARM_ETHERH_MODULE ) || \ + defined(CONFIG_NET_CBUS )#define EI_SHIFT (x) (ei_local->reg_offset[x])#else #define EI_SHIFT (x) (x)
drivers/net/Kconfig +52 -3
79 lines not on this page · raw message
drivers/net/Makefile +1 -0
@@ -90,6 +90,7 @@ obj-$(CONFIG_WD80x3) += wd.o 8390.o obj-$(CONFIG_EL2) += 3c503.o 8390.o obj-$(CONFIG_NE2000) += ne.o 8390.o +obj-$(CONFIG_NE2K_CBUS) += ne.o 8390.o obj-$(CONFIG_NE2_MCA) += ne2.o 8390.o obj-$(CONFIG_HPLAN) += hp.o 8390.o obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390.o
drivers/net/Makefile.lib +1 -0
@@ -19,6 +19,7 @@ obj-$(CONFIG_MACMACE) += crc32.o obj-$(CONFIG_MIPS_AU1000_ENET) += crc32.o obj-$(CONFIG_NATSEMI) += crc32.o +obj-$(CONFIG_NE2K_CBUS) += crc32.o obj-$(CONFIG_PCMCIA_FMVJ18X) += crc32.o obj-$(CONFIG_PCMCIA_SMC91C92) += crc32.o obj-$(CONFIG_PCMCIA_XIRTULIP) += crc32.o
drivers/net/Space.c +1 -1
@@ -233,7 +233,7 @@ #ifdef CONFIG_E2100 /* Cabletron E21xx series. */ {e2100_probe, 0}, #endif -#ifdef CONFIG_NE2000 /* ISA (use ne2k-pci for PCI cards) */ +#if defined(CONFIG_NE2000) || defined(CONFIG_NE2K_CBUS) /* ISA & PC-9800 CBUS (use ne2k-pci for PCI cards) */ {ne_probe, 0}, #endif #ifdef CONFIG_LANCE /* ISA/VLB (use pcnet32 for PCI cards) */
drivers/net/at1700.c +102 -13
249 lines not on this page · raw message
drivers/net/ne.c +342 -14
557 lines not on this page · raw message
drivers/net/ne2k_cbus.h +481 -0
481 lines not on this page · raw message
PATCH 1/1 PC-9800 sub-arch (9/29) ac-update
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (9/29).
Updates floppy driver for PC98 in 2.5.50-ac1.
drivers/block/Makefile +1 -1
@@ -14,7 +14,7 @@ obj-y := elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o deadline-iosched.o obj-$(CONFIG_MAC_FLOPPY) += swim3.o -ifneq ($(CONFIG_PC9800),y) +ifneq ($(CONFIG_X86_PC9800),y) obj-$(CONFIG_BLK_DEV_FD) += floppy.o else obj-$(CONFIG_BLK_DEV_FD) += floppy98.o
drivers/block/floppy98.c +49 -35
163 lines not on this page · raw message
PATCH 1/1 PC-9800 sub-arch (10/29) fs, patition table
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (10/29).
FAT fs and partition table support.
fs/fat/inode.c +3 -1
@@ -939,7 +939,9 @@ error = first; goto out_fail; } -if (FAT_FIRST_ENT (sb, media) != first) { +if (FAT_FIRST_ENT (sb, media) != first + && (!pc98 || media !=0xf8 || (first &0xff ) !=0xfe )) + {if (!silent) { printk(KERN_ERR "FAT: invalid first entry of FAT " "(0x%x != 0x%x)\n",
fs/partitions/Kconfig +7 -0
@@ -177,6 +177,13 @@ If unsure, say N. +config NEC98_PARTITION + bool "NEC PC-9800 partition table support" if PARTITION_ADVANCED + default y if !PARTITION_ADVANCED && X86_PC9800 + help + Say Y here if you would like to be able to read the hard disk + partition table format used by NEC PC-9800 machines. + config SGI_PARTITION bool "SGI partition support" if PARTITION_ADVANCED default y if !PARTITION_ADVANCED && (SGI_IP22 || SGI_IP27)
fs/partitions/Makefile +1 -0
@@ -18,3 +18,4 @@ obj-$(CONFIG_ULTRIX_PARTITION) += ultrix.o obj-$(CONFIG_IBM_PARTITION) += ibm.o obj-$(CONFIG_EFI_PARTITION) += efi.o +obj-$(CONFIG_NEC98_PARTITION) += nec98.o msdos.o
fs/partitions/check.c +4 -0
@@ -28,6 +28,7 @@#include "ldm.h" #include "mac.h" #include "msdos.h" +#include "nec98.h" #include "osf.h" #include "sgi.h" #include "sun.h"
@@ -51,6 +52,9 @@#ifdef CONFIG_LDM_PARTITION ldm_partition, /* this must come before msdos */#endif +#ifdef CONFIG_NEC98_PARTITION + nec98_partition, /* must be come before `msdos_partition' */ +#endif #ifdef CONFIG_MSDOS_PARTITION msdos_partition,#endif
fs/partitions/msdos.c +1 -1
@@ -219,7 +219,7 @@* Create devices for BSD partitions listed in a disklabel, under a * dos-like partition. See parse_extended() for more information. */ -static void +void parse_bsd (struct parsed_partitions *state,struct block_device *bdev,u32 offset,u32 size,int origin,char *flavour,int max_partitions)
fs/partitions/nec98.c +272 -0
272 lines not on this page · raw message
fs/partitions/nec98.h +10 -0
@@ -0,0 +1,10 @@ +/* +* NEC PC-9800 series partition supports +* +* Copyright (C) 1998-2000 Kyoto University Microcomputer Club +*/ + +#define NEC98_PTABLE_MAGIC 0xAA55 + +extern int nec98_partition (struct parsed_partitions *state, +struct block_device *bdev);
PATCH 1/1 PC-9800 sub-arch (11/29) ac-update
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (11/29).
Updates console driver for PC98 in 2.5.50-ac1.
drivers/video/console/gdccon.c +0 -1
@@ -17,7 +17,6 @@#include <linux/kernel.h> #include <linux/tty.h> #include <linux/console.h> -#include <linux/console_struct.h> #include <linux/string.h> #include <linux/kd.h> #include <linux/slab.h>
include/asm-i386/gdc.h +79 -65
181 lines not on this page · raw message
PATCH 1/1 PC-9800 sub-arch (12/29) ac-update
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (12/29).
Updates arch/i386/kernel/i8259.c in 2.5.50-ac1.
arch/i386/kernel/i8259.c +1 -1
@@ -331,7 +331,7 @@static void math_error_irq (int cpl,void *dev_id,struct pt_regs *regs) {extern void math_error (void *); -#ifndef CONFIG_PC9800 +#ifndef CONFIG_X86_PC9800 outb (0 ,0xF0 );#endif if (ignore_fpu_irq || !boot_cpu_data.hard_math)
PATCH 1/1 PC-9800 sub-arch (13/29) IDE
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (13/29).
Support standard IDE I/F of PC98.
drivers/ide/Kconfig +5 -0
@@ -1015,6 +1015,11 @@ If unsure, say N. +config BLK_DEV_IDE_PC9800 + bool + depends on X86_PC9800 + default y + ##if [ "$CONFIG_IDE_TASKFILE_IO" = "y" ]; then ## dep_mbool CONFIG_BLK_DEV_TF_DISK $CONFIG_BLK_DEV_IDEDISK ##else
drivers/ide/ide-disk.c +67 -0
79 lines not on this page · raw message
drivers/ide/ide-probe.c +13 -3
@@ -573,7 +573,7 @@if (hwif->mmio ==2 )return 0 ; - addr_errs =hwif_check_region (hwif, hwif->io_ports[IDE_DATA_OFFSET ],1 ); + addr_errs =hwif_check_region (hwif, hwif->io_ports[IDE_DATA_OFFSET ], pc98 ?2 :1 );for (i =IDE_ERROR_OFFSET ; i <=IDE_STATUS_OFFSET ; i++) addr_errs +=hwif_check_region (hwif, hwif->io_ports[i],1 );if (hwif->io_ports[IDE_CONTROL_OFFSET ])
@@ -622,7 +622,9 @@ }for (i =IDE_DATA_OFFSET ; i <=IDE_STATUS_OFFSET ; i++) -hwif_request_region (hwif->io_ports[i],1 , hwif->name); +hwif_request_region (hwif->io_ports[i], + (pc98 && i ==IDE_DATA_OFFSET ) ?2 :1 , + hwif->name); }//EXPORT_SYMBOL(hwif_register);
@@ -644,6 +646,9 @@#if CONFIG_BLK_DEV_PDC4030 (hwif->chipset != ide_pdc4030 || hwif->channel == 0) &&#endif /* CONFIG_BLK_DEV_PDC4030 */ +#if CONFIG_BLK_DEV_IDE_PC9800 + (hwif->chipset != ide_pc9800 || !hwif->mate->present) && +#endif (hwif_check_regions(hwif))) {u16 msgout =0 ;for (unit =0 ; unit <MAX_DRIVES ; ++unit) {
@@ -973,7 +978,7 @@/* all CPUs; safe now that hwif->hwgroup is set up */ spin_unlock_irqrestore (&ide_lock, flags); -#if !defined(__mc68000__) && !defined(CONFIG_APUS ) && !defined(__sparc__) +#if !defined(__mc68000__) && !defined(CONFIG_APUS ) && !defined(__sparc__) && !defined(CONFIG_X86_PC9800 ) printk("%s at 0x%03lx-0x%03lx,0x%03lx on irq %d", hwif->name, hwif->io_ports[IDE_DATA_OFFSET], hwif->io_ports[IDE_DATA_OFFSET]+7,
@@ -983,6 +988,11 @@ hwif->io_ports[IDE_DATA_OFFSET ], hwif->io_ports[IDE_DATA_OFFSET ]+7 , hwif->io_ports[IDE_CONTROL_OFFSET], __irq_itoa(hwif->irq)); +#elif defined(CONFIG_X86_PC9800 ) +printk ("%s at 0x%03lx-0x%03lx,0x%03lx on irq %d" , hwif->name, + hwif->io_ports[IDE_DATA_OFFSET ], + hwif->io_ports[IDE_DATA_OFFSET ]+15 , + hwif->io_ports[IDE_CONTROL_OFFSET ], hwif->irq);#else printk ("%s at %x on irq 0x%08x" , hwif->name, hwif->io_ports[IDE_DATA_OFFSET ], hwif->irq);
drivers/ide/ide-proc.c +3 -0
@@ -365,6 +365,9 @@case ide_cy82c693: name ="cy82c693" ;break ;case ide_4drives: name ="4drives" ;break ;case ide_pmac: name ="mac-io" ;break ; +#ifdef CONFIG_X86_PC9800 +case ide_pc9800: name ="pc9800" ;break ; +#endif default : name ="(unknown)" ;break ; } len =sprintf (page,"%s\n" , name);
drivers/ide/ide.c +8 -1
@@ -547,7 +547,8 @@ }for (i =IDE_DATA_OFFSET ; i <=IDE_STATUS_OFFSET ; i++) {if (hwif->io_ports[i]) { -hwif_release_region (hwif->io_ports[i],1 ); +hwif_release_region (hwif->io_ports[i], + (pc98 && i ==IDE_DATA_OFFSET ) ?2 :1 ); } } }
@@ -2011,6 +2012,12 @@ }#endif /* CONFIG_BLK_DEV_IDEPCI */ +#ifdef CONFIG_BLK_DEV_IDE_PC9800 + { +extern void ide_probe_for_pc9800 (void ); +ide_probe_for_pc9800 (); + } +#endif #ifdef CONFIG_ETRAX_IDE {extern void init_e100_ide (void );
drivers/ide/legacy/Makefile +5 -0
@@ -2,6 +2,7 @@ obj-$(CONFIG_BLK_DEV_ALI14XX) += ali14xx.o obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o +obj-$(CONFIG_BLK_DEV_IDE_PC9800) += pc9800.o obj-$(CONFIG_BLK_DEV_PDC4030) += pdc4030.o obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o obj-$(CONFIG_BLK_DEV_UMC8672) += umc8672.o
@@ -15,6 +16,10 @@ obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o # Last of all +ifneq ($(CONFIG_X86_PC9800),y) obj-$(CONFIG_BLK_DEV_HD) += hd.o +else +obj-$(CONFIG_BLK_DEV_HD) += hd98.o +endif EXTRA_CFLAGS := -Idrivers/ide
drivers/ide/legacy/hd98.c +904 -0
904 lines not on this page · raw message
drivers/ide/legacy/pc9800.c +82 -0
82 lines not on this page · raw message
include/asm-i386/ide.h +18 -0
@@ -26,6 +26,9 @@static __inline__int ide_default_irq (ide_ioreg_t base) {switch (base) { +#ifdef CONFIG_X86_PC9800 +case 0x640 :return 9 ; +#endif /* CONFIG_X86_PC9800 */ case 0x1f0 :return 14 ;case 0x170 :return 15 ;case 0x1e8 :return 11 ;
@@ -39,7 +42,11 @@static __inline__ide_ioreg_t ide_default_io_base (int index) { +#ifndef CONFIG_X86_PC9800 static unsigned long ata_io_base[MAX_HWIFS ] = {0x1f0 ,0x170 ,0x1e8 ,0x168 ,0x1e0 ,0x160 }; +#else /* CONFIG_X86_PC9800 */ +static unsigned long ata_io_base[MAX_HWIFS ] = {0x640 ,0x640 ,0 ,0 ,0 ,0 }; +#endif /* !CONFIG_X86_PC9800 */ return ata_io_base[index]; }
@@ -48,13 +55,24 @@ {ide_ioreg_t reg = data_port;int i; +#ifdef CONFIG_X86_PC9800 +ide_ioreg_t increment = data_port ==0x640 ?2 :1 ; +#endif for (i =IDE_DATA_OFFSET ; i <=IDE_STATUS_OFFSET ; i++) { hw->io_ports[i] = reg; +#ifndef CONFIG_X86_PC9800 reg +=1 ; +#else + reg += increment; +#endif }if (ctrl_port) { hw->io_ports[IDE_CONTROL_OFFSET ] = ctrl_port; +#ifdef CONFIG_X86_PC9800 + }else if (data_port ==0x640 ) { + hw->io_ports[IDE_CONTROL_OFFSET ] =0x74c ; +#endif }else { hw->io_ports[IDE_CONTROL_OFFSET ] = hw->io_ports[IDE_DATA_OFFSET ] +0x206 ; }
include/linux/hdreg.h +19 -0
@@ -5,11 +5,13 @@* This file contains some defines for the AT-hd-controller. * Various sources. */ +#include <linux/config.h> /* ide.c has its own port definitions in "ide.h" */ #define HD_IRQ 14 +#ifndef CONFIG_X86_PC9800 /* Hd controller regs. Ref: IBM AT Bios-listing */ #define HD_DATA 0x1f0/* _CTL when writing */ #define HD_ERROR 0x1f1/* see err-bits */
@@ -25,6 +27,23 @@#define HD_CMD 0x3f6/* used for resets */ #define HD_ALTSTATUS 0x3f6/* same as HD_STATUS but doesn't clear irq */ +#else /* CONFIG_X86_PC9800 */ +/* Hd controller regs. for NEC PC-9800 */ +#define HD_DATA 0x640/* _CTL when writing */ +#define HD_ERROR 0x642/* see err-bits */ +#define HD_NSECTOR 0x644/* nr of sectors to read/write */ +#define HD_SECTOR 0x646/* starting sector */ +#define HD_LCYL 0x648/* starting cylinder */ +#define HD_HCYL 0x64a/* high byte of starting cyl */ +#define HD_CURRENT 0x64c/* 101dhhhh , d=drive, hhhh=head */ +#define HD_STATUS 0x64e/* see status-bits */ +#define HD_FEATURE HD_ERROR/* same io address, read=error, write=feature */ +#define HD_PRECOMP HD_FEATURE/* obsolete use of this port - predates IDE */ +#define HD_COMMAND HD_STATUS/* same io address, read=status, write=cmd */ + +#define HD_CMD 0x74c/* used for resets */ +#define HD_ALTSTATUS 0x74c/* same as HD_STATUS but doesn't clear irq */ +#endif /* CONFIG_X86_PC9800 */ /* remainder is shared between hd.c, ide.c, ide-cd.c, and the hdparm utility */
include/linux/ide.h +1 -1
@@ -294,7 +294,7 @@ ide_qd65xx, ide_umc8672, ide_ht6560b, ide_pdc4030, ide_rz1000, ide_trm290, ide_cmd646, ide_cy82c693, ide_4drives, - ide_pmac, ide_etrax100, ide_acorn + ide_pmac, ide_etrax100, ide_acorn, ide_pc9800 } hwif_chipset_t; typedef struct ide_io_ops_s {
PATCH 1/1 PC-9800 sub-arch (14/29) core#2
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (14/29).
Core patches for PC98 under include/asm-i386/ directory.
include/asm-i386/dma.h +7 -0
@@ -10,6 +10,9 @@#include <linux/config.h> #include <linux/spinlock.h> /* And spinlocks */ +#ifdef CONFIG_X86_PC9800 +#include <asm/pc9800_dma.h> +#else /* !CONFIG_X86_PC9800 */ #include <asm/io.h> /* need byte IO */ #include <linux/delay.h>
@@ -72,8 +75,10 @@#define MAX_DMA_CHANNELS 8 +#ifndef CONFIG_X86_PC9800 /* The maximum address that we can perform a DMA transfer to on this platform */ #define MAX_DMA_ADDRESS (PAGE_OFFSET+0x1000000) +#endif /* 8237 DMA controllers */ #define IO_DMA1_BASE 0x00/* 8 bit slave DMA, channels 0..3 */
@@ -295,4 +300,6 @@#define isa_dma_bridge_buggy (0)#endif +#endif /* CONFIG_X86_PC9800 */ +#endif /* _ASM_DMA_H */
include/asm-i386/io.h +6 -0
@@ -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 +#ifndef CONFIG_X86_PC9800 #define __SLOW_DOWN_IO "outb %%al,$0x80;" +#else +#define __SLOW_DOWN_IO "outb %%al,$0x5f;" +#endif #endif static inline void slow_down_io (void ) {
include/asm-i386/irq.h +4 -0
@@ -17,7 +17,11 @@static __inline__int irq_cannonicalize (int irq) { +#ifndef CONFIG_X86_PC9800 return ((irq ==2 ) ?9 : irq); +#else +return ((irq ==7 ) ?11 : irq); +#endif }extern void disable_irq (unsigned int );
include/asm-i386/pc9800.h +27 -0
@@ -0,0 +1,27 @@ +/* +* PC-9800 machine types. +* +* Copyright (C) 1999 TAKAI Kosuke <[email protected]> +* (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
include/asm-i386/pc9800_dma.h +238 -0
238 lines not on this page · raw message
include/asm-i386/pgtable.h +4 -0
@@ -58,7 +58,11 @@#endif #endif +#ifndef CONFIG_X86_PC9800 #define __beep () asm("movb $0x3,%al; outb %al,$0x61") +#else +#define __beep () asm("movb $0x6,%al; outb %al,$0x37") +#endif #define PMD_SIZE (1UL << PMD_SHIFT)#define PMD_MASK (~(PMD_SIZE-1))
include/asm-i386/scatterlist.h +6 -0
@@ -1,6 +1,8 @@ #ifndef _I386_SCATTERLIST_H #define _I386_SCATTERLIST_H +#include <linux/config.h> + struct scatterlist { struct page *page; unsigned int offset;
@@ -8,6 +10,10 @@ unsigned int length; }; +#ifdef CONFIG_X86_PC9800 +#define ISA_DMA_THRESHOLD (0xffffffff) +#else #define ISA_DMA_THRESHOLD (0x00ffffff) +#endif #endif /* !(_I386_SCATTERLIST_H) */
include/asm-i386/timex.h +4 -0
@@ -9,11 +9,15 @@#include <linux/config.h> #include <asm/msr.h> +#ifdef CONFIG_X86_PC9800 +extern int CLOCK_TICK_RATE ; +#else #ifdef CONFIG_MELAN # define CLOCK_TICK_RATE 1189200/* AMD Elan has different frequency! */ #else # define CLOCK_TICK_RATE 1193180/* Underlying HZ */ #endif +#endif #define CLOCK_TICK_FACTOR 20/* Factor of both 1000000 and CLOCK_TICK_RATE */ #define FINETUNE ((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \
PATCH 1/1 PC-9800 sub-arch (15/29) ac-update
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (15/29).
Updates input driver for PC98 in 2.5.50-ac1.
drivers/input/keyboard/Kconfig +1 -1
@@ -92,7 +92,7 @@ config KEYBOARD_98KBD tristate "NEC PC-9800 Keyboard support" - depends on PC9800 && INPUT && INPUT_KEYBOARD && SERIO + depends on X86_PC9800 && INPUT && INPUT_KEYBOARD && SERIO help Say Y here if you want to use the NEC PC-9801/PC-9821 keyboard (or compatible) on your system.
drivers/input/mouse/98busmouse.c +4 -3
@@ -31,15 +31,16 @@* */ -#include <asm/io.h> -#include <asm/irq.h> -#include <linux/config.h> #include <linux/module.h> #include <linux/delay.h> #include <linux/ioport.h> #include <linux/init.h> #include <linux/input.h> +#include <linux/interrupt.h> + +#include <asm/io.h> +#include <asm/irq.h> MODULE_AUTHOR ("Osamu Tomita <[email protected]>" );MODULE_DESCRIPTION ("PC-9801 busmouse driver" );
drivers/input/mouse/Kconfig +1 -1
@@ -123,7 +123,7 @@ config MOUSE_PC9800 tristate "NEC PC-9800 busmouse" - depends on PC9800 && INPUT && INPUT_MOUSE && ISA + depends on X86_PC9800 && INPUT && INPUT_MOUSE && ISA help Say Y here if you have NEC PC-9801/PC-9821 computer and want its native mouse supported.
drivers/input/serio/98kbd-io.c +4 -3
@@ -11,16 +11,17 @@* the Free Software Foundation. */ -#include <asm/io.h> - +#include <linux/config.h> #include <linux/delay.h> #include <linux/module.h> +#include <linux/interrupt.h> #include <linux/ioport.h> -#include <linux/config.h> #include <linux/init.h> #include <linux/serio.h> #include <linux/sched.h> +#include <asm/io.h> +MODULE_AUTHOR ("Osamu Tomita <[email protected]>" );MODULE_DESCRIPTION ("NEC PC-9801 keyboard controller driver" );MODULE_LICENSE ("GPL" );
drivers/input/serio/Kconfig +1 -1
@@ -109,7 +109,7 @@ config SERIO_98KBD tristate "NEC PC-9800 keyboard controller" - depends on PC9800 && SERIO + depends on X86_PC9800 && SERIO help Say Y here if you have the NEC PC-9801/PC-9821 and want to use its standard keyboard connected to its keyboard controller.
PATCH 1/1 PC-9800 sub-arch (16/29) input
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (16/29).
Beep driver and keyboard support files.
drivers/input/misc/98spkr.c +95 -0
@@ -0,0 +1,95 @@ +/* +* PC-9800 Speaker beeper driver for Linux +* +* Copyright (c) 2002 Osamu Tomita +* Copyright (c) 2002 Vojtech Pavlik +* Copyright (c) 1992 Orest Zborowski +* +*/ + +/* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License version 2 as published by +* the Free Software Foundation +*/ + +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/init.h> +#include <linux/input.h> +#include <asm/io.h> + +MODULE_AUTHOR ("Osamu Tomita <[email protected]>" ); +MODULE_DESCRIPTION ("PC-9800 Speaker beeper driver" ); +MODULE_LICENSE ("GPL" ); + +static char spkr98_name[] ="PC-9801 Speaker" ; +static char spkr98_phys[] ="isa3fdb/input0" ; +static struct input_dev spkr98_dev; + +spinlock_t i8253_beep_lock =SPIN_LOCK_UNLOCKED ; + +static int spkr98_event (struct input_dev *dev,unsigned int type,unsigned int code,int value) +{ +unsigned int count =0 ; +unsigned long flags; + +if (type !=EV_SND ) +return -1 ; + +switch (code) { +case SND_BELL :if (value) value =1000 ; +case SND_TONE :break ; +default :return -1 ; + } + +if (value >20 && value <32767 ) + count =CLOCK_TICK_RATE / value; + +spin_lock_irqsave (&i8253_beep_lock, flags); + +if (count) { +outb (0x76 ,0x3fdf ); +outb (0 ,0x5f ); +outb (count &0xff ,0x3fdb ); +outb (0 ,0x5f ); +outb ((count >>8 ) &0xff ,0x3fdb ); +/* beep on */ +outb (6 ,0x37 ); + }else { +/* beep off */ +outb (7 ,0x37 ); + } + +spin_unlock_irqrestore (&i8253_beep_lock, flags); + +return 0 ; +} + +static int __init spkr98_init (void ) +{ + spkr98_dev.evbit[0 ] =BIT (EV_SND ); + spkr98_dev.sndbit[0 ] =BIT (SND_BELL ) |BIT (SND_TONE ); + spkr98_dev.event = spkr98_event; + + spkr98_dev.name = spkr98_name; + spkr98_dev.phys = spkr98_phys; + spkr98_dev.id.bustype =BUS_ISA ; + spkr98_dev.id.vendor =0x001f ; + spkr98_dev.id.product =0x0001 ; + spkr98_dev.id.version =0x0100 ; + +input_register_device (&spkr98_dev); + +printk (KERN_INFO "input: %s\n" , spkr98_name); + +return 0 ; +} + +static void __exit spkr98_exit(void) +{ +input_unregister_device (&spkr98_dev); +} + +module_init (spkr98_init); +module_exit (spkr98_exit);
drivers/input/misc/Kconfig +4 -0
@@ -44,6 +44,10 @@ tristate "M68k Beeper support" depends on M68K && INPUT && INPUT_MISC +config INPUT_98SPKR + tristate "PC-9800 Speaker support" + depends on X86_PC9800 && INPUT && INPUT_MISC + config INPUT_UINPUT tristate "User level driver support" depends on INPUT && INPUT_MISC
drivers/input/misc/Makefile +1 -0
@@ -7,5 +7,6 @@ obj-$(CONFIG_INPUT_SPARCSPKR) += sparcspkr.o obj-$(CONFIG_INPUT_PCSPKR) += pcspkr.o obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o +obj-$(CONFIG_INPUT_98SPKR) += 98spkr.o obj-$(CONFIG_INPUT_UINPUT) += uinput.o obj-$(CONFIG_INPUT_GSC) += gsc_ps2.o
drivers/char/keyboard.c +4 -0
@@ -57,7 +57,11 @@* Some laptops take the 789uiojklm,. keys as number pad when NumLock is on. * This seems a good reason to start with NumLock off. */ +#ifndef CONFIG_X86_PC9800 #define KBD_DEFLEDS 0 +#else +#define KBD_DEFLEDS (1 << VC_NUMLOCK) +#endif #endif #ifndef KBD_DEFLOCK
include/linux/kbd_kern.h +3 -2
@@ -43,11 +43,12 @@#define LED_SHOW_IOCTL 1/* only change leds upon ioctl */ #define LED_SHOW_MEM 2/* `heartbeat': peek into memory */ - unsigned char ledflagstate:3; /* flags, not lights */ - unsigned char default_ledflagstate:3; + unsigned char ledflagstate:4; /* flags, not lights */ + unsigned char default_ledflagstate:4;#define VC_SCROLLOCK 0/* scroll-lock mode */ #define VC_NUMLOCK 1/* numeric lock mode */ #define VC_CAPSLOCK 2/* capslock mode */ +#define VC_KANALOCK 3/* kanalock mode */ unsigned char kbdmode:2; /* one 2-bit value */#define VC_XLATE 0/* translate keycodes using keymap */
include/linux/keyboard.h +1 -0
@@ -9,6 +9,7 @@#define KG_ALT 3#define KG_ALTGR 1#define KG_SHIFTL 4 +#define KG_KANASHIFT 4#define KG_SHIFTR 5#define KG_CTRLL 6#define KG_CTRLR 7
PATCH 1/1 PC-9800 sub-arch (17/29) kernel
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (17/29).
Misc files for support PC98.
kernel/dma.c +3 -0
@@ -9,6 +9,7 @@* [It also happened to remove the sizeof(char *) == sizeof(int) * assumption introduced because of those /proc/dma patches. -- Hennus] */ +#include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/errno.h>
@@ -62,10 +63,12 @@ { 0, 0 }, { 0, 0 }, { 0, 0 }, +#ifndef CONFIG_X86_PC9800 { 1, "cascade" }, { 0, 0 }, { 0, 0 }, { 0, 0 } +#endif };
kernel/timer.c +5 -0
@@ -434,8 +434,13 @@/* * Timekeeping variables */ +#ifndef CONFIG_X86_PC9800 unsigned long tick_usec =TICK_USEC ;/* ACTHZ period (usec) */ unsigned long tick_nsec =TICK_NSEC (TICK_USEC );/* USER_HZ period (nsec) */ +#else +extern unsigned long tick_usec;/* ACTHZ period (usec) */ +extern unsigned long tick_nsec;/* USER_HZ period (nsec) */ +#endif /* The current time */ struct timespec xtime __attribute__ ((aligned (16)));
include/linux/kernel.h +6 -0
@@ -224,4 +224,10 @@#define __FUNCTION__ (__func__)#endif +#ifdef CONFIG_X86_PC9800 +#define pc98 1 +#else +#define pc98 0 +#endif +#endif
PATCH 1/1 PC-9800 sub-arch (19/29) ac-update
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (19/29).
Updates files under arch/i386/mach-pc9800 in 2.5.50-ac1.
arch/i386/mach-pc9800/Makefile +1 -9
@@ -1,15 +1,7 @@ # # Makefile for the linux kernel. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definitions are now in the main makefile... EXTRA_CFLAGS += -I../kernel -export-objs := - -obj-y := setup.o -include $(TOPDIR)/Rules.make +obj-y := setup.o topology.o
arch/i386/mach-pc9800/setup.c +4 -4
@@ -8,6 +8,7 @@#include <linux/init.h> #include <linux/irq.h> #include <linux/interrupt.h> +#include <linux/apm_bios.h> #include <asm/setup.h> #include <asm/arch_hooks.h>
@@ -16,9 +17,6 @@unsigned char table[0 ]; }; -/* Indicates PC-9800 architecture No:0 Yes:1 */ -extern int pc98; -/** * pre_intr_init_hook - initialisation prior to setting up interrupt vectors *
@@ -68,7 +66,9 @@ {SYS_DESC_TABLE .length =0 ; MCA_bus =0 ; - pc98 =1 ; +/* In PC-9800, APM BIOS version is written in BCD...?? */ +APM_BIOS_INFO .version = (APM_BIOS_INFO .version &0xff00 ) + | ((APM_BIOS_INFO .version &0x00f0 ) >>4 ); }/**
arch/i386/mach-pc9800/topology.c +68 -0
68 lines not on this page · raw message
PATCH 1/1 PC-9800 sub-arch (18/29) ac-update
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (18/29).
Updates bakward comptible printer driver for PC98 in 2.5.50-ac1.
drivers/char/lp_old98.c +69 -78
@@ -10,45 +10,35 @@* generic PC printer port driver. */ -#include <linux/init.h> #include <linux/module.h> +#include <linux/init.h> #include <linux/config.h> #include <linux/errno.h> #include <linux/kernel.h> #include <linux/major.h> #include <linux/sched.h> -#include <linux/malloc.h> +#include <linux/slab.h> +#include <linux/spinlock.h> #include <linux/ioport.h> #include <linux/fcntl.h> #include <linux/delay.h> #include <linux/console.h> #include <linux/version.h> +#include <linux/fs.h> #include <asm/io.h> #include <asm/uaccess.h> #include <asm/system.h> -#if !defined(CONFIG_PC9800 ) && !defined(CONFIG_PC98 ) -#error This driver works only for NEC PC-9800 series -#endif - -#if LINUX_VERSION_CODE <0x20200 -# define LP_STATS -#endif - -#if LINUX_VERSION_CODE >=0x2030b -# define CONFIG_RESOURCE98 -#endif -#include <linux/lp.h> /* * I/O port numbers */ #define LP_PORT_DATA 0x40 -#define LP_PORT_STATUS (LP_PORT_DATA+2) -#define LP_PORT_STROBE (LP_PORT_DATA+4) -#define LP_PORT_CONTROL (LP_PORT_DATA+6) +#define LP_PORT_STATUS (LP_PORT_DATA + 2) +#define LP_PORT_STROBE (LP_PORT_DATA + 4) +#define LP_PORT_CONTROL (LP_PORT_DATA + 6)#define LP_PORT_H98MODE 0x0448#define LP_PORT_EXTMODE 0x0149
@@ -73,27 +63,27 @@/* PC-9800s have at least and at most one old-style printer port. */ static struct lp_struct lp = {/* Following `TAG: INITIALIZER' notations are GNU CC extension. */ - flags:LP_EXIST |LP_ABORTOPEN , - chars:LP_INIT_CHAR , - time:LP_INIT_TIME , - wait:LP_INIT_WAIT , + .flags =LP_EXIST |LP_ABORTOPEN , + .chars =LP_INIT_CHAR , + .time =LP_INIT_TIME , + .wait =LP_INIT_WAIT , };static int dc1_check =1000 ; +static spinlock_t lp_old98_lock =SPIN_LOCK_UNLOCKED ; -#undef LP_OLD98_DEBUG -#ifndef __udelay_val -# define __udelay_val current_cpu_data.loops_per_sec -#endif +#undef LP_OLD98_DEBUGstatic inline void nanodelay (unsigned long nanosecs)/* Evil ? */ { -if ( nanosecs ) { - nanosecs *= (unsigned long )((1ULL <<40 ) /1000000000ULL ); - __asm__("mul%L2 %2" - :"=d" (nanosecs) :"a" (nanosecs),"g" (__udelay_val)); -__delay (nanosecs >>8 ); +if (nanosecs) { +int d0; + nanosecs = (nanosecs *512UL ) /119UL ; + __asm__("mull %0" + :"=d" (nanosecs),"=&a" (d0) + :"1" (nanosecs),"0" (current_cpu_data.loops_per_jiffy)); +__delay (nanosecs *HZ ); } }
@@ -118,15 +108,14 @@ } } -static inline int -lp_old98_wait_ready (void ) +static inline int lp_old98_wait_ready (void ) {struct timer_list timer;init_timer (&timer); timer.function = lp_old98_timer_function; timer.expires = jiffies +1 ; - timer.data = (unsigned long ) &timer; + timer.data = (unsigned long )&timer;add_timer (&timer);interruptible_sleep_on (&lp_old98_waitq);del_timer (&timer);
@@ -140,7 +129,7 @@int tmp;#endif -while ( !(inb (LP_PORT_STATUS ) & LP_MASK_nBUSY) ) { +while (!(inb (LP_PORT_STATUS ) & LP_MASK_nBUSY)) { count++;if (count >= lp.chars)return 0 ;
@@ -153,7 +142,7 @@* Update lp statsistics here (and between next two outb()'s). * Time to compute it is part of storobe delay. */ -if ( count > lp.stats.maxwait ) { +if (count > lp.stats.maxwait) {#ifdef LP_OLD98_DEBUG printk (KERN_DEBUG "lp_old98: success after %d counts.\n" , count);
@@ -162,7 +151,7 @@ } count *=256 ; tmp = count - lp.stats.meanwait; -if ( tmp <0 ) +if (tmp <0 ) tmp = -tmp;#endif nanodelay (lp.wait);
@@ -173,7 +162,7 @@#ifdef LP_STATS lp.stats.meanwait = (255 * lp.stats.meanwait + count +128 ) /256 ; lp.stats.mdev = (127 * lp.stats.mdev + tmp +64 ) /128 ; - lp.stats.chars++; + lp.stats.chars ++;#endif nanodelay (lp.wait);
@@ -199,7 +188,7 @@return -EFAULT ;#ifdef LP_STATS -if ( jiffies - lp.lastcall > lp.time ) +if (jiffies - lp.lastcall > lp.time) lp.runchars =0 ; lp.lastcall = jiffies;#endif
@@ -212,17 +201,17 @@if (__copy_from_user (lp.lp_buffer, buf, copy_size))return -EFAULT ; -while ( bytes_written < copy_size ) { -if (lp_old98_char (lp.lp_buffer[bytes_written]) ) - bytes_written++; +while (bytes_written < copy_size) { +if (lp_old98_char (lp.lp_buffer[bytes_written])) + bytes_written ++;else {#ifdef LP_STATS int rc = lp.runchars + bytes_written; -if ( rc > lp.stats.maxrun ) +if (rc > lp.stats.maxrun) lp.stats.maxrun = rc; - lp.stats.sleeps++; + lp.stats.sleeps ++;#endif #ifdef LP_OLD98_DEBUG printk(KERN_DEBUG
@@ -243,7 +232,7 @@ lp.runchars += bytes_written;#endif count -= bytes_written; - }while ( count >0 ); + }while (count >0 );return total_bytes_written; }
@@ -256,16 +245,16 @@static int lp_old98_open (struct inode * inode,struct file * file) { -if (MINOR (inode->i_rdev) !=0 ) +if (minor (inode->i_rdev) !=0 )return -ENXIO ; -if ( lp.flags &LP_BUSY ) +if (lp.flags &LP_BUSY )return -EBUSY ;if ((lp.lp_buffer =kmalloc (LP_BUFFER_SIZE ,GFP_KERNEL )) ==NULL )return -ENOMEM ;if (dc1_check && (lp.flags &LP_ABORTOPEN ) - && !(file->f_flags &O_NONBLOCK ) ) { + && !(file->f_flags &O_NONBLOCK )) {/* * Check whether printer is on-line. * PC-9800's old style port have only BUSY# as status input,
@@ -284,22 +273,22 @@* `PC-9801 Super Technique', Ascii, 1992. */ int count; -unsigned long eflags; +unsigned long flags; -save_flags (eflags); -cli ();/* interrupts while check is fairly bad */ +/* interrupts while check is fairly bad */ +spin_lock_irqsave (&lp_old98_lock, flags);if (!lp_old98_char (DC1 )) { -restore_flags (eflags); +spin_unlock_irqrestore (&lp_old98_lock, flags);return -EBUSY ; } count = (unsigned int )dc1_check >10000 ?10000 : dc1_check; -while (inb (LP_PORT_STATUS ) & LP_MASK_nBUSY ) -if ( --count ==0 ) { -restore_flags (eflags); +while (inb (LP_PORT_STATUS ) & LP_MASK_nBUSY) +if (--count ==0 ) { +spin_unlock_irqrestore (&lp_old98_lock, flags);return -ENODEV ; } -restore_flags (eflags); +spin_unlock_irqrestore (&lp_old98_lock, flags); } lp.flags |=LP_BUSY ;
@@ -329,14 +318,14 @@ {unsigned char data; -if ( (data =inb (LP_PORT_EXTMODE )) !=0xFF && (data &0x10 ) ) { +if ((data =inb (LP_PORT_EXTMODE )) !=0xFF && (data &0x10 )) {printk (KERN_INFO "lp_old98: shutting down extended parallel port mode...\n" );outb (data & ~0x10 ,LP_PORT_EXTMODE ); }#ifdef PC98_HW_H98 -if ( (pc98_hw_flags &PC98_HW_H98 ) - && ((data =inb (LP_PORT_H98MODE )) &0x01 ) ) { +if ((pc98_hw_flags &PC98_HW_H98 ) + && ((data =inb (LP_PORT_H98MODE )) &0x01 )) {printk (KERN_INFO "lp_old98: shutting down H98 full centronics mode...\n" );outb (data & ~0x01 ,LP_PORT_H98MODE );
@@ -358,7 +347,7 @@ {int retval =0 ; -switch ( command ) { +switch (command) {case LPTIME : lp.time = arg *HZ /100 ;break ;
@@ -366,13 +355,13 @@ lp.chars = arg;break ;case LPABORT : -if ( arg ) +if (arg) lp.flags |=LP_ABORT ;else lp.flags &= ~LP_ABORT ;break ;case LPABORTOPEN : -if ( arg ) +if (arg) lp.flags |=LP_ABORTOPEN ;else lp.flags &= ~LP_ABORTOPEN ;
@@ -402,8 +391,8 @@break ;#ifdef LP_STATS case LPGETSTATS : -if (copy_to_user ((struct lp_stats *)arg, &lp.stats, -sizeof (struct lp_stats )) ) +if (copy_to_user ((struct lp_stats *)arg, &lp.stats, +sizeof (struct lp_stats ))) retval = -EFAULT ;else if (suser ())memset (&lp.stats,0 ,sizeof (struct lp_stats ));
@@ -420,13 +409,13 @@ }static struct file_operations lp_old98_fops = { - owner:THIS_MODULE , - llseek: lp_old98_llseek, - read:NULL , - write: lp_old98_write, - ioctl: lp_old98_ioctl, - open: lp_old98_open, - release:lp_old98_release, + .owner =THIS_MODULE , + .llseek = lp_old98_llseek, + .read =NULL , + .write = lp_old98_write, + .ioctl = lp_old98_ioctl, + .open = lp_old98_open, + .release = lp_old98_release, };/*
@@ -494,15 +483,15 @@static kdev_t lp_old98_console_device (struct console *console) { -return MKDEV (LP_MAJOR ,0 ); +return mk_kdev (LP_MAJOR ,0 ); }static struct console lp_old98_console = { - name:"lp_old98" , - write: lp_old98_console_write, - device: lp_old98_console_device, - flags:CON_PRINTBUFFER , - index:-1 , + .name ="lp_old98" , + .write = lp_old98_console_write, + .device = lp_old98_console_device, + .flags =CON_PRINTBUFFER , + .index =-1 , };#endif /* console on lp_old98 */
@@ -544,7 +533,7 @@* but for locking out other printer drivers... */ #ifdef PC98_HW_H98 -if ( pc98_hw_flags &PC98_HW_H98 ) +if (pc98_hw_flags &PC98_HW_H98 )request_region (LP_PORT_H98MODE ,1 ,"lp_old98" );#endif request_region (LP_PORT_EXTMODE ,1 ,"lp_old98" );
@@ -565,7 +554,7 @@release_region (LP_PORT_STATUS ,1 );release_region (LP_PORT_STROBE ,1 );#ifdef PC98_HW_H98 -if ( pc98_hw_flags &PC98_HW_H98 ) +if (pc98_hw_flags &PC98_HW_H98 )release_region (LP_PORT_H98MODE ,1 );#endif release_region (LP_PORT_EXTMODE ,1 );
@@ -573,5 +562,7 @@MODULE_PARM (dc1_check,"1i" );MODULE_AUTHOR ("Kousuke Takai <[email protected]>" ); +MODULE_DESCRIPTION ("PC-9800 old printer port driver" ); +MODULE_LICENSE ("GPL" );#endif
PATCH 1/1 PC-9800 sub-arch (20/29) parport
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (20/29).
Parallel port support.
drivers/parport/parport_pc.c +61 -5
@@ -332,7 +332,10 @@unsigned char parport_pc_read_status (struct parport *p) { -return inb (STATUS (p)); +if (pc98 && p->base ==0x40 ) +return ((inb (0x42 ) &0x04 ) <<5 ) |PARPORT_STATUS_ERROR ; +else +return inb (STATUS (p)); }void parport_pc_disable_irq (struct parport *p)
@@ -1644,6 +1647,8 @@ {unsigned char r, w; +if (pc98 && pb->base ==0x40 ) +return PARPORT_MODE_PCSPP ;/* * first clear an eventually pending EPP timeout * I ([email protected]) have an SMSC chipset
@@ -1777,6 +1782,9 @@ {int ok =0 ; +if (pc98 && pb->base ==0x40 ) +return 0 ;/* never support */ +clear_epp_timeout (pb);/* try to tri-state the buffer */
@@ -1908,6 +1916,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);
@@ -2048,6 +2059,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);
@@ -2212,7 +2226,14 @@struct parport tmp;struct parport *p = &tmp;int probedirq =PARPORT_IRQ_NONE ; -if (check_region (base,3 ))return NULL ; +if (pc98 && base ==0x40 ) { +int i; +for (i =0 ; i <8 ; i +=2 ) +if (check_region (base + i,1 ))return NULL ; + }else { +if (check_region (base,3 ))return NULL ; + } + priv =kmalloc (sizeof (struct parport_pc_private ),GFP_KERNEL );if (!priv) {printk (KERN_DEBUG "parport (0x%lx): no memory!\n" , base);
@@ -2245,7 +2266,7 @@if (base_hi && !check_region (base_hi,3 ))parport_ECR_present (p); -if (base !=0x3bc ) { +if (!pc98 && base !=0x3bc ) {if (!check_region (base+0x3 ,5 )) {if (!parport_EPP_supported (p))parport_ECPEPP_supported (p);
@@ -2343,7 +2364,12 @@printk (KERN_INFO "%s: irq %d detected\n" , p->name, probedirq);parport_proc_register (p); -request_region (p->base,3 , p->name); +if (pc98 && p->base ==0x40 ) { +int i; +for (i =0 ; i <8 ; i +=2 ) +request_region (p->base + i,1 , p->name); + }else +request_region (p->base,3 , p->name);if (p->size >3 )request_region (p->base +3 , p->size -3 , p->name);if (p->modes &PARPORT_MODE_ECP )
@@ -2413,7 +2439,13 @@free_dma (p->dma);if (p->irq !=PARPORT_IRQ_NONE )free_irq (p->irq, p); -release_region (p->base,3 ); +if (pc98 && p->base ==0x40 ) { +int i; +for (i =0 ; i <8 ; i +=2 ) +release_region (p->base + i,1 ); + }else +release_region (p->base,3 ); +if (p->size >3 )release_region (p->base +3 , p->size -3 );if (p->modes &PARPORT_MODE_ECP )
@@ -2996,6 +3028,30 @@ {int count =0 ; +if (pc98) { +/* Set default resource settings for old style parport */ +int base =0x40 ; +int base_hi =0 ; +int irq =PARPORT_IRQ_NONE ; +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 ? */ +/* Set default settings for IEEE1284 parport */ + base =0x140 ; + base_hi =0x14c ; + irq =14 ; +/* dma = PARPORT_DMA_NONE; */ + } + } + +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 ))
include/linux/parport_pc.h +10 -0
@@ -119,6 +119,11 @@#endif ctr = (ctr & ~mask) ^ val; ctr &= priv->ctr_writable;/* only write writable bits. */ +#ifdef CONFIG_X86_PC9800 +if (p->base ==0x40 && ((priv->ctr) ^ ctr) &0x01 ) +outb (0x0e | ((ctr &0x01 ) ^0x01 ),0x46 ); + else +#endif /* CONFIG_X86_PC9800 */ outb (ctr,CONTROL (p)); priv->ctr = ctr;/* Update soft copy */ return ctr;
@@ -191,6 +196,11 @@extern __inline__unsigned char parport_pc_read_status (struct parport *p) { +#ifdef CONFIG_X86_PC9800 +if (p->base ==0x40 ) +return ((inb (0x42 ) &0x04 ) <<5 ) |PARPORT_STATUS_ERROR ; + else +#endif /* CONFIG_X86_PC9800 */ return inb (STATUS (p)); }
PATCH 1/1 PC-9800 sub-arch (21/29) ac-update
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (21/29).
Updates drivers/pci/quirks.c in 2.5.50-ac1.
drivers/pci/quirks.c +2 -0
@@ -551,6 +551,8 @@ { 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 }, { PCI_FIXUP_FINAL, PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_1, quirk_isa_dma_hangs }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_dma_hangs }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs }, { 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 },
PATCH 1/1 PC-9800 sub-arch (22/29) PCI
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (22/29).
PCI support.
arch/i386/pci/irq.c +27 -0
@@ -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_X86_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_X86_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.
drivers/pcmcia/yenta.c +6 -0
@@ -8,6 +8,7 @@* Dynamically adjust the size of the bridge resource * */ +#include <linux/config.h> #include <linux/init.h> #include <linux/pci.h> #include <linux/sched.h>
@@ -510,6 +511,7 @@add_timer (&socket->poll_timer); } +#ifndef CONFIG_X86_PC9800 /* * Only probe "regular" interrupts, don't * touch dangerous spots like the mouse irq,
@@ -520,6 +522,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) {
include/asm-i386/pci.h +4 -0
@@ -17,7 +17,11 @@#endif extern unsigned long pci_mem_start; +#ifndef CONFIG_X86_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 );
PATCH 1/1 PC-9800 sub-arch (23/29) PCMCIA
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (23/29).
PCMCIA (16bits) support.
drivers/pcmcia/i82365.c +4 -0
@@ -187,7 +187,11 @@ };/* Default ISA interrupt mask */ +#ifndef CONFIG_X86_PC9800 #define I365_MASK 0xdeb8/* irq 15,14,12,11,10,9,7,5,4,3 */ +#else +#define I365_MASK 0xd668/* irq 15,14,12,10,9,6,5,3 */ +#endif #ifdef CONFIG_ISA static int grab_irq;
PATCH 1/1 PC-9800 sub-arch (24/29) PNP
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (24/29).
Legacy bus PNP support.
drivers/pnp/isapnp/core.c +5 -0
@@ -72,8 +72,13 @@MODULE_PARM_DESC (isapnp_verbose,"ISA Plug & Play verbose mode" );MODULE_LICENSE ("GPL" ); +#ifndef CONFIG_X86_PC9800 #define _PIDXR 0x279#define _PNPWRP 0xa79 +#else +#define _PIDXR 0x259 +#define _PNPWRP 0xa59 +#endif /* short tags */ #define _STAG_PNPVERNO 0x01
PATCH 1/1 PC-9800 sub-arch (26/29) ac-update
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (26/29).
Updates include/asm-i386/serial.h in 2.5.50-ac1.
include/asm-i386/serial.h +2 -2
@@ -50,7 +50,7 @@#define C_P (card,port) (((card)<<6|(port)<<3) + 1) -#ifndef CONFIG_PC9800 +#ifndef CONFIG_X86_PC9800 #define STD_SERIAL_PORT_DEFNS \/* UART CLK PORT IRQ FLAGS */ \ { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },/* ttyS0 */ \
@@ -62,7 +62,7 @@ /* UART CLK PORT IRQ FLAGS */ \ { 0, BASE_BAUD, 0x30, 4, STD_COM_FLAGS }, /* ttyS0 */ \ { 0, BASE_BAUD, 0x238, 5, STD_COM_FLAGS }, /* ttyS1 */ -#endif /* CONFIG_PC9800 */ +#endif /* CONFIG_X86_PC9800 */ #ifdef CONFIG_SERIAL_MANY_PORTS
PATCH 1/1 PC-9800 sub-arch (25/29) SCSI
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (25/29).
SCSI host adapter support.
drivers/scsi/Kconfig +7 -0
@@ -1730,6 +1730,13 @@ see the picture at <http://amiga.multigraph.com/photos/oktagon.html>. +config SCSI_PC980155 + tristate "NEC PC-9801-55 SCSI support" + depends on X86_PC9800 && SCSI + help + If you have the NEC PC-9801-55 SCSI interface card or compatibles + for NEC PC-9801/PC-9821, say Y. + # bool 'Cyberstorm Mk III SCSI support (EXPERIMENTAL)' CONFIG_CYBERSTORMIII_SCSI # bool 'GVP Turbo 040/060 SCSI support (EXPERIMENTAL)' CONFIG_GVP_TURBO_SCSI endmenu
drivers/scsi/Makefile +9 -1
@@ -31,6 +31,7 @@ obj-$(CONFIG_A3000_SCSI) += a3000.o wd33c93.o obj-$(CONFIG_A2091_SCSI) += a2091.o wd33c93.o obj-$(CONFIG_GVP11_SCSI) += gvp11.o wd33c93.o +obj-$(CONFIG_SCSI_PC980155) += pc980155.o wd33c93.o obj-$(CONFIG_MVME147_SCSI) += mvme147.o wd33c93.o obj-$(CONFIG_SGIWD93_SCSI) += sgiwd93.o wd33c93.o obj-$(CONFIG_CYBERSTORM_SCSI) += NCR53C9x.o cyberstorm.o
@@ -124,10 +125,17 @@ obj-$(CONFIG_BLK_DEV_SR) += sr_mod.o obj-$(CONFIG_CHR_DEV_SG) += sg.o -scsi_mod-objs := scsi.o hosts.o scsi_ioctl.o constants.o scsicam.o \ +scsi_mod-objs := scsi.o hosts.o scsi_ioctl.o constants.o \ scsi_error.o scsi_lib.o scsi_scan.o scsi_syms.o \ scsi_sysfs.o +ifneq ($(CONFIG_X86_PC9800),y) +scsi_mod-objs += scsicam.o +else +export-objs += wd33c93.o +scsi_mod-objs += scsicam98.o +endif + ifdef CONFIG_PROC_FS scsi_mod-objs += scsi_proc.o endif
drivers/scsi/pc980155.c +263 -0
263 lines not on this page · raw message
drivers/scsi/pc980155.h +47 -0
47 lines not on this page · raw message
drivers/scsi/pc980155regs.h +89 -0
89 lines not on this page · raw message
drivers/scsi/scsi_scan.c +1 -0
@@ -128,6 +128,7 @@ {"MITSUMI", "CD-R CR-2201CS", "6119", BLIST_NOLUN}, /* locks up */ {"RELISYS", "Scorpio", NULL, BLIST_NOLUN}, /* responds to all lun */ {"MICROTEK", "ScanMaker II", "5.61", BLIST_NOLUN}, /* responds to all lun */ + {"NEC", "D3856", "0009", BLIST_NOLUN},/* * Other types of devices that have special flags.
drivers/scsi/scsi_syms.c +4 -0
@@ -97,6 +97,10 @@EXPORT_SYMBOL (scsi_host_put);EXPORT_SYMBOL (scsi_device_types); +/* For PC-9800 architecture support */ +extern struct scsi_device *sd_find_params_by_bdev (struct block_device *,char **,sector_t *); +EXPORT_SYMBOL (sd_find_params_by_bdev); +/* * This is for st to find the bounce limit */
drivers/scsi/scsicam98.c +192 -0
192 lines not on this page · raw message
drivers/scsi/sd.c +22 -1
@@ -480,7 +480,7 @@ diskinfo[2 ] = sdkp->capacity >>11 ;/* override with calculated, extended default, or driver values */ -if (host->hostt->bios_param) +if (!pc98 && host->hostt->bios_param) host->hostt->bios_param (sdp, bdev, sdkp->capacity, diskinfo);else scsicam_bios_param (bdev, sdkp->capacity, diskinfo);
@@ -1377,6 +1377,27 @@kfree (sdkp); } +struct scsi_device *sd_find_params_by_bdev (struct block_device *bdev,char **disk_name,sector_t *capacity) +{ +struct scsi_disk *sdkp; +int major =major (to_kdev_t (bdev->bd_dev)); + +spin_lock (&sd_devlist_lock); +list_for_each_entry (sdkp, &sd_devlist, list) { +if (sdkp->disk->major == major) { +if (capacity) + *capacity = sdkp->capacity; +if (disk_name) + *disk_name = sdkp->disk->disk_name; +spin_unlock (&sd_devlist_lock); +return sdkp->device; + } + } + +spin_unlock (&sd_devlist_lock); +return NULL ; +} +/** * init_sd - entry point for this driver (both when built in or when * a module).
drivers/scsi/wd33c93.c +25 -5
@@ -84,6 +84,7 @@#include <linux/init.h> #include <asm/irq.h> #include <linux/blk.h> +#include <linux/spinlock.h> #include "scsi.h" #include "hosts.h"
@@ -173,7 +174,11 @@MODULE_PARM (setup_strings,"s" );#endif +static spinlock_t wd_lock =SPIN_LOCK_UNLOCKED ; +#if defined(CONFIG_SCSI_PC980155 ) || defined(CONFIG_SCSI_PC980155_MODULE ) +#include "pc980155regs.h" +#else /* !CONFIG_SCSI_PC980155 */ static inline uchar read_wd33c93 (const wd33c93_regs regs,uchar reg_num) {
@@ -203,6 +208,7 @@ *regs.SCMD = cmd; mb(); } +#endif /* CONFIG_SCSI_PC980155 */ static inline uchar read_1_byte (const wd33c93_regs regs)
@@ -220,6 +226,7 @@return x; } +#if !defined(CONFIG_SCSI_PC980155 ) && !defined(CONFIG_SCSI_PC980155_MODULE )static void write_wd33c93_count (const wd33c93_regs regs,unsigned long value) {
@@ -244,6 +251,7 @@mb (); return value; } +#endif /* !CONFIG_SCSI_PC980155 */ /* The 33c93 needs to be told which direction a command transfers its
@@ -426,7 +434,6 @@struct WD33C93_hostdata *hostdata = (struct WD33C93_hostdata *)instance->hostdata;const wd33c93_regs regs = hostdata->regs;Scsi_Cmnd *cmd, *prev; -int i;DB (DB_EXECUTE ,printk ("EX(" ))
@@ -589,9 +596,16 @@* (take advantage of auto-incrementing) */ - *regs.SASR =WD_CDB_1 ; -for (i=0 ; i<cmd->cmd_len; i++) - *regs.SCMD = cmd->cmnd[i]; +#if defined(CONFIG_SCSI_PC980155 ) || defined(CONFIG_SCSI_PC980155_MODULE ) +write_wd33c93_cdb (regs, cmd->cmd_len, cmd->cmnd); +#else /* !CONFIG_SCSI_PC980155 */ + { +int i; + *regs.SASR =WD_CDB_1 ; +for (i =0 ; i < cmd->cmd_len; i++) + *regs.SCMD = cmd->cmnd[i]; + } +#endif /* CONFIG_SCSI_PC980155 */ /* The wd33c93 only knows about Group 0, 1, and 5 commands when * it's doing a 'select-and-transfer'. To be safe, we write the
@@ -1703,7 +1717,7 @@return 1 ; } -__setup ("wd33c93" , wd33c93_setup); +__setup ("wd33c93=" , wd33c93_setup);/* check_setup_args() returns index if key found, 0 if not
@@ -2037,4 +2051,10 @@ { } +EXPORT_SYMBOL (wd33c93_reset); +EXPORT_SYMBOL (wd33c93_init); +EXPORT_SYMBOL (wd33c93_release); +EXPORT_SYMBOL (wd33c93_abort); +EXPORT_SYMBOL (wd33c93_queuecommand); +EXPORT_SYMBOL (wd33c93_intr);MODULE_LICENSE ("GPL" );
drivers/scsi/wd33c93.h +5 -0
@@ -186,8 +186,13 @@/* This is what the 3393 chip looks like to us */ typedef struct { +#if defined(CONFIG_SCSI_PC980155 ) || defined(CONFIG_SCSI_PC980155_MODULE ) +volatile unsigned int *SASR; +volatile unsigned int *SCMD; +#else volatile unsigned char *SASR;volatile unsigned char *SCMD; +#endif }wd33c93_regs ;
PATCH 1/1 PC-9800 sub-arch (28/29) SMP
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (28/29).
SMP support.
arch/i386/kernel/mpparse.c +26 -8
@@ -33,6 +33,7 @@#include <mach_apic.h> #include <mach_mpparse.h> +#include <bios_ebda.h> /* Have we found an MP table */ int smp_found_config;
@@ -653,7 +654,8 @@* Read the physical hardware table. Anything here will * override the defaults. */ -if (!smp_read_mpc ((void *)mpf->mpf_physptr)) { +if (!smp_read_mpc (pc98 ?phys_to_virt (mpf->mpf_physptr) + : (void *)mpf->mpf_physptr)) { smp_found_config =0 ;printk (KERN_ERR "BIOS bug, MP table errors detected!...\n" );printk (KERN_ERR "... disabling SMP support. (tell your hw vendor)\n" );
@@ -707,8 +709,23 @@printk ("found SMP MP-table at %08lx\n" ,virt_to_phys (mpf));reserve_bootmem (virt_to_phys (mpf),PAGE_SIZE ); -if (mpf->mpf_physptr) -reserve_bootmem (mpf->mpf_physptr,PAGE_SIZE ); +if (mpf->mpf_physptr) { +/* +* We cannot access to MPC table to compute +* table size yet, as only few megabytes from +* the bottom is mapped now. +* PC-9800's MPC table places on the very last +* of physical memory; so that simply reserving +* PAGE_SIZE from mpg->mpf_physptr yields BUG() +* in reserve_bootmem. +*/ +unsigned long size =PAGE_SIZE ; +unsigned long end = max_low_pfn *PAGE_SIZE ; +if (mpf->mpf_physptr + size > end) + size = end - mpf->mpf_physptr; +reserve_bootmem (mpf->mpf_physptr, size); + } + mpf_found = mpf;return 1 ; }
@@ -751,11 +768,12 @@* MP1.4 SPEC states to only scan first 1K of 4K EBDA. */ - address = *(unsigned short *)phys_to_virt (0x40E ); - address <<=4 ; -smp_scan_config (address,0x400 ); -if (smp_found_config) -printk (KERN_WARNING "WARNING: MP table in the EBDA can be UNSAFE, contact [email protected] if you experience SMP problems!\n" ); + address =get_bios_ebda (); +if (address) { +smp_scan_config (address,0x400 ); +if (smp_found_config) +printk (KERN_WARNING "WARNING: MP table in the EBDA can be UNSAFE, contact [email protected] if you experience SMP problems!\n" ); + } }
include/asm-i386/mach-default/bios_ebda.h +15 -0
@@ -0,0 +1,15 @@ +#ifndef _MACH_BIOS_EBDA_H +#define _MACH_BIOS_EBDA_H + +/* +* there is a real-mode segmented pointer pointing to the +* 4K EBDA area at 0x40E. +*/ +static inline unsigned int get_bios_ebda (void ) +{ +unsigned int address = *(unsigned short *)phys_to_virt (0x40E ); + address <<=4 ; +return address;/* 0 means none */ +} + +#endif /* _MACH_BIOS_EBDA_H */
include/asm-i386/mach-pc9800/bios_ebda.h +14 -0
@@ -0,0 +1,14 @@ +#ifndef _MACH_BIOS_EBDA_H +#define _MACH_BIOS_EBDA_H + +/* +* PC-9800 has no EBDA. +* Its BIOS uses 0x40E for other purpose, +* Not pointer to 4K EBDA area. +*/ +static inline unsigned int get_bios_ebda (void ) +{ +return 0 ;/* 0 means none */ +} + +#endif /* _MACH_BIOS_EBDA_H */
arch/i386/kernel/smpboot.c +14 -0
@@ -825,13 +825,27 @@store_NMI_vector (&nmi_high, &nmi_low); +#ifndef CONFIG_X86_PC9800 CMOS_WRITE (0xa ,0xf ); +#else +/* reset code is stored in 8255 on PC-9800. */ +outb (0x0e ,0x37 );/* SHUT0 = 0 */ +#endif local_flush_tlb ();Dprintk ("1.\n" ); *((volatile unsigned short *)TRAMPOLINE_HIGH ) = start_eip >>4 ;Dprintk ("2.\n" ); *((volatile unsigned short *)TRAMPOLINE_LOW ) = start_eip &0xf ;Dprintk ("3.\n" ); +#ifdef CONFIG_X86_PC9800 +/* +* On PC-9800, continuation on warm reset is done by loading +* %ss:%sp from 0x0000:0404 and executing 'lret', so: +*/ +/* 0x3f0 is on unused interrupt vector and should be safe... */ + *((volatile unsigned long *)phys_to_virt (0x404 )) =0x000003f0 ; +Dprintk ("4.\n" ); +#endif /* * Starting actual IPI sequence...
include/asm-i386/mach-pc9800/mach_wakecpu.h +45 -0
45 lines not on this page · raw message
PATCH 1/1 PC-9800 sub-arch (27/29) serial
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (27/29).
Serial port driver.
drivers/serial/8250_pnp.c +5 -0
@@ -188,6 +188,8 @@ { "MVX00A1", 0 },/* PC Rider K56 Phone System PnP */ { "MVX00F2", 0 }, +/* NEC 98NOTE SPEAKER PHONE FAX MODEM(33600bps) */ + { "nEC8241", 0 },/* Pace 56 Voice Internal Plug & Play Modem */ { "PMC2430", 0 },/* Generic */
@@ -373,6 +375,9 @@ ((port->min ==0x2f8 ) || (port->min ==0x3f8 ) || (port->min ==0x2e8 ) || +#ifdef CONFIG_X86_PC9800 + (port->min ==0x8b0 ) || +#endif (port->min == 0x3e8))) return 0; }
drivers/serial/Kconfig +14 -3
@@ -372,14 +372,25 @@ bool "Use NEC V850E on-chip UART for console" depends on V850E_NB85E_UART +config SERIAL98 + tristate "PC-9800 8251-based primary serial port support" + depends on X86_PC9800 + help + If you want to use standard primary serial ports on PC-9800, + say Y. Otherwise, say N. + +config SERIAL98_CONSOLE + bool "Support for console on PC-9800 standard serial port" + depends on SERIAL98=y + config SERIAL_CORE tristate - default m if SERIAL_AMBA!=y && SERIAL_CLPS711X!=y && SERIAL_21285!=y && !SERIAL_SA1100 && !SERIAL_ANAKIN && !SERIAL_UART00 && SERIAL_8250!=y && SERIAL_MUX!=y && !SERIAL_ROCKETPORT && !SERIAL_SUNCORE && !V850E_NB85E_UART && (SERIAL_AMBA=m || SERIAL_CLPS711X=m || SERIAL_21285=m || SERIAL_8250=m || SERIAL_MUX=m) - default y if SERIAL_AMBA=y || SERIAL_CLPS711X=y || SERIAL_21285=y || SERIAL_SA1100 || SERIAL_ANAKIN || SERIAL_UART00 || SERIAL_8250=y || SERIAL_MUX=y || SERIAL_ROCKETPORT || SERIAL_SUNCORE || V850E_NB85E_UART + default m if SERIAL_AMBA!=y && SERIAL_CLPS711X!=y && SERIAL_21285!=y && !SERIAL_SA1100 && !SERIAL_ANAKIN && !SERIAL_UART00 && SERIAL_8250!=y && SERIAL_MUX!=y && !SERIAL_ROCKETPORT && !SERIAL_SUNCORE && !V850E_NB85E_UART && (SERIAL_AMBA=m || SERIAL_CLPS711X=m || SERIAL_21285=m || SERIAL_8250=m || SERIAL_MUX=m || SERIAL98=m) + default y if SERIAL_AMBA=y || SERIAL_CLPS711X=y || SERIAL_21285=y || SERIAL_SA1100 || SERIAL_ANAKIN || SERIAL_UART00 || SERIAL_8250=y || SERIAL_MUX=y || SERIAL_ROCKETPORT || SERIAL_SUNCORE || V850E_NB85E_UART || SERIAL98=y config SERIAL_CORE_CONSOLE bool - depends on SERIAL_AMBA_CONSOLE || SERIAL_CLPS711X_CONSOLE || SERIAL_21285_CONSOLE || SERIAL_SA1100_CONSOLE || SERIAL_ANAKIN_CONSOLE || SERIAL_UART00_CONSOLE || SERIAL_8250_CONSOLE || SERIAL_MUX_CONSOLE || SERIAL_SUNCORE || V850E_NB85E_UART_CONSOLE + depends on SERIAL_AMBA_CONSOLE || SERIAL_CLPS711X_CONSOLE || SERIAL_21285_CONSOLE || SERIAL_SA1100_CONSOLE || SERIAL_ANAKIN_CONSOLE || SERIAL_UART00_CONSOLE || SERIAL_8250_CONSOLE || SERIAL_MUX_CONSOLE || SERIAL_SUNCORE || V850E_NB85E_UART_CONSOLE || SERIAL98_CONSOLE default y config SERIAL_68328
drivers/serial/Makefile +1 -0
@@ -29,3 +29,4 @@ obj-$(CONFIG_SERIAL_68360) += 68360serial.o obj-$(CONFIG_SERIAL_COLDFIRE) += mcfserial.o obj-$(CONFIG_V850E_NB85E_UART) += nb85e_uart.o +obj-$(CONFIG_SERIAL98) += serial98.o
drivers/serial/serial98.c +1125 -0
1,125 lines not on this page · raw message
include/linux/serial_core.h +8 -0
@@ -58,6 +58,14 @@/* NEC v850. */ #define PORT_NB85E_UART 40 +/* NEC PC-9800 */ +#define PORT_8251_PC98 41 +#define PORT_19K_PC98 42 +#define PORT_FIFO_PC98 43 +#define PORT_VFAST_PC98 44 +#define PORT_PC9861 45 +#define PORT_PC9801_101 46 +#ifdef __KERNEL__
PATCH 1/1 PC-9800 sub-arch (29/29) ac-update
In reply to Osamu TomitaThis is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (29/29).
Updates include/asm-i386/upd4990a.h in 2.5.50-ac1.
include/asm-i386/upd4990a.h +0 -6
@@ -13,10 +13,6 @@#ifndef _ASM_I386_uPD4990A_H#define _ASM_I386_uPD4990A_H -#include <linux/config.h> - -#ifdef CONFIG_PC9800 -#include <asm/io.h> #define UPD4990A_IO (0x0020)
@@ -53,6 +49,4 @@/* Caller should ignore all bits except bit0 */ #define UPD4990A_READ_DATA () inb(UPD4990A_IO_DATAOUT) -#endif /* CONFIG_PC9800 */ -#endif
Re: [PATCHSET] PC-9800 sub-arch (3/29) alsa
In reply to a message not in the archiveQuoted 6 lines · Takashi Iwai
Hi,
At Sun, 19 Jan 2003 15:34:22 +0900,
Quoted 1 line · Osamu Tomita
Quoted 8 lines
Quoted 5 lines
This is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (3/29).
ALSA sound drivers for PC98
Fix bug in 2.5.59 and additional driver.are there any essential changes except for the replacement of
CONFIG_PC9800withCONFIG_X86_PC9800?
Only one change below.
diff -Nru linux/sound/drivers/mpu401/mpu401.c linux98/sound/drivers/mpu401/mpu40 1.c
--- linux/sound/drivers/mpu401/mpu401.c 2002-12-24 14:20:59.000000000 +0900
+++ linux98/sound/drivers/mpu401/mpu401.c 2003-01-04 14:05:38.000000000 +0
900
@@ -154,6 +154,9 @@
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
+#ifdef CONFIG_X86_PC9800
+ get_option(&str,&pc98ii[nr_dev]) == 2 &&
+#endif
get_option(&str,(int *)&port[nr_dev]) == 2 &&
get_option(&str,&irq[nr_dev]) == 2);
nr_dev++;Thanks,
Osamu Tomita
Re: [PATCHSET] PC-9800 sub-arch (3/29) alsa
At Tue, 21 Jan 2003 20:37:28 +0900,
Quoted 11 lines · Osamu Tomita
Quoted 9 lines · Takashi Iwai
Hi,
At Sun, 19 Jan 2003 15:34:22 +0900,
Quoted 4 lines · Osamu Tomita
This is patchset to support NEC PC-9800 subarchitecture against 2.5.59 (3/29).
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
ALSA sound drivers for PC98
Fix bug in 2.5.59 and additional driver.are there any essential changes except for the replacement of
CONFIG_PC9800withCONFIG_X86_PC9800?Only one change below.
thanks, i'll apply this change to ALSA cvs, too.
ciao,
Takashi