You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial patches from Greg Kroah-Hartman: "Here's the big tty/serial driver patches for 3.9-rc1. More tty port rework and fixes from Jiri here, as well as lots of individual serial driver updates and fixes. All of these have been in the linux-next tree for a while." * tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (140 commits) tty: mxser: improve error handling in mxser_probe() and mxser_module_init() serial: imx: fix uninitialized variable warning serial: tegra: assume CONFIG_OF TTY: do not update atime/mtime on read/write lguest: select CONFIG_TTY to build properly. ARM defconfigs: add missing inclusions of linux/platform_device.h fb/exynos: include platform_device.h ARM: sa1100/assabet: include platform_device.h directly serial: imx: Fix recursive locking bug pps: Fix build breakage from decoupling pps from tty tty: Remove ancient hardpps() pps: Additional cleanups in uart_handle_dcd_change pps: Move timestamp read into PPS code proper pps: Don't crash the machine when exiting will do pps: Fix a use-after free bug when unregistering a source. pps: Use pps_lookup_dev to reduce ldisc coupling pps: Add pps_lookup_dev() function tty: serial: uartlite: Support uartlite on big and little endian systems tty: serial: uartlite: Fix sparse and checkpatch warnings serial/arc-uart: Miscll DT related updates (Grant's review comments) ... Fix up trivial conflicts, mostly just due to the TTY config option clashing with the EXPERIMENTAL removal.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
NVIDIA Tegra20/Tegra30 high speed (DMA based) UART controller driver.
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "nvidia,tegra30-hsuart", "nvidia,tegra20-hsuart".
|
||||
- reg: Should contain UART controller registers location and length.
|
||||
- interrupts: Should contain UART controller interrupts.
|
||||
- nvidia,dma-request-selector : The Tegra DMA controller's phandle and
|
||||
request selector for this UART controller.
|
||||
|
||||
Optional properties:
|
||||
- nvidia,enable-modem-interrupt: Enable modem interrupts. Should be enable
|
||||
only if all 8 lines of UART controller are pinmuxed.
|
||||
|
||||
Example:
|
||||
|
||||
serial@70006000 {
|
||||
compatible = "nvidia,tegra30-hsuart", "nvidia,tegra20-hsuart";
|
||||
reg = <0x70006000 0x40>;
|
||||
reg-shift = <2>;
|
||||
interrupts = <0 36 0x04>;
|
||||
nvidia,dma-request-selector = <&apbdma 8>;
|
||||
nvidia,enable-modem-interrupt;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
* Synopsys ARC UART : Non standard UART used in some of the ARC FPGA boards
|
||||
|
||||
Required properties:
|
||||
- compatible : "snps,arc-uart"
|
||||
- reg : offset and length of the register set for the device.
|
||||
- interrupts : device interrupt
|
||||
- clock-frequency : the input clock frequency for the UART
|
||||
- current-speed : baud rate for UART
|
||||
|
||||
e.g.
|
||||
|
||||
arcuart0: serial@c0fc1000 {
|
||||
compatible = "snps,arc-uart";
|
||||
reg = <0xc0fc1000 0x100>;
|
||||
interrupts = <5>;
|
||||
clock-frequency = <80000000>;
|
||||
current-speed = <115200>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
Note: Each port should have an alias correctly numbered in "aliases" node.
|
||||
|
||||
e.g.
|
||||
aliases {
|
||||
serial0 = &arcuart0;
|
||||
};
|
||||
@@ -5,10 +5,16 @@ Required properties:
|
||||
- reg : Address and length of the register set
|
||||
- interrupts : Should contain uart interrupt
|
||||
|
||||
Optional properties:
|
||||
- location : Decides the location of the USART I/O pins.
|
||||
Allowed range : [0 .. 5]
|
||||
Default: 0
|
||||
|
||||
Example:
|
||||
|
||||
uart@0x4000c400 {
|
||||
compatible = "efm32,uart";
|
||||
reg = <0x4000c400 0x400>;
|
||||
interrupts = <15>;
|
||||
location = <0>;
|
||||
};
|
||||
|
||||
@@ -133,6 +133,16 @@ hardware.
|
||||
Interrupts: locally disabled.
|
||||
This call must not sleep
|
||||
|
||||
send_xchar(port,ch)
|
||||
Transmit a high priority character, even if the port is stopped.
|
||||
This is used to implement XON/XOFF flow control and tcflow(). If
|
||||
the serial driver does not implement this function, the tty core
|
||||
will append the character to the circular buffer and then call
|
||||
start_tx() / stop_tx() to flush the data out.
|
||||
|
||||
Locking: none.
|
||||
Interrupts: caller dependent.
|
||||
|
||||
stop_rx(port)
|
||||
Stop receiving characters; the port is in the process of
|
||||
being closed.
|
||||
@@ -242,9 +252,8 @@ hardware.
|
||||
|
||||
pm(port,state,oldstate)
|
||||
Perform any power management related activities on the specified
|
||||
port. State indicates the new state (defined by ACPI D0-D3),
|
||||
oldstate indicates the previous state. Essentially, D0 means
|
||||
fully on, D3 means powered down.
|
||||
port. State indicates the new state (defined by
|
||||
enum uart_pm_state), oldstate indicates the previous state.
|
||||
|
||||
This function should not be used to grab any resources.
|
||||
|
||||
@@ -255,6 +264,10 @@ hardware.
|
||||
Locking: none.
|
||||
Interrupts: caller dependent.
|
||||
|
||||
set_wake(port,state)
|
||||
Enable/disable power management wakeup on serial activity. Not
|
||||
currently implemented.
|
||||
|
||||
type(port)
|
||||
Return a pointer to a string constant describing the specified
|
||||
port, or return NULL, in which case the string 'unknown' is
|
||||
@@ -307,6 +320,31 @@ hardware.
|
||||
Locking: none.
|
||||
Interrupts: caller dependent.
|
||||
|
||||
poll_init(port)
|
||||
Called by kgdb to perform the minimal hardware initialization needed
|
||||
to support poll_put_char() and poll_get_char(). Unlike ->startup()
|
||||
this should not request interrupts.
|
||||
|
||||
Locking: tty_mutex and tty_port->mutex taken.
|
||||
Interrupts: n/a.
|
||||
|
||||
poll_put_char(port,ch)
|
||||
Called by kgdb to write a single character directly to the serial
|
||||
port. It can and should block until there is space in the TX FIFO.
|
||||
|
||||
Locking: none.
|
||||
Interrupts: caller dependent.
|
||||
This call must not sleep
|
||||
|
||||
poll_get_char(port)
|
||||
Called by kgdb to read a single character directly from the serial
|
||||
port. If data is available, it should be returned; otherwise
|
||||
the function should return NO_POLL_CHAR immediately.
|
||||
|
||||
Locking: none.
|
||||
Interrupts: caller dependent.
|
||||
This call must not sleep
|
||||
|
||||
Other functions
|
||||
---------------
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ choice
|
||||
|
||||
config ALPHA_GENERIC
|
||||
bool "Generic"
|
||||
depends on TTY
|
||||
help
|
||||
A generic kernel will run on all supported Alpha hardware.
|
||||
|
||||
@@ -490,6 +491,7 @@ config VGA_HOSE
|
||||
|
||||
config ALPHA_SRM
|
||||
bool "Use SRM as bootloader" if ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_NAUTILUS || ALPHA_NONAME
|
||||
depends on TTY
|
||||
default y if ALPHA_JENSEN || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_DP264 || ALPHA_RAWHIDE || ALPHA_EIGER || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_MARVEL
|
||||
---help---
|
||||
There are two different types of booting firmware on Alphas: SRM,
|
||||
|
||||
@@ -44,7 +44,7 @@ typedef union _srmcons_result {
|
||||
|
||||
/* called with callback_lock held */
|
||||
static int
|
||||
srmcons_do_receive_chars(struct tty_struct *tty)
|
||||
srmcons_do_receive_chars(struct tty_port *port)
|
||||
{
|
||||
srmcons_result result;
|
||||
int count = 0, loops = 0;
|
||||
@@ -52,13 +52,13 @@ srmcons_do_receive_chars(struct tty_struct *tty)
|
||||
do {
|
||||
result.as_long = callback_getc(0);
|
||||
if (result.bits.status < 2) {
|
||||
tty_insert_flip_char(tty, (char)result.bits.c, 0);
|
||||
tty_insert_flip_char(port, (char)result.bits.c, 0);
|
||||
count++;
|
||||
}
|
||||
} while((result.bits.status & 1) && (++loops < 10));
|
||||
|
||||
if (count)
|
||||
tty_schedule_flip(tty);
|
||||
tty_schedule_flip(port);
|
||||
|
||||
return count;
|
||||
}
|
||||
@@ -73,7 +73,7 @@ srmcons_receive_chars(unsigned long data)
|
||||
|
||||
local_irq_save(flags);
|
||||
if (spin_trylock(&srmcons_callback_lock)) {
|
||||
if (!srmcons_do_receive_chars(port->tty))
|
||||
if (!srmcons_do_receive_chars(port))
|
||||
incr = 100;
|
||||
spin_unlock(&srmcons_callback_lock);
|
||||
}
|
||||
@@ -88,7 +88,7 @@ srmcons_receive_chars(unsigned long data)
|
||||
|
||||
/* called with callback_lock held */
|
||||
static int
|
||||
srmcons_do_write(struct tty_struct *tty, const char *buf, int count)
|
||||
srmcons_do_write(struct tty_port *port, const char *buf, int count)
|
||||
{
|
||||
static char str_cr[1] = "\r";
|
||||
long c, remaining = count;
|
||||
@@ -113,10 +113,10 @@ srmcons_do_write(struct tty_struct *tty, const char *buf, int count)
|
||||
cur += result.bits.c;
|
||||
|
||||
/*
|
||||
* Check for pending input iff a tty was provided
|
||||
* Check for pending input iff a tty port was provided
|
||||
*/
|
||||
if (tty)
|
||||
srmcons_do_receive_chars(tty);
|
||||
if (port)
|
||||
srmcons_do_receive_chars(port);
|
||||
}
|
||||
|
||||
while (need_cr) {
|
||||
@@ -135,7 +135,7 @@ srmcons_write(struct tty_struct *tty,
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&srmcons_callback_lock, flags);
|
||||
srmcons_do_write(tty, (const char *) buf, count);
|
||||
srmcons_do_write(tty->port, (const char *) buf, count);
|
||||
spin_unlock_irqrestore(&srmcons_callback_lock, flags);
|
||||
|
||||
return count;
|
||||
|
||||
@@ -45,6 +45,38 @@
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
};
|
||||
|
||||
clkuart0: uart0 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <1>;
|
||||
};
|
||||
|
||||
clkuart1: uart1 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <2>;
|
||||
};
|
||||
|
||||
clkuart2: uart2 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <3>;
|
||||
};
|
||||
|
||||
clkuart3: uart3 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -83,28 +115,28 @@
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd8200000 0x1040>;
|
||||
interrupts = <32>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart0>;
|
||||
};
|
||||
|
||||
uart@d82b0000 {
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd82b0000 0x1040>;
|
||||
interrupts = <33>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart1>;
|
||||
};
|
||||
|
||||
uart@d8210000 {
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd8210000 0x1040>;
|
||||
interrupts = <47>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart2>;
|
||||
};
|
||||
|
||||
uart@d82c0000 {
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd82c0000 0x1040>;
|
||||
interrupts = <50>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart3>;
|
||||
};
|
||||
|
||||
rtc@d8100000 {
|
||||
|
||||
@@ -59,6 +59,54 @@
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
};
|
||||
|
||||
clkuart0: uart0 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <1>;
|
||||
};
|
||||
|
||||
clkuart1: uart1 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <2>;
|
||||
};
|
||||
|
||||
clkuart2: uart2 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <3>;
|
||||
};
|
||||
|
||||
clkuart3: uart3 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <4>;
|
||||
};
|
||||
|
||||
clkuart4: uart4 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <22>;
|
||||
};
|
||||
|
||||
clkuart5: uart5 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <23>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -96,42 +144,42 @@
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd8200000 0x1040>;
|
||||
interrupts = <32>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart0>;
|
||||
};
|
||||
|
||||
uart@d82b0000 {
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd82b0000 0x1040>;
|
||||
interrupts = <33>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart1>;
|
||||
};
|
||||
|
||||
uart@d8210000 {
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd8210000 0x1040>;
|
||||
interrupts = <47>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart2>;
|
||||
};
|
||||
|
||||
uart@d82c0000 {
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd82c0000 0x1040>;
|
||||
interrupts = <50>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart3>;
|
||||
};
|
||||
|
||||
uart@d8370000 {
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd8370000 0x1040>;
|
||||
interrupts = <31>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart4>;
|
||||
};
|
||||
|
||||
uart@d8380000 {
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd8380000 0x1040>;
|
||||
interrupts = <30>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart5>;
|
||||
};
|
||||
|
||||
rtc@d8100000 {
|
||||
|
||||
@@ -75,6 +75,22 @@
|
||||
reg = <0x204>;
|
||||
};
|
||||
|
||||
clkuart0: uart0 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <1>;
|
||||
};
|
||||
|
||||
clkuart1: uart1 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
clocks = <&ref24>;
|
||||
enable-reg = <0x250>;
|
||||
enable-bit = <2>;
|
||||
};
|
||||
|
||||
arm: arm {
|
||||
#clock-cells = <0>;
|
||||
compatible = "via,vt8500-device-clock";
|
||||
@@ -128,14 +144,14 @@
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd8200000 0x1040>;
|
||||
interrupts = <32>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart0>;
|
||||
};
|
||||
|
||||
uart@d82b0000 {
|
||||
compatible = "via,vt8500-uart";
|
||||
reg = <0xd82b0000 0x1040>;
|
||||
interrupts = <33>;
|
||||
clocks = <&ref24>;
|
||||
clocks = <&clkuart1>;
|
||||
};
|
||||
|
||||
rtc@d8100000 {
|
||||
|
||||
@@ -44,14 +44,14 @@
|
||||
compatible = "xlnx,xuartps";
|
||||
reg = <0xE0000000 0x1000>;
|
||||
interrupts = <0 27 4>;
|
||||
clock = <50000000>;
|
||||
clocks = <&uart_clk 0>;
|
||||
};
|
||||
|
||||
uart1: uart@e0001000 {
|
||||
compatible = "xlnx,xuartps";
|
||||
reg = <0xE0001000 0x1000>;
|
||||
interrupts = <0 50 4>;
|
||||
clock = <50000000>;
|
||||
clocks = <&uart_clk 1>;
|
||||
};
|
||||
|
||||
slcr: slcr@f8000000 {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/platform_data/sa11x0-serial.h>
|
||||
#include <linux/serial_core.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mfd/ucb1x00.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#define __ASM_PLAT_ADC_H __FILE__
|
||||
|
||||
struct s3c_adc_client;
|
||||
struct platform_device;
|
||||
|
||||
extern int s3c_adc_start(struct s3c_adc_client *client,
|
||||
unsigned int channel, unsigned int nr_samples);
|
||||
|
||||
@@ -8,6 +8,7 @@ config HP_SIMETH
|
||||
|
||||
config HP_SIMSERIAL
|
||||
bool "Simulated serial driver support"
|
||||
depends on TTY
|
||||
|
||||
config HP_SIMSERIAL_CONSOLE
|
||||
bool "Console for HP simulator"
|
||||
|
||||
@@ -53,7 +53,7 @@ struct tty_driver *hp_simserial_driver;
|
||||
|
||||
static struct console *console;
|
||||
|
||||
static void receive_chars(struct tty_struct *tty)
|
||||
static void receive_chars(struct tty_port *port)
|
||||
{
|
||||
unsigned char ch;
|
||||
static unsigned char seen_esc = 0;
|
||||
@@ -81,10 +81,10 @@ static void receive_chars(struct tty_struct *tty)
|
||||
}
|
||||
seen_esc = 0;
|
||||
|
||||
if (tty_insert_flip_char(tty, ch, TTY_NORMAL) == 0)
|
||||
if (tty_insert_flip_char(port, ch, TTY_NORMAL) == 0)
|
||||
break;
|
||||
}
|
||||
tty_flip_buffer_push(tty);
|
||||
tty_flip_buffer_push(port);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -93,18 +93,9 @@ static void receive_chars(struct tty_struct *tty)
|
||||
static irqreturn_t rs_interrupt_single(int irq, void *dev_id)
|
||||
{
|
||||
struct serial_state *info = dev_id;
|
||||
struct tty_struct *tty = tty_port_tty_get(&info->port);
|
||||
|
||||
if (!tty) {
|
||||
printk(KERN_INFO "%s: tty=0 problem\n", __func__);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
/*
|
||||
* pretty simple in our case, because we only get interrupts
|
||||
* on inbound traffic
|
||||
*/
|
||||
receive_chars(tty);
|
||||
tty_kref_put(tty);
|
||||
receive_chars(&info->port);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -435,7 +426,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
|
||||
struct tty_port *port = &info->port;
|
||||
|
||||
tty->driver_data = info;
|
||||
tty->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
|
||||
port->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
|
||||
|
||||
/*
|
||||
* figure out which console to use (should be one already)
|
||||
|
||||
@@ -41,7 +41,7 @@ config NFBLOCK
|
||||
|
||||
config NFCON
|
||||
tristate "NatFeat console driver"
|
||||
depends on NATFEAT
|
||||
depends on TTY && NATFEAT
|
||||
help
|
||||
Say Y to include support for the ARAnyM NatFeat console driver
|
||||
which allows the console output to be redirected to the stderr
|
||||
|
||||
@@ -118,7 +118,7 @@ static struct resource sc26xx_rsrc[] = {
|
||||
}
|
||||
};
|
||||
|
||||
#include <linux/platform_data/sccnxp.h>
|
||||
#include <linux/platform_data/serial-sccnxp.h>
|
||||
|
||||
static struct sccnxp_pdata sccnxp_data = {
|
||||
.reg_shift = 2,
|
||||
|
||||
@@ -524,7 +524,7 @@ static int mask_test_and_clear(volatile u8 *ptr, u8 mask)
|
||||
static void mn10300_serial_receive_interrupt(struct mn10300_serial_port *port)
|
||||
{
|
||||
struct uart_icount *icount = &port->uart.icount;
|
||||
struct tty_struct *tty = port->uart.state->port.tty;
|
||||
struct tty_port *tport = &port->uart.state->port;
|
||||
unsigned ix;
|
||||
int count;
|
||||
u8 st, ch, push, status, overrun;
|
||||
@@ -534,10 +534,10 @@ static void mn10300_serial_receive_interrupt(struct mn10300_serial_port *port)
|
||||
push = 0;
|
||||
|
||||
count = CIRC_CNT(port->rx_inp, port->rx_outp, MNSC_BUFFER_SIZE);
|
||||
count = tty_buffer_request_room(tty, count);
|
||||
count = tty_buffer_request_room(tport, count);
|
||||
if (count == 0) {
|
||||
if (!tty->low_latency)
|
||||
tty_flip_buffer_push(tty);
|
||||
if (!tport->low_latency)
|
||||
tty_flip_buffer_push(tport);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -545,8 +545,8 @@ try_again:
|
||||
/* pull chars out of the hat */
|
||||
ix = ACCESS_ONCE(port->rx_outp);
|
||||
if (CIRC_CNT(port->rx_inp, ix, MNSC_BUFFER_SIZE) == 0) {
|
||||
if (push && !tty->low_latency)
|
||||
tty_flip_buffer_push(tty);
|
||||
if (push && !tport->low_latency)
|
||||
tty_flip_buffer_push(tport);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -666,19 +666,19 @@ insert:
|
||||
else
|
||||
flag = TTY_NORMAL;
|
||||
|
||||
tty_insert_flip_char(tty, ch, flag);
|
||||
tty_insert_flip_char(tport, ch, flag);
|
||||
}
|
||||
|
||||
/* overrun is special, since it's reported immediately, and doesn't
|
||||
* affect the current character
|
||||
*/
|
||||
if (overrun)
|
||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
||||
tty_insert_flip_char(tport, 0, TTY_OVERRUN);
|
||||
|
||||
count--;
|
||||
if (count <= 0) {
|
||||
if (!tty->low_latency)
|
||||
tty_flip_buffer_push(tty);
|
||||
if (!tport->low_latency)
|
||||
tty_flip_buffer_push(tport);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ config PARISC
|
||||
select HAVE_MOD_ARCH_SPECIFIC
|
||||
select MODULES_USE_ELF_RELA
|
||||
select CLONE_BACKWARDS
|
||||
select TTY # Needed for pdc_cons.c
|
||||
|
||||
help
|
||||
The PA-RISC microprocessor is designed by Hewlett-Packard and used
|
||||
|
||||
@@ -138,23 +138,17 @@ static const struct tty_operations pdc_console_tty_ops = {
|
||||
static void pdc_console_poll(unsigned long unused)
|
||||
{
|
||||
int data, count = 0;
|
||||
struct tty_struct *tty = tty_port_tty_get(&tty_port);
|
||||
|
||||
if (!tty)
|
||||
return;
|
||||
|
||||
while (1) {
|
||||
data = pdc_console_poll_key(NULL);
|
||||
if (data == -1)
|
||||
break;
|
||||
tty_insert_flip_char(tty, data & 0xFF, TTY_NORMAL);
|
||||
tty_insert_flip_char(&tty_port, data & 0xFF, TTY_NORMAL);
|
||||
count ++;
|
||||
}
|
||||
|
||||
if (count)
|
||||
tty_flip_buffer_push(tty);
|
||||
|
||||
tty_kref_put(tty);
|
||||
tty_flip_buffer_push(&tty_port);
|
||||
|
||||
if (pdc_cons.flags & CON_ENABLED)
|
||||
mod_timer(&pdc_console_timer, jiffies + PDC_CONS_POLL_DELAY);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <linux/kgdb.h>
|
||||
#include <linux/kdebug.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <asm/kdebug.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user