Commit 37f4c1fc authored by Linus Torvalds's avatar Linus Torvalds

Import 1.3.94

parent 0ccc2576
......@@ -1365,3 +1365,10 @@ D: Miscellaneous kernel fixes
S: 3078 Sulphur Spring Court
S: San Jose, California 95148
S: USA
N: Dmitry S. Gorodchanin
E: begemot@bgm.rosprint.net
D: RISCom/8 driver, misc kernel fixes.
S: 6/1 M.Koneva bl, apt #125
S: Poltava 314023
S: Ukraine
......@@ -2803,6 +2803,15 @@ CONFIG_DIGI
order to become a BBS. If you have a card like that, say Y here and
read the file Documentation/digiboard.txt.
SDL RISCom/8 card support
CONFIG_RISCOM8
This is a driver for the SDL Communications RISCom/8 multiport card,
that give you many serial ports. You would need something like this
to connect more than two modems to your linux box, for instance in
order to become a BBS. If you have a card like that, say Y here and
read the file Documentation/riscom8.txt. Also it's possible to say
M here and compile this driver as kernel loadable module.
Cyclades async mux support
CONFIG_CYCLADES
This is a driver for a card that gives you many serial ports. You
......
This is the README for RISCom/8 multi-port serial driver
(C) 1994-1996 D.Gorodchanin (begemot@bgm.rosrpint.net)
See file LICENSE for terms and conditions.
NOTE: English is not my native language.
I'm sorry for any mistakes in this text.
Misc. notes for RISCom/8 serial driver, in no particule order :)
1) This driver can support up to 4 boards at time.
Use string "riscom8=0xXXX,0xXXX,0xXXX,0xXXX" at LILO prompt, for
setting I/O base addresses for boards. If you compile driver
as module use insmod options "iobase=0xXXX iobase1=0xXXX iobase2=..."
2) The driver partially supports famous 'setserial' program, you can use almost
any it option, exclude port & irq settings.
3) There are some misc. defines at the beginning of riscom8.c, please read the
comments and try to change some of them in case of problems.
4) I consider the current state of the driver as BETA.
If you REALLY think you found the bug, send me e-mail, I hope I'll
fix it. For any other problems please ask support@sdlcomm.com.
5) SDL Communications WWW page is http://www.sdlcomm.com.
6) You can use the script at the end of this file to create RISCom/8 devices.
7) Minors number for 1-st board are 0-7, for second 8-15, etc.
22 Apr 1996.
-------------------------------cut here-------------------------------------
#!/bin/bash
NORMAL_DEVICE=/dev/ttyL
CALLOUT_DEVICE=/dev/cuL
NORMAL_MAJOR=48
CALLOUT_MAJOR=49
echo "Creating devices... "
for i in 0 1 2 3; do
echo "Board No $[$i+1]"
for j in 0 1 2 3 4 5 6 7; do
k=$[ 8 * $i + $j]
rm -f $NORMAL_DEVICE$k
mknod $NORMAL_DEVICE$k c $NORMAL_MAJOR $k
chmod a+rw $NORMAL_DEVICE$k
echo -n $NORMAL_DEVICE$k" "
rm -f $CALLOUT_DEVICE$k
mknod $CALLOUT_DEVICE$k c $CALLOUT_MAJOR $k
chmod a+rw $CALLOUT_DEVICE$k
echo $CALLOUT_DEVICE$k
done
done
echo "done."
-------------------------------cut here-------------------------------------
......@@ -61,6 +61,7 @@ TTY_LDISC_MAGIC 0x5403 struct tty_ldisc include/linux/tty_ldisc.h
SERIAL_MAGIC 0x5301 struct async_struct include/linux/serial.h
SLIP_MAGIC 0x5302 struct slip drivers/net/slip.h
SCC_MAGIC 0x8530 struct scc_channel include/linux/scc.h
RISCOM8_MAGIC 0x0907 struct riscom_port drivers/char/riscom8.h
......
......@@ -159,7 +159,7 @@ S: Maintained
FTAPE/QIC-117:
P: Kai Harrekilde-Petersen
M: khp@@dolphinics.no
M: khp@dolphinics.no
L: linux-tape@vger.rutgers.edu
S: Maintained
......@@ -261,6 +261,13 @@ M: clameter@fuller.edu
L: digiboard@list.fuller.edu
S: Maintained
RISCOM8 DRIVER:
P: Dmitry Gorodchanin
M: begemot@bgm.rosprint.net
L: linux-kernel@vger.rutgers.edu
S: Maintained
MOUSE AND MISC DEVICES [GENERAL]
P: Alessandro Rubini
M: rubini@ipvvis.unipv.it
......
VERSION = 1
PATCHLEVEL = 3
SUBLEVEL = 93
SUBLEVEL = 94
ARCH = i386
......
......@@ -96,7 +96,6 @@ CONFIG_BLK_DEV_SR=y
#
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_AUTO_BIOSP is not set
#
# SCSI low-level drivers
......@@ -151,6 +150,7 @@ CONFIG_NET_EISA=y
# CONFIG_APRICOT is not set
CONFIG_DE4X5=y
# CONFIG_DEC_ELCP is not set
# CONFIG_DGRS is not set
# CONFIG_ZNET is not set
# CONFIG_NET_POCKET is not set
# CONFIG_TR is not set
......@@ -180,6 +180,7 @@ CONFIG_NFS_FS=y
CONFIG_ISO9660_FS=y
# CONFIG_HPFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Character devices
......@@ -188,6 +189,7 @@ CONFIG_SERIAL=y
# CONFIG_DIGI is not set
# CONFIG_CYCLADES is not set
# CONFIG_STALDRV is not set
# CONFIG_RISCOM8 is not set
# CONFIG_PRINTER is not set
# CONFIG_BUSMOUSE is not set
CONFIG_PSMOUSE=y
......
......@@ -138,6 +138,7 @@ CONFIG_NFS_FS=y
CONFIG_ISO9660_FS=y
# CONFIG_HPFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Character devices
......@@ -146,6 +147,7 @@ CONFIG_SERIAL=y
# CONFIG_DIGI is not set
# CONFIG_CYCLADES is not set
# CONFIG_STALDRV is not set
# CONFIG_RISCOM8 is not set
# CONFIG_PRINTER is not set
# CONFIG_BUSMOUSE is not set
# CONFIG_PSMOUSE is not set
......
#
# m68k/Makefile
#
# This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies. Remember to do have actions
# for "archclean" and "archdep" for cleaning up and making dependencies for
# this architecture
#
# 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.
#
# Copyright (C) 1994 by Hamish Macdonald
#
# override top level makefile
ifdef CONFIG_KERNEL_ELF
AS = as -m68020
LD = ld -m m68kelf
CC := $(CC)
# set up for cross compiling
COMPILE_ARCH = $(shell uname -m)
ifneq ($(COMPILE_ARCH),$(ARCH))
CROSSDIR=/usr/$(ARCH)-linux
CC := $(CROSSDIR)/$(CC)
AS := $(CROSSDIR)/$(AS)
LD := $(CROSSDIR)/$(LD)
AR := $(CROSSDIR)/$(AR)
NM := $(CROSSDIR)/$(NM)
STRIP := $(CROSSDIR)/$(STRIP)
endif
else
AS = /usr/m68k-linuxaout/bin/as -m68020
CC := $(CC) -pipe -b m68k-linuxaout
LD = ld -m m68klinux
endif
#
# Set these to indicate how to link it..
#
# -zmagic:
#
# LINKFLAGS = -Ttext 0x100000
#
# -qmagic (we need to remove the 32 byte header for bootup purposes)
#
ifdef CONFIG_KERNEL_ELF
LINKFLAGS = -Ttext 0x1000
else
LINKFLAGS = -qmagic -Ttext 0xFE0
endif
CFLAGS := $(CFLAGS) -pipe
HEAD := arch/m68k/kernel/head.o
SUBDIRS += arch/m68k/kernel arch/m68k/mm arch/m68k/console arch/m68k/lib
#SUBDIRS += arch/m68k/kernel arch/m68k/mm arch/m68k/lib
ARCHIVES := arch/m68k/kernel/kernel.o arch/m68k/mm/mm.o $(ARCHIVES)
LIBS += arch/m68k/lib/lib.a
ifdef CONFIG_AMIGA
ARCHIVES := $(ARCHIVES) arch/m68k/amiga/amiga.o
SUBDIRS := $(SUBDIRS) arch/m68k/amiga
endif
ifdef CONFIG_ATARI
ARCHIVES := $(ARCHIVES) arch/m68k/atari/atari.o
SUBDIRS := $(SUBDIRS) arch/m68k/atari
endif
ifdef CONFIG_MAC
ARCHIVES := $(ARCHIVES) arch/m68k/mac/mac.o
SUBDIRS := $(SUBDIRS) arch/m68k/mac
endif
# add in console.a after {amiga,atari}.o that need it
ARCHIVES := $(ARCHIVES) arch/m68k/console/console.a
ifdef CONFIG_FPSP_040
ARCHIVES := $(ARCHIVES) arch/m68k/fpsp040/fpsp.o
SUBDIRS := $(SUBDIRS) arch/m68k/fpsp040
endif
ifdef CONFIG_IFPSP_060
ARCHIVES := $(ARCHIVES) arch/m68k/ifpsp060/ifpsp.o
SUBDIRS := $(SUBDIRS) arch/m68k/ifpsp060
endif
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
lilo: vmlinux
if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
cat vmlinux > $(INSTALL_PATH)/vmlinux
cp System.map $(INSTALL_PATH)/System.map
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
bootstrap:
@$(MAKEBOOT) bootstrap
archclean:
@$(MAKEBOOT) clean
archdep:
$(MAKEBOOT) dep
#
# m68k/Makefile
#
# This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies. Remember to do have actions
# for "archclean" and "archdep" for cleaning up and making dependencies for
# this architecture
#
# 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.
#
# Copyright (C) 1994 by Hamish Macdonald
#
# override top level makefile
AS = as -m68020
#CC := $(CC) -b m68kelf
LD = ld -m m68kelf
#
# Set these to indicate how to link it..
#
# -zmagic:
#
# LINKFLAGS = -Ttext 0x100000
#
# -qmagic (we need to remove the 32 byte header for bootup purposes)
#
LINKFLAGS = -qmagic -Ttext 0xFE0
HEAD := arch/m68k/kernel/head.o
SUBDIRS := $(SUBDIRS) arch/m68k/kernel arch/m68k/mm arch/m68k/lib
ARCHIVES := arch/m68k/kernel/kernel.o arch/m68k/mm/mm.o $(ARCHIVES)
LIBS := $(TOPDIR)/arch/m68k/lib/lib.a $(LIBS) $(TOPDIR)/arch/m68k/lib/lib.a
ifdef CONFIG_AMIGA
ARCHIVES := $(ARCHIVES) arch/m68k/amiga/amiga.o
SUBDIRS := $(SUBDIRS) arch/m68k/amiga
endif
ifdef CONFIG_ATARI
ARCHIVES := $(ARCHIVES) arch/m68k/atari/atari.o
SUBDIRS := $(SUBDIRS) arch/m68k/atari
endif
ifdef CONFIG_MAC
ARCHIVES := $(ARCHIVES) arch/m68k/mac/mac.o
SUBDIRS := $(SUBDIRS) arch/m68k/mac
endif
ifdef CONFIG_FPSP_040
ARCHIVES := $(ARCHIVES) arch/m68k/fpsp040/fpsp.o
SUBDIRS := $(SUBDIRS) arch/m68k/fpsp040
endif
arch/m68k/kernel: dummy
$(MAKE) linuxsubdirs SUBDIRS=arch/m68k/kernel
arch/m68k/mm: dummy
$(MAKE) linuxsubdirs SUBDIRS=arch/m68k/mm
arch/m68k/lib: dummy
$(MAKE) linuxsubdirs SUBDIRS=arch/m68k/lib
arch/m68k/amiga: dummy
$(MAKE) linuxsubdirs SUBDIRS=arch/m68k/amiga
arch/m68k/atari: dummy
$(MAKE) linuxsubdirs SUBDIRS=arch/m68k/atari
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
lilo: vmlinux
if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
cat vmlinux > $(INSTALL_PATH)/vmlinux
cp System.map $(INSTALL_PATH)/System.map
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
bootstrap:
@$(MAKEBOOT) bootstrap
archclean:
@$(MAKEBOOT) clean
archdep:
$(MAKEBOOT) dep
#
# 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 := amiga.o
O_OBJS := config.o amikeyb.o amiints.o amipart.o \
chipram.o amisound.o amifb.o zorro.o
OX_OBJS = ksyms.o
include $(TOPDIR)/Rules.make
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* linux/amiga/amipart.c
*
* Amiga partition checking driver for 680x0 Linux
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file README.legal in the main directory of this archive
* for more details.
*/
#include <linux/fs.h>
#include <linux/genhd.h>
#include <linux/kernel.h>
#include <asm/amigardb.h>
#include <asm/machdep.h>
extern int current_minor;
static ulong checksum (ulong *ptr, int len)
{
ulong sum;
int cnt;
for (sum = 0, cnt = 0; cnt < len; cnt++)
sum += ptr[cnt];
return sum;
}
/* XXX */
/* int current_minor = 0; */
void amiga_check_partition(struct gendisk *hd, kdev_t dev)
{
int i, minor = current_minor, m_lim = current_minor + hd->max_p;
struct buffer_head *bh;
struct RigidDiskBlock *rdb;
struct PartitionBlock *pb;
ulong bnum, partsect;
for (bnum = 0; bnum < RDB_LOCATION_LIMIT/2; bnum++) {
if (!(bh = bread(dev,bnum,1024))) {
printk (" unable to read block %ld\n", bnum);
return;
}
#ifdef DEBUG
printk ("block read, press mousebutton to continue\n");
waitbut();
#endif
rdb = (struct RigidDiskBlock *)bh->b_data;
if (rdb->rdb_ID == IDNAME_RIGIDDISK)
break;
rdb = (struct RigidDiskBlock *)&bh->b_data[512];
if (rdb->rdb_ID == IDNAME_RIGIDDISK)
break;
brelse (bh);
}
if (bnum == RDB_LOCATION_LIMIT/2) {
/* no RDB on the disk! */
printk (" unable to find RigidDiskBlock\n");
return;
}
/* checksum the RigidDiskBlock */
if (checksum ((ulong *)rdb, rdb->rdb_SummedLongs) != 0) {
printk (" RDB checksum bad\n");
return;
}
printk(" %s%c:", hd->major_name, 'a'+(minor >> hd->minor_shift));
partsect = rdb->rdb_PartitionList;
brelse (bh);
for (i = 1; minor < m_lim && partsect != 0xffffffff; minor++, i++)
{
ulong *env;
if (!(bh = bread(dev,partsect/2,1024))) {
printk (" block %ld read failed\n", partsect);
return;
}
#ifdef DEBUG
printk ("block read, press mousebutton to continue\n");
waitbut();
#endif
pb = (struct PartitionBlock *)bh->b_data;
if (partsect & 1)
pb = (struct PartitionBlock *)&bh->b_data[512];
if (pb->pb_ID != IDNAME_PARTITION) {
printk (" block %ld Not a partition block (%#lx)\n",
partsect, pb->pb_ID);
brelse (bh);
return;
}
if (checksum ((ulong *)pb, pb->pb_SummedLongs) != 0) {
printk (" block %ld checksum bad\n", partsect);
brelse (bh);
return;
}
env = pb->pb_Environment;
hd->part[minor].start_sect = env[DE_LOWCYL]
* env[DE_NUMHEADS] * env[DE_BLKSPERTRACK];
hd->part[minor].nr_sects = (env[DE_UPPERCYL]
- env[DE_LOWCYL] + 1)
* env[DE_NUMHEADS] * env[DE_BLKSPERTRACK];
printk(" %s%c%d", hd->major_name,
'a'+(minor >> hd->minor_shift), i);
partsect = pb->pb_Next;
brelse (bh);
}
printk ("\n");
}
/*
* linux/amiga/amisound.c
*
* amiga sound driver for 680x0 Linux
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file README.legal in the main directory of this archive
* for more details.
*/
#include <linux/sched.h>
#include <linux/timer.h>
#include <asm/system.h>
#include <asm/amigahw.h>
#include <asm/bootinfo.h>
static u_short *snd_data = NULL;
static const signed char sine_data[] = {
0, 39, 75, 103, 121, 127, 121, 103, 75, 39,
0, -39, -75, -103, -121, -127, -121, -103, -75, -39
};
#define DATA_SIZE (sizeof(sine_data)/sizeof(sine_data[0]))
/* Imported from arch/m68k/amiga/amifb.c */
extern volatile u_short amiga_audio_min_period;
#define MAX_PERIOD (65535)
/*
* Current period (set by dmasound.c)
*/
u_short amiga_audio_period = MAX_PERIOD;
static u_long clock_constant;
static void init_sound(void)
{
snd_data = amiga_chip_alloc(sizeof(sine_data));
if (!snd_data) {
printk (KERN_CRIT "amiga init_sound: failed to allocate chipmem\n");
return;
}
memcpy (snd_data, sine_data, sizeof(sine_data));
/* setup divisor */
clock_constant = (amiga_colorclock+DATA_SIZE/2)/DATA_SIZE;
}
static void nosound( unsigned long ignored );
static struct timer_list sound_timer = { NULL, NULL, 0, 0, nosound };
void amiga_mksound( unsigned int hz, unsigned int ticks )
{
static int inited = 0;
unsigned long flags;
if (!inited) {
init_sound();
inited = 1;
}
if (!snd_data)
return;
save_flags(flags);
cli();
del_timer( &sound_timer );
if (hz > 20 && hz < 32767) {
u_long period = (clock_constant / hz);
if (period < amiga_audio_min_period)
period = amiga_audio_min_period;
if (period > MAX_PERIOD)
period = MAX_PERIOD;
/* setup pointer to data, period, length and volume */
custom.aud[0].audlc = snd_data;
custom.aud[0].audlen = sizeof(sine_data)/2;
custom.aud[0].audper = (u_short)period;
custom.aud[0].audvol = 64; /* maxvol */
if (ticks) {
sound_timer.expires = jiffies + ticks;
add_timer( &sound_timer );
}
/* turn on DMA for audio channel 0 */
custom.dmacon = DMAF_SETCLR | DMAF_AUD0;
restore_flags(flags);
return;
} else {
nosound( 0 );
restore_flags(flags);
return;
}
}
static void nosound( unsigned long ignored )
{
/* turn off DMA for audio channel 0 */
custom.dmacon = DMAF_AUD0;
/* restore period to previous value after beeping */
custom.aud[0].audper = amiga_audio_period;
}
/*
** linux/amiga/chipram.c
**
** Modified 03-May-94 by Geert Uytterhoeven
** (Geert.Uytterhoeven@cs.kuleuven.ac.be)
** - 64-bit aligned allocations for full AGA compatibility
*/
#include <linux/types.h>
#include <linux/kernel.h>
#include <asm/bootinfo.h>
#include <asm/amigahw.h>
struct chip_desc {
unsigned first : 1;
unsigned last : 1;
unsigned alloced : 1;
unsigned length : 24;
long pad; /* We suppose this makes this struct 64 bits long!! */
};
#define DP(ptr) ((struct chip_desc *)(ptr))
static unsigned long chipsize;
void amiga_chip_init (void)
{
struct chip_desc *dp;
if (!AMIGAHW_PRESENT(CHIP_RAM))
return;
chipsize = boot_info.bi_amiga.chip_size;
/* initialize start boundary */
custom.color[0] = 0xfff;
dp = DP(chipaddr);
dp->first = 1;
custom.color[0] = 0x0f00;
dp->alloced = 0;
dp->length = chipsize - 2*sizeof(*dp);
/* initialize end boundary */
dp = DP(chipaddr + chipsize) - 1;
dp->last = 1;
custom.color[0] = 0x00f0;
dp->alloced = 0;
dp->length = chipsize - 2*sizeof(*dp);
custom.color[0] = 0x000f;
#ifdef DEBUG
printk ("chipram end boundary is %p, length is %d\n", dp,
dp->length);
#endif
}
void *amiga_chip_alloc (long size)
{
/* last chunk */
struct chip_desc *dp;
void *ptr;
/* round off */
size = (size + 7) & ~7;
#ifdef DEBUG
printk ("chip_alloc: allocate %ld bytes\n", size);
#endif
/*
* get pointer to descriptor for last chunk by
* going backwards from end chunk
*/
dp = DP(chipaddr + chipsize) - 1;
dp = DP((unsigned long)dp - dp->length) - 1;
while ((dp->alloced || dp->length < size)
&& !dp->first)
dp = DP ((unsigned long)dp - dp[-1].length) - 2;
if (dp->alloced || dp->length < size) {
printk ("no chipmem available for %ld allocation\n", size);
return NULL;
}
if (dp->length < (size + 2*sizeof(*dp))) {
/* length too small to split; allocate the whole thing */
dp->alloced = 1;
ptr = (void *)(dp+1);
dp = DP((unsigned long)ptr + dp->length);
dp->alloced = 1;
#ifdef DEBUG
printk ("chip_alloc: no split\n");
#endif
} else {
/* split the extent; use the end part */
long newsize = dp->length - (2*sizeof(*dp) + size);
#ifdef DEBUG
printk ("chip_alloc: splitting %d to %ld\n", dp->length,
newsize);
#endif
dp->length = newsize;
dp = DP((unsigned long)(dp+1) + newsize);
dp->first = dp->last = 0;
dp->alloced = 0;
dp->length = newsize;
dp++;
dp->first = dp->last = 0;
dp->alloced = 1;
dp->length = size;
ptr = (void *)(dp+1);
dp = DP((unsigned long)ptr + size);
dp->alloced = 1;
dp->length = size;
}
#ifdef DEBUG
printk ("chip_alloc: returning %p\n", ptr);
#endif
if ((unsigned long)ptr & 7)
panic("chip_alloc: alignment violation\n");
return ptr;
}
void amiga_chip_free (void *ptr)
{
struct chip_desc *sdp = DP(ptr) - 1, *dp2;
struct chip_desc *edp = DP((unsigned long)ptr + sdp->length);
/* deallocate the chunk */
sdp->alloced = edp->alloced = 0;
/* check if we should merge with the previous chunk */
if (!sdp->first && !sdp[-1].alloced) {
dp2 = DP((unsigned long)sdp - sdp[-1].length) - 2;
dp2->length += sdp->length + 2*sizeof(*sdp);
edp->length = dp2->length;
sdp = dp2;
}
/* check if we should merge with the following chunk */
if (!edp->last && !edp[1].alloced) {
dp2 = DP((unsigned long)edp + edp[1].length) + 2;
dp2->length += edp->length + 2*sizeof(*sdp);
sdp->length = dp2->length;
edp = dp2;
}
}
This diff is collapsed.
#include <linux/module.h>
static struct symbol_table mach_amiga_symbol_table = {
#include <linux/symtab_begin.h>
/*
* Add things here when you find the need for it.
*/
/* examble
X(something_you_need),
*/
#include <linux/symtab_end.h>
};
void mach_amiga_syms_export(void)
{
register_symtab(&mach_amiga_symbol_table);
}
This diff is collapsed.
#
# Makefile for Linux arch/m68k/atari 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...
EXTRA_CFLAGS := -Wa,-m68030
O_TARGET := atari.o
O_OBJS := config.o atakeyb.o ataints.o \
atapart.o stdma.o atasound.o joystick.o stram.o atafb.o
OX_OBJS = ksyms.o
include $(TOPDIR)/Rules.make
This diff is collapsed.
#include <linux/fb.h>
#include <linux/console.h>
struct display
{
int bytes_per_row; /* offset to one line below */
int cursor_x; /* current cursor position */
int cursor_y;
int fgcol; /* text colors */
int bgcol;
struct fb_var_screeninfo var; /* variable infos */
struct fb_cmap cmap; /* colormap */
/* the following three are copies from fb_fix_screeninfo */
int visual;
int type;
int type_aux;
u_char *bitplane; /* pointer to top of physical screen */
u_char *screen_base; /* pointer to top of virtual screen */
u_char *fontdata; /* Font associated to this display */
int fontheight;
int fontwidth;
int inverse; /* != 0 text black on white as default */
struct vc_data *conp; /* pointer to console data */
struct display_switch *dispsw; /* pointers to depth specific functions */
};
struct fb_info
{
char modename[40]; /* name of the at boottime detected video mode */
struct display *disp; /* pointer to display variables */
int (*changevar)(int); /* tell the console var has changed */
int (*switch_con)(int); /* tell the framebuffer to switch consoles */
int (*updatevar)(int); /* tell the framebuffer to update the vars */
void (*blank)(int); /* tell the framebuffer to (un)blank the screen */
};
struct fb_info *atafb_init(long *);
This diff is collapsed.
This diff is collapsed.
/*
* linux/atari/atapart.c
*
* Atari partition checking driver for 680x0 Linux
* Written by Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de)
*
* 5/3/94 Roman Hodek:
* Added some sanity checks
* Linux device names start from 1 not 0, so I changed the initial value
* for i to 1.
*
* 10/09/94 Guenther Kelleter:
* Added support for ICD/Supra partition info.
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file README.legal in the main directory of this archive
* for more details.
*/
#include <linux/fs.h>
#include <linux/genhd.h>
#include <linux/kernel.h>
#include <asm/atari_rootsec.h>
/* ++guenther: this should be settable by the user ("make config")?.
*/
#define ICD_PARTS
extern int current_minor;
void
atari_check_partition (struct gendisk *hd, unsigned int dev)
{
int i, minor = current_minor, m_lim = current_minor + hd->max_p;
struct buffer_head *bh;
struct rootsector *rs;
struct partition_info *pi;
ulong extensect;
#ifdef ICD_PARTS
int part_fmt = 0; /* 0:unknown, 1:AHDI, 2:ICD/Supra */
#endif
bh = bread (dev, 0, 1024);
if (!bh)
{
printk (" unable to read block 0\n");
return;
}
rs = (struct rootsector *) bh->b_data;
printk (" %s%c:", hd->major_name, 'a' + (minor >> hd->minor_shift));
pi = &rs->part[0];
for (i = 1; pi < &rs->part[4] && minor < m_lim; i++, minor++, pi++)
{
if (pi->flg & 1)
/* active partition */
{
if (memcmp (pi->id, "XGM", 3) == 0)
/* extension partition */
{
struct rootsector *xrs;
struct buffer_head *xbh;
ulong partsect;
#ifdef ICD_PARTS
part_fmt = 1;
#endif
partsect = extensect = pi->st;
while (1)
{
xbh = bread (dev, partsect / 2, 1024);
if (!xbh)
{
printk (" block %ld read failed\n", partsect);
return;
}
if (partsect & 1)
xrs = (struct rootsector *) &xbh->b_data[512];
else
xrs = (struct rootsector *) &xbh->b_data[0];
/* ++roman: sanity check: bit 0 of flg field must be set */
if (!(xrs->part[0].flg & 1)) {
printk( "\nFirst sub-partition in extended partition is not valid!\n" );
break;
}
hd->part[minor].start_sect = partsect + xrs->part[0].st;
hd->part[minor].nr_sects = xrs->part[0].siz;
printk (" %s%c%d", hd->major_name,
'a' + (minor >> hd->minor_shift), i);
if (!(xrs->part[1].flg & 1)) {
/* end of linked partition list */
brelse( xbh );
break;
}
if (memcmp( xrs->part[1].id, "XGM", 3 ) != 0) {
printk( "\nID of extended partion is not XGM!\n" );
brelse( xbh );
break;
}
partsect = xrs->part[1].st + extensect;
brelse (xbh);
i++;
minor++;
if (minor >= m_lim) {
printk( "\nMaximum number of partitions reached!\n" );
break;
}
}
}
else
{
/* we don't care about other id's */
hd->part[minor].start_sect = pi->st;
hd->part[minor].nr_sects = pi->siz;
printk (" %s%c%d", hd->major_name,
'a' + (minor >> hd->minor_shift), i);
}
}
}
#ifdef ICD_PARTS
if ( part_fmt!=1 ) /* no extended partitions -> test ICD-format */
{
pi = &rs->icdpart[0];
/* sanity check: no ICD format if first partion invalid */
if (memcmp (pi->id, "GEM", 3) == 0 ||
memcmp (pi->id, "BGM", 3) == 0 ||
memcmp (pi->id, "RAW", 3) == 0 )
{
for (i = 1; pi < &rs->icdpart[8] && minor < m_lim; i++, minor++, pi++)
{
/* accept only GEM,BGM,RAW partitions */
if (pi->flg & 1 &&
(memcmp (pi->id, "GEM", 3) == 0 ||
memcmp (pi->id, "BGM", 3) == 0 ||
memcmp (pi->id, "RAW", 3) == 0) )
{
part_fmt = 2;
hd->part[minor].start_sect = pi->st;
hd->part[minor].nr_sects = pi->siz;
printk (" %s%c%d", hd->major_name,
'a' + (minor >> hd->minor_shift), i);
}
}
}
}
#endif
brelse (bh);
printk ("\n");
}
gcc -D__KERNEL__ -O2 -m68030 -c atacon.c -o atacon.o
gcc -D__KERNEL__ -O2 -m68030 -c atasound.c -o atasound.o
gcc -D__KERNEL__ -O2 -m68030 -c ataints.c -o ataints.o
gcc -D__KERNEL__ -O2 -m68030 -c atapart.c -o atapart.o
gcc -D__KERNEL__ -O2 -m68030 -c atakeyb.c -o atakeyb.o
gcc -D__KERNEL__ -O2 -m68030 -c joystick.c -o joystick.o
gcc -D__KERNEL__ -O2 -m68030 -c mouse.c -o mouse.o
gcc -D__KERNEL__ -O2 -m68030 -c config.c -o config.o
gcc -D__KERNEL__ -O2 -m68030 -c font_8x16.c -o font_8x16.o
gcc -D__KERNEL__ -O2 -m68030 -c font_8x8.c -o font_8x8.o
gcc -D__KERNEL__ -O2 -m68030 -c stdma.c -o stdma.o
lnx-ld -r -o atari.o atacon.o atasound.o ataints.o atapart.o atakeyb.o config.o font_8x8.o font_8x1.o joystick.o mouse.o stdma.o
cp atari.o ..\makedir
/*
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 README.legal in the main directory of this archive
for more details.
*/
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/major.h>
#include <linux/config.h>
#include <linux/fcntl.h>
#include <linux/errno.h>
#include <linux/mm.h>
#include <asm/atarihw.h>
#include <asm/system.h>
#include <asm/irq.h>
#include <asm/pgtable.h>
#include <asm/atariints.h>
#include <asm/bootinfo.h>
/*
* stuff from the old atasound.c
*/
static void atari_nosound (unsigned long ignored)
{
unsigned char tmp;
unsigned long flags;
/* turn off generator A in mixer control */
save_flags(flags);
cli();
sound_ym.rd_data_reg_sel = 7;
tmp = sound_ym.rd_data_reg_sel;
sound_ym.wd_data = tmp | 0x39;
restore_flags(flags);
}
void atari_microwire_cmd (int cmd)
{
tt_microwire.mask = 0x7ff;
tt_microwire.data = MW_LM1992_ADDR | cmd;
/* Busy wait for data being completely sent :-( */
while( tt_microwire.mask != 0x7ff)
;
}
#define PC_FREQ 1192180
#define PSG_FREQ 125000
void atari_mksound (unsigned int count, unsigned int ticks)
{
static struct timer_list sound_timer = { NULL, NULL, 0, 0,
atari_nosound };
/*
* Generates sound of some count for some number of clock ticks
* [count = 1193180 / frequency]
*/
unsigned long flags;
unsigned char tmp;
save_flags(flags);
cli();
if (count == 750 && ticks == HZ/8) {
/* Special case: These values are used by console.c to
* generate the console bell. They are catched here and the
* sound actually generated is somehow special: it uses the
* generator B and an envelope. No timer is needed therefore
* and the bell doesn't disturb an other ongoing sound.
*/
/* set envelope duration to 492 ms */
sound_ym.rd_data_reg_sel = 11;
sound_ym.wd_data = 0;
sound_ym.rd_data_reg_sel = 12;
sound_ym.wd_data = 15;
/* envelope form: max -> min single */
sound_ym.rd_data_reg_sel = 13;
sound_ym.wd_data = 9;
/* set generator B frequency to 2400 Hz */
sound_ym.rd_data_reg_sel = 2;
sound_ym.wd_data = 52;
sound_ym.rd_data_reg_sel = 3;
sound_ym.wd_data = 0;
/* set volume of generator B to envelope control */
sound_ym.rd_data_reg_sel = 9;
sound_ym.wd_data = 0x10;
/* enable generator B in the mixer control */
sound_ym.rd_data_reg_sel = 7;
tmp = sound_ym.rd_data_reg_sel;
sound_ym.wd_data = (tmp & ~0x02) | 0x38;
restore_flags(flags);
return;
}
del_timer( &sound_timer );
if (!count) {
atari_nosound( 0 );
}
else {
/* convert from PC counter value (base frequency 1.193 MHz)
* to PSG period value (base frequency 125 kHz).
*/
int period = (PSG_FREQ * count + PC_FREQ/2) / PC_FREQ;
if (period > 0xfff) period = 0xfff;
/* set generator A frequency to 0 */
sound_ym.rd_data_reg_sel = 0;
sound_ym.wd_data = period & 0xff;
sound_ym.rd_data_reg_sel = 1;
sound_ym.wd_data = (period >> 8) & 0xf;
/* turn on generator A in mixer control (but not noise
* generator!) */
sound_ym.rd_data_reg_sel = 7;
tmp = sound_ym.rd_data_reg_sel;
sound_ym.wd_data = (tmp & ~0x01) | 0x38;
/* set generator A level to maximum, no envelope */
sound_ym.rd_data_reg_sel = 8;
sound_ym.wd_data = 15;
if (ticks) {
sound_timer.expires = jiffies + ticks;
add_timer( &sound_timer );
}
}
restore_flags(flags);
}
/*
* Minor numbers for the sound driver.
*
* Unfortunately Creative called the codec chip of SB as a DSP. For this
* reason the /dev/dsp is reserved for digitized audio use. There is a
* device for true DSP processors but it will be called something else.
* In v3.0 it's /dev/sndproc but this could be a temporary solution.
*/
#define SND_NDEVS 256 /* Number of supported devices */
#define SND_DEV_CTL 0 /* Control port /dev/mixer */
#define SND_DEV_SEQ 1 /* Sequencer output /dev/sequencer (FM
synthesizer and MIDI output) */
#define SND_DEV_MIDIN 2 /* Raw midi access */
#define SND_DEV_DSP 3 /* Digitized voice /dev/dsp */
#define SND_DEV_AUDIO 4 /* Sparc compatible /dev/audio */
#define SND_DEV_DSP16 5 /* Like /dev/dsp but 16 bits/sample */
#define SND_DEV_STATUS 6 /* /dev/sndstat */
/* #7 not in use now. Was in 2.4. Free for use after v3.0. */
#define SND_DEV_SEQ2 8 /* /dev/sequencer, level 2 interface */
#define SND_DEV_SNDPROC 9 /* /dev/sndproc for programmable devices */
#define SND_DEV_PSS SND_DEV_SNDPROC
#define DSP_DEFAULT_SPEED 8000
#define ON 1
#define OFF 0
#define MAX_AUDIO_DEV 5
#define MAX_MIXER_DEV 2
#define MAX_SYNTH_DEV 3
#define MAX_MIDI_DEV 6
#define MAX_TIMER_DEV 3
This diff is collapsed.
This diff is collapsed.
#include <linux/config.h>
#include <linux/module.h>
#include <asm/ptrace.h>
#include <asm/traps.h>
#include <asm/atarihw.h>
#include <asm/atariints.h>
#include <asm/atarikb.h>
#include <asm/atari_joystick.h>
#include <asm/atari_stdma.h>
#if 0
#include <asm/atari_acsi.h>
#endif
static struct symbol_table mach_atari_symbol_table = {
#include <linux/symtab_begin.h>
X(is_medusa),
X(atari_register_vme_int),
X(stdma_lock),
X(stdma_release),
X(stdma_others_waiting),
X(stdma_islocked),
X(atari_mouse_buttons),
X(atari_mouse_interrupt_hook),
X(atari_MIDI_interrupt_hook),
X(ikbd_write),
X(ikbd_mouse_y0_top),
X(ikbd_mouse_thresh),
X(ikbd_mouse_rel_pos),
X(ikbd_mouse_disable),
#if 0
#ifdef CONFIG_ATARI_ACSI
X(acsi_wait_for_IRQ),
X(acsi_wait_for_noIRQ),
X(acsicmd_nodma),
X(acsi_getstatus),
#ifdef CONFIG_ATARI_SLM
X(acsi_extstatus),
X(acsi_end_extstatus),
X(acsi_extcmd),
#endif
#endif
#endif /* 0 */
#include <linux/symtab_end.h>
};
void mach_atari_syms_export(void)
{
register_symtab(&mach_atari_symbol_table);
}
This diff is collapsed.
This diff is collapsed.
#
# linux/arch/m68k/boot/Makefile
#
# 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.
ifdef CONFIG_AMIGA
AMIGA_BOOTOBJS := amiga/bootstrap.o
endif
ifdef CONFIG_ATARI
ATARI_BOOTOBJS := atari/bootstrap.o
HOSTCC += -b m68k-mint
endif
ifdef CONFIG_ATARI
atari_bootstrap: $(ATARI_BOOTOBJS)
$(HOSTCC) $(HOSTFLAGS) -o $@ $(ATARI_BOOTOBJS)
rm -f ../../../bootstrap
ln $@ ../../../bootstrap
endif
ifdef CONFIG_AMIGA
amiga_bootstrap: $(AMIGA_BOOTOBJS)
$(HOSTCC) $(HOSTFLAGS) -o $@ $(AMIGA_BOOTOBJS)
rm -f ../../../bootstrap
ln $@ ../../../bootstrap
endif
$(AMIGA_BOOTOBJS) $(ATARI_BOOTOBJS): %.o: %.c
$(HOSTCC) $(HOSTFLAGS) -c $< -o $@
clean:
rm -f *.o
dep:
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.
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.
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