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 into for-next

Conflicts:
	arch/arm64/kernel/early_printk.c
  • Loading branch information
Rob Herring committed May 20, 2014
2 parents eafd370 + e26f1db commit 6e87b70
Show file tree
Hide file tree
Showing 31 changed files with 3,193 additions and 993 deletions.
33 changes: 33 additions & 0 deletions Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
* NXP SC16IS7xx advanced Universal Asynchronous Receiver-Transmitter (UART)

Required properties:
- compatible: Should be one of the following:
- "nxp,sc16is740" for NXP SC16IS740,
- "nxp,sc16is741" for NXP SC16IS741,
- "nxp,sc16is750" for NXP SC16IS750,
- "nxp,sc16is752" for NXP SC16IS752,
- "nxp,sc16is760" for NXP SC16IS760,
- "nxp,sc16is762" for NXP SC16IS762.
- reg: I2C address of the SC16IS7xx device.
- interrupt-parent: The phandle for the interrupt controller that
services interrupts for this IC.
- interrupts: Should contain the UART interrupt
- clocks: Reference to the IC source clock.

Optional properties:
- gpio-controller: Marks the device node as a GPIO controller.
- #gpio-cells: Should be two. The first cell is the GPIO number and
the second cell is used to specify the GPIO polarity:
0 = active high,
1 = active low.

Example:
sc16is750: sc16is750@51 {
compatible = "nxp,sc16is750";
reg = <0x51>;
clocks = <&clk20m>;
interrupt-parent = <&gpio3>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
gpio-controller;
#gpio-cells = <2>;
};
9 changes: 9 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
which are not unmapped.

earlycon= [KNL] Output early console device and options.

uart[8250],io,<addr>[,options]
uart[8250],mmio,<addr>[,options]
uart[8250],mmio32,<addr>[,options]
Expand All @@ -892,6 +893,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
(mmio) or 32-bit (mmio32).
The options are the same as for ttyS, above.

pl011,<addr>
Start an early, polled-mode console on a pl011 serial
port at the specified address. The pl011 serial port
must already be setup and configured. Options are not
yet supported.

smh Use ARM semihosting calls for early console.

earlyprintk= [X86,SH,BLACKFIN,ARM]
earlyprintk=vga
earlyprintk=efi
Expand Down
3 changes: 3 additions & 0 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ config IOMMU_HELPER
config KERNEL_MODE_NEON
def_bool y

config FIX_EARLYCON_MEM
def_bool y

source "init/Kconfig"

source "kernel/Kconfig.freezer"
Expand Down
9 changes: 0 additions & 9 deletions arch/arm64/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ config STRICT_DEVMEM

If in doubt, say Y.

config EARLY_PRINTK
bool "Early printk support"
default y
help
Say Y here if you want to have an early console using the
earlyprintk=<name>[,<addr>][,<options>] kernel parameter. It
is assumed that the early console device has been initialised
by the boot loader prior to starting the Linux kernel.

config PID_IN_CONTEXTIDR
bool "Write the current PID to the CONTEXTIDR register"
help
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ arm64-obj-$(CONFIG_SMP) += smp.o smp_spin_table.o topology.o
arm64-obj-$(CONFIG_PERF_EVENTS) += perf_regs.o
arm64-obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o
arm64-obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
arm64-obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
arm64-obj-$(CONFIG_ARM64_CPU_SUSPEND) += sleep.o suspend.o
arm64-obj-$(CONFIG_JUMP_LABEL) += jump_label.o
arm64-obj-$(CONFIG_KGDB) += kgdb.o
Expand Down
156 changes: 0 additions & 156 deletions arch/arm64/kernel/early_printk.c

This file was deleted.

3 changes: 3 additions & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ config ARCH_HWEIGHT_CFLAGS
config ARCH_SUPPORTS_UPROBES
def_bool y

config FIX_EARLYCON_MEM
def_bool y

source "init/Kconfig"
source "kernel/Kconfig.freezer"

Expand Down
24 changes: 19 additions & 5 deletions drivers/bluetooth/hci_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,29 @@ static inline struct sk_buff *hci_uart_dequeue(struct hci_uart *hu)

int hci_uart_tx_wakeup(struct hci_uart *hu)
{
struct tty_struct *tty = hu->tty;
struct hci_dev *hdev = hu->hdev;
struct sk_buff *skb;

if (test_and_set_bit(HCI_UART_SENDING, &hu->tx_state)) {
set_bit(HCI_UART_TX_WAKEUP, &hu->tx_state);
return 0;
}

BT_DBG("");

schedule_work(&hu->write_work);

return 0;
}

static void hci_uart_write_work(struct work_struct *work)
{
struct hci_uart *hu = container_of(work, struct hci_uart, write_work);
struct tty_struct *tty = hu->tty;
struct hci_dev *hdev = hu->hdev;
struct sk_buff *skb;

/* REVISIT: should we cope with bad skbs or ->write() returning
* and error value ?
*/

restart:
clear_bit(HCI_UART_TX_WAKEUP, &hu->tx_state);

Expand All @@ -153,7 +165,6 @@ int hci_uart_tx_wakeup(struct hci_uart *hu)
goto restart;

clear_bit(HCI_UART_SENDING, &hu->tx_state);
return 0;
}

static void hci_uart_init_work(struct work_struct *work)
Expand Down Expand Up @@ -282,6 +293,7 @@ static int hci_uart_tty_open(struct tty_struct *tty)
tty->receive_room = 65536;

INIT_WORK(&hu->init_ready, hci_uart_init_work);
INIT_WORK(&hu->write_work, hci_uart_write_work);

spin_lock_init(&hu->rx_lock);

Expand Down Expand Up @@ -319,6 +331,8 @@ static void hci_uart_tty_close(struct tty_struct *tty)
if (hdev)
hci_uart_close(hdev);

cancel_work_sync(&hu->write_work);

if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) {
if (hdev) {
if (test_bit(HCI_UART_REGISTERED, &hu->flags))
Expand Down
1 change: 1 addition & 0 deletions drivers/bluetooth/hci_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ struct hci_uart {
unsigned long hdev_flags;

struct work_struct init_ready;
struct work_struct write_work;

struct hci_uart_proto *proto;
void *priv;
Expand Down
5 changes: 0 additions & 5 deletions drivers/tty/serial/8250/8250_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1926,13 +1926,8 @@ static void serial8250_put_poll_char(struct uart_port *port,
wait_for_xmitr(up, BOTH_EMPTY);
/*
* Send the character out.
* If a LF, also do CR...
*/
serial_port_out(port, UART_TX, c);
if (c == 10) {
wait_for_xmitr(up, BOTH_EMPTY);
serial_port_out(port, UART_TX, 13);
}

/*
* Finally, wait for transmitter to become empty
Expand Down
Loading

0 comments on commit 6e87b70

Please sign in to comment.