Commit a03099aa authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.87pre1

parent 7393083b
......@@ -33,6 +33,12 @@ S: Klaproosstraat 72 c 10
S: B-2610 Wilrijk-Antwerpen
S: Belgium
N: C. Scott Ananian
E: cananian@alumni.princeton.edu
W: http://www.pdos.lcs.mit.edu/~cananian
P: 1024/85AD9EED AD C0 49 08 91 67 DF D7 FA 04 1A EE 09 E8 44 B0
D: pty improvements.
N: Erik Andersen
E: andersee@debian.org
W: http://www.inconnect.com/~andersen
......@@ -124,10 +130,12 @@ S: Rainweg 15
S: Germany
N: Fred Baumgarten
E: dc6iq@insu1.etec.uni-karlsruhe.de
E: dc6iq@insl1.etec.uni-karlsruhe.de
E: dc6iq@adacom.org
E: dc6iq@db0ais.#hes.deu.eu (packet radio)
D: NET-2 & netstat(8)
S: Kandelstrasse 27
S: 76297 Stutensee
S: Soevener Strasse 11
S: 53773 Hennef
S: Germany
N: Donald Becker
......@@ -675,6 +683,11 @@ S: Talstr. 1
S: D - 72072 Tuebingen
S: Germany
N: Jauder Ho
E: jauderho@transmeta.com
D: bug toaster (A1 sauce makes all the difference)
D: Transmeta BOFH in my free time
N: Dirk Hohndel
E: hohndel@aib.com
D: The XFree86[tm] Project
......
HAYES ESP DRIVER VERSION 1.6
HAYES ESP DRIVER VERSION 2.0
A big thanks to the people at Hayes, especially Alan Adamson. Their support
has enabled me to provide enhancements to the driver.
Please report your experiences with this driver to me (arobinso@nyx.net). I
am looking for both positive and negative feedback.
*** IMPORTANT CHANGES FOR 2.0 ***
Support for PIO mode. Five situations will cause PIO mode to be used:
1) A multiport card is detected. PIO mode will always be used. (8 port cards
do not support DMA).
2) The DMA channel is set to an invalid value (anything other than 1 or 3).
3) The DMA buffer/channel could not be allocated. The port will revert to PIO
mode until it is reopened.
4) Less than 33 bytes need to be transferred to/from the FIFOs. PIO mode will
be used for that transfer only.
5) A port needs to do a DMA transfer and another port is already using the
DMA channel. PIO mode will be used for that transfer only.
A patch for setserial (2.12) is included to allow the ESP enhanced mode
configuration to be viewed and changed.
***
This package contains the files needed to compile a module to support the Hayes
ESP card. The drivers are basically a modified version of the serial drivers.
Features:
- Uses the enhanced mode of the ESP card, allowing a wider range of
interrupts and features than compatibilty mode
- Uses DMA to transfer data to and from the ESP's FIFOs, reducing CPU load
- Uses DMA and 16 bit PIO mode to transfer data to and from the ESP's FIFOs,
reducing CPU load
- Supports primary and secondary ports
- Special version of setserial can be used to view/change the enhanced mode
configuration. The setserial patch is distributed with the standalone
driver distribution. See http://www.nyx.net/~arobinso for more information.
To compile/install:
......@@ -47,7 +70,8 @@ be:
insmod esp divisor=0,0,0,0,0,0,0x84,0
The dma= option can be used to set the DMA channel. The channel can be either
1 or 3. For example, to set the dma channel to 3, the insmod command would be:
1 or 3. Specifying any other value will force the driver to use PIO mode.
For example, to set the dma channel to 3, the insmod command would be:
insmod esp dma=3
......
Ioctl Numbers
1 Sep 1997
28 Jan 1998
Michael Chastain
<mec@shout.net>
......@@ -86,7 +86,7 @@ Code Seq# Include File Comments
'W' 28-2F linux/iso16-relay.h in development
'Y' all linux/cyclades.h
'a' all various, see http://lrcwww.epfl.ch/linux-atm/magic.html
'b' 00-3F bit3 vme host bridge in development:
'b' 00-FF bit3 vme host bridge in development:
<mailto:natalia@nikhefk.nikhef.nl>
'c' all linux/comstats.h
'f' all linux/ext2_fs.h
......@@ -108,6 +108,8 @@ Code Seq# Include File Comments
'w' all CERN SCI driver in development
'z' 00-3F CAN bus card in development:
<mailto:hdstich@connectu.ulm.circular.de>
'z' 40-7F CAN bas card in development:
<mailto:oe@port.de>
0x89 00-0F asm-i386/sockios.h
0x89 10-DF linux/sockios.h
0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range
......
......@@ -3,7 +3,7 @@
----------------------------------
Maintained by Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
Last revised: March 23, 1997
Last revised: January 24, 1998
0. Introduction
......@@ -23,85 +23,47 @@ The device is accessed through special device nodes, usually located in the
--------------------------
From the user's point of view, the frame buffer device looks just like any
other device in /dev. It's a character device using major 29, the minor is
divided into a frame buffer number in the upper 3 bits (allowing max. 8 frame
buffers simultaneously) and a resolution code in the lower 5 bits of the minor.
other device in /dev. It's a character device using major 29; the minor
specifies the frame buffer number.
By convention, the following device nodes are used (numbers indicate the device
minor numbers):
First frame buffer
0 = /dev/fb0current Current resolution
1 = /dev/fb0autodetect Default resolution
2 = /dev/fb0predefined0 Predefined resolutions (22)
...
23 = /dev/fb0predefined21
24 = /dev/fb0user0 User defined resolutions (8)
...
31 = /dev/fb0user7
Second frame buffer
32 = /dev/fb1current Current resolution
33 = /dev/fb1autodetect Default resolution
34 = /dev/fb1predefined0 Predefined resolutions (22)
...
55 = /dev/fb1predefined21
56 = /dev/fb1user0 User defined resolutions (8)
...
63 = /dev/fb1user7
0 = /dev/fb0 First frame buffer
32 = /dev/fb1 Second frame buffer
...
224 = /dev/fb7 8th frame buffer
and so on...
The device with (minor & 31) == 0 (/dev/fb?current) stands for the frame buffer
together with the currently set video parameters; (minor & 31) == 1
(/dev/fb?autodetect) is the video mode detected at boot time. Any other minor
stands for some predefined or user defined video mode.
The predefined entries (/dev/fb?predefined*) usually have a device dependent
name, e.g. for major 29, minor 5, we have /dev/fb0multiscan on Amiga and
/dev/fb0ttmid on Atari. These are meant to contain hardware dependent
resolutions.
The user defined resolutions (/dev/fb?user?) are meant to be filled in by the
user. This way the user can store his favorite 8 resolutions during boot up.
For backwards compatibility, you may want to create the following symbolic
links:
Note: if you need more than 8 user defined resolutions, you can always override
the predefined resolutions by storing them in one of the predefined entries.
But this is not recommended. Similarly, if there are more than 22 predefined
resolutions, the device writer can decide to store them in the user defined
entries.
/dev/fb0current -> fb0
/dev/fb1current -> fb1
If the device is opened (for writing), the frame buffer driver switches to the
selected video mode. Thus, you can switch video modes by writing to a frame
buffer device, e.g.
> /dev/fb0ttlow
will switch your video to TT low mode. Note: if you specify a resolution which
contains a value that's not possible on your hardware, the frame buffer device
will round it up (if possible) or return an error condition.
and so on...
The frame buffer devices are also `normal' memory devices, this means, you can
read and write their contents. You can, for example, make a screen snapshot by
cp /dev/fb0current myfile
cp /dev/fb0 myfile
There also can be more than one frame buffer at a time, e.g. if you have a
graphics card in addition to the built-in hardware. The corresponding frame
buffer devices (/dev/fb0* and /dev/fb1* etc.) work independently.
buffer devices (/dev/fb0 and /dev/fb1 etc.) work independently.
Application software that uses the frame buffer device (e.g. the X server) will
use /dev/fb0current by default. You can specify an alternative resolution by
setting the environment variable $FRAMEBUFFER to the path name of a frame
buffer device, e.g. (for sh/bash users):
use /dev/fb0 by default (older software uses /dev/fb0current). You can specify
an alternative frame buffer device by setting the environment variable
$FRAMEBUFFER to the path name of a frame buffer device, e.g. (for sh/bash
users):
export FRAMEBUFFER=/dev/fb0multiscan
export FRAMEBUFFER=/dev/fb1
or (for csh users):
setenv FRAMEBUFFER /dev/fb0multiscan
setenv FRAMEBUFFER /dev/fb1
After this the X server will use the multiscan video mode.
After this the X server will use the second frame buffer.
2. Programmer's View of /dev/fb*
......@@ -152,23 +114,20 @@ much trouble...
--------------------------------------
Frame buffer resolutions are maintained using the utility `fbset'. It allows to
change the video mode properties of the current or a user defined resolution.
It's main usage is to tune video modes and to store custom resolutions into one
of the /dev/fb?user? entries, e.g. during boot up in one of your /etc/rc.* or
/etc/init.d/* files, after which those resolutions can be used by applications.
change the video mode properties of the current resolution. It's main usage is
to change the current video mode, e.g. during boot up in one of your /etc/rc.*
or /etc/init.d/* files.
Fbset uses a video mode database stored in a configuration file, so you can
easily add your own modes and refer to them with a simple identifier. The fbset
install script also creates the special device nodes for the device dependent
predefined resolutions.
easily add your own modes and refer to them with a simple identifier.
4. The X Server
---------------
The X server (XF68_FBDev) is the most notable application program for the frame
buffer device. The current X server is part of the XFree86/XFree68 release 3.2
package and has 2 modes:
buffer device. The current X server is part of the XFree86/XFree68 release
3.3.1 package and has 2 modes:
- If the `Display' subsection for the `fbdev' driver in the /etc/XF86Config
file contains a
......@@ -347,7 +306,7 @@ applications, please refer to the following documentation:
- The mighty kernel sources:
o linux/include/linux/fb.h
o linux/drivers/char/fbmem.c
o linux/arch/m68k/*/*fb.c
o linux/drivers/video/*fb.c
8. Downloading
......
......@@ -3,8 +3,8 @@
Command Line Options for Linux/m68k
===================================
Date: Oct 6, 1997
Linux/m68k version: 2.0.21
Last Update: Nov 28, 1997
Linux/m68k version: 2.1.64
Author: Roman.Hodek@informatik.uni-erlangen.de (Roman Hodek)
Update: jds@kom.auc.dk (Jes Sorensen)
......@@ -191,6 +191,7 @@ Devices possible for Atari:
- "ser2": SCC channel B serial port ("Modem2"); parameters: 9600bps, 8N1
- "ser" : default serial port
This is "ser2" for a Falcon, and "ser1" for any other machine
- "midi": The MIDI port; parameters: 31250bps, 8N1
- "par" : parallel port
The printing routine for this implements a timeout for the
case there's no printer connected (else the kernel would
......@@ -408,19 +409,7 @@ physical start, in bytes.
Often, extended interval video hardware has to be activated somehow.
For this, see the "sw_*" options below.
4.1.6) sw_acia, sw_snd6, sw_snd7
--------------------------------
This specifies the method for turning on extended internal video
hardware, like OverScan. Several methods are in use:
sw_acia: Set RTS of the keyboard ACIA high
sw_snd6: Set bit 6 of the PSG port A
sw_snd7: Set bit 7 of the PSG port A
These sub-options are generally only useful together with "internal:".
4.1.7) external:
4.1.6) external:
----------------
Syntax:
......@@ -509,13 +498,13 @@ If you're missing a corresponding yres_virtual: the external part is legacy,
therefore we don't support hardware-dependend functions like hardware-scroll,
panning or blanking.
4.1.8) eclock:
4.1.7) eclock:
--------------
The external pixel clock attached to the Falcon VIDEL shifter. This
currently works only with the ScreenWonder!
4.1.9) monitorcap:
4.1.8) monitorcap:
-------------------
Syntax: monitorcap:<vmin>;<vmax>;<hmin>;<hmax>
......@@ -532,7 +521,7 @@ the horizontal frequency, in kHz.
The defaults for TV/SC1224/SC1435 cover both PAL and NTSC standards.
4.1.10) keep
4.1.9) keep
------------
If this option is given, the framebuffer device doesn't do any video
......@@ -650,7 +639,62 @@ ignored (other aren't affected).
can be performed in optimal order. Not all SCSI devices support
tagged queuing (:-().
4.6 switches=
-------------
Syntax: switches=<list of switches>
With this option you can switch some hardware lines that are often
used to enable/disable certain hardware extensions. Examples are
OverScan, overclocking, ...
The <list of switches> is a comma-separated list of the following
items:
ikbd: set RTS of the keyboard ACIA high
midi: set RTS of the MIDI ACIA high
snd6: set bit 6 of the PSG port A
snd7: set bit 6 of the PSG port A
It doesn't make sense to mention a switch more than once (no
difference to only once), but you can give as many switches as you
want to enable different features. The switch lines are set as early
as possible during kernel initialization (even before determining the
present hardware.)
All of the items can also be prefixed with "ov_", i.e. "ov_ikbd",
"ov_midi", ... These options are meant for switching on an OverScan
video extension. The difference to the bare option is that the
switch-on is done after video initialization, and somehow synchronized
to the HBLANK. A speciality is that ov_ikbd and ov_midi are switched
off before rebooting, so that OverScan is disabled and TOS boots
correctly.
If you give an option both, with and without the "ov_" prefix, the
earlier initialization ("ov_"-less) takes precedence. But the
switching-off on reset still happens in this case.
4.5) stram_swap=
----------------
Syntax: stram_swap=<do_swap>[,<max_swap>]
This option is available only if the kernel has been compiled with
CONFIG_STRAM_SWAP enabled. Normally, the kernel then determines
dynamically whether to actually use ST-RAM as swap space. (Currently,
the fraction of ST-RAM must be less or equal 1/3 of total memory to
enable this swapping.) You can override the kernel's decision by
specifying this option. 1 for <do_swap> means always enable the swap,
even if you have less alternate RAM. 0 stands for never swap to
ST-RAM, even if it's small enough compared to the rest of memory.
If ST-RAM swapping is enabled, the kernel usually uses all free
ST-RAM as swap "device". (If the kernel resides in ST-RAM, the region
allocated by it is obviously never used for swapping :-) You can also
limit this amount by specifying the second parameter, <max_swap>, if
you want to use parts of ST-RAM as normal system memory. <max_swap> is
in kBytes and the number should be a multiple of 4 (otherwise: rounded
down).
5) Options for Amiga Only:
==========================
......
......@@ -348,8 +348,8 @@ L: linux-mac68k@wave.lm.com
S: Maintained
MENUCONFIG:
P: William Roadcap
M: roadcapw@cfw.com
P: Michael Elizabeth Chastain
M: mec@shout.net
L: linux-kernel@vger.rutgers.edu
S: Maintained
......
VERSION = 2
PATCHLEVEL = 1
SUBLEVEL = 86
SUBLEVEL = 87
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
......
......@@ -18,8 +18,12 @@ HEAD := arch/alpha/kernel/head.o
SUBDIRS := $(SUBDIRS) arch/alpha/kernel arch/alpha/mm arch/alpha/lib \
arch/alpha/math-emu
CORE_FILES := arch/alpha/kernel/kernel.o arch/alpha/mm/mm.o $(CORE_FILES)
LIBS := $(TOPDIR)/arch/alpha/math-emu/math-emu.a \
$(TOPDIR)/arch/alpha/lib/lib.a $(LIBS) $(TOPDIR)/arch/alpha/lib/lib.a
ifeq ($(CONFIG_MATHEMU),y)
CORE_FILES := $(CORE_FILES) arch/alpha/math-emu/math-emu.o
endif
LIBS := arch/alpha/lib/lib.a $(LIBS) arch/alpha/lib/lib.a
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
......
......@@ -245,6 +245,12 @@ bool 'Kernel profiling support' CONFIG_PROFILE
if [ "$CONFIG_PROFILE" = "y" ]; then
int ' Profile shift count' CONFIG_PROFILE_SHIFT 2
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Kernel FP software completion' CONFIG_MATHEMU
else
define_bool CONFIG_MATHEMU y
fi
bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
endmenu
......
......@@ -30,14 +30,19 @@ CONFIG_NATIVE=y
# CONFIG_ALPHA_JENSEN is not set
# CONFIG_ALPHA_NONAME is not set
# CONFIG_ALPHA_MIKASA is not set
# CONFIG_ALPHA_NORITAKE is not set
CONFIG_ALPHA_ALCOR=y
# CONFIG_ALPHA_MIATA is not set
# CONFIG_ALPHA_SABLE is not set
# CONFIG_ALPHA_BOOK1 is not set
# CONFIG_ALPHA_P2K is not set
CONFIG_PCI=y
CONFIG_PCI_OLD_PROC=y
CONFIG_ALPHA_EV5=y
CONFIG_ALPHA_CIA=y
CONFIG_ALPHA_SRM=y
CONFIG_ALPHA_EISA=y
CONFIG_TGA_CONSOLE=y
CONFIG_PCI_OLD_PROC=y
CONFIG_NET=y
CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
......@@ -70,28 +75,35 @@ CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_DEV_MD is not set
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_DEV_EZ is not set
CONFIG_PARIDE_PARPORT=y
# CONFIG_PARIDE is not set
# CONFIG_BLK_DEV_HD is not set
#
# Networking options
#
# CONFIG_PACKET is not set
# CONFIG_NETLINK is not set
# CONFIG_FIREWALL is not set
# CONFIG_NET_ALIAS is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_IP_ACCT is not set
# CONFIG_IP_MASQUERADE is not set
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_ALIAS is not set
# CONFIG_SYN_COOKIES is not set
#
# (it is safe to leave these untouched)
#
# CONFIG_INET_PCTCP is not set
# CONFIG_INET_RARP is not set
CONFIG_PATH_MTU_DISCOVERY=y
CONFIG_IP_NOSR=y
CONFIG_SKB_LARGE=y
......@@ -100,7 +112,6 @@ CONFIG_SKB_LARGE=y
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_AX25 is not set
#
# SCSI support
......@@ -121,6 +132,7 @@ CONFIG_BLK_DEV_SR=y
#
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
#
# SCSI low-level drivers
......@@ -139,11 +151,15 @@ CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_NCR53C7xx is not set
# CONFIG_SCSI_NCR53C8XX is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
CONFIG_SCSI_QLOGIC_ISP=y
# CONFIG_SCSI_SEAGATE is not set
......@@ -177,12 +193,18 @@ CONFIG_DE4X5=y
# CONFIG_FDDI is not set
# CONFIG_DLCI is not set
# CONFIG_PPP is not set
# CONFIG_NET_RADIO is not set
# CONFIG_SLIP is not set
# CONFIG_NET_RADIO is not set
# CONFIG_TR is not set
# CONFIG_WAN_DRIVERS is not set
# CONFIG_LAPBETHER is not set
# CONFIG_X25_ASY is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# ISDN subsystem
#
......@@ -192,6 +214,7 @@ CONFIG_DE4X5=y
# CD-ROM drivers (not for SCSI or IDE/ATAPI drives)
#
# CONFIG_CD_NO_IDESCSI is not set
CONFIG_CDROM=y
#
# Filesystems
......@@ -199,25 +222,29 @@ CONFIG_DE4X5=y
# CONFIG_QUOTA is not set
# CONFIG_MINIX_FS is not set
CONFIG_EXT2_FS=y
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
# CONFIG_ROOT_NFS is not set
# CONFIG_NFSD is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_CODA_FS is not set
# CONFIG_SMB_FS is not set
CONFIG_ISO9660_FS=y
# CONFIG_HPFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_UFS_FS is not set
# CONFIG_MAC_PARTITION is not set
# CONFIG_NLS is not set
#
# Character devices
......@@ -225,6 +252,7 @@ CONFIG_ISO9660_FS=y
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
# CONFIG_SERIAL_CONSOLE is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_MOUSE=y
......@@ -236,12 +264,18 @@ CONFIG_PSMOUSE=y
# CONFIG_PC110_PAD is not set
# CONFIG_UMISC is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_FTAPE is not set
# CONFIG_APM is not set
# CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set
# CONFIG_VIDEO_DEV is not set
# CONFIG_NVRAM is not set
# CONFIG_JOYSTICK is not set
# CONFIG_MISC_RADIO is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
#
# Sound
......@@ -252,4 +286,5 @@ CONFIG_PSMOUSE=y
# Kernel hacking
#
# CONFIG_PROFILE is not set
CONFIG_MATHEMU=y
# CONFIG_MAGIC_SYSRQ is not set
......@@ -16,7 +16,7 @@ all: kernel.o head.o
O_TARGET := kernel.o
O_OBJS := entry.o traps.o process.o osf_sys.o irq.o signal.o setup.o \
bios32.o ptrace.o time.o
bios32.o ptrace.o time.o fpreg.o
OX_OBJS := alpha_ksyms.o
......
......@@ -21,6 +21,7 @@
#include <asm/checksum.h>
#include <linux/interrupt.h>
#include <asm/softirq.h>
#include <asm/fpu.h>
#define __KERNEL_SYSCALLS__
#include <asm/unistd.h>
......@@ -88,6 +89,8 @@ EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(hwrpb);
EXPORT_SYMBOL(wrusp);
EXPORT_SYMBOL(start_thread);
EXPORT_SYMBOL(alpha_read_fp_reg);
EXPORT_SYMBOL(alpha_write_fp_reg);
/* In-kernel system calls. */
EXPORT_SYMBOL(__kernel_thread);
......@@ -110,6 +113,11 @@ EXPORT_SYMBOL(csum_partial_copy);
EXPORT_SYMBOL(csum_partial_copy_from_user);
EXPORT_SYMBOL(csum_ipv6_magic);
#ifdef CONFIG_MATHEMU_MODULE
extern long (*alpha_fp_emul_imprecise)(struct pt_regs *, unsigned long);
EXPORT_SYMBOL(alpha_fp_emul_imprecise);
#endif
/*
* The following are specially called from the uaccess assembly stubs.
*/
......
......@@ -1046,7 +1046,7 @@ sys_call_table:
.quad sys_bdflush /* 300 */
.quad sys_sethae
.quad sys_mount
.quad sys_adjtimex
.quad sys_old_adjtimex
.quad sys_swapoff
.quad sys_getdents /* 305 */
.quad alpha_create_module
......
/*
* kernel/fpreg.c
*
* (C) Copyright 1998 Linus Torvalds
*/
unsigned long
alpha_read_fp_reg (unsigned long reg)
{
unsigned long r;
switch (reg) {
case 0: asm ("stt $f0,%0" : "m="(r)); break;
case 1: asm ("stt $f1,%0" : "m="(r)); break;
case 2: asm ("stt $f2,%0" : "m="(r)); break;
case 3: asm ("stt $f3,%0" : "m="(r)); break;
case 4: asm ("stt $f4,%0" : "m="(r)); break;
case 5: asm ("stt $f5,%0" : "m="(r)); break;
case 6: asm ("stt $f6,%0" : "m="(r)); break;
case 7: asm ("stt $f7,%0" : "m="(r)); break;
case 8: asm ("stt $f8,%0" : "m="(r)); break;
case 9: asm ("stt $f9,%0" : "m="(r)); break;
case 10: asm ("stt $f10,%0" : "m="(r)); break;
case 11: asm ("stt $f11,%0" : "m="(r)); break;
case 12: asm ("stt $f12,%0" : "m="(r)); break;
case 13: asm ("stt $f13,%0" : "m="(r)); break;
case 14: asm ("stt $f14,%0" : "m="(r)); break;
case 15: asm ("stt $f15,%0" : "m="(r)); break;
case 16: asm ("stt $f16,%0" : "m="(r)); break;
case 17: asm ("stt $f17,%0" : "m="(r)); break;
case 18: asm ("stt $f18,%0" : "m="(r)); break;
case 19: asm ("stt $f19,%0" : "m="(r)); break;
case 20: asm ("stt $f20,%0" : "m="(r)); break;
case 21: asm ("stt $f21,%0" : "m="(r)); break;
case 22: asm ("stt $f22,%0" : "m="(r)); break;
case 23: asm ("stt $f23,%0" : "m="(r)); break;
case 24: asm ("stt $f24,%0" : "m="(r)); break;
case 25: asm ("stt $f25,%0" : "m="(r)); break;
case 26: asm ("stt $f26,%0" : "m="(r)); break;
case 27: asm ("stt $f27,%0" : "m="(r)); break;
case 28: asm ("stt $f28,%0" : "m="(r)); break;
case 29: asm ("stt $f29,%0" : "m="(r)); break;
case 30: asm ("stt $f30,%0" : "m="(r)); break;
case 31: asm ("stt $f31,%0" : "m="(r)); break;
default:
break;
}
return r;
}
#if 1
/*
* This is IMHO the better way of implementing LDT(). But it
* has the disadvantage that gcc 2.7.0 refuses to compile it
* (invalid operand constraints), so instead, we use the uglier
* macro below.
*/
# define LDT(reg,val) \
asm volatile ("ldt $f"#reg",%0" : : "m"(val));
#else
# define LDT(reg,val) \
asm volatile ("ldt $f"#reg",0(%0)" : : "r"(&val));
#endif
void
alpha_write_fp_reg (unsigned long reg, unsigned long val)
{
switch (reg) {
case 0: LDT( 0, val); break;
case 1: LDT( 1, val); break;
case 2: LDT( 2, val); break;
case 3: LDT( 3, val); break;
case 4: LDT( 4, val); break;
case 5: LDT( 5, val); break;
case 6: LDT( 6, val); break;
case 7: LDT( 7, val); break;
case 8: LDT( 8, val); break;
case 9: LDT( 9, val); break;
case 10: LDT(10, val); break;
case 11: LDT(11, val); break;
case 12: LDT(12, val); break;
case 13: LDT(13, val); break;
case 14: LDT(14, val); break;
case 15: LDT(15, val); break;
case 16: LDT(16, val); break;
case 17: LDT(17, val); break;
case 18: LDT(18, val); break;
case 19: LDT(19, val); break;
case 20: LDT(20, val); break;
case 21: LDT(21, val); break;
case 22: LDT(22, val); break;
case 23: LDT(23, val); break;
case 24: LDT(24, val); break;
case 25: LDT(25, val); break;
case 26: LDT(26, val); break;
case 27: LDT(27, val); break;
case 28: LDT(28, val); break;
case 29: LDT(29, val); break;
case 30: LDT(30, val); break;
case 31: LDT(31, val); break;
default:
break;
}
}
......@@ -121,37 +121,3 @@ cserve_dis:
call_pal PAL_cserve
ret ($26)
.end cserve_dis
#
# The following two functions don't need trapb/excb instructions
# around the mf_fpcr/mt_fpcr instructions because (a) the kernel
# never generates arithmetic faults and (b) call_pal instructions
# are implied trap barriers.
#
.align 3
.globl rdfpcr
.ent rdfpcr
rdfpcr:
lda $30,-0x10($30)
stt $f0,0($30)
mf_fpcr $f0
stt $f0,8($30)
ldt $f0,0($30)
ldq $0,8($30)
lda $30,0x10($30)
ret ($26)
.end rdfpcr
.align 3
.globl wrfpcr
.ent wrfpcr
wrfpcr:
lda $30,-0x10($30)
stt $f0,0($30)
stq $16,8($30)
ldt $f0,8($30)
mt_fpcr $f0
ldt $f0,0($30)
lda $30,0x10($30)
ret ($26)
.end wrfpcr
......@@ -24,6 +24,7 @@
#include <linux/a.out.h>
#include <linux/utsname.h>
#include <linux/time.h>
#include <linux/timex.h>
#include <linux/major.h>
#include <linux/stat.h>
#include <linux/mman.h>
......@@ -925,6 +926,7 @@ extern int do_getitimer(int which, struct itimerval *value);
extern int do_setitimer(int which, struct itimerval *, struct itimerval *);
asmlinkage int sys_utimes(char *, struct timeval *);
extern int sys_wait4(pid_t, int *, int, struct rusage *);
extern int do_adjtimex(struct timex *);
struct timeval32
{
......@@ -1270,3 +1272,57 @@ asmlinkage int osf_usleep_thread(struct timeval32 *sleep, struct timeval32 *rema
fault:
return -EFAULT;
}
struct timex32 {
unsigned int modes; /* mode selector */
long offset; /* time offset (usec) */
long freq; /* frequency offset (scaled ppm) */
long maxerror; /* maximum error (usec) */
long esterror; /* estimated error (usec) */
int status; /* clock command/status */
long constant; /* pll time constant */
long precision; /* clock precision (usec) (read only) */
long tolerance; /* clock frequency tolerance (ppm)
* (read only)
*/
struct timeval32 time; /* (read only) */
long tick; /* (modified) usecs between clock ticks */
long ppsfreq; /* pps frequency (scaled ppm) (ro) */
long jitter; /* pps jitter (us) (ro) */
int shift; /* interval duration (s) (shift) (ro) */
long stabil; /* pps stability (scaled ppm) (ro) */
long jitcnt; /* jitter limit exceeded (ro) */
long calcnt; /* calibration intervals (ro) */
long errcnt; /* calibration errors (ro) */
long stbcnt; /* stability limit exceeded (ro) */
int :32; int :32; int :32; int :32;
int :32; int :32; int :32; int :32;
int :32; int :32; int :32; int :32;
};
asmlinkage int sys_old_adjtimex(struct timex32 *txc_p)
{
struct timex txc;
int ret;
/* copy relevant bits of struct timex. */
if (copy_from_user(&txc, txc_p, offsetof(struct timex32, time)) ||
copy_from_user(&txc.tick, &txc_p->tick, sizeof(struct timex32) -
offsetof(struct timex32, time)))
return -EFAULT;
if ((ret = do_adjtimex(&txc)))
return ret;
/* copy back to timex32 */
if (copy_to_user(txc_p, &txc, offsetof(struct timex32, time)) ||
(copy_to_user(&txc_p->tick, &txc.tick, sizeof(struct timex32) -
offsetof(struct timex32, tick))) ||
(put_tv32(&txc_p->time, &txc.time)))
return -EFAULT;
return 0;
}
......@@ -105,14 +105,24 @@ void die_if_kernel(char * str, struct pt_regs *regs, long err,
do_exit(SIGSEGV);
}
#ifndef CONFIG_MATHEMU
static long dummy_alpha_fp_emul_imprecise(struct pt_regs *r, unsigned long wm)
{
return 0;
}
long (*alpha_fp_emul_imprecise)(struct pt_regs *regs, unsigned long writemask)
= dummy_alpha_fp_emul_imprecise;
#else
long alpha_fp_emul_imprecise(struct pt_regs *regs, unsigned long writemask);
#endif
asmlinkage void do_entArith(unsigned long summary, unsigned long write_mask,
unsigned long a2, unsigned long a3,
unsigned long a4, unsigned long a5,
struct pt_regs regs)
{
if ((summary & 1)) {
extern long alpha_fp_emul_imprecise (struct pt_regs * regs,
unsigned long write_mask);
/*
* Software-completion summary bit is set, so try to
* emulate the instruction.
......
......@@ -2,11 +2,11 @@
# Makefile for math-emulator files...
#
OBJS = fp-emul.o ieee-math.o
O_TARGET := math-emu.o
O_OBJS := fp-emul.o ieee-math.o
math-emu.a: $(OBJS)
$(AR) rcs $@ $(OBJS)
dep:
ifeq ($(CONFIG_MATHEMU),m)
M_OBJS := $(O_TARGET)
endif
include $(TOPDIR)/Rules.make
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/sched.h>
......@@ -52,111 +52,33 @@
#define MISC_TRAPB 0x0000
#define MISC_EXCB 0x0400
extern unsigned long alpha_read_fp_reg (unsigned long reg);
extern void alpha_write_fp_reg (unsigned long reg, unsigned long val);
extern unsigned long rdfpcr (void);
extern void wrfpcr (unsigned long);
#ifdef MODULE
MODULE_DESCRIPTION("FP Software completion module");
unsigned long
alpha_read_fp_reg (unsigned long reg)
extern long (*alpha_fp_emul_imprecise)(struct pt_regs *, unsigned long);
static long (*save_emul)(struct pt_regs *, unsigned long);
long do_alpha_fp_emul_imprecise(struct pt_regs *, unsigned long);
int init_module(void)
{
unsigned long r;
switch (reg) {
case 0: asm ("stt $f0,%0" : "m="(r)); break;
case 1: asm ("stt $f1,%0" : "m="(r)); break;
case 2: asm ("stt $f2,%0" : "m="(r)); break;
case 3: asm ("stt $f3,%0" : "m="(r)); break;
case 4: asm ("stt $f4,%0" : "m="(r)); break;
case 5: asm ("stt $f5,%0" : "m="(r)); break;
case 6: asm ("stt $f6,%0" : "m="(r)); break;
case 7: asm ("stt $f7,%0" : "m="(r)); break;
case 8: asm ("stt $f8,%0" : "m="(r)); break;
case 9: asm ("stt $f9,%0" : "m="(r)); break;
case 10: asm ("stt $f10,%0" : "m="(r)); break;
case 11: asm ("stt $f11,%0" : "m="(r)); break;
case 12: asm ("stt $f12,%0" : "m="(r)); break;
case 13: asm ("stt $f13,%0" : "m="(r)); break;
case 14: asm ("stt $f14,%0" : "m="(r)); break;
case 15: asm ("stt $f15,%0" : "m="(r)); break;
case 16: asm ("stt $f16,%0" : "m="(r)); break;
case 17: asm ("stt $f17,%0" : "m="(r)); break;
case 18: asm ("stt $f18,%0" : "m="(r)); break;
case 19: asm ("stt $f19,%0" : "m="(r)); break;
case 20: asm ("stt $f20,%0" : "m="(r)); break;
case 21: asm ("stt $f21,%0" : "m="(r)); break;
case 22: asm ("stt $f22,%0" : "m="(r)); break;
case 23: asm ("stt $f23,%0" : "m="(r)); break;
case 24: asm ("stt $f24,%0" : "m="(r)); break;
case 25: asm ("stt $f25,%0" : "m="(r)); break;
case 26: asm ("stt $f26,%0" : "m="(r)); break;
case 27: asm ("stt $f27,%0" : "m="(r)); break;
case 28: asm ("stt $f28,%0" : "m="(r)); break;
case 29: asm ("stt $f29,%0" : "m="(r)); break;
case 30: asm ("stt $f30,%0" : "m="(r)); break;
case 31: asm ("stt $f31,%0" : "m="(r)); break;
default:
break;
}
return r;
save_emul = alpha_fp_emul_imprecise;
alpha_fp_emul_imprecise = do_alpha_fp_emul_imprecise;
return 0;
}
#if 0
/*
* This is IMHO the better way of implementing LDT(). But it
* has the disadvantage that gcc 2.7.0 refuses to compile it
* (invalid operand constraints), so instead, we use the uglier
* macro below.
*/
# define LDT(reg,val) \
asm volatile ("ldt $f"#reg",%0" :: "m"(val));
#else
# define LDT(reg,val) \
asm volatile ("ldt $f"#reg",0(%0)" :: "r"(&val));
#endif
void
alpha_write_fp_reg (unsigned long reg, unsigned long val)
void cleanup_module(void)
{
switch (reg) {
case 0: LDT( 0, val); break;
case 1: LDT( 1, val); break;
case 2: LDT( 2, val); break;
case 3: LDT( 3, val); break;
case 4: LDT( 4, val); break;
case 5: LDT( 5, val); break;
case 6: LDT( 6, val); break;
case 7: LDT( 7, val); break;
case 8: LDT( 8, val); break;
case 9: LDT( 9, val); break;
case 10: LDT(10, val); break;
case 11: LDT(11, val); break;
case 12: LDT(12, val); break;
case 13: LDT(13, val); break;
case 14: LDT(14, val); break;
case 15: LDT(15, val); break;
case 16: LDT(16, val); break;
case 17: LDT(17, val); break;
case 18: LDT(18, val); break;
case 19: LDT(19, val); break;
case 20: LDT(20, val); break;
case 21: LDT(21, val); break;
case 22: LDT(22, val); break;
case 23: LDT(23, val); break;
case 24: LDT(24, val); break;
case 25: LDT(25, val); break;
case 26: LDT(26, val); break;
case 27: LDT(27, val); break;
case 28: LDT(28, val); break;
case 29: LDT(29, val); break;
case 30: LDT(30, val); break;
case 31: LDT(31, val); break;
default:
break;
}
alpha_fp_emul_imprecise = save_emul;
}
#define alpha_fp_emul_imprecise do_alpha_fp_emul_imprecise
#endif /* MODULE */
/*
* Emulate the floating point instruction at address PC. Returns 0 if
......@@ -334,6 +256,8 @@ alpha_fp_emul_imprecise (struct pt_regs *regs, unsigned long write_mask)
unsigned long trigger_pc = regs->pc - 4;
unsigned long insn, opcode, rc;
MOD_INC_USE_COUNT;
/*
* Turn off the bits corresponding to registers that are the
* target of instructions that set bits in the exception
......@@ -354,12 +278,14 @@ alpha_fp_emul_imprecise (struct pt_regs *regs, unsigned long write_mask)
case OPC_PAL:
case OPC_JSR:
case 0x30 ... 0x3f: /* branches */
MOD_DEC_USE_COUNT;
return 0;
case OPC_MISC:
switch (insn & 0xffff) {
case MISC_TRAPB:
case MISC_EXCB:
MOD_DEC_USE_COUNT;
return 0;
default:
......@@ -386,11 +312,13 @@ alpha_fp_emul_imprecise (struct pt_regs *regs, unsigned long write_mask)
{
/* re-execute insns in trap-shadow: */
regs->pc = trigger_pc + 4;
MOD_DEC_USE_COUNT;
return 1;
}
break;
}
trigger_pc -= 4;
}
MOD_DEC_USE_COUNT;
return 0;
}
......@@ -137,9 +137,8 @@ sub128 (const unsigned long a[2], const unsigned long b[2], unsigned long c[2])
static inline void
mul64 (const unsigned long a, const unsigned long b, unsigned long c[2])
{
asm ("mulq %2,%3,%0\n\t"
"umulh %2,%3,%1"
: "r="(c[0]), "r="(c[1]) : "r"(a), "r"(b));
c[0] = a * b;
asm ("umulh %1,%2,%0" : "=r"(c[1]) : "r"(a), "r"(b));
}
......@@ -276,7 +275,7 @@ make_s_ieee (long f, EXTENDED *a, unsigned long *b)
{
unsigned long res, sticky;
if (!a->f[0] && !a->f[1]) {
if (!a->e && !a->f[0] && !a->f[1]) {
*b = (unsigned long) a->s << 63; /* return +/-0 */
return 0;
}
......@@ -356,7 +355,7 @@ make_t_ieee (long f, EXTENDED *a, unsigned long *b)
{
unsigned long res, sticky;
if (!a->f[0] && !a->f[1]) {
if (!a->e && !a->f[0] && !a->f[1]) {
*b = (unsigned long) a->s << 63; /* return +/-0 */
return 0;
}
......@@ -384,7 +383,7 @@ make_t_ieee (long f, EXTENDED *a, unsigned long *b)
a->e = -0x3ff;
}
}
if (a->e > 0x3ff) {
if (a->e >= 0x3ff) {
res = FPCR_OVF | FPCR_INE;
if (f & IEEE_TRAP_ENABLE_OVF) {
a->e -= 0x600; /* scale down result by 2^alpha */
......@@ -1143,12 +1142,9 @@ ieee_MULS (int f, unsigned long a, unsigned long b, unsigned long *c)
return 0;
}
op_c.s = op_a.s ^ op_b.s;
op_c.e = op_a.e + op_b.e;
op_c.e = op_a.e + op_b.e - 55;
mul64(op_a.f[0], op_b.f[0], op_c.f);
normalize(&op_c);
op_c.e -= 55; /* drop the 55 original bits. */
return round_s_ieee(f, &op_c, c);
}
......@@ -1200,12 +1196,9 @@ ieee_MULT (int f, unsigned long a, unsigned long b, unsigned long *c)
return 0;
}
op_c.s = op_a.s ^ op_b.s;
op_c.e = op_a.e + op_b.e;
op_c.e = op_a.e + op_b.e - 55;
mul64(op_a.f[0], op_b.f[0], op_c.f);
normalize(&op_c);
op_c.e -= 55; /* drop the 55 original bits. */
return round_t_ieee(f, &op_c, c);
}
......
......@@ -570,22 +570,31 @@ void __global_sti(void)
unsigned long __global_save_flags(void)
{
return global_irq_holder == (unsigned char) smp_processor_id();
if (!local_irq_count[smp_processor_id()])
return global_irq_holder == (unsigned char) smp_processor_id();
else {
unsigned long x;
__save_flags(x);
return x;
}
}
void __global_restore_flags(unsigned long flags)
{
switch (flags) {
case 0:
__global_sti();
break;
case 1:
__global_cli();
break;
default:
printk("global_restore_flags: %08lx (%08lx)\n",
flags, (&flags)[-1]);
}
if (!local_irq_count[smp_processor_id()]) {
switch (flags) {
case 0:
__global_sti();
break;
case 1:
__global_cli();
break;
default:
printk("global_restore_flags: %08lx (%08lx)\n",
flags, (&flags)[-1]);
}
} else
__restore_flags(flags);
}
#endif
......
......@@ -26,6 +26,7 @@ endif
LINKFLAGS = -T $(TOPDIR)/arch/m68k/vmlinux.lds
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
ifdef CONFIG_OPTIMIZE_040
......@@ -33,7 +34,7 @@ CFLAGS := $(CFLAGS) -m68040
endif
ifdef CONFIG_OPTIMIZE_060
CFLAGS := $(CFLAGS) -m68020-40
CFLAGS := $(CFLAGS) -m68060
endif
ifdef CONFIG_KGDB
......@@ -63,10 +64,14 @@ CORE_FILES := $(CORE_FILES) arch/m68k/mac/mac.o
SUBDIRS := $(SUBDIRS) arch/m68k/mac
endif
ifdef CONFIG_VT
# add in console.a after {amiga,atari}.o that need it
CORE_FILES := $(CORE_FILES) arch/m68k/console/console.a
SUBDIRS := $(SUBDIRS) arch/m68k/console
ifdef CONFIG_APOLLO
CORE_FILES := $(CORE_FILES) arch/m68k/apollo/apollo.o
SUBDIRS := $(SUBDIRS) arch/m68k/apollo
endif
ifdef CONFIG_MVME16x
CORE_FILES := $(CORE_FILES) arch/m68k/mvme16x/mvme16x.o
SUBDIRS := $(SUBDIRS) arch/m68k/mvme16x
endif
ifdef CONFIG_M68040
......@@ -99,9 +104,6 @@ else
gzip -9c vmlinux >vmlinux.gz
endif
bootstrap: dummy
@$(MAKEBOOT) bootstrap
archclean:
rm -f vmlinux.gz
......
......@@ -8,16 +8,7 @@
# Note 2! The CFLAGS definitions are now in the main makefile...
O_TARGET := amiga.o
O_OBJS := config.o amikeyb.o amiints.o cia.o \
chipram.o amisound.o amifb.o zorro.o
O_OBJS := config.o amiints.o cia.o chipram.o amisound.o zorro.o
OX_OBJS := amiga_ksyms.o
ifdef CONFIG_FB_CYBER
O_OBJS := $(O_OBJS) cyberfb.o
endif
ifdef CONFIG_FB_RETINAZ3
O_OBJS := $(O_OBJS) retz3fb.o
endif
include $(TOPDIR)/Rules.make
......@@ -331,7 +331,7 @@ void amiga_disable_irq(unsigned int irq)
inline void amiga_do_irq(int irq, struct pt_regs *fp)
{
kstat.interrupts[SYS_IRQS + irq]++;
kstat.irqs[0][SYS_IRQS + irq]++;
ami_irq_list[irq]->handler(irq, ami_irq_list[irq]->dev_id, fp);
}
......@@ -340,7 +340,7 @@ void amiga_do_irq_list(int irq, struct pt_regs *fp, struct irq_server *server)
irq_node_t *node, *slow_nodes;
unsigned short flags;
kstat.interrupts[SYS_IRQS + irq]++;
kstat.irqs[0][SYS_IRQS + irq]++;
if (server->count++)
server->reentrance = 1;
/* serve first fast and normal handlers */
......@@ -489,7 +489,7 @@ int amiga_get_irq_list(char *buf)
if (node->flags & IRQ_FLG_STD)
continue;
len += sprintf(buf+len, "ami %2d: %10u ", i,
kstat.interrupts[SYS_IRQS + i]);
kstat.irqs[0][SYS_IRQS + i]);
do {
if (ami_servers[i]) {
if (node->flags & IRQ_FLG_FAST)
......
......@@ -145,7 +145,7 @@ static void cia_handler(int irq, void *dev_id, struct pt_regs *fp)
custom.intreq = base->int_mask;
for (i = 0; i < CIA_IRQS; i++, irq++, mach_irq++) {
if (ints & 1) {
kstat.interrupts[irq]++;
kstat.irqs[0][irq]++;
base->irq_list[i].handler(mach_irq, base->irq_list[i].dev_id, fp);
}
ints >>= 1;
......@@ -181,7 +181,7 @@ int cia_get_irq_list(struct ciabase *base, char *buf)
for (i = 0; i < CIA_IRQS; i++) {
if (!(base->irq_list[i].flags & IRQ_FLG_STD)) {
len += sprintf(buf+len, "cia %2d: %10d ", j + i,
kstat.interrupts[SYS_IRQS + j + i]);
kstat.irqs[0][SYS_IRQS + j + i]);
if (base->irq_list[i].flags & IRQ_FLG_LOCK)
len += sprintf(buf+len, "L ");
else
......
This diff is collapsed.
/* s3 commands */
#define S3_BITBLT 0xc011
#define S3_TWOPOINTLINE 0x2811
#define S3_FILLEDRECT 0x40b1
#define S3_FIFO_EMPTY 0x0400
#define S3_HDW_BUSY 0x0200
/* Enhanced register mapping (MMIO mode) */
#define S3_READ_SEL 0xbee8 /* offset f */
#define S3_MULT_MISC 0xbee8 /* offset e */
#define S3_ERR_TERM 0x92e8
#define S3_FRGD_COLOR 0xa6e8
#define S3_BKGD_COLOR 0xa2e8
#define S3_PIXEL_CNTL 0xbee8 /* offset a */
#define S3_FRGD_MIX 0xbae8
#define S3_BKGD_MIX 0xb6e8
#define S3_CUR_Y 0x82e8
#define S3_CUR_X 0x86e8
#define S3_DESTY_AXSTP 0x8ae8
#define S3_DESTX_DIASTP 0x8ee8
#define S3_MIN_AXIS_PCNT 0xbee8 /* offset 0 */
#define S3_MAJ_AXIS_PCNT 0x96e8
#define S3_CMD 0x9ae8
#define S3_GP_STAT 0x9ae8
#define S3_ADVFUNC_CNTL 0x4ae8
#define S3_WRT_MASK 0xaae8
#define S3_RD_MASK 0xaee8
/* Enhanced register mapping (Packed MMIO mode, write only) */
#define S3_ALT_CURXY 0x8100
#define S3_ALT_CURXY2 0x8104
#define S3_ALT_STEP 0x8108
#define S3_ALT_STEP2 0x810c
#define S3_ALT_ERR 0x8110
#define S3_ALT_CMD 0x8118
#define S3_ALT_MIX 0x8134
#define S3_ALT_PCNT 0x8148
#define S3_ALT_PAT 0x8168
/* Drawing modes */
#define S3_NOTCUR 0x0000
#define S3_LOGICALZERO 0x0001
#define S3_LOGICALONE 0x0002
#define S3_LEAVEASIS 0x0003
#define S3_NOTNEW 0x0004
#define S3_CURXORNEW 0x0005
#define S3_NOT_CURXORNEW 0x0006
#define S3_NEW 0x0007
#define S3_NOTCURORNOTNEW 0x0008
#define S3_CURORNOTNEW 0x0009
#define S3_NOTCURORNEW 0x000a
#define S3_CURORNEW 0x000b
#define S3_CURANDNEW 0x000c
#define S3_NOTCURANDNEW 0x000d
#define S3_CURANDNOTNEW 0x000e
#define S3_NOTCURANDNOTNEW 0x000f
#define S3_CRTC_ADR 0x03d4
#define S3_CRTC_DATA 0x03d5
#define S3_REG_LOCK2 0x39
#define S3_HGC_MODE 0x45
#define S3_HWGC_ORGX_H 0x46
#define S3_HWGC_ORGX_L 0x47
#define S3_HWGC_ORGY_H 0x48
#define S3_HWGC_ORGY_L 0x49
#define S3_HWGC_DX 0x4e
#define S3_HWGC_DY 0x4f
#define S3_LAW_CTL 0x58
This diff is collapsed.
#
# Makefile for Linux arch/m68k/amiga source directory
#
# 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...
O_TARGET := apollo.o
O_OBJS := config.o dn_ints.o \
include $(TOPDIR)/Rules.make
#include <stdarg.h>
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/kd.h>
#include <linux/tty.h>
#include <linux/console.h>
#include <asm/setup.h>
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/apollohw.h>
#include <asm/irq.h>
#include <asm/machdep.h>
extern struct consw fb_con;
extern void dn_sched_init(void (*handler)(int,void *,struct pt_regs *));
extern int dn_keyb_init(void);
extern int dn_dummy_kbdrate(struct kbd_repeat *);
extern void dn_init_IRQ(void);
#if 0
extern void (*dn_default_handler[])(int,void *,struct pt_regs *);
#endif
extern int dn_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id);
extern void dn_free_irq(unsigned int irq, void *dev_id);
extern void dn_enable_irq(unsigned int);
extern void dn_disable_irq(unsigned int);
extern int dn_get_irq_list(char *);
extern unsigned long dn_gettimeoffset(void);
extern void dn_gettod(int *, int *, int *, int *, int *, int *);
extern int dn_dummy_hwclk(int, struct hwclk_time *);
extern int dn_dummy_set_clock_mmss(unsigned long);
extern void dn_mksound(unsigned int count, unsigned int ticks);
extern void dn_dummy_reset(void);
extern void dn_dummy_waitbut(void);
extern struct fb_info *dn_fb_init(long *);
extern void dn_dummy_debug_init(void);
extern void (*kd_mksound)(unsigned int, unsigned int);
extern void dn_dummy_video_setup(char *,int *);
extern void dn_process_int(int irq, struct pt_regs *fp);
static struct console dn_console_driver;
static void dn_debug_init(void);
static void dn_timer_int(int irq,void *, struct pt_regs *);
static void (*sched_timer_handler)(int, void *, struct pt_regs *)=NULL;
int dn_serial_console_wait_key(void) {
while(!(sio01.srb_csrb & 1))
barrier();
return sio01.rhrb_thrb;
}
void dn_serial_console_write (const char *str,unsigned int count)
{
while(count--) {
if (*str == '\n') {
sio01.rhrb_thrb = (unsigned char)'\r';
while (!(sio01.srb_csrb & 0x4))
;
}
sio01.rhrb_thrb = (unsigned char)*str++;
while (!(sio01.srb_csrb & 0x4))
;
}
}
void dn_serial_print (const char *str)
{
while (*str) {
if (*str == '\n') {
sio01.rhrb_thrb = (unsigned char)'\r';
while (!(sio01.srb_csrb & 0x4))
;
}
sio01.rhrb_thrb = (unsigned char)*str++;
while (!(sio01.srb_csrb & 0x4))
;
}
}
void config_apollo(void) {
dn_serial_print("Config apollo !\n");
#if 0
dn_debug_init();
#endif
printk("Config apollo !\n");
mach_sched_init=dn_sched_init; /* */
mach_keyb_init=dn_keyb_init;
mach_kbdrate=dn_dummy_kbdrate;
mach_init_IRQ=dn_init_IRQ;
mach_default_handler=NULL;
mach_request_irq = dn_request_irq;
mach_free_irq = dn_free_irq;
enable_irq = dn_enable_irq;
disable_irq = dn_disable_irq;
mach_get_irq_list = dn_get_irq_list;
mach_gettimeoffset = dn_gettimeoffset;
mach_gettod = dn_gettod; /* */
mach_max_dma_address = 0xffffffff;
mach_hwclk = dn_dummy_hwclk; /* */
mach_set_clock_mmss = dn_dummy_set_clock_mmss; /* */
mach_process_int = dn_process_int;
#ifdef CONFIG_BLK_DEV_FD
mach_floppy_init = dn_dummy_floppy_init;
mach_floppy_setup = dn_dummy_floppy_setup;
#endif
mach_reset = dn_dummy_reset; /* */
conswitchp = &fb_con;
#if 0
mach_fb_init = dn_fb_init;
mach_video_setup = dn_dummy_video_setup;
#endif
kd_mksound = dn_mksound;
}
void dn_timer_int(int irq, void *dev_id, struct pt_regs *fp) {
volatile unsigned char x;
sched_timer_handler(irq,dev_id,fp);
x=*(volatile unsigned char *)(IO_BASE+0x10803);
x=*(volatile unsigned char *)(IO_BASE+0x10805);
}
void dn_sched_init(void (*timer_routine)(int, void *, struct pt_regs *)) {
dn_serial_print("dn sched_init\n");
#if 0
/* program timer 2 */
*(volatile unsigned char *)(IO_BASE+0x10803)=0x00;
*(volatile unsigned char *)(IO_BASE+0x10809)=0;
*(volatile unsigned char *)(IO_BASE+0x1080b)=50;
/* program timer 3 */
*(volatile unsigned char *)(IO_BASE+0x10801)=0x00;
*(volatile unsigned char *)(IO_BASE+0x1080c)=0;
*(volatile unsigned char *)(IO_BASE+0x1080f)=50;
#endif
/* program timer 1 */
*(volatile unsigned char *)(IO_BASE+0x10803)=0x01;
*(volatile unsigned char *)(IO_BASE+0x10801)=0x40;
*(volatile unsigned char *)(IO_BASE+0x10805)=0x09;
*(volatile unsigned char *)(IO_BASE+0x10807)=0xc4;
/* enable IRQ of PIC B */
*(volatile unsigned char *)(IO_BASE+PICA+1)&=(~8);
printk("*(0x10803) %02x\n",*(volatile unsigned char *)(IO_BASE+0x10803));
printk("*(0x10803) %02x\n",*(volatile unsigned char *)(IO_BASE+0x10803));
sched_timer_handler=timer_routine;
request_irq(0,dn_timer_int,0,NULL,NULL);
}
unsigned long dn_gettimeoffset(void) {
return 0xdeadbeef;
}
void dn_gettod(int *yearp, int *monp, int *dayp,
int *hourp, int *minp, int *secp) {
*yearp=rtc->year;
*monp=rtc->month;
*dayp=rtc->day_of_month;
*hourp=rtc->hours;
*minp=rtc->minute;
*secp=rtc->second;
printk("gettod: %d %d %d %d %d %d\n",*yearp,*monp,*dayp,*hourp,*minp,*secp);
}
int dn_dummy_hwclk(int op, struct hwclk_time *t) {
dn_serial_print("hwclk !\n");
if(!op) { /* read */
t->sec=rtc->second;
t->min=rtc->minute;
t->hour=rtc->hours;
t->day=rtc->day_of_month;
t->wday=rtc->day_of_week;
t->mon=rtc->month;
t->year=rtc->year;
} else {
rtc->second=t->sec;
rtc->minute=t->min;
rtc->hours=t->hour;
rtc->day_of_month=t->day;
if(t->wday!=-1)
rtc->day_of_week=t->wday;
rtc->month=t->mon;
rtc->year=t->year;
}
dn_serial_print("hwclk end!\n");
return 0;
}
int dn_dummy_set_clock_mmss(unsigned long nowtime) {
printk("set_clock_mmss\n");
return 0;
}
void dn_dummy_reset(void) {
dn_serial_print("The end !\n");
for(;;);
}
void dn_dummy_waitbut(void) {
dn_serial_print("waitbut\n");
}
#if 0
void dn_debug_init(void) {
dn_console_driver.write=dn_serial_console_write;
register_console(&dn_console_driver);
}
#endif
#include <stdarg.h>
#define DN_DEBUG_BUFFER_BASE 0x82800000
#define DN_DEBUG_BUFFER_SIZE 8*1024*1024
static char *current_dbg_ptr=DN_DEBUG_BUFFER_BASE;
int dn_deb_printf(const char *fmt, ...) {
va_list args;
int i;
if(current_dbg_ptr<(DN_DEBUG_BUFFER_BASE + DN_DEBUG_BUFFER_SIZE)) {
va_start(args,fmt);
i=vsprintf(current_dbg_ptr,fmt,args);
va_end(args);
current_dbg_ptr+=i;
return i;
}
else
return 0;
}
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/kernel_stat.h>
#include <asm/system.h>
#include <asm/irq.h>
#include <asm/traps.h>
#include <asm/page.h>
#include <asm/machdep.h>
#include <asm/apollohw.h>
static irq_handler_t dn_irqs[16];
extern void write_keyb_cmd(u_short length, u_char *cmd);
static char BellOnCommand[] = { 0xFF, 0x21, 0x81 },
BellOffCommand[] = { 0xFF, 0x21, 0x82 };
void dn_process_int(int irq, struct pt_regs *fp) {
#if 0
unsigned char x;
#endif
#if 0
printk("Aha DN interrupt ! : %d\n",irq);
#endif
if(dn_irqs[irq-160].handler) {
dn_irqs[irq-160].handler(irq,dn_irqs[irq-160].dev_id,fp);
}
else {
printk("spurious irq %d occured\n",irq);
}
#if 0
printk("*(0x10803) %02x\n",*(volatile unsigned char *)(IO_BASE+0x10803));
x=*(volatile unsigned char *)(IO_BASE+0x10805);
#endif
*(volatile unsigned char *)(IO_BASE+0x11000)=0x20;
*(volatile unsigned char *)(IO_BASE+0x11100)=0x20;
}
void dn_init_IRQ(void) {
int i;
printk("Init IRQ\n");
for(i=0;i<16;i++) {
dn_irqs[i].handler=NULL;
dn_irqs[i].flags=IRQ_FLG_STD;
dn_irqs[i].dev_id=NULL;
dn_irqs[i].devname=NULL;
}
}
int dn_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id) {
printk("dn request IRQ\n");
if((irq<0) || (irq>15)) {
printk("Trying to request illegal IRQ\n");
return -ENXIO;
}
if(!dn_irqs[irq].handler) {
dn_irqs[irq].handler=handler;
dn_irqs[irq].flags=IRQ_FLG_STD;
dn_irqs[irq].dev_id=dev_id;
dn_irqs[irq].devname=devname;
if(irq<8)
*(volatile unsigned char *)(IO_BASE+PICA+1)&=~(1<<irq);
else
*(volatile unsigned char *)(IO_BASE+PICB+1)&=~(1<<(irq-8));
return 0;
}
else {
printk("Trying to request already assigned irq %d\n",irq);
return -ENXIO;
}
}
void dn_free_irq(unsigned int irq, void *dev_id) {
printk("dn free irq\n");
if((irq<0) || (irq>15)) {
printk("Trying to free illegal IRQ\n");
return ;
}
if(irq<8)
*(volatile unsigned char *)(IO_BASE+PICA+1)|=(1<<irq);
else
*(volatile unsigned char *)(IO_BASE+PICB+1)|=(1<<(irq-8));
dn_irqs[irq].handler=NULL;
dn_irqs[irq].flags=IRQ_FLG_STD;
dn_irqs[irq].dev_id=NULL;
dn_irqs[irq].devname=NULL;
return ;
}
void dn_enable_irq(unsigned int irq) {
printk("dn enable irq\n");
}
void dn_disable_irq(unsigned int irq) {
printk("dn disable irq\n");
}
int dn_get_irq_list(char *buf) {
printk("dn get irq list\n");
return 0;
}
struct fb_info *dn_dummy_fb_init(long *mem_start) {
printk("fb init\n");
return NULL;
}
static void dn_nosound (unsigned long ignored) {
write_keyb_cmd(sizeof(BellOffCommand),BellOffCommand);
}
void dn_mksound( unsigned int count, unsigned int ticks ) {
static struct timer_list sound_timer = { NULL, NULL, 0, 0,
dn_nosound };
del_timer( &sound_timer );
if(count) {
write_keyb_cmd(sizeof(BellOnCommand),BellOnCommand);
if (ticks) {
sound_timer.expires = jiffies + ticks;
add_timer( &sound_timer );
}
}
else
write_keyb_cmd(sizeof(BellOffCommand),BellOffCommand);
}
void dn_dummy_video_setup(char *options,int *ints) {
printk("no video yet\n");
}
......@@ -8,8 +8,8 @@
# Note 2! The CFLAGS definitions are now in the main makefile...
O_TARGET := atari.o
O_OBJS := config.o atakeyb.o ataints.o \
stdma.o atasound.o joystick.o stram.o atafb.o
O_OBJS := config.o time.o debug.o atakeyb.o ataints.o stdma.o atasound.o \
joystick.o stram.o
OX_OBJS := atari_ksyms.o
include $(TOPDIR)/Rules.make
......@@ -166,7 +166,7 @@ static int free_vme_vec_bitmap = 0;
asmlinkage void IRQ_NAME(n); \
/* Dummy function to allow asm with operands. */ \
void atari_slow_irq_##n##_dummy (void) { \
__asm__ (ALIGN_STR "\n" \
__asm__ (__ALIGN_STR "\n" \
SYMBOL_NAME_STR(atari_slow_irq_) #n "_handler:\t" \
" addql #1,"SYMBOL_NAME_STR(local_irq_count)"\n" \
SAVE_ALL_INT "\n" \
......@@ -190,7 +190,7 @@ SYMBOL_NAME_STR(atari_slow_irq_) #n "_handler:\t" \
" andw #0xfeff,%%sr\n" /* set IPL = 6 again */ \
" orb #(1<<(%c3&7)),%a4:w\n" /* now unmask the int again */ \
" jbra "SYMBOL_NAME_STR(ret_from_interrupt)"\n" \
: : "i" (&kstat.interrupts[n+8]), "i" (&irq_handler[n+8]), \
: : "i" (&kstat.irqs[0][n+8]), "i" (&irq_handler[n+8]), \
"n" (PT_OFF_SR), "n" (n), \
"i" (n & 8 ? (n & 16 ? &tt_mfp.int_mk_a : &mfp.int_mk_a) \
: (n & 16 ? &tt_mfp.int_mk_b : &mfp.int_mk_b)) \
......@@ -270,7 +270,7 @@ asmlinkage void atari_prio_irq_handler( void );
/* Dummy function to allow asm with operands. */
void atari_fast_prio_irq_dummy (void) {
__asm__ (ALIGN_STR "\n"
__asm__ (__ALIGN_STR "\n"
SYMBOL_NAME_STR(atari_fast_irq_handler) ":
orw #0x700,%%sr /* disable all interrupts */
"SYMBOL_NAME_STR(atari_prio_irq_handler) ":\t
......@@ -294,7 +294,7 @@ SYMBOL_NAME_STR(atari_fast_irq_handler) ":
addql #8,%%sp
addql #4,%%sp
jbra "SYMBOL_NAME_STR(ret_from_interrupt)
: : "i" (&kstat.interrupts), "n" (PT_OFF_FORMATVEC)
: : "i" (&kstat.irqs), "n" (PT_OFF_FORMATVEC)
);
}
......@@ -304,7 +304,7 @@ SYMBOL_NAME_STR(atari_fast_irq_handler) ":
*/
asmlinkage void falcon_hblhandler(void);
asm(".text\n"
ALIGN_STR "\n"
__ALIGN_STR "\n"
SYMBOL_NAME_STR(falcon_hblhandler) ":
orw #0x200,%sp@ /* set saved ipl to 2 */
rte");
......@@ -314,6 +314,8 @@ asmlinkage void bad_interrupt(void);
extern void atari_microwire_cmd( int cmd );
extern int atari_SCC_reset_done;
/*
* void atari_init_IRQ (void)
*
......@@ -358,7 +360,7 @@ __initfunc(void atari_init_IRQ(void))
tt_mfp.int_mk_b = 0xff;
}
if (ATARIHW_PRESENT(SCC)) {
if (ATARIHW_PRESENT(SCC) && !atari_SCC_reset_done) {
scc.cha_a_ctrl = 9;
MFPDELAY();
scc.cha_a_ctrl = (char) 0xc0; /* hardware reset */
......@@ -374,10 +376,13 @@ __initfunc(void atari_init_IRQ(void))
tt_scu.vme_mask = 0x60; /* enable MFP and SCC ints */
}
else {
/* If no SCU, the HSYNC interrupt needs to be disabled this
* way. (Else _inthandler in kernel/sys_call.S gets overruns)
/* If no SCU and no Hades, the HSYNC interrupt needs to be
* disabled this way. (Else _inthandler in kernel/sys_call.S
* gets overruns)
*/
vectors[VEC_INT2] = falcon_hblhandler;
if (!MACH_IS_HADES)
vectors[VEC_INT2] = falcon_hblhandler;
}
if (ATARIHW_PRESENT(PCM_8BIT) && ATARIHW_PRESENT(MICROWIRE)) {
......@@ -414,7 +419,14 @@ int atari_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_r
unsigned long flags, const char *devname, void *dev_id)
{
int vector;
/*
* The following is a hack to make some PCI card drivers work,
* which set the SA_SHIRQ flag.
*/
flags &= ~SA_SHIRQ;
if (flags < IRQ_TYPE_SLOW || flags > IRQ_TYPE_PRIO) {
printk ("%s: Bad irq type %ld requested from %s\n",
__FUNCTION__, flags, devname);
......@@ -600,11 +612,11 @@ int atari_get_irq_list(char *buf)
continue;
if (i < STMFP_SOURCE_BASE)
len += sprintf(buf+len, "auto %2d: %10u ",
i, kstat.interrupts[i]);
i, kstat.irqs[0][i]);
else
len += sprintf(buf+len, "vec $%02x: %10u ",
IRQ_SOURCE_TO_VECTOR(i),
kstat.interrupts[i]);
kstat.irqs[0][i]);
if (irq_handler[i].handler != atari_call_irq_list) {
len += sprintf(buf+len, "%s\n", irq_param[i].devname);
......
......@@ -32,7 +32,6 @@
#include <asm/atari_joystick.h>
#include <asm/irq.h>
extern int ovsc_switchmode;
extern unsigned char mach_keyboard_type;
static void atakeyb_rep( unsigned long ignore );
extern unsigned int keymap_count;
......@@ -504,23 +503,6 @@ static void keyboard_interrupt(int irq, void *dummy, struct pt_regs *fp)
}
}
#ifdef KEYB_WRITE_INTERRUPT
if (acia_stat & ACIA_TDRE) /* transmit of character is finished */
{
if (kb_state.buf)
{
acia.key_data = *kb_state.buf++;
kb_state.len--;
if (kb_state.len == 0)
{
kb_state.buf = NULL;
if (!kb_state.kernel_mode)
/* unblock something */;
}
}
}
#endif
#if 0
if (acia_stat & ACIA_CTS)
/* cannot happen */;
......@@ -537,26 +519,6 @@ static void keyboard_interrupt(int irq, void *dummy, struct pt_regs *fp)
goto repeat;
}
#ifdef KEYB_WRITE_INTERRUPT
void ikbd_write(const char *str, int len)
{
u_char acia_stat;
if (kb_stat.buf)
/* wait */;
acia_stat = acia.key_ctrl;
if (acia_stat & ACIA_TDRE)
{
if (len != 1)
{
kb_stat.buf = str + 1;
kb_stat.len = len - 1;
}
acia.key_data = *str;
/* poll */
}
}
#else
/*
* I write to the keyboard without using interrupts, I poll instead.
* This takes for the maximum length string allowed (7) at 7812.5 baud
......@@ -581,7 +543,6 @@ void ikbd_write(const char *str, int len)
}
}
}
#endif
/* Reset (without touching the clock) */
void ikbd_reset(void)
......@@ -828,33 +789,28 @@ __initfunc(int atari_keyb_init(void))
atari_turnoff_irq(IRQ_MFP_ACIA);
do {
acia.key_ctrl = ACIA_RESET; /* reset ACIA */
/* reset IKBD ACIA */
acia.key_ctrl = ACIA_RESET |
(atari_switches & ATARI_SWITCH_IKBD) ? ACIA_RHTID : 0;
(void)acia.key_ctrl;
(void)acia.key_data;
acia.mid_ctrl = ACIA_RESET; /* reset other ACIA */
/* reset MIDI ACIA */
acia.mid_ctrl = ACIA_RESET |
(atari_switches & ATARI_SWITCH_MIDI) ? ACIA_RHTID : 0;
(void)acia.mid_ctrl;
(void)acia.mid_data;
/* divide 500kHz by 64 gives 7812.5 baud */
/* 8 data no parity 1 start 1 stop bit */
/* receive interrupt enabled */
#ifdef KEYB_WRITE_INTERRUPT
/* RTS low, transmit interrupt enabled */
if (ovsc_switchmode == 1)
acia.key_ctrl = (ACIA_DIV64|ACIA_D8N1S|ACIA_RHTIE|ACIA_RIE);
/* switch on OverScan via keyboard ACIA */
else
acia.key_ctrl = (ACIA_DIV64|ACIA_D8N1S|ACIA_RLTIE|ACIA_RIE);
#else
/* RTS low, transmit interrupt disabled */
if (ovsc_switchmode == 1)
acia.key_ctrl = (ACIA_DIV64|ACIA_D8N1S|ACIA_RHTID|ACIA_RIE);
else
acia.key_ctrl = (ACIA_DIV64|ACIA_D8N1S|ACIA_RLTID|ACIA_RIE);
#endif
/* RTS low (except if switch selected), transmit interrupt disabled */
acia.key_ctrl = (ACIA_DIV64|ACIA_D8N1S|ACIA_RIE) |
((atari_switches & ATARI_SWITCH_IKBD) ?
ACIA_RHTID : ACIA_RLTID);
acia.mid_ctrl = ACIA_DIV16 | ACIA_D8N1S;
acia.mid_ctrl = ACIA_DIV16 | ACIA_D8N1S |
(atari_switches & ATARI_SWITCH_MIDI) ? ACIA_RHTID : 0;
}
/* make sure the interrupt line is up */
while ((mfp.par_dt_reg & 0x10) == 0);
......
......@@ -7,24 +7,32 @@
#include <asm/atarikb.h>
#include <asm/atari_joystick.h>
#include <asm/atari_stdma.h>
#include <asm/atari_stram.h>
extern void atari_microwire_cmd( int cmd );
extern int atari_MFP_init_done;
extern int atari_SCC_init_done;
extern int atari_SCC_reset_done;
EXPORT_SYMBOL(atari_mch_cookie);
EXPORT_SYMBOL(atari_mch_type);
EXPORT_SYMBOL(atari_hw_present);
EXPORT_SYMBOL(is_medusa);
EXPORT_SYMBOL(is_hades);
EXPORT_SYMBOL(atari_switches);
EXPORT_SYMBOL(atari_dont_touch_floppy_select);
EXPORT_SYMBOL(atari_register_vme_int);
EXPORT_SYMBOL(atari_unregister_vme_int);
EXPORT_SYMBOL(stdma_lock);
EXPORT_SYMBOL(stdma_release);
EXPORT_SYMBOL(stdma_others_waiting);
EXPORT_SYMBOL(stdma_islocked);
EXPORT_SYMBOL(atari_stram_alloc);
EXPORT_SYMBOL(atari_stram_free);
EXPORT_SYMBOL(atari_mouse_buttons);
EXPORT_SYMBOL(atari_mouse_interrupt_hook);
EXPORT_SYMBOL(atari_MIDI_interrupt_hook);
EXPORT_SYMBOL(atari_MFP_init_done);
EXPORT_SYMBOL(atari_SCC_init_done);
EXPORT_SYMBOL(atari_SCC_reset_done);
EXPORT_SYMBOL(ikbd_write);
EXPORT_SYMBOL(ikbd_mouse_y0_top);
......
/*
linux/arch/m68k/atari/atasound.c
++Geert: Moved almost all stuff to linux/drivers/sound/
The author of atari_nosound, atari_mksound and atari_microwire_cmd is
unknown.
(++roman: That's me... :-)
This file is subject to the terms and conditions of the GNU General Public
License. See the file COPYING in the main directory of this archive
for more details.
*/
* linux/arch/m68k/atari/atasound.c
*
* ++Geert: Moved almost all stuff to linux/drivers/sound/
*
* The author of atari_nosound, atari_mksound and atari_microwire_cmd is
* unknown. (++roman: That's me... :-)
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive
* for more details.
*
*/
#include <linux/sched.h>
......
This diff is collapsed.
This diff is collapsed.
......@@ -82,15 +82,16 @@ static int open_joystick(struct inode *inode, struct file *file)
return 0;
}
static long write_joystick(struct inode *inode, struct file *file,
const char *buffer, unsigned long count)
static ssize_t write_joystick(struct file *file, const char *buffer,
size_t count, loff_t *ppos)
{
return -EINVAL;
}
static long read_joystick(struct inode *inode, struct file *file,
char *buffer, unsigned long count)
static ssize_t read_joystick(struct file *file, char *buffer, size_t count,
loff_t *ppos)
{
struct inode *inode = file->f_dentry->d_inode;
int minor = DEVICE_NR(inode->i_rdev);
if (count < 2)
......@@ -109,7 +110,7 @@ static long read_joystick(struct inode *inode, struct file *file,
static unsigned int joystick_poll(struct file *file, poll_table *wait)
{
int minor = DEVICE_NR(file->f_inode->i_rdev);
int minor = DEVICE_NR(file->f_dentry->d_inode->i_rdev);
poll_wait(&joystick[minor].wait, wait);
if (joystick[minor].ready)
......
/*
* linux/atari/stmda.c
* linux/arch/m68k/atari/stmda.c
*
* Copyright (C) 1994 Roman Hodek
*
......@@ -37,7 +36,6 @@
#include <asm/atari_stdma.h>
#include <asm/atariints.h>
#include <asm/atarihw.h>
#include <asm/atarihdreg.h>
#include <asm/io.h>
#include <asm/irq.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -42,11 +42,6 @@ CONFIG_SYSCTL=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
CONFIG_ZORRO=y
CONFIG_AMIFB_OCS=y
CONFIG_AMIFB_ECS=y
CONFIG_AMIFB_AGA=y
# CONFIG_FB_CYBER is not set
# CONFIG_FB_RETINAZ3 is not set
# CONFIG_AMIGA_GSP is not set
# CONFIG_GSP_RESOLVER is not set
# CONFIG_GSP_A2410 is not set
......@@ -54,7 +49,8 @@ CONFIG_AMIFB_AGA=y
#
# Block device driver configuration
#
CONFIG_BLK_DEV_FD=y
CONFIG_AMIGA_FLOPPY=y
CONFIG_ATARI_FLOPPY=y
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_IDE is not set
# CONFIG_BLK_DEV_IDEDISK is not set
......@@ -62,6 +58,7 @@ CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_BLK_DEV_IDEDOUBLER is not set
# CONFIG_AMIGA_Z2RAM is not set
# CONFIG_ATARI_ACSI is not set
# CONFIG_ACSI_MULTI_LUN is not set
......@@ -132,6 +129,9 @@ CONFIG_GVP11_SCSI=y
# CONFIG_BLZ2060_SCSI is not set
# CONFIG_BLZ1230_SCSI is not set
# CONFIG_FASTLANE_SCSI is not set
# CONFIG_A4000T_SCSI is not set
# CONFIG_A4091_SCSI is not set
# CONFIG_WARPENGINE_SCSI is not set
CONFIG_ATARI_SCSI=y
#
......@@ -170,6 +170,21 @@ CONFIG_NFS_FS=y
# CONFIG_ROMFS_FS is not set
# CONFIG_UFS_FS is not set
#
# Frame buffer devices
#
CONFIG_FB_AMIGA=y
CONFIG_FB_AMIGA_OCS=y
CONFIG_FB_AMIGA_ECS=y
CONFIG_FB_AMIGA_AGA=y
# CONFIG_FB_CYBER is not set
# CONFIG_FB_RETINAZ3 is not set
# CONFIG_FB_ATARI is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FBCON_ADVANCED is not set
CONFIG_NLS_CODEPAGE_437=y
#
# Character devices
#
......
......@@ -183,7 +183,7 @@ _060_real_cas2:
|
| _060_lock_page():
|
| Entry point for the operating system's routine to "lock" a page
| Entry point for the operating system`s routine to "lock" a page
| from being paged out. This routine is needed by the cas/cas2
| algorithms so that no page faults occur within the "core" code
| region. Note: the routine must lock two pages if the operand
......@@ -208,7 +208,7 @@ _060_real_lock_page:
|
| _060_unlock_page():
|
| Entry point for the operating system's routine to "unlock" a
| Entry point for the operating system`s routine to "unlock" a
| page that has been "locked" previously with _real_lock_page.
| Note: the routine must unlock two pages if the operand spans
| two pages.
......
......@@ -345,7 +345,6 @@ morein:
copyinae:
movs.b (%a0)+,%d1 | fetch user byte
move.b %d1,(%a1)+ | write supervisor byte
subq.l #0x1,%d0 | are we through yet?
dbra %d0,morein | are we through yet?
moveq #0,%d0 | return success
rts
......
......@@ -10,19 +10,26 @@
.S.o:
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
all: kernel.o head.o
all: head.o kernel.o
O_TARGET := kernel.o
O_OBJS := entry.o process.o traps.o ints.o signal.o ptrace.o \
setup.o sys_m68k.o time.o
ifdef CONFIG_VT
O_OBJS += console.o
endif
OX_OBJS := m68k_ksyms.o
ifdef CONFIG_KGDB
O_OBJS += kgdb.o
endif
head.o: head.S
ifdef CONFIG_PCI
O_OBJS += bios32.o
endif
head.o: head.S m68k_defs.h
m68k_defs.h: m68k_defs.c m68k_defs.head $(TOPDIR)/include/linux/sched.h
$(CC) ${CFLAGS} -S m68k_defs.c
cp m68k_defs.head m68k_defs.h
sed -n < m68k_defs.s >> m68k_defs.h '/^#define/s/ #/ /p'
rm m68k_defs.s
include $(TOPDIR)/Rules.make
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -53,7 +53,7 @@ static irq_node_t nodes[NUM_IRQ_NODES];
unsigned int local_irq_count[NR_CPUS];
int __m68k_bh_counter;
unsigned int local_bh_count[NR_CPUS];
static void dummy_enable_irq(unsigned int irq);
static void dummy_disable_irq(unsigned int irq);
......@@ -214,7 +214,7 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
{
if (vec >= VEC_INT1 && vec <= VEC_INT7) {
vec -= VEC_SPUR;
kstat.interrupts[vec]++;
kstat.irqs[0][vec]++;
irq_list[vec].handler(vec, irq_list[vec].dev_id, fp);
} else {
if (mach_process_int)
......@@ -233,7 +233,7 @@ int get_irq_list(char *buf)
if (mach_default_handler) {
for (i = 0; i < SYS_IRQS; i++) {
len += sprintf(buf+len, "auto %2d: %10u ", i,
i ? kstat.interrupts[i] : num_spurious);
i ? kstat.irqs[0][i] : num_spurious);
if (irq_list[i].flags & IRQ_FLG_LOCK)
len += sprintf(buf+len, "L ");
else
......
/*
* This program is used to generate definitions needed by
* assembly language modules.
*
* We use the technique used in the OSF Mach kernel code:
* generate asm statements containing #defines,
* compile this file to assembler, and then extract the
* #defines from the assembly-language output.
*/
#include <linux/stddef.h>
#include <linux/sched.h>
#define DEFINE(sym, val) \
asm volatile("\n#define " #sym " %0" : : "i" (val))
int main(void)
{
DEFINE(TS_TSS, offsetof(struct task_struct, tss));
DEFINE(TS_ESP0, offsetof(struct task_struct, tss.esp0));
DEFINE(TS_FPU, offsetof(struct task_struct, tss.fp));
return 0;
}
......@@ -26,16 +26,15 @@ extern int dump_fpu(elf_fpregset_t *);
/* platform dependent support */
EXPORT_SYMBOL(memcmp);
EXPORT_SYMBOL(m68k_machtype);
EXPORT_SYMBOL(m68k_cputype);
EXPORT_SYMBOL(m68k_is040or060);
EXPORT_SYMBOL(cache_push);
EXPORT_SYMBOL(cache_push_v);
EXPORT_SYMBOL(cache_clear);
EXPORT_SYMBOL(mm_vtop);
EXPORT_SYMBOL(mm_ptov);
EXPORT_SYMBOL(mm_end_of_chunk);
EXPORT_SYMBOL(kernel_map);
EXPORT_SYMBOL(m68k_debug_device);
EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(dump_thread);
......@@ -43,7 +42,7 @@ EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(local_irq_count);
EXPORT_SYMBOL(__m68k_bh_counter);
EXPORT_SYMBOL(local_bh_count);
/* Networking helper routines. */
EXPORT_SYMBOL(csum_partial_copy);
......@@ -55,6 +54,7 @@ EXPORT_SYMBOL(csum_partial_copy);
EXPORT_SYMBOL_NOVERS(__ashrdi3);
EXPORT_SYMBOL_NOVERS(memcpy);
EXPORT_SYMBOL_NOVERS(memset);
EXPORT_SYMBOL_NOVERS(memcmp);
EXPORT_SYMBOL_NOVERS(__down_failed);
EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#include <linux/module.h>
#include <asm/ptrace.h>
#include <asm/traps.h>
/* Hook for mouse driver */
extern void (*mac_mouse_interrupt_hook) (char *);
EXPORT_SYMBOL(mac_mouse_interrupt_hook);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment