mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
tty and serial merge for 3.4-rc1
Here's the big serial and tty merge for the 3.4-rc1 tree. There's loads of fixes and reworks in here from Jiri for the tty layer, and a number of patches from Alan to help try to wrestle the vt layer into a sane model. Other than that, lots of driver updates and fixes, and other minor stuff, all detailed in the shortlog. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEABECAAYFAk9nihQACgkQMUfUDdst+ylXTQCdFuwVuZgjCts+xDVa1jX2ac84 UogAn3Wr+P7NYFN6gvaGm52KbGbZs405 =2b/l -----END PGP SIGNATURE----- Merge tag 'tty-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull TTY/serial patches from Greg KH: "tty and serial merge for 3.4-rc1 Here's the big serial and tty merge for the 3.4-rc1 tree. There's loads of fixes and reworks in here from Jiri for the tty layer, and a number of patches from Alan to help try to wrestle the vt layer into a sane model. Other than that, lots of driver updates and fixes, and other minor stuff, all detailed in the shortlog." * tag 'tty-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (132 commits) serial: pxa: add clk_prepare/clk_unprepare calls TTY: Wrong unicode value copied in con_set_unimap() serial: PL011: clear pending interrupts serial: bfin-uart: Don't access tty circular buffer in TX DMA interrupt after it is reset. vt: NULL dereference in vt_do_kdsk_ioctl() tty: serial: vt8500: fix annotations for probe/remove serial: remove back and forth conversions in serial_out_sync serial: use serial_port_in/out vs serial_in/out in 8250 serial: introduce generic port in/out helpers serial: reduce number of indirections in 8250 code serial: delete useless void casts in 8250.c serial: make 8250's serial_in shareable to other drivers. serial: delete last unused traces of pausing I/O in 8250 pch_uart: Add module parameter descriptions pch_uart: Use existing default_baud in setup_console pch_uart: Add user_uartclk parameter pch_uart: Add Fish River Island II uart clock quirks pch_uart: Use uartclk instead of base_baud mpc5200b/uart: select more tolerant uart prescaler on low baudrates tty: moxa: fix bit test in moxa_start() ...
This commit is contained in:
commit
843ec558f9
117 changed files with 3207 additions and 3139 deletions
|
|
@ -5,8 +5,6 @@
|
|||
#ifndef __ALTUART_H
|
||||
#define __ALTUART_H
|
||||
|
||||
#include <linux/init.h>
|
||||
|
||||
struct altera_uart_platform_uart {
|
||||
unsigned long mapbase; /* Physical address base */
|
||||
unsigned int irq; /* Interrupt vector */
|
||||
|
|
@ -14,6 +12,4 @@ struct altera_uart_platform_uart {
|
|||
unsigned int bus_shift; /* Bus shift (address stride) */
|
||||
};
|
||||
|
||||
int __init early_altera_uart_setup(struct altera_uart_platform_uart *platp);
|
||||
|
||||
#endif /* __ALTUART_H */
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
extern struct tasklet_struct keyboard_tasklet;
|
||||
|
||||
extern int shift_state;
|
||||
|
||||
extern char *func_table[MAX_NR_FUNC];
|
||||
extern char func_buf[];
|
||||
extern char *funcbufptr;
|
||||
|
|
@ -65,8 +63,6 @@ struct kbd_struct {
|
|||
#define VC_META 4 /* 0 - meta, 1 - meta=prefix with ESC */
|
||||
};
|
||||
|
||||
extern struct kbd_struct kbd_table[];
|
||||
|
||||
extern int kbd_init(void);
|
||||
|
||||
extern unsigned char getledstate(void);
|
||||
|
|
@ -79,6 +75,7 @@ extern void (*kbd_ledfunc)(unsigned int led);
|
|||
extern int set_console(int nr);
|
||||
extern void schedule_console_callback(void);
|
||||
|
||||
/* FIXME: review locking for vt.c callers */
|
||||
static inline void set_leds(void)
|
||||
{
|
||||
tasklet_schedule(&keyboard_tasklet);
|
||||
|
|
@ -142,8 +139,6 @@ static inline void chg_vc_kbd_led(struct kbd_struct * kbd, int flag)
|
|||
|
||||
struct console;
|
||||
|
||||
int getkeycode(unsigned int scancode);
|
||||
int setkeycode(unsigned int scancode, unsigned int keycode);
|
||||
void compute_shiftstate(void);
|
||||
|
||||
/* defkeymap.c */
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
#ifdef __KERNEL__
|
||||
struct notifier_block;
|
||||
extern const int NR_TYPES;
|
||||
extern const int max_vals[];
|
||||
extern unsigned short *key_maps[MAX_NR_KEYMAPS];
|
||||
extern unsigned short plain_map[NR_KEYS];
|
||||
|
||||
|
|
|
|||
18
include/linux/platform_data/efm32-uart.h
Normal file
18
include/linux/platform_data/efm32-uart.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
#ifndef __LINUX_PLATFORM_DATA_EFM32_UART_H__
|
||||
#define __LINUX_PLATFORM_DATA_EFM32_UART_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/**
|
||||
* struct efm32_uart_pdata
|
||||
* @location: pinmux location for the I/O pins (to be written to the ROUTE
|
||||
* register)
|
||||
*/
|
||||
struct efm32_uart_pdata {
|
||||
u8 location;
|
||||
};
|
||||
#endif /* ifndef __LINUX_PLATFORM_DATA_EFM32_UART_H__ */
|
||||
|
|
@ -152,8 +152,8 @@ struct serial_uart_config {
|
|||
#define ASYNC_AUTOPROBE (1U << ASYNCB_AUTOPROBE)
|
||||
|
||||
#define ASYNC_FLAGS ((1U << (ASYNCB_LAST_USER + 1)) - 1)
|
||||
#define ASYNC_USR_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI| \
|
||||
ASYNC_CALLOUT_NOHUP|ASYNC_SPD_SHI|ASYNC_LOW_LATENCY)
|
||||
#define ASYNC_USR_MASK (ASYNC_SPD_MASK|ASYNC_CALLOUT_NOHUP| \
|
||||
ASYNC_LOW_LATENCY)
|
||||
#define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI)
|
||||
#define ASYNC_SPD_WARP (ASYNC_SPD_HI|ASYNC_SPD_SHI)
|
||||
#define ASYNC_SPD_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI)
|
||||
|
|
|
|||
|
|
@ -1,142 +0,0 @@
|
|||
/*
|
||||
* Private header file for the (dumb) serial driver
|
||||
*
|
||||
* Copyright (C) 1997 by Theodore Ts'o.
|
||||
*
|
||||
* Redistribution of this file is permitted under the terms of the GNU
|
||||
* Public License (GPL)
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_SERIALP_H
|
||||
#define _LINUX_SERIALP_H
|
||||
|
||||
/*
|
||||
* This is our internal structure for each serial port's state.
|
||||
*
|
||||
* Many fields are paralleled by the structure used by the serial_struct
|
||||
* structure.
|
||||
*
|
||||
* For definitions of the flags field, see tty.h
|
||||
*/
|
||||
|
||||
#include <linux/termios.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/circ_buf.h>
|
||||
#include <linux/wait.h>
|
||||
|
||||
struct serial_state {
|
||||
int magic;
|
||||
int baud_base;
|
||||
unsigned long port;
|
||||
int irq;
|
||||
int flags;
|
||||
int hub6;
|
||||
int type;
|
||||
int line;
|
||||
int revision; /* Chip revision (950) */
|
||||
int xmit_fifo_size;
|
||||
int custom_divisor;
|
||||
int count;
|
||||
u8 *iomem_base;
|
||||
u16 iomem_reg_shift;
|
||||
unsigned short close_delay;
|
||||
unsigned short closing_wait; /* time to wait before closing */
|
||||
struct async_icount icount;
|
||||
int io_type;
|
||||
struct async_struct *info;
|
||||
struct pci_dev *dev;
|
||||
};
|
||||
|
||||
struct async_struct {
|
||||
int magic;
|
||||
unsigned long port;
|
||||
int hub6;
|
||||
int flags;
|
||||
int xmit_fifo_size;
|
||||
struct serial_state *state;
|
||||
struct tty_struct *tty;
|
||||
int read_status_mask;
|
||||
int ignore_status_mask;
|
||||
int timeout;
|
||||
int quot;
|
||||
int x_char; /* xon/xoff character */
|
||||
int close_delay;
|
||||
unsigned short closing_wait;
|
||||
unsigned short closing_wait2; /* obsolete */
|
||||
int IER; /* Interrupt Enable Register */
|
||||
int MCR; /* Modem control register */
|
||||
int LCR; /* Line control register */
|
||||
int ACR; /* 16950 Additional Control Reg. */
|
||||
unsigned long event;
|
||||
unsigned long last_active;
|
||||
int line;
|
||||
int blocked_open; /* # of blocked opens */
|
||||
struct circ_buf xmit;
|
||||
spinlock_t xmit_lock;
|
||||
u8 *iomem_base;
|
||||
u16 iomem_reg_shift;
|
||||
int io_type;
|
||||
struct work_struct work;
|
||||
struct tasklet_struct tlet;
|
||||
#ifdef DECLARE_WAITQUEUE
|
||||
wait_queue_head_t open_wait;
|
||||
wait_queue_head_t close_wait;
|
||||
wait_queue_head_t delta_msr_wait;
|
||||
#else
|
||||
struct wait_queue *open_wait;
|
||||
struct wait_queue *close_wait;
|
||||
struct wait_queue *delta_msr_wait;
|
||||
#endif
|
||||
struct async_struct *next_port; /* For the linked list */
|
||||
struct async_struct *prev_port;
|
||||
};
|
||||
|
||||
#define CONFIGURED_SERIAL_PORT(info) ((info)->port || ((info)->iomem_base))
|
||||
|
||||
#define SERIAL_MAGIC 0x5301
|
||||
#define SSTATE_MAGIC 0x5302
|
||||
|
||||
/*
|
||||
* Events are used to schedule things to happen at timer-interrupt
|
||||
* time, instead of at rs interrupt time.
|
||||
*/
|
||||
#define RS_EVENT_WRITE_WAKEUP 0
|
||||
|
||||
/*
|
||||
* Multiport serial configuration structure --- internal structure
|
||||
*/
|
||||
struct rs_multiport_struct {
|
||||
int port1;
|
||||
unsigned char mask1, match1;
|
||||
int port2;
|
||||
unsigned char mask2, match2;
|
||||
int port3;
|
||||
unsigned char mask3, match3;
|
||||
int port4;
|
||||
unsigned char mask4, match4;
|
||||
int port_monitor;
|
||||
};
|
||||
|
||||
#if defined(__alpha__) && !defined(CONFIG_PCI)
|
||||
/*
|
||||
* Digital did something really horribly wrong with the OUT1 and OUT2
|
||||
* lines on at least some ALPHA's. The failure mode is that if either
|
||||
* is cleared, the machine locks up with endless interrupts.
|
||||
*
|
||||
* This is still used by arch/mips/au1000/common/serial.c for some weird
|
||||
* reason (mips != alpha!)
|
||||
*/
|
||||
#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2 | UART_MCR_OUT1)
|
||||
#elif defined(CONFIG_SBC8560)
|
||||
/*
|
||||
* WindRiver did something similarly broken on their SBC8560 board. The
|
||||
* UART tristates its IRQ output while OUT2 is clear, but they pulled
|
||||
* the interrupt line _up_ instead of down, so if we register the IRQ
|
||||
* while the UART is in that state, we die in an IRQ storm. */
|
||||
#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2)
|
||||
#else
|
||||
#define ALPHA_KLUDGE_MCR 0
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_SERIAL_H */
|
||||
|
|
@ -210,6 +210,8 @@
|
|||
/* Atheros AR933X SoC */
|
||||
#define PORT_AR933X 99
|
||||
|
||||
/* Energy Micro efm32 SoC */
|
||||
#define PORT_EFMUART 100
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
|
|
@ -381,6 +383,16 @@ struct uart_port {
|
|||
void *private_data; /* generic platform data pointer */
|
||||
};
|
||||
|
||||
static inline int serial_port_in(struct uart_port *up, int offset)
|
||||
{
|
||||
return up->serial_in(up, offset);
|
||||
}
|
||||
|
||||
static inline void serial_port_out(struct uart_port *up, int offset, int value)
|
||||
{
|
||||
up->serial_out(up, offset, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the state information which is persistent across opens.
|
||||
*/
|
||||
|
|
|
|||
33
include/linux/sunserialcore.h
Normal file
33
include/linux/sunserialcore.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/* sunserialcore.h
|
||||
*
|
||||
* Generic SUN serial/kbd/ms layer. Based entirely
|
||||
* upon drivers/sbus/char/sunserial.h which is:
|
||||
*
|
||||
* Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
|
||||
*
|
||||
* Port to new UART layer is:
|
||||
*
|
||||
* Copyright (C) 2002 David S. Miller (davem@redhat.com)
|
||||
*/
|
||||
|
||||
#ifndef _SERIAL_SUN_H
|
||||
#define _SERIAL_SUN_H
|
||||
|
||||
/* Serial keyboard defines for L1-A processing... */
|
||||
#define SUNKBD_RESET 0xff
|
||||
#define SUNKBD_L1 0x01
|
||||
#define SUNKBD_UP 0x80
|
||||
#define SUNKBD_A 0x4d
|
||||
|
||||
extern unsigned int suncore_mouse_baud_cflag_next(unsigned int, int *);
|
||||
extern int suncore_mouse_baud_detection(unsigned char, int);
|
||||
|
||||
extern int sunserial_register_minors(struct uart_driver *, int);
|
||||
extern void sunserial_unregister_minors(struct uart_driver *, int);
|
||||
|
||||
extern int sunserial_console_match(struct console *, struct device_node *,
|
||||
struct uart_driver *, int, bool);
|
||||
extern void sunserial_console_termios(struct console *,
|
||||
struct device_node *);
|
||||
|
||||
#endif /* !(_SERIAL_SUN_H) */
|
||||
|
|
@ -52,6 +52,7 @@
|
|||
* hardcoded at present.)
|
||||
*/
|
||||
#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */
|
||||
#define NR_UNIX98_PTY_RESERVE 1024 /* Default reserve for main devpts */
|
||||
#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */
|
||||
|
||||
/*
|
||||
|
|
@ -480,10 +481,11 @@ extern void free_tty_struct(struct tty_struct *tty);
|
|||
extern void initialize_tty_struct(struct tty_struct *tty,
|
||||
struct tty_driver *driver, int idx);
|
||||
extern void deinitialize_tty_struct(struct tty_struct *tty);
|
||||
extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx,
|
||||
int first_ok);
|
||||
extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx);
|
||||
extern int tty_release(struct inode *inode, struct file *filp);
|
||||
extern int tty_init_termios(struct tty_struct *tty);
|
||||
extern int tty_standard_install(struct tty_driver *driver,
|
||||
struct tty_struct *tty);
|
||||
|
||||
extern struct tty_struct *tty_pair_get_tty(struct tty_struct *tty);
|
||||
extern struct tty_struct *tty_pair_get_pty(struct tty_struct *tty);
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@
|
|||
* Note that tty_shutdown() is not called if ops->shutdown is defined.
|
||||
* This means one is responsible to take care of calling ops->remove (e.g.
|
||||
* via tty_driver_remove_tty) and releasing tty->termios.
|
||||
* Note that this hook may be called from *all* the contexts where one
|
||||
* uses tty refcounting (e.g. tty_port_tty_get).
|
||||
*
|
||||
*
|
||||
* void (*cleanup)(struct tty_struct * tty);
|
||||
|
|
@ -234,6 +236,7 @@
|
|||
* if provided (otherwise EINVAL will be returned).
|
||||
*/
|
||||
|
||||
#include <linux/export.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/cdev.h>
|
||||
|
|
@ -298,7 +301,6 @@ struct tty_driver {
|
|||
int name_base; /* offset of printed name */
|
||||
int major; /* major device number */
|
||||
int minor_start; /* start of minor device number */
|
||||
int minor_num; /* number of *possible* devices */
|
||||
int num; /* number of devices allocated */
|
||||
short type; /* type of tty driver */
|
||||
short subtype; /* subtype of tty driver */
|
||||
|
|
@ -324,7 +326,7 @@ struct tty_driver {
|
|||
|
||||
extern struct list_head tty_drivers;
|
||||
|
||||
extern struct tty_driver *alloc_tty_driver(int lines);
|
||||
extern struct tty_driver *__alloc_tty_driver(int lines, struct module *owner);
|
||||
extern void put_tty_driver(struct tty_driver *driver);
|
||||
extern void tty_set_operations(struct tty_driver *driver,
|
||||
const struct tty_operations *op);
|
||||
|
|
@ -332,6 +334,8 @@ extern struct tty_driver *tty_find_polling_driver(char *name, int *line);
|
|||
|
||||
extern void tty_driver_kref_put(struct tty_driver *driver);
|
||||
|
||||
#define alloc_tty_driver(lines) __alloc_tty_driver(lines, THIS_MODULE)
|
||||
|
||||
static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
|
||||
{
|
||||
kref_get(&d->kref);
|
||||
|
|
|
|||
|
|
@ -167,4 +167,30 @@ extern int unregister_vt_notifier(struct notifier_block *nb);
|
|||
|
||||
extern void hide_boot_cursor(bool hide);
|
||||
|
||||
/* keyboard provided interfaces */
|
||||
extern int vt_do_diacrit(unsigned int cmd, void __user *up, int eperm);
|
||||
extern int vt_do_kdskbmode(int console, unsigned int arg);
|
||||
extern int vt_do_kdskbmeta(int console, unsigned int arg);
|
||||
extern int vt_do_kbkeycode_ioctl(int cmd, struct kbkeycode __user *user_kbkc,
|
||||
int perm);
|
||||
extern int vt_do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe,
|
||||
int perm, int console);
|
||||
extern int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb,
|
||||
int perm);
|
||||
extern int vt_do_kdskled(int console, int cmd, unsigned long arg, int perm);
|
||||
extern int vt_do_kdgkbmode(int console);
|
||||
extern int vt_do_kdgkbmeta(int console);
|
||||
extern void vt_reset_unicode(int console);
|
||||
extern int vt_get_shift_state(void);
|
||||
extern void vt_reset_keyboard(int console);
|
||||
extern int vt_get_leds(int console, int flag);
|
||||
extern int vt_get_kbd_mode_bit(int console, int bit);
|
||||
extern void vt_set_kbd_mode_bit(int console, int bit);
|
||||
extern void vt_clr_kbd_mode_bit(int console, int bit);
|
||||
extern void vt_set_led_state(int console, int leds);
|
||||
extern void vt_set_led_state(int console, int leds);
|
||||
extern void vt_kbd_con_start(int console);
|
||||
extern void vt_kbd_con_stop(int console);
|
||||
|
||||
|
||||
#endif /* _VT_KERN_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue