Skip to content

Commit

Permalink
Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/gregkh/tty

* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (65 commits)
  tty: serial: imx: move del_timer_sync() to avoid potential deadlock
  imx: add polled io uart methods
  imx: Add save/restore functions for UART control regs
  serial/imx: let probing fail for the dt case without a valid alias
  serial/imx: propagate error from of_alias_get_id instead of using -ENODEV
  tty: serial: imx: Allow UART to be a source for wakeup
  serial: driver for m32 arch should not have DEC alpha errata
  serial/documentation: fix documented name of DCD cpp symbol
  atmel_serial: fix spinlock lockup in RS485 code
  tty: Fix memory leak in virtual console when enable unicode translation
  serial: use DIV_ROUND_CLOSEST instead of open coding it
  serial: add support for 400 and 800 v3 series Titan cards
  serial: bfin-uart: Remove ASYNC_CTS_FLOW flag for hardware automatic CTS.
  serial: bfin-uart: Enable hardware automatic CTS only when CTS pin is available.
  serial: make FSL errata depend on 8250_CONSOLE, not just 8250
  serial: add irq handler for Freescale 16550 errata.
  serial: manually inline serial8250_handle_port
  serial: make 8250 timeout use the specified IRQ handler
  serial: export the key functions for an 8250 IRQ handler
  serial: clean up parameter passing for 8250 Rx IRQ handling
  ...
  • Loading branch information
torvalds committed Jan 9, 2012
2 parents 21a2cb5 + 995234d commit 5983faf
Show file tree
Hide file tree
Showing 45 changed files with 1,989 additions and 658 deletions.
2 changes: 1 addition & 1 deletion Documentation/serial/driver
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ hardware.
Returns the current state of modem control inputs. The state
of the outputs should not be returned, since the core keeps
track of their state. The state information should include:
- TIOCM_DCD state of DCD signal
- TIOCM_CAR state of DCD signal
- TIOCM_CTS state of CTS signal
- TIOCM_DSR state of DSR signal
- TIOCM_RI state of RI signal
Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/legacy_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,9 @@ static void __init fixup_port_irq(int index,
return;

port->irq = virq;

if (of_device_is_compatible(np, "fsl,ns16550"))
port->handle_irq = fsl8250_handle_irq;
}

static void __init fixup_port_pio(int index,
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/include/asm/mrst.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ extern struct console early_mrst_console;
extern void mrst_early_console_init(void);

extern struct console early_hsu_console;
extern void hsu_early_console_init(void);
extern void hsu_early_console_init(const char *);

extern void intel_scu_devices_create(void);
extern void intel_scu_devices_destroy(void);
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static int __init setup_early_printk(char *buf)
}

if (!strncmp(buf, "hsu", 3)) {
hsu_early_console_init();
hsu_early_console_init(buf + 3);
early_console_register(&early_hsu_console, keep);
}
#endif
Expand Down
16 changes: 12 additions & 4 deletions arch/x86/platform/mrst/early_printk_mrst.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,24 @@ struct console early_mrst_console = {
* Following is the early console based on Medfield HSU (High
* Speed UART) device.
*/
#define HSU_PORT2_PADDR 0xffa28180
#define HSU_PORT_BASE 0xffa28080

static void __iomem *phsu;

void hsu_early_console_init(void)
void hsu_early_console_init(const char *s)
{
unsigned long paddr, port = 0;
u8 lcr;

phsu = (void *)set_fixmap_offset_nocache(FIX_EARLYCON_MEM_BASE,
HSU_PORT2_PADDR);
/*
* Select the early HSU console port if specified by user in the
* kernel command line.
*/
if (*s && !kstrtoul(s, 10, &port))
port = clamp_val(port, 0, 2);

paddr = HSU_PORT_BASE + port * 0x80;
phsu = (void *)set_fixmap_offset_nocache(FIX_EARLYCON_MEM_BASE, paddr);

/* Disable FIFO */
writeb(0x0, phsu + UART_FCR);
Expand Down
13 changes: 1 addition & 12 deletions drivers/parport/parport_ax88796.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,18 +420,7 @@ static struct platform_driver axdrv = {
.resume = parport_ax88796_resume,
};

static int __init parport_ax88796_init(void)
{
return platform_driver_register(&axdrv);
}

static void __exit parport_ax88796_exit(void)
{
platform_driver_unregister(&axdrv);
}

module_init(parport_ax88796_init)
module_exit(parport_ax88796_exit)
module_platform_driver(axdrv);

MODULE_AUTHOR("Ben Dooks <[email protected]>");
MODULE_DESCRIPTION("AX88796 Parport parallel port driver");
Expand Down
13 changes: 1 addition & 12 deletions drivers/parport/parport_sunbpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,21 +391,10 @@ static struct platform_driver bpp_sbus_driver = {
.remove = __devexit_p(bpp_remove),
};

static int __init parport_sunbpp_init(void)
{
return platform_driver_register(&bpp_sbus_driver);
}

static void __exit parport_sunbpp_exit(void)
{
platform_driver_unregister(&bpp_sbus_driver);
}
module_platform_driver(bpp_sbus_driver);

MODULE_AUTHOR("Derrick J Brashear");
MODULE_DESCRIPTION("Parport Driver for Sparc bidirectional Port");
MODULE_SUPPORTED_DEVICE("Sparc Bidirectional Parallel Port");
MODULE_VERSION("2.0");
MODULE_LICENSE("GPL");

module_init(parport_sunbpp_init)
module_exit(parport_sunbpp_exit)
6 changes: 3 additions & 3 deletions drivers/tty/n_hdlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
__FILE__,__LINE__,tbuf,tbuf->count);

/* Send the next block of data to device */
tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
actual = tty->ops->write(tty, tbuf->buf, tbuf->count);

/* rollback was possible and has been done */
Expand Down Expand Up @@ -459,7 +459,7 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
}

if (!tbuf)
tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);

/* Clear the re-entry flag */
spin_lock_irqsave(&n_hdlc->tx_buf_list.spinlock, flags);
Expand Down Expand Up @@ -491,7 +491,7 @@ static void n_hdlc_tty_wakeup(struct tty_struct *tty)
return;

if (tty != n_hdlc->tty) {
tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
return;
}

Expand Down
8 changes: 4 additions & 4 deletions drivers/tty/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* controlling the space in the read buffer.
*/
#define TTY_THRESHOLD_THROTTLE 128 /* now based on remaining room */
#define TTY_THRESHOLD_UNTHROTTLE 128
#define TTY_THRESHOLD_UNTHROTTLE 128

/*
* Special byte codes used in the echo buffer to represent operations
Expand Down Expand Up @@ -405,7 +405,7 @@ static ssize_t process_output_block(struct tty_struct *tty,
const unsigned char *buf, unsigned int nr)
{
int space;
int i;
int i;
const unsigned char *cp;

mutex_lock(&tty->output_lock);
Expand Down Expand Up @@ -1607,7 +1607,7 @@ static inline int input_available_p(struct tty_struct *tty, int amt)
}

/**
* copy_from_read_buf - copy read data directly
* copy_from_read_buf - copy read data directly
* @tty: terminal device
* @b: user data
* @nr: size of data
Expand Down Expand Up @@ -1909,7 +1909,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
if (nr)
clear_bit(TTY_PUSH, &tty->flags);
} else if (test_and_clear_bit(TTY_PUSH, &tty->flags))
goto do_it_again;
goto do_it_again;

n_tty_set_room(tty);
return retval;
Expand Down
26 changes: 9 additions & 17 deletions drivers/tty/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,19 +446,8 @@ static inline void legacy_pty_init(void) { }
int pty_limit = NR_UNIX98_PTY_DEFAULT;
static int pty_limit_min;
static int pty_limit_max = NR_UNIX98_PTY_MAX;
static int tty_count;
static int pty_count;

static inline void pty_inc_count(void)
{
pty_count = (++tty_count) / 2;
}

static inline void pty_dec_count(void)
{
pty_count = (--tty_count) / 2;
}

static struct cdev ptmx_cdev;

static struct ctl_table pty_table[] = {
Expand Down Expand Up @@ -600,8 +589,7 @@ static int pty_unix98_install(struct tty_driver *driver, struct tty_struct *tty)
*/
tty_driver_kref_get(driver);
tty->count++;
pty_inc_count(); /* tty */
pty_inc_count(); /* tty->link */
pty_count++;
return 0;
err_free_mem:
deinitialize_tty_struct(o_tty);
Expand All @@ -613,15 +601,19 @@ static int pty_unix98_install(struct tty_driver *driver, struct tty_struct *tty)
return -ENOMEM;
}

static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty)
static void ptm_unix98_remove(struct tty_driver *driver, struct tty_struct *tty)
{
pty_count--;
}

static void pts_unix98_remove(struct tty_driver *driver, struct tty_struct *tty)
{
pty_dec_count();
}

static const struct tty_operations ptm_unix98_ops = {
.lookup = ptm_unix98_lookup,
.install = pty_unix98_install,
.remove = pty_unix98_remove,
.remove = ptm_unix98_remove,
.open = pty_open,
.close = pty_close,
.write = pty_write,
Expand All @@ -638,7 +630,7 @@ static const struct tty_operations ptm_unix98_ops = {
static const struct tty_operations pty_unix98_ops = {
.lookup = pts_unix98_lookup,
.install = pty_unix98_install,
.remove = pty_unix98_remove,
.remove = pts_unix98_remove,
.open = pty_open,
.close = pty_close,
.write = pty_write,
Expand Down
Loading

0 comments on commit 5983faf

Please sign in to comment.