From: James S. <jsi...@us...> - 2001-10-19 21:19:43
|
Update of /cvsroot/linux-mips/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv13849/drivers/char Modified Files: Config.in Makefile au1000_gpio.c au1000_ts.c dz.c ite_gpio.c keyboard.c mem.c serial.c Removed Files: qtronix.c rtc.c tty_io.c vt.c Log Message: Synced to 2.4.10. Index: Config.in =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/Config.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Config.in 2001/10/12 17:49:17 1.9 +++ Config.in 2001/10/19 21:19:38 1.10 @@ -201,7 +201,7 @@ bool ' Intel 440LX/BX/GX and I815/I840/I850 support' CONFIG_AGP_INTEL bool ' Intel I810/I815 (on-board) support' CONFIG_AGP_I810 bool ' VIA chipset support' CONFIG_AGP_VIA - bool ' AMD Irongate support' CONFIG_AGP_AMD + bool ' AMD Irongate, 761, and 762 support' CONFIG_AGP_AMD bool ' Generic SiS support' CONFIG_AGP_SIS bool ' ALI chipset support' CONFIG_AGP_ALI bool ' Serverworks LE/HE support' CONFIG_AGP_SWORKS Index: Makefile =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile 2001/10/10 21:56:15 1.10 +++ Makefile 2001/10/19 21:19:38 1.11 @@ -54,20 +54,6 @@ SERIAL = endif -ifeq ($(ARCH),s390) - KEYMAP = - KEYBD = - CONSOLE = - SERIAL = -endif - -ifeq ($(ARCH),s390x) - KEYMAP = - KEYBD = - CONSOLE = - SERIAL = -endif - ifeq ($(ARCH),m68k) ifdef CONFIG_AMIGA KEYBD = amikeyb.o @@ -265,10 +251,10 @@ consolemap_deftbl.o: consolemap_deftbl.c $(TOPDIR)/include/linux/types.h +.DELETE_ON_ERROR: + defkeymap.c: defkeymap.map - loadkeys --mktable defkeymap.map > defkeymap.c + set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@ -ifeq ($(CONFIG_QTRONIX_KEYBOARD),y) qtronixmap.c: qtronixmap.map - loadkeys --mktable qtronixmap.map > qtronixmap.c -endif + set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@ Index: au1000_gpio.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/au1000_gpio.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- au1000_gpio.c 2001/10/10 21:56:15 1.1 +++ au1000_gpio.c 2001/10/19 21:19:38 1.2 @@ -35,11 +35,11 @@ #include <linux/types.h> #include <linux/kernel.h> #include <linux/miscdevice.h> -#include <linux/au1000_gpio.h> #include <linux/init.h> #include <asm/uaccess.h> #include <asm/io.h> #include <asm/au1000.h> +#include <asm/au1000_gpio.h> #define VERSION "0.01" @@ -195,29 +195,29 @@ case AU1000GPIO_OUT: - if (get_user(val, (u32 *)arg)) - return -EFAULT; + if (get_user(val, (u32 *)arg)) + return -EFAULT; return au1000gpio_out(val); case AU1000GPIO_SET: - if (get_user(val, (u32 *)arg)) - return -EFAULT; + if (get_user(val, (u32 *)arg)) + return -EFAULT; return au1000gpio_set(val); case AU1000GPIO_CLEAR: - if (get_user(val, (u32 *)arg)) - return -EFAULT; + if (get_user(val, (u32 *)arg)) + return -EFAULT; return au1000gpio_clear(val); case AU1000GPIO_TRISTATE: - if (get_user(val, (u32 *)arg)) - return -EFAULT; + if (get_user(val, (u32 *)arg)) + return -EFAULT; return au1000gpio_tristate(val); Index: au1000_ts.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/au1000_ts.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- au1000_ts.c 2001/10/10 21:56:15 1.1 +++ au1000_ts.c 2001/10/19 21:19:38 1.2 @@ -171,11 +171,11 @@ } TS_EVENT; typedef struct { - int xscale; - int xtrans; - int yscale; - int ytrans; - int xyswap; + int xscale; + int xtrans; + int yscale; + int ytrans; + int xyswap; } TS_CAL; /* Use 'f' as magic number */ @@ -313,7 +313,7 @@ ts->pendown = 1; else if (ts->pendown && Rt < ts->penup_thresh_ohms) ts->pendown = 0; - + if (ts->pendown) { // Pen is down // Calculate calibrated X,Y @@ -358,8 +358,8 @@ { au1000_ts_t* ts = (au1000_ts_t*)data; unsigned long flags; - - spin_lock_irqsave(&ts->lock, flags); + + spin_lock_irqsave(&ts->lock, flags); // start acquisition with X coordinate ts->acq_state = ACQ_X; @@ -378,7 +378,7 @@ { au1000_ts_t *ts = (au1000_ts_t*)dev_id; u32 stat, int_stat, data; - + spin_lock(&ts->lock); stat = inl(SSI0_STATUS); @@ -388,7 +388,7 @@ int_stat = inl(SSI0_INT); // clear sticky intr status bits outl(int_stat & (SSIINT_OI|SSIINT_UI|SSIINT_DI), SSI0_INT); - + if ((int_stat & (SSIINT_OI|SSIINT_UI|SSIINT_DI)) != SSIINT_DI) { if (int_stat & SSIINT_OI) err("overflow"); @@ -397,7 +397,7 @@ spin_unlock(&ts->lock); return; } - + data = inl(SSI0_ADATA) & SSIADAT_DATA_MASK; switch (ts->acq_state) { @@ -436,8 +436,8 @@ ts->z2_raw = data; ts->acq_state = IDLE; // got the raw stuff, now mark BH - queue_task(&ts->chug_tq, &tq_immediate); - mark_bh(IMMEDIATE_BH); + queue_task(&ts->chug_tq, &tq_immediate); + mark_bh(IMMEDIATE_BH); break; } @@ -451,7 +451,7 @@ au1000_fasync(int fd, struct file *filp, int mode) { au1000_ts_t* ts = (au1000_ts_t*)filp->private_data; - return fasync_helper(fd, filp, mode, &ts->fasync); + return fasync_helper(fd, filp, mode, &ts->fasync); } static int @@ -460,21 +460,21 @@ { au1000_ts_t* ts = (au1000_ts_t*)filp->private_data; - switch(cmd) { - case TS_GET_RATE: /* TODO: what is this? */ - break; - case TS_SET_RATE: /* TODO: what is this? */ - break; - case TS_GET_CAL: - copy_to_user((char *)arg, (char *)&ts->cal, sizeof(TS_CAL)); - break; - case TS_SET_CAL: - copy_from_user((char *)&ts->cal, (char *)arg, sizeof(TS_CAL)); - break; - default: - err("unknown cmd %04x", cmd); - return -EINVAL; - } + switch(cmd) { + case TS_GET_RATE: /* TODO: what is this? */ + break; + case TS_SET_RATE: /* TODO: what is this? */ + break; + case TS_GET_CAL: + copy_to_user((char *)arg, (char *)&ts->cal, sizeof(TS_CAL)); + break; + case TS_SET_CAL: + copy_from_user((char *)&ts->cal, (char *)arg, sizeof(TS_CAL)); + break; + default: + err("unknown cmd %04x", cmd); + return -EINVAL; + } return 0; } @@ -483,10 +483,10 @@ au1000_poll(struct file * filp, poll_table * wait) { au1000_ts_t* ts = (au1000_ts_t*)filp->private_data; - poll_wait(filp, &ts->wait, wait); - if (ts->event_count) - return POLLIN | POLLRDNORM; - return 0; + poll_wait(filp, &ts->wait, wait); + if (ts->event_count) + return POLLIN | POLLRDNORM; + return 0; } static ssize_t @@ -496,15 +496,15 @@ unsigned long flags; TS_EVENT event; int i; - + if (ts->event_count == 0) { if (filp->f_flags & O_NONBLOCK) return -EAGAIN; - interruptible_sleep_on(&ts->wait); - if (signal_pending(current)) + interruptible_sleep_on(&ts->wait); + if (signal_pending(current)) return -ERESTARTSYS; } - + for (i = count; i >= sizeof(TS_EVENT); i -= sizeof(TS_EVENT), buf += sizeof(TS_EVENT)) { @@ -522,14 +522,14 @@ return count - i; } - - + + static int au1000_open(struct inode * inode, struct file * filp) { au1000_ts_t* ts; unsigned long flags; - + filp->private_data = ts = &au1000_ts; spin_lock_irqsave(&ts->lock, flags); @@ -574,7 +574,7 @@ au1000_ts_t* ts = (au1000_ts_t*)filp->private_data; unsigned long flags; - au1000_fasync(-1, filp, 0); + au1000_fasync(-1, filp, 0); del_timer_sync(&ts->acq_timer); spin_lock_irqsave(&ts->lock, flags); @@ -582,16 +582,16 @@ outl(0, SSI0_INT_ENABLE); spin_unlock_irqrestore(&ts->lock, flags); - MOD_DEC_USE_COUNT; - return 0; + MOD_DEC_USE_COUNT; + return 0; } static struct file_operations ts_fops = { read: au1000_read, - poll: au1000_poll, + poll: au1000_poll, ioctl: au1000_ioctl, - fasync: au1000_fasync, + fasync: au1000_fasync, open: au1000_open, release: au1000_release, }; @@ -605,35 +605,33 @@ au1000_ts_t* ts = &au1000_ts; int ret; - /* register our character device */ - if ((ret = register_chrdev(TS_MAJOR, TS_NAME, &ts_fops)) < 0) { - err("can't get major number"); - return ret; - } + /* register our character device */ + if ((ret = register_chrdev(TS_MAJOR, TS_NAME, &ts_fops)) < 0) { + err("can't get major number"); + return ret; + } info("registered"); memset(ts, 0, sizeof(au1000_ts_t)); init_waitqueue_head(&ts->wait); spin_lock_init(&ts->lock); - if (!request_region(virt_to_phys((void*)SSI0_STATUS), - 0x100, TS_NAME)) { + if (!request_region(virt_to_phys((void*)SSI0_STATUS), 0x100, TS_NAME)) { err("SSI0 ports in use"); return -ENXIO; } - - if ((ret = request_irq(AU1000_SSI0_INT, ssi0_interrupt, - SA_SHIRQ | SA_INTERRUPT, - TS_NAME, ts))) { - err("could not get IRQ"); - return ret; - } - + + if ((ret = request_irq(AU1000_SSI0_INT, ssi0_interrupt, + SA_SHIRQ | SA_INTERRUPT, TS_NAME, ts))) { + err("could not get IRQ"); + return ret; + } + // initial calibration values - ts->cal.xscale = -93; - ts->cal.xtrans = 346; - ts->cal.yscale = -64; - ts->cal.ytrans = 251; + ts->cal.xscale = -93; + ts->cal.xtrans = 346; + ts->cal.yscale = -64; + ts->cal.ytrans = 251; // init pen up/down hysteresis points ts->pendown_thresh_ohms = DEFAULT_PENDOWN_THRESH_OHMS; Index: dz.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/dz.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- dz.c 2001/09/06 16:55:35 1.5 +++ dz.c 2001/10/19 21:19:38 1.6 @@ -1614,3 +1614,5 @@ } #endif /* CONFIG_SERIAL_CONSOLE */ + +MODULE_LICENSE("GPL"); Index: ite_gpio.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/ite_gpio.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- ite_gpio.c 2001/06/22 02:29:32 1.1.1.1 +++ ite_gpio.c 2001/10/19 21:19:38 1.2 @@ -426,3 +426,5 @@ module_init(ite_gpio_init); module_exit(ite_gpio_exit); + +MODULE_LICENSE("GPL"); Index: keyboard.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/keyboard.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- keyboard.c 2001/06/22 02:29:32 1.1.1.1 +++ keyboard.c 2001/10/19 21:19:38 1.2 @@ -205,15 +205,12 @@ char raw_mode; pm_access(pm_kbd); - - do_poke_blanked_console = 1; - tasklet_schedule(&console_tasklet); add_keyboard_randomness(scancode | up_flag); tty = ttytab? ttytab[fg_console]: NULL; if (tty && (!tty->driver_data)) { /* - * We touch the tty structure via the the ttytab array + * We touch the tty structure via the ttytab array * without knowing whether or not tty is open, which * is inherently dangerous. We currently rely on that * fact that console_open sets tty->driver_data when @@ -233,7 +230,7 @@ * Convert scancode to keycode */ if (!kbd_translate(scancode, &keycode, raw_mode)) - return; + goto out; /* * At this point the variable `keycode' contains the keycode. @@ -252,11 +249,11 @@ #ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */ if (keycode == SYSRQ_KEY) { sysrq_pressed = !up_flag; - return; + goto out; } else if (sysrq_pressed) { if (!up_flag) { handle_sysrq(kbd_sysrq_xlate[keycode], kbd_pt_regs, kbd, tty); - return; + goto out; } } #endif @@ -298,7 +295,7 @@ if (type >= 0xf0) { type -= 0xf0; if (raw_mode && ! (TYPES_ALLOWED_IN_RAW_MODE & (1 << type))) - return; + goto out; if (type == KT_LETTER) { type = KT_LATIN; if (vc_kbd_led(kbd, VC_CAPSLOCK)) { @@ -322,13 +319,16 @@ compute_shiftstate(); kbd->slockstate = 0; /* play it safe */ #else - keysym = U(plain_map[keycode]); + keysym = U(plain_map[keycode]); type = KTYP(keysym); if (type == KT_SHIFT) (*key_handler[type])(keysym & 0xff, up_flag); #endif } } +out: + do_poke_blanked_console = 1; + schedule_console_callback(); } #ifdef CONFIG_FORWARD_KEYBOARD @@ -927,6 +927,10 @@ EXPORT_SYMBOL(keyboard_tasklet); DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0); +typedef void (pm_kbd_func) (void); + +pm_callback pm_kbd_request_override = NULL; + int __init kbd_init(void) { int i; @@ -950,7 +954,7 @@ tasklet_enable(&keyboard_tasklet); tasklet_schedule(&keyboard_tasklet); - pm_kbd = pm_register(PM_SYS_DEV, PM_SYS_KBC, NULL); + pm_kbd = pm_register(PM_SYS_DEV, PM_SYS_KBC, pm_kbd_request_override); return 0; } Index: mem.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/mem.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mem.c 2001/09/06 16:53:06 1.4 +++ mem.c 2001/10/19 21:19:38 1.5 @@ -41,9 +41,6 @@ #if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_CHAR) extern void tapechar_init(void); #endif -#if defined(CONFIG_ADB) -extern void adbdev_init(void); -#endif static ssize_t do_write_mem(struct file * file, void *p, unsigned long realp, const char * buf, size_t count, loff_t *ppos) @@ -134,7 +131,7 @@ { unsigned long prot = pgprot_val(_prot); -#if defined(__i386__) +#if defined(__i386__) || defined(__x86_64__) /* On PPro and successors, PCD alone doesn't always mean uncached because of interactions with the MTRRs. PCD | PWT means definitely uncached. */ @@ -640,9 +637,6 @@ #endif #if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_CHAR) tapechar_init(); -#endif -#if defined(CONFIG_ADB) - adbdev_init(); #endif return 0; } Index: serial.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/serial.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- serial.c 2001/09/25 03:36:35 1.5 +++ serial.c 2001/10/19 21:19:38 1.6 @@ -1789,11 +1789,13 @@ if (I_IGNPAR(info->tty)) info->ignore_status_mask |= UART_LSR_OE; } +#if 0 /* breaks serial console during boot stage */ /* * !!! ignore all characters if CREAD is not set */ if ((cflag & CREAD) == 0) info->ignore_status_mask |= UART_LSR_DR; +#endif save_flags(flags); cli(); if (uart_config[info->state->type].flags & UART_STARTECH) { serial_outp(info, UART_LCR, 0xBF); @@ -3911,7 +3913,7 @@ case 6: /* BAR 4*/ case 7: base_idx=idx-2; /* BAR 5*/ } - + /* Some Titan cards are also a little weird */ if (dev->vendor == PCI_VENDOR_ID_TITAN && (dev->device == PCI_DEVICE_ID_TITAN_400L || @@ -5744,6 +5746,7 @@ module_exit(rs_fini); MODULE_DESCRIPTION("Standard/generic (dumb) serial driver"); MODULE_AUTHOR("Theodore Ts'o <ty...@mi...>"); +MODULE_LICENSE("GPL"); /* @@ -5787,7 +5790,7 @@ * Print a string to the serial port trying not to disturb * any possible real use of the port... * - * The console_lock must be held when we get here. + * The console must be locked when we get here. */ static void serial_console_write(struct console *co, const char *s, unsigned count) --- qtronix.c DELETED --- --- rtc.c DELETED --- --- tty_io.c DELETED --- --- vt.c DELETED --- |