Commit b512cdf9 authored by Vojtech Pavlik's avatar Vojtech Pavlik

Merge suse.cz:/home/vojtech/bk/linus into suse.cz:/home/vojtech/bk/input

parents 94eda096 ae5ec6fe
......@@ -33,7 +33,6 @@
#include <asm/amigaints.h>
#include <asm/irq.h>
#include <asm/rtc.h>
#include <asm/keyboard.h>
#include <asm/machdep.h>
#include <asm/io.h>
......@@ -71,11 +70,6 @@ static char amiga_model_name[13] = "Amiga ";
extern char m68k_debug_device[];
static void amiga_sched_init(void (*handler)(int, void *, struct pt_regs *));
/* amiga specific keyboard functions */
extern int amiga_keyb_init(void);
extern int amiga_kbdrate (struct kbd_repeat *);
extern int amiga_kbd_translate(unsigned char keycode, unsigned char *keycodep,
char raw_mode);
/* amiga specific irq functions */
extern void amiga_init_IRQ (void);
extern void (*amiga_default_handler[]) (int, void *, struct pt_regs *);
......@@ -94,7 +88,6 @@ static unsigned long amiga_gettimeoffset (void);
static int a3000_hwclk (int, struct rtc_time *);
static int a2000_hwclk (int, struct rtc_time *);
static int amiga_set_clock_mmss (unsigned long);
extern void amiga_mksound( unsigned int count, unsigned int ticks );
#ifdef CONFIG_AMIGA_FLOPPY
extern void amiga_floppy_setup(char *, int *);
#endif
......@@ -116,18 +109,6 @@ static struct console amiga_console_driver = {
.index = -1,
};
#ifdef CONFIG_MAGIC_SYSRQ
static char amiga_sysrq_xlate[128] =
"\0001234567890-=\\\000\000" /* 0x00 - 0x0f */
"qwertyuiop[]\000123" /* 0x10 - 0x1f */
"asdfghjkl;'\000\000456" /* 0x20 - 0x2f */
"\000zxcvbnm,./\000+789" /* 0x30 - 0x3f */
" \177\t\r\r\000\177\000\000\000-\000\000\000\000\000" /* 0x40 - 0x4f */
"\000\201\202\203\204\205\206\207\210\211()/*+\000" /* 0x50 - 0x5f */
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" /* 0x60 - 0x6f */
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"; /* 0x70 - 0x7f */
#endif
/*
* Motherboard Resources present in all Amiga models
......@@ -388,11 +369,6 @@ void __init config_amiga(void)
request_resource(&iomem_resource, &((struct resource *)&mb_resources)[i]);
mach_sched_init = amiga_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = amiga_keyb_init;
mach_kbdrate = amiga_kbdrate;
mach_kbd_translate = amiga_kbd_translate;
#endif
mach_init_IRQ = amiga_init_IRQ;
mach_default_handler = &amiga_default_handler;
mach_request_irq = amiga_request_irq;
......@@ -432,16 +408,10 @@ void __init config_amiga(void)
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
#ifdef CONFIG_VT
kd_mksound = amiga_mksound;
#endif
#ifdef CONFIG_MAGIC_SYSRQ
SYSRQ_KEY = 0xff;
mach_sysrq_key = 0x5f; /* HELP */
mach_sysrq_shift_state = 0x03; /* SHIFT+ALTGR */
mach_sysrq_shift_mask = 0xff; /* all modifiers except CapsLock */
mach_sysrq_xlate = amiga_sysrq_xlate;
#ifdef CONFIG_INPUT_M68K_BEEP
mach_beep = amiga_mksound;
#endif
#ifdef CONFIG_HEARTBEAT
mach_heartbeat = amiga_heartbeat;
#endif
......@@ -709,7 +679,7 @@ static void amiga_reset (void)
unsigned long jmp_addr040 = virt_to_phys(&&jmp_addr_label040);
unsigned long jmp_addr = virt_to_phys(&&jmp_addr_label);
cli();
local_irq_disable();
if (CPU_IS_040_OR_060)
/* Setup transparent translation registers for mapping
* of 16 MB kernel segment before disabling translation
......
This diff is collapsed.
......@@ -39,7 +39,6 @@
#include <asm/atariints.h>
#include <asm/atari_stram.h>
#include <asm/system.h>
#include <asm/keyboard.h>
#include <asm/machdep.h>
#include <asm/hwtest.h>
#include <asm/io.h>
......@@ -59,12 +58,6 @@ extern void atari_floppy_setup(char *, int *);
static void atari_get_model(char *model);
static int atari_get_hardware_list(char *buffer);
/* atari specific keyboard functions */
extern int atari_keyb_init(void);
extern int atari_kbdrate (struct kbd_repeat *);
extern int atari_kbd_translate(unsigned char keycode, unsigned char *keycodep,
char raw_mode);
extern void atari_kbd_leds (unsigned int);
/* atari specific irq functions */
extern void atari_init_IRQ (void);
extern int atari_request_irq (unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
......@@ -73,7 +66,6 @@ extern void atari_free_irq (unsigned int irq, void *dev_id);
extern void atari_enable_irq (unsigned int);
extern void atari_disable_irq (unsigned int);
extern int show_atari_interrupts (struct seq_file *, void *);
extern void atari_mksound( unsigned int count, unsigned int ticks );
#ifdef CONFIG_HEARTBEAT
static void atari_heartbeat( int on );
#endif
......@@ -89,18 +81,6 @@ extern int atari_tt_set_clock_mmss (unsigned long);
/* atari specific debug functions (in debug.c) */
extern void atari_debug_init(void);
#ifdef CONFIG_MAGIC_SYSRQ
static char atari_sysrq_xlate[128] =
"\000\0331234567890-=\177\t" /* 0x00 - 0x0f */
"qwertyuiop[]\r\000as" /* 0x10 - 0x1f */
"dfghjkl;'`\000\\zxcv" /* 0x20 - 0x2f */
"bnm,./\000\000\000 \000\201\202\203\204\205" /* 0x30 - 0x3f */
"\206\207\210\211\212\000\000\000\000\000-\000\000\000+\000"/* 0x40 - 0x4f */
"\000\000\000\177\000\000\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
"\000\000\000()/*789456123" /* 0x60 - 0x6f */
"0.\r\000\000\000\000\000\000\000\000\000\000\000\000\000"; /* 0x70 - 0x7f */
#endif
/* I've moved hwreg_present() and hwreg_present_bywrite() out into
* mm/hwtest.c, to avoid having multiple copies of the same routine
......@@ -254,12 +234,6 @@ void __init config_atari(void)
to 4GB. */
mach_sched_init = atari_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = atari_keyb_init;
mach_kbdrate = atari_kbdrate;
mach_kbd_translate = atari_kbd_translate;
mach_kbd_leds = atari_kbd_leds;
#endif
mach_init_IRQ = atari_init_IRQ;
mach_request_irq = atari_request_irq;
mach_free_irq = atari_free_irq;
......@@ -277,15 +251,8 @@ void __init config_atari(void)
conswitchp = &dummy_con;
#endif
mach_max_dma_address = 0xffffff;
#ifdef CONFIG_VT
kd_mksound = atari_mksound;
#endif
#ifdef CONFIG_MAGIC_SYSRQ
SYSRQ_KEY = 0xff;
mach_sysrq_key = 98; /* HELP */
mach_sysrq_shift_state = 8; /* Alt */
mach_sysrq_shift_mask = 0xff; /* all modifiers except CapsLock */
mach_sysrq_xlate = atari_sysrq_xlate;
#ifdef CONFIG_INPUT_M68K_BEEP
mach_beep = atari_mksound;
#endif
#ifdef CONFIG_HEARTBEAT
mach_heartbeat = atari_heartbeat;
......
/*
* Atari Joystick Driver for Linux
* by Robert de Vries (robert@and.nl) 19Jul93
*
* 16 Nov 1994 Andreas Schwab
* Support for three button mouse (shamelessly stolen from MiNT)
* third button wired to one of the joystick directions on joystick 1
*/
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/major.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/smp_lock.h>
#include <asm/atarikb.h>
#include <asm/atari_joystick.h>
#include <asm/uaccess.h>
#define MAJOR_NR JOYSTICK_MAJOR
#define ANALOG_JOY(n) (!(n & 0x80))
#define DIGITAL_JOY(n) (minor(n) & 0x80)
#define DEVICE_NR(n) (minor(n) & 0x7f)
static struct joystick_status joystick[2];
int atari_mouse_buttons; /* for three-button mouse */
void atari_joystick_interrupt(char *buf)
{
int j;
/* ikbd_joystick_disable(); */
j = buf[0] & 0x1;
joystick[j].dir = buf[1] & 0xF;
joystick[j].fire = (buf[1] & 0x80) >> 7;
joystick[j].ready = 1;
wake_up_interruptible(&joystick[j].wait);
/* For three-button mouse emulation fake a mouse packet */
if (atari_mouse_interrupt_hook &&
j == 1 && (buf[1] & 1) != ((atari_mouse_buttons & 2) >> 1))
{
char faked_packet[3];
atari_mouse_buttons = (atari_mouse_buttons & 5) | ((buf[1] & 1) << 1);
faked_packet[0] = (atari_mouse_buttons & 1) |
(atari_mouse_buttons & 4 ? 2 : 0);
faked_packet[1] = 0;
faked_packet[2] = 0;
atari_mouse_interrupt_hook (faked_packet);
}
/* ikbd_joystick_event_on(); */
}
static int release_joystick(struct inode *inode, struct file *file)
{
int minor = DEVICE_NR(inode->i_rdev);
joystick[minor].active = 0;
joystick[minor].ready = 0;
if ((joystick[0].active == 0) && (joystick[1].active == 0))
ikbd_joystick_disable();
return 0;
}
static int open_joystick(struct inode *inode, struct file *file)
{
int minor = DEVICE_NR(inode->i_rdev);
if (!DIGITAL_JOY(inode->i_rdev) || minor > 1)
return -ENODEV;
if (joystick[minor].active)
return -EBUSY;
joystick[minor].active = 1;
joystick[minor].ready = 0;
ikbd_joystick_event_on();
return 0;
}
static ssize_t write_joystick(struct file *file, const char *buffer,
size_t count, loff_t *ppos)
{
return -EINVAL;
}
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)
return -EINVAL;
if (!joystick[minor].ready)
return -EAGAIN;
joystick[minor].ready = 0;
if (put_user(joystick[minor].fire, buffer++) ||
put_user(joystick[minor].dir, buffer++))
return -EFAULT;
if (count > 2)
if (clear_user(buffer, count - 2))
return -EFAULT;
return count;
}
static unsigned int joystick_poll(struct file *file, poll_table *wait)
{
int minor = DEVICE_NR(file->f_dentry->d_inode->i_rdev);
poll_wait(file, &joystick[minor].wait, wait);
if (joystick[minor].ready)
return POLLIN | POLLRDNORM;
return 0;
}
struct file_operations atari_joystick_fops = {
.read = read_joystick,
.write = write_joystick,
.poll = joystick_poll,
.open = open_joystick,
.release = release_joystick,
};
int __init atari_joystick_init(void)
{
joystick[0].active = joystick[1].active = 0;
joystick[0].ready = joystick[1].ready = 0;
init_waitqueue_head(&joystick[0].wait);
init_waitqueue_head(&joystick[1].wait);
if (register_chrdev(MAJOR_NR, "Joystick", &atari_joystick_fops))
printk("unable to get major %d for joystick devices\n", MAJOR_NR);
devfs_register_series (NULL, "joysticks/digital%u", 2, DEVFS_FL_DEFAULT,
MAJOR_NR, 128, S_IFCHR | S_IRUSR | S_IWUSR,
&atari_joystick_fops, NULL);
return 0;
}
......@@ -45,12 +45,9 @@ static void bvme6000_get_model(char *model);
static int bvme6000_get_hardware_list(char *buffer);
extern int bvme6000_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id);
extern void bvme6000_sched_init(void (*handler)(int, void *, struct pt_regs *));
extern int bvme6000_keyb_init(void);
extern int bvme6000_kbdrate (struct kbd_repeat *);
extern unsigned long bvme6000_gettimeoffset (void);
extern int bvme6000_hwclk (int, struct rtc_time *);
extern int bvme6000_set_clock_mmss (unsigned long);
extern void bvme6000_mksound( unsigned int count, unsigned int ticks );
extern void bvme6000_reset (void);
extern void bvme6000_waitbut(void);
void bvme6000_set_vectors (void);
......@@ -72,15 +69,6 @@ int bvme6000_parse_bootinfo(const struct bi_record *bi)
return 1;
}
int bvme6000_kbdrate (struct kbd_repeat *k)
{
return 0;
}
void bvme6000_mksound( unsigned int count, unsigned int ticks )
{
}
void bvme6000_reset()
{
volatile PitRegsPtr pit = (PitRegsPtr)BVME_PIT_BASE;
......@@ -133,15 +121,10 @@ void __init config_bvme6000(void)
mach_max_dma_address = 0xffffffff;
mach_sched_init = bvme6000_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = bvme6000_keyb_init;
mach_kbdrate = bvme6000_kbdrate;
#endif
mach_init_IRQ = bvme6000_init_IRQ;
mach_gettimeoffset = bvme6000_gettimeoffset;
mach_hwclk = bvme6000_hwclk;
mach_set_clock_mmss = bvme6000_set_clock_mmss;
/* mach_mksound = bvme6000_mksound; */
mach_reset = bvme6000_reset;
mach_free_irq = bvme6000_free_irq;
mach_process_int = bvme6000_process_int;
......@@ -394,8 +377,3 @@ int bvme6000_set_clock_mmss (unsigned long nowtime)
return retval;
}
int bvme6000_keyb_init (void)
{
return 0;
}
......@@ -3,6 +3,7 @@
# see Documentation/kbuild/config-language.txt.
#
define_bool CONFIG_M68K y
define_bool CONFIG_UID16 y
define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
......
......@@ -17,7 +17,6 @@
#include <linux/init.h>
#include <asm/machdep.h>
#include <asm/blinken.h>
#include <asm/io.h> /* readb() and writeb() */
#include <asm/hwtest.h> /* hwreg_present() */
#include "ints.h"
......@@ -27,14 +26,6 @@ extern void hp300_reset(void);
extern void (*hp300_default_handler[])(int, void *, struct pt_regs *);
extern int show_hp300_interrupts(struct seq_file *, void *);
#ifdef CONFIG_VT
extern int hp300_keyb_init(void);
static int hp300_kbdrate(struct kbd_repeat *k)
{
return 0;
}
#endif
#ifdef CONFIG_HEARTBEAT
static void hp300_pulse(int x)
{
......@@ -53,10 +44,6 @@ static void hp300_get_model(char *model)
void __init config_hp300(void)
{
mach_sched_init = hp300_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = hp300_keyb_init;
mach_kbdrate = hp300_kbdrate;
#endif
mach_init_IRQ = hp300_init_IRQ;
mach_request_irq = hp300_request_irq;
mach_free_irq = hp300_free_irq;
......
This diff is collapsed.
......@@ -71,13 +71,6 @@ char saved_command_line[CL_SIZE];
char m68k_debug_device[6] = "";
void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)) __initdata = NULL;
/* machine dependent keyboard functions */
#ifdef CONFIG_VT
int (*mach_keyb_init) (void) __initdata = NULL;
int (*mach_kbdrate) (struct kbd_repeat *) = NULL;
void (*mach_kbd_leds) (unsigned int) = NULL;
int (*mach_kbd_translate)(unsigned char scancode, unsigned char *keycode, char raw_mode) = NULL;
#endif
/* machine dependent irq functions */
void (*mach_init_IRQ) (void) __initdata = NULL;
void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL;
......@@ -89,6 +82,8 @@ void (*mach_process_int) (int, struct pt_regs *) = NULL;
unsigned long (*mach_gettimeoffset) (void);
int (*mach_hwclk) (int, struct rtc_time*) = NULL;
int (*mach_set_clock_mmss) (unsigned long) = NULL;
int (*mach_get_rtc_pll)(struct rtc_pll_info *) = NULL;
int (*mach_set_rtc_pll)(struct rtc_pll_info *) = NULL;
void (*mach_reset)( void );
void (*mach_halt)( void ) = NULL;
void (*mach_power_off)( void ) = NULL;
......@@ -103,15 +98,9 @@ EXPORT_SYMBOL(mach_heartbeat);
#ifdef CONFIG_M68K_L2_CACHE
void (*mach_l2_flush) (int) = NULL;
#endif
#ifdef CONFIG_MAGIC_SYSRQ
unsigned int SYSRQ_KEY;
int mach_sysrq_key = -1;
int mach_sysrq_shift_state = 0;
int mach_sysrq_shift_mask = 0;
char *mach_sysrq_xlate = NULL;
#ifdef CONFIG_INPUT_M68K_BEEP
void (*mach_beep)(unsigned int, unsigned int) = NULL;
#endif
#if defined(CONFIG_ISA) && defined(MULTI_ISA)
int isa_type;
int isa_sex;
......
......@@ -78,27 +78,12 @@ extern void oss_init(void);
extern void psc_init(void);
extern void baboon_init(void);
extern void mac_mksound(unsigned int, unsigned int);
extern void nubus_sweep_video(void);
/* Mac specific debug functions (in debug.c) */
extern void mac_debug_init(void);
extern void mac_debugging_long(int, long);
extern int mackbd_init_hw(void);
extern void mackbd_leds(unsigned int leds);
extern int mackbd_translate(unsigned char keycode, unsigned char *keycodep, char raw_mode);
extern void mac_hid_init_hw(void);
extern int mac_hid_kbd_translate(unsigned char scancode, unsigned char *keycode, char raw_mode);
#ifdef CONFIG_MAGIC_SYSRQ
extern unsigned char mac_hid_kbd_sysrq_xlate[128];
extern unsigned char pckbd_sysrq_xlate[128];
extern unsigned char mackbd_sysrq_xlate[128];
#endif /* CONFIG_MAGIC_SYSRQ */
static void mac_get_model(char *str);
void mac_bang(int irq, void *vector, struct pt_regs *p)
......@@ -207,33 +192,6 @@ void __init config_mac(void)
printk("ERROR: no Mac, but config_mac() called!! \n");
}
#ifdef CONFIG_VT
#ifdef CONFIG_INPUT_ADBHID
mach_keyb_init = mac_hid_init_hw;
mach_kbd_translate = mac_hid_kbd_translate;
#ifdef CONFIG_MAGIC_SYSRQ
#ifdef CONFIG_MAC_ADBKEYCODES
if (!keyboard_sends_linux_keycodes) {
mach_sysrq_xlate = mac_hid_kbd_sysrq_xlate;
SYSRQ_KEY = 0x69;
} else
#endif /* CONFIG_MAC_ADBKEYCODES */
{
mach_sysrq_xlate = pckbd_sysrq_xlate;
SYSRQ_KEY = 0x54;
}
#endif /* CONFIG_MAGIC_SYSRQ */
#elif defined(CONFIG_ADB_KEYBOARD)
mach_keyb_init = mackbd_init_hw;
mach_kbd_leds = mackbd_leds;
mach_kbd_translate = mackbd_translate;
#ifdef CONFIG_MAGIC_SYSRQ
mach_sysrq_xlate = mackbd_sysrq_xlate;
SYSRQ_KEY = 0x69;
#endif /* CONFIG_MAGIC_SYSRQ */
#endif /* CONFIG_INPUT_ADBHID */
#endif /* CONFIG_VT */
mach_sched_init = mac_sched_init;
mach_init_IRQ = mac_init_IRQ;
mach_request_irq = mac_request_irq;
......@@ -249,9 +207,6 @@ void __init config_mac(void)
mach_hwclk = mac_hwclk;
#endif
mach_set_clock_mmss = mac_set_clock_mmss;
#if 0
mach_mksound = mac_mksound;
#endif
mach_reset = mac_reset;
mach_halt = mac_poweroff;
mach_power_off = mac_poweroff;
......@@ -262,8 +217,8 @@ void __init config_mac(void)
#if 0
mach_debug_init = mac_debug_init;
#endif
#ifdef CONFIG_VT
kd_mksound = mac_mksound;
#ifdef CONFIG_INPUT_M68K_BEEP
mach_beep = mac_mksound;
#endif
#ifdef CONFIG_HEARTBEAT
#if 0
......@@ -287,10 +242,6 @@ void __init config_mac(void)
|| macintosh_config->ident == MAC_MODEL_IIFX) {
mach_l2_flush = mac_cache_card_flush;
}
#ifdef MAC_DEBUG_SOUND
/* goes on forever if timers broken */
mac_mksound(1000,10);
#endif
/*
* Check for machine specific fixups.
......
......@@ -45,8 +45,6 @@ static void mvme147_get_model(char *model);
static int mvme147_get_hardware_list(char *buffer);
extern int mvme147_request_irq (unsigned int irq, void (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id);
extern void mvme147_sched_init(void (*handler)(int, void *, struct pt_regs *));
extern int mvme147_keyb_init(void);
extern int mvme147_kbdrate (struct kbd_repeat *);
extern unsigned long mvme147_gettimeoffset (void);
extern int mvme147_hwclk (int, struct rtc_time *);
extern int mvme147_set_clock_mmss (unsigned long);
......@@ -70,11 +68,6 @@ int mvme147_parse_bootinfo(const struct bi_record *bi)
return 1;
}
int mvme147_kbdrate (struct kbd_repeat *k)
{
return 0;
}
void mvme147_reset()
{
printk ("\r\n\nCalled mvme147_reset\r\n");
......@@ -102,10 +95,6 @@ void __init config_mvme147(void)
{
mach_max_dma_address = 0x01000000;
mach_sched_init = mvme147_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = mvme147_keyb_init;
mach_kbdrate = mvme147_kbdrate;
#endif
mach_init_IRQ = mvme147_init_IRQ;
mach_gettimeoffset = mvme147_gettimeoffset;
mach_hwclk = mvme147_hwclk;
......
......@@ -49,12 +49,9 @@ static void mvme16x_get_model(char *model);
static int mvme16x_get_hardware_list(char *buffer);
extern int mvme16x_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id);
extern void mvme16x_sched_init(void (*handler)(int, void *, struct pt_regs *));
extern int mvme16x_keyb_init(void);
extern int mvme16x_kbdrate (struct kbd_repeat *);
extern unsigned long mvme16x_gettimeoffset (void);
extern int mvme16x_hwclk (int, struct rtc_time *);
extern int mvme16x_set_clock_mmss (unsigned long);
extern void mvme16x_mksound( unsigned int count, unsigned int ticks );
extern void mvme16x_reset (void);
extern void mvme16x_waitbut(void);
......@@ -77,15 +74,6 @@ int mvme16x_parse_bootinfo(const struct bi_record *bi)
return 1;
}
int mvme16x_kbdrate (struct kbd_repeat *k)
{
return 0;
}
void mvme16x_mksound( unsigned int count, unsigned int ticks )
{
}
void mvme16x_reset()
{
printk ("\r\n\nCalled mvme16x_reset\r\n"
......@@ -144,17 +132,10 @@ void __init config_mvme16x(void)
mach_max_dma_address = 0xffffffff;
mach_sched_init = mvme16x_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = mvme16x_keyb_init;
mach_kbdrate = mvme16x_kbdrate;
#endif
mach_init_IRQ = mvme16x_init_IRQ;
mach_gettimeoffset = mvme16x_gettimeoffset;
mach_hwclk = mvme16x_hwclk;
mach_set_clock_mmss = mvme16x_set_clock_mmss;
#ifdef CONFIG_VT
/* kd_mksound = mvme16x_mksound; */
#endif
mach_reset = mvme16x_reset;
mach_free_irq = mvme16x_free_irq;
mach_process_int = mvme16x_process_int;
......@@ -301,8 +282,3 @@ int mvme16x_set_clock_mmss (unsigned long nowtime)
return 0;
}
int mvme16x_keyb_init (void)
{
return 0;
}
......@@ -36,12 +36,9 @@
#include <asm/rtc.h>
#include <asm/machdep.h>
#include <asm/q40_master.h>
#include <asm/keyboard.h>
extern void floppy_setup(char *str, int *ints);
extern int q40kbd_translate(unsigned char scancode, unsigned char *keycode,
char raw_mode);
extern void q40_process_int (int level, struct pt_regs *regs);
extern void (*q40_sys_default_handler[]) (int, void *, struct pt_regs *); /* added just for debugging */
extern void q40_init_IRQ (void);
......@@ -62,8 +59,6 @@ void q40_halt(void);
extern void q40_waitbut(void);
void q40_set_vectors (void);
void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/ );
extern char *saved_command_line;
extern char m68k_debug_device[];
static void q40_mem_console_write(struct console *co, const char *b,
......@@ -82,14 +77,6 @@ static struct console q40_console_driver = {
extern char *q40_mem_cptr; /*=(char *)0xff020000;*/
static int _cpleft;
#if 0
int q40_kbd_translate(unsigned char keycode, unsigned char *keycodep, char raw_mode)
{
*keycodep = keycode;
return 1;
}
#endif
static void q40_mem_console_write(struct console *co, const char *s,
unsigned int count)
{
......@@ -117,13 +104,6 @@ void printq40(char *str)
}
#endif
#if 0
int q40_kbdrate (struct kbd_repeat *k)
{
return 0;
}
#endif
static int halted=0;
#ifdef CONFIG_HEARTBEAT
......@@ -185,10 +165,6 @@ void __init config_q40(void)
{
mach_sched_init = q40_sched_init;
#ifdef CONFIG_VT
mach_keyb_init = q40kbd_init_hw;
mach_kbd_translate = q40kbd_translate;
#endif
mach_init_IRQ = q40_init_IRQ;
mach_gettimeoffset = q40_gettimeoffset;
mach_hwclk = q40_hwclk;
......@@ -204,12 +180,9 @@ void __init config_q40(void)
mach_default_handler = &q40_sys_default_handler;
mach_get_model = q40_get_model;
mach_get_hardware_list = q40_get_hardware_list;
#ifdef CONFIG_VT
kd_mksound = q40_mksound;
#endif
#ifdef CONFIG_MAGIC_SYSRQ
mach_sysrq_key = 0x54;
#ifdef CONFIG_INPUT_M68K_BEEP
mach_beep = q40_mksound;
#endif
#ifdef CONFIG_HEARTBEAT
mach_heartbeat = q40_heartbeat;
......
This diff is collapsed.
/*
* Atari Mouse Driver for Linux
* by Robert de Vries (robert@and.nl) 19Jul93
*
* 16 Nov 1994 Andreas Schwab
* Compatibility with busmouse
* Support for three button mouse (shamelessly stolen from MiNT)
* third button wired to one of the joystick directions on joystick 1
*
* 1996/02/11 Andreas Schwab
* Module support
* Allow multiple open's
*
* Converted to use new generic busmouse code. 5 Apr 1998
* Russell King <rmk@arm.uk.linux.org>
*/
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
#include <linux/mm.h>
#include <linux/random.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/logibusmouse.h>
#include <asm/setup.h>
#include <asm/atarikb.h>
#include <asm/uaccess.h>
#include "busmouse.h"
static int msedev;
static int mouse_threshold[2] = {2,2};
MODULE_PARM(mouse_threshold, "2i");
extern int atari_mouse_buttons;
static void atari_mouse_interrupt(char *buf)
{
int buttons;
/* ikbd_mouse_disable(); */
buttons = ((buf[0] & 1)
| ((buf[0] & 2) << 1)
| (atari_mouse_buttons & 2));
atari_mouse_buttons = buttons;
busmouse_add_movementbuttons(msedev, buf[1], -buf[2], buttons ^ 7);
/* ikbd_mouse_rel_pos(); */
}
static int release_mouse(struct inode *inode, struct file *file)
{
ikbd_mouse_disable();
atari_mouse_interrupt_hook = NULL;
return 0;
}
static int open_mouse(struct inode *inode, struct file *file)
{
atari_mouse_buttons = 0;
ikbd_mouse_y0_top ();
ikbd_mouse_thresh (mouse_threshold[0], mouse_threshold[1]);
ikbd_mouse_rel_pos();
atari_mouse_interrupt_hook = atari_mouse_interrupt;
return 0;
}
static struct busmouse atarimouse = {
ATARIMOUSE_MINOR, "atarimouse", THIS_MODULE, open_mouse, release_mouse, 0
};
static int __init atari_mouse_init(void)
{
if (!MACH_IS_ATARI)
return -ENODEV;
msedev = register_busmouse(&atarimouse);
if (msedev < 0)
printk(KERN_WARNING "Unable to register Atari mouse driver.\n");
else
printk(KERN_INFO "Atari mouse installed.\n");
return msedev < 0 ? msedev : 0;
}
#ifndef MODULE
#define MIN_THRESHOLD 1
#define MAX_THRESHOLD 20 /* more seems not reasonable... */
static int __init atari_mouse_setup( char *str )
{
int ints[8];
str = get_options(str, ARRAY_SIZE(ints), ints);
if (ints[0] < 1) {
printk(KERN_ERR "atari_mouse_setup: no arguments!\n" );
return 0;
}
else if (ints[0] > 2) {
printk(KERN_WARNING "atari_mouse_setup: too many arguments\n" );
}
if (ints[1] < MIN_THRESHOLD || ints[1] > MAX_THRESHOLD)
printk(KERN_WARNING "atari_mouse_setup: bad threshold value (ignored)\n" );
else {
mouse_threshold[0] = ints[1];
mouse_threshold[1] = ints[1];
if (ints[0] > 1) {
if (ints[2] < MIN_THRESHOLD || ints[2] > MAX_THRESHOLD)
printk(KERN_WARNING "atari_mouse_setup: bad threshold value (ignored)\n" );
else
mouse_threshold[1] = ints[2];
}
}
return 1;
}
__setup("atarimouse=",atari_mouse_setup);
#endif /* !MODULE */
static void __exit atari_mouse_cleanup (void)
{
unregister_busmouse(msedev);
}
module_init(atari_mouse_init);
module_exit(atari_mouse_cleanup);
MODULE_LICENSE("GPL");
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -8,4 +8,7 @@ dep_tristate ' PC Speaker support' CONFIG_INPUT_PCSPKR $CONFIG_INPUT $CONFIG_IN
if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
dep_tristate ' SPARC Speaker support' CONFIG_INPUT_SPARCSPKR $CONFIG_INPUT $CONFIG_INPUT_MISC
fi
if [ "$CONFIG_M68K" = "y" ]; then
dep_tristate ' M68K Beeper support' CONFIG_INPUT_M68K_BEEP $CONFIG_INPUT $CONFIG_INPUT_MISC
fi
dep_tristate ' User level driver support' CONFIG_INPUT_UINPUT $CONFIG_INPUT $CONFIG_INPUT_MISC
......@@ -6,6 +6,7 @@
obj-$(CONFIG_INPUT_SPARCSPKR) += sparcspkr.o
obj-$(CONFIG_INPUT_PCSPKR) += pcspkr.o
obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o
obj-$(CONFIG_INPUT_UINPUT) += uinput.o
# The global Rules.make.
......
/*
* m68k beeper driver for Linux
*
* Copyright (c) 2002 Richard Zidlicky
* Copyright (c) 2002 Vojtech Pavlik
* Copyright (c) 1992 Orest Zborowski
*
*/
/*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
#include <asm/machdep.h>
#include <asm/io.h>
MODULE_AUTHOR("Richard Zidlicky <rz@linux-m68k.org>");
MODULE_DESCRIPTION("m68k beeper driver");
MODULE_LICENSE("GPL");
static char m68kspkr_name[] = "m68k beeper";
static char m68kspkr_phys[] = "m68k/generic";
static struct input_dev m68kspkr_dev;
static int m68kspkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
{
unsigned int count = 0;
unsigned long flags;
if (type != EV_SND)
return -1;
switch (code) {
case SND_BELL: if (value) value = 1000;
case SND_TONE: break;
default: return -1;
}
if (value > 20 && value < 32767)
count = 1193182 / value;
mach_beep(count, -1);
return 0;
}
static int __init m68kspkr_init(void)
{
if (!mach_beep){
printk("%s: no lowlevel beep support\n", m68kspkr_name);
return -1;
}
m68kspkr_dev.evbit[0] = BIT(EV_SND);
m68kspkr_dev.sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
m68kspkr_dev.event = m68kspkr_event;
m68kspkr_dev.name = m68kspkr_name;
m68kspkr_dev.phys = m68kspkr_phys;
m68kspkr_dev.id.bustype = BUS_HOST;
m68kspkr_dev.id.vendor = 0x001f;
m68kspkr_dev.id.product = 0x0001;
m68kspkr_dev.id.version = 0x0100;
input_register_device(&m68kspkr_dev);
printk(KERN_INFO "input: %s\n", m68kspkr_name);
return 0;
}
static void __exit m68kspkr_exit(void)
{
input_unregister_device(&m68kspkr_dev);
}
module_init(m68kspkr_init);
module_exit(m68kspkr_exit);
......@@ -4,17 +4,12 @@
#include <linux/seq_file.h>
struct pt_regs;
struct kbd_repeat;
struct mktime;
struct rtc_time;
struct rtc_pll_info;
struct buffer_head;
extern void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *));
/* machine dependent keyboard functions */
extern int (*mach_keyb_init) (void);
extern int (*mach_kbdrate) (struct kbd_repeat *);
extern void (*mach_kbd_leds) (unsigned int);
extern int (*mach_kbd_translate)(unsigned char scancode, unsigned char *keycode, char raw_mode);
/* machine dependent irq functions */
extern void (*mach_init_IRQ) (void);
extern void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *);
......@@ -28,6 +23,8 @@ extern void (*mach_process_int) (int irq, struct pt_regs *fp);
/* machine dependent timer functions */
extern unsigned long (*mach_gettimeoffset)(void);
extern int (*mach_hwclk)(int, struct rtc_time*);
extern int (*mach_get_rtc_pll)(struct rtc_pll_info *);
extern int (*mach_set_rtc_pll)(struct rtc_pll_info *);
extern int (*mach_set_clock_mmss)(unsigned long);
extern void (*mach_reset)( void );
extern void (*mach_halt)( void );
......@@ -38,9 +35,6 @@ extern long mach_max_dma_address;
extern void (*mach_floppy_setup)(char *, int *);
extern void (*mach_heartbeat) (int);
extern void (*mach_l2_flush) (int);
extern int mach_sysrq_key;
extern int mach_sysrq_shift_state;
extern int mach_sysrq_shift_mask;
extern char *mach_sysrq_xlate;
extern void (*mach_beep) (unsigned int, unsigned int);
#endif /* _M68K_MACHDEP_H */
/*
* linux/include/asm-m68k/q40_keyboard.h
*
* Q40 specific keyboard definitions
*/
#ifdef __KERNEL__
#include <asm/machdep.h>
extern int q40kbd_setkeycode(unsigned int scancode, unsigned int keycode);
extern int q40kbd_getkeycode(unsigned int scancode);
extern int q40kbd_pretranslate(unsigned char scancode, char raw_mode);
extern int q40kbd_translate(unsigned char scancode, unsigned char *keycode,
char raw_mode);
extern char q40kbd_unexpected_up(unsigned char keycode);
extern void q40kbd_leds(unsigned char leds);
extern int q40kbd_is_sysrq(unsigned char keycode);
extern int q40kbd_init_hw(void);
extern unsigned char q40kbd_sysrq_xlate[128];
#endif /* __KERNEL__ */
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