aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty
AgeCommit message (Collapse)AuthorFilesLines
2014-07-10tty: serial: msm: Support big-endian CPUsStephen Boyd2-12/+20
To support big-endian CPUs use the string versions of the io read/write macros on the TX/RX fifos and the non-raw variants of the readl/writel macros throughout. This way we don't byteswap the characters coming from the fifos but we properly deal with the little-endian nature of the serial hardware while controlling it. Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: txx9: remove duplicate TXX9_SIFCR_TDIL_MASK defineDan Carpenter1-1/+0
The TXX9_SIFCR_TDIL_MASK define is cut and pasted twice so we can delete the second instance. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: blackfin: Fix CTS flow controlPeter Hurley2-8/+16
blackfin uart port drivers mistakenly set the struct uart_port flags bit UPF_BUG_THRE (which only has meaning to the 8250 core) while trying to set ASYNC_CTS_FLOW. Uart port drivers can override termios settings based on actual hardware support in their .set_termios method; the serial core sets the appropriate port flags based on the overrides. Overriding only the initial termios settings is accomplished by only perform those overrides if the old termios parameter is NULL. CC: Sonic Zhang <[email protected]> CC: [email protected] Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10tty: serial: Fix termios/port flags mismatchPeter Hurley1-2/+3
Uart port drivers may reconfigure termios settings based on available hardware support; set/clear ASYNC_CTS_FLOW and ASYNC_CHECK_CD _after_ calling the port driver's .set_termios method. Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10tty: Call hangup method in modern stylePeter Hurley1-1/+1
Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10tty: Remove tty_hung_up_p() tests from tty drivers' open()Peter Hurley7-46/+18
Since at least before 2.6.30, it has not been possible to observe a hung up file pointer in a tty driver's open() method unless/until the driver open() releases the tty_lock() (eg., before blocking). This is because tty_open() adds the file pointer while holding the tty_lock() _and_ doesn't release the lock until after calling the tty driver's open() method. [ Before tty_lock(), this was lock_kernel(). ] Since __tty_hangup() first waits on the tty_lock() before enumerating and hanging up the open file pointers, either __tty_hangup() will wait for the tty_lock() or tty_open() will not yet have added the file pointer. For example, CPU 0 | CPU 1 | tty_open | __tty_hangup .. | .. tty_lock | .. tty_reopen | tty_lock / blocks .. | tty_add_file(tty, filp) | .. | tty->ops->open(tty, filp) | tty_port_open | tty_port_block_til_ready | .. | while (1) | .. | tty_unlock | / unblocks schedule | for each filp on tty->tty_files | f_ops = tty_hung_up_fops; | .. | tty_unlock tty_lock | .. | tty_unlock | Note that since tty_port_block_til_ready() and similar drop the tty_lock while blocking, when woken, the file pointer must then be tested for having been hung up. Also, fix bit-rotted drivers that used extra_count to track the port->count bump. CC: Mikael Starvik <[email protected]> CC: Samuel Ortiz <[email protected]> CC: "David S. Miller" <[email protected]> Signed-off-by: Peter Hurley <[email protected]> Acked-by: Jesper Nilsson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: Use UPF_* constants with struct uart_port flagsPeter Hurley2-3/+3
Fix ASYNC_* constant usage that should be the corresponding UPF_* constant. CC: Grant Likely <[email protected]> CC: Rob Herring <[email protected]> CC: [email protected] Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10tty: ipwireless: Remove tty->closing abort from ipw_open()Peter Hurley1-5/+0
tty->closing cannot be set on ipw_open() because the ipwireless tty driver does not call any functions that set tty->closing. CC: Jiri Kosina <[email protected]> Signed-off-by: Peter Hurley <[email protected]> Acked-by: David Sterba <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10tty: Move tty->closing from port lock critical sectionPeter Hurley2-3/+5
tty->closing informs the line discipline that the hardware will be shutting down imminently, and to disable further input other than soft flow control (but to still allow additional output). However, the tty lock is the necessary lock for preventing concurrent changes to tty->closing. As shown by the call-tree audit [1] of functions that modify tty->closing, the tty lock is already held for those functions. [1] Call-tree audit of functions that modify tty->closing * does not include call tree to tty_port_close(), tty_port_close_start(), or tty_port_close_end() which is already documented in 'tty: Document locking for tty_port_close{,start,end}' that shows callers to those 3 functions hold the tty lock tty_release() tty->ops->close() --+ | __tty_hangup() | tty->ops->close() --+ | mp_close():drivers/staging/sb105x/sb_pci_mp.c dngc_tty_close():drivers/staging/dgnc/dgnc_tty.c dgap_tty_close():drivers/staging/dgap/dgap_tty.c dgrp_tty_close():drivers/staging/dgrp/dgrp_tty.c rp_close():drivers/tty/rocket.c hvsi_close():drivers/tty/hvc/hvsi.c rs_close():drivers/tty/serial/68328serial.c rs_close():drivers/tty/serial/crisv10.c uart_close():drivers/tty/serial/serial_core.c isdn_tty_close():drivers/isdn/i4l/isdn_tty.c tty3215_close():drivers/s390/char/con3215.c tty_open() tty_ldisc_setup() ----+ | __tty_hangup() | tty_ldisc_hangup() ---+ | tty_set_ldisc() --------+ tty_ldisc_restore() --+ | +- tty_ldisc_open() ld->ops->open() --+ | +- n_tty_open() Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10tty: Document locking for tty_port_hangup()Peter Hurley1-0/+2
The tty lock is held when the tty driver's hangup() method is called (from the lone call-site, __tty_hangup()). The call-tree audit [1] of tty_port_hangup() is a closed graph of the callers of tty_port_hangup(); ie., all callers originate only from __tty_hangup(). Of these callers, none drop the tty lock prior to calling tty_port_hangup(). [1] Call-tree audit of tty_port_hangup() __tty_hangup() tty->ops->hangup() --+ | rs_hangup():arch/ia64/hp/sim/simserial.c line_hangup():arch/um/drivers/line.c gdm_tty_hangup():drivers/staging/gdm724x/gdm_tty.c fwtty_hangup():drivers/staging/fwserial/fwserial.c acm_tty_hangup():drivers/usb/class/cdc-acm.c serial_hangup():drivers/usb/serial/usb-serial.c ipoctal_hangup():drivers/ipack/devices/ipoctal.c cy_hangup():drivers/tty/cyclades.c isicom_hangup():drivers/tty/isicom.c rp_hangup():drivers/tty/rocket.c dashtty_hangup():drivers/tty/metag_da.c moxa_hangup():drivers/tty/moxa.c gsmtty_hangup():drivers/tty/n_gsm.c goldfish_tty_hangup():drivers/tty/goldfish.c ehv_bc_tty_hangup():drivers/tty/ehv_bytechan.c mxser_hangup():drivers/tty/mxser.c kgdb_nmi_tty_hangup():drivers/tty/serial/kgdb_nmi.c ifx_spi_hangup():drivers/tty/serial/ifx6x60.c ntty_hangup():drivers/tty/nozomi.c capinc_tty_hangup():drivers/isdn/capi/capi.c mgslpc_hangup():drivers/char/pcmcia/synclink_cs.c sdio_uart_hangup():drivers/mmc/card/sdio_uart.c rfcomm_tty_hangup():net/bluetooth/rfcomm/tty.c | +- tty_port_hangup() Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10tty: Document locking for tty_port_block_til_ready()Peter Hurley1-0/+5
The tty lock is held when the tty driver's open() method is called (from tty_open()). The call-tree audit [1] of tty_port_block_til_ready() is a closed graph of the callers of tty_port_block_til_ready(); ie., all callers originate only from tty_open(). Of these callers, none drop the tty lock. Also, document tty_port_block_til_ready() may drop and reacquire the tty lock when blocking, which means the tty or tty_port may have changed state. [1] Call-tree audit of tty_port_block_til_ready() * does not include call tree of tty_port_open() which is already documented in 'tty: Document locking from tty_port_open()' tty_open() tty->ops->open() --+ | cy_open():drivers/tty/cyclades.c rp_open():drivers/tty/rocket.c rs_open():drivers/tty/amiserial.c moxa_open():drivers/tty/moxa.c gsmtty_open():drivers/tty/n_gsm.c rs_open():drivers/tty/serial/68328serial.c uart_open():drivers/tty/serial/serial_core.c isdn_tty_open():drivers/isdn/i4l/isdn_tty.c mgslpc_open():drivers/char/pcmcia/synclink_cs.c | +- tty_port_block_til_ready() Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10tty: Document locking for tty_port_open()Peter Hurley1-0/+8
The tty lock is held when the tty driver's open method is called (from the lone call-site, tty_open()). The call-tree audit [1] of tty_port_open() is a closed graph of the callers of tty_port_open(); ie., all callers originate from only tty_open(). Of these callers, none drop the tty lock. Also, document that tty_port_block_til_ready() may drop and reacquire the tty lock when blocking, which means the tty or tty_port may have changed state. [1] Call-tree audit of tty_port_open() tty_open() tty->ops->open() --+ | rs_open():arch/ia64/hp/sim/simserial.c *line_open():arch/um/drivers/line.c gdm_tty_open():drivers/staging/gdm724x/gdm_tty.c fwtty_open():drivers/staging/fwserial/fwserial.c acm_tty_open():drivers/usb/class/cdc-acm.c serial_open():drivers/usb/serial/usb-serial.c pti_tty_driver_open():drivers/misc/pti.c ipoctal_open():drivers/ipack/devices/ipoctal.c isicom_open():drivers/tty/isicom.c dashtty_open():drivers/tty/metag_da.c goldfish_tty_open():drivers/tty/goldfish.c ehv_bc_tty_open():drivers/tty/ehv_bytechan.c mxser_open():drivers/tty/mxser.c kgdb_nmi_tty_open():drivers/tty/serial/kgdb_nmi.c ifx_spi_open():drivers/tty/serial/ifx6x60.c smd_tty_open():drivers/tty/serial/msm_smd_tty.c ntty_open():drivers/tty/nozomi.c capinc_tty_open():drivers/isdn/capi/capi.c tpk_open():drivers/char/ttyprintk.c sdio_uart_open():drivers/mmc/card/sdio_uart.c rfcomm_tty_open():net/bluetooth/rfcomm/tty.c | +- tty_port_open() * line_open() is the .open method for 2 um drivers declared in ./arch/um/drivers/stdio_console.c and in ./arch/um/drivers/ssl.c, and not called directly Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10tty: Document locking for tty_port_close{,start,end}()Peter Hurley1-0/+14
The tty lock is held when the tty driver's .close method is called (from the two lone call-sites of tty_release() and __tty_hangup()). The call-tree audit[1] of tty_port_close(), tty_port_close_start, and tty_port_close_end() is a closed graph of the callers of these 3 functions; ie., all callers originate from only tty_release() or __tty_hangup(). Of these callers, none drop the tty lock. Also, document tty_port_close_start() may drop and reacquire the tty lock in tty_wait_until_sent_from_close(), which means the tty or tty_port may have changed state (but not reopened or hung up). [1] Call-tree audit of tty_port_close, tty_port_close_start, and tty_port_close_end() tty_release() tty->ops->close() --+ | __tty_hangup() | tty->ops->close() --+ | +- rp_close():drivers/tty/rocket.c -------------------+ +- uart_close():drivers/tty/serial/serial_core.c -----+ | +- tty_port_close_start() | | +- close():drivers/tty/synclinkmp.c ------------------+ +- rs_close():drivers/tty/amiserial.c ----------------+ +- gsmtty_close():drivers/tty/n_gsm.c ----------------+ +- mxser_close():drivers/tty/mxser.c -----------------+ +- close():drivers/tty/synclink_gt.c -----------------+ +- mgsl_close():drivers/tty/synclink.c ---------------+ +- isdn_tty_close():drivers/isdn/i4l/isdn_tty.c ------+ +- mgslpc_close():drivers/char/pcmcia/synclink_cs.c --+ +- ircomm_tty_close():net/irda/ircomm/ircomm_tty.c ---+ | | rs_close():arch/ia64/hp/sim/simserial.c | *line_close():arch/um/drivers/line.c | gdm_tty_close():drivers/staging/gdm724x/gdm_tty.c fwtty_close():drivers/staging/fwserial/fwserial.c acm_tty_close():drivers/usb/class/cdc-acm.c serial_close():drivers/usb/serial/usb-serial.c pti_tty_driver_close():drivers/misc/pti.c ipoctal_close():drivers/ipack/devices/ipoctal.c cy_close():drivers/tty/cyclades.c isicom_close():drivers/tty/isicom.c dashtty_close():drivers/tty/metag_da.c moxa_close():drivers/tty/moxa.c goldfish_tty_close():drivers/tty/goldfish.c ehv_bc_tty_close():drivers/tty/ehv_bytechan.c kgdb_nmi_tty_close():drivers/tty/serial/kgdb_nmi.c ifx_spi_close():drivers/tty/serial/ifx6x60.c smd_tty_close():drivers/tty/serial/msm_smd_tty.c ntty_close():drivers/tty/nozomi.c capinc_tty_close():drivers/isdn/capi/capi.c tpk_close():drivers/char/ttyprintk.c sdio_uart_close():drivers/mmc/card/sdio_uart.c | rfcomm_tty_close():net/bluetooth/rfcomm/tty.c | | | +- tty_port_close():drivers/tty/tty_port.c -----------+ | +- tty_port_close_start() +- tty_port_close_end() * line_close() is the .close method for 2 um drivers, declared in ./arch/um/drivers/stdio_console.c and in ./arch/um/drivers/ssl.c, and not called directly Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: fsl_lpuart: calculate DMA burstStefan Agner1-14/+13
The DMA burst size must match the transmit FIFO depth in order to make sure all character are transmitted. This patch calculates DMA burst size by using FIFO depth rather than use the hardcoded 16 bytes. This is required since some UARTs (e.g. UART2 on Vybrid) have a FIFO depth of 8 bytes. Signed-off-by: Stefan Agner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: fsl_lpuart: move DMA RX timeout calculationStefan Agner1-7/+11
The DMA RX timeout calculation is done based on FIFO buffer size and port timeout when setting up DMA. However, both variables are not necessarily initialized at DMA initialization time, which can lead to a division by zero. Move the timeout calculation to set_termios where both variables are initialized. Signed-off-by: Stefan Agner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: core: Preserve termios c_cflag for console resumePeter Hurley1-0/+3
When a tty is opened for the serial console, the termios c_cflag settings are inherited from the console line settings. However, if the tty is subsequently closed, the termios settings are lost. This results in a garbled console if the console is later suspended and resumed. Preserve the termios c_cflag for the serial console when the tty is shutdown; this reflects the most recent line settings. Fixes: Bugzilla #69751, 'serial console does not wake from S3' Reported-by: Valerio Vanni <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Peter Hurley <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: tegra: ack the rx dma desc after transfer terminatedPradeep Goudagunta1-0/+1
The Rx dma descriptor allocated without the DMA_ACK flags so that once after tarnsfer done or terminated, client can ack the descriptor to free it for later use. If the Rx DMA is terminated for some reason then rx-dma descriptor is not getting acked which causes the memory leak and list of usage desc to grow continuously. Hence, acknowledge the rx-dma descriptor once transfer is terminated to avoid memory leak and desc list to grow. Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: tegra: update tx_circular buffer only when TX_DMA is in progressPradeep Goudagunta1-0/+3
When channel is require to stop transmit then update the Tx circular buffer only when DMA based transfer is in progress. If there is no DMA based transfer then no need to update the Tx buffer. Signed-off-by: Pradeep Goudagunta <[email protected]> Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: lpc32xx uart module can't do consoleArnd Bergmann1-1/+1
Every uart driver that provides a console driver needs to be built-in for the console code to work, we get a build error for modular console drivers. This changes the SERIAL_HS_LPC32XX_CONSOLE symbol to depend on the SERIAL_HS_LPC32XX driver being built-in, just like we do for all the other uart drivers. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: pxa: fix build with !SERIAL_PXA_CONSOLEArnd Bergmann1-1/+1
When CONFIG_SERIAL_PXA_CONSOLE is disabled, the serial_pxa_get_poll_char and serial_pxa_put_poll_char functions are not defined, and we can't reference them. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial/arc: Enable DT based earlyconVineet Gupta1-0/+1
This allows a param less earlycon to pick up the earlyconsole from chosen/stdout-path Signed-off-by: Vineet Gupta <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial/arc: inline the probe helperVineet Gupta1-50/+40
Signed-off-by: Vineet Gupta <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial/arc: remove last remanants of platform dataVineet Gupta1-16/+6
Signed-off-by: Vineet Gupta <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial/arc: remove earlyprintk support and switch to earlyconVineet Gupta1-75/+12
Signed-off-by: Vineet Gupta <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial/arc: Use generic earlycon infrastructureVineet Gupta2-0/+31
With this change both earlyprintk and earlycon coexist We switch over to latter in next patch Signed-off-by: Vineet Gupta <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial/arc: Remove the workaround for legacy ISSVineet Gupta1-14/+0
Signed-off-by: Vineet Gupta <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial/arc: Refactor by referencing to uart_port where possibleVineet Gupta1-86/+69
The ARC UART MMIO helpers would take arc_uart_port and then reference generic uart_port->membase member. So change them to difrectly refer to uart_port and fix call sites accordingly. This removes the need for to_arc_port() converion almost eveeywhere and makes code a bit easier to read. Signed-off-by: Vineet Gupta <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial/arc: use uart_console_write() helperVineet Gupta1-14/+4
Signed-off-by: Vineet Gupta <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: 8250_dw: add ability to handle the peripheral clockHeiko Stübner1-3/+28
First try to find the named clock variants then fall back to the already existing handling of a nameless declared baudclk. This also adds the missing documentation for this already existing variant. Signed-off-by: Heiko Stuebner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: 8250_dw: use UPF_* constants when define flagsAndy Shevchenko1-1/+1
The flags member has upf_t type and corresponding macros to define them. This patch converts ASYNC_SKIP_TEST to UPF_SKIP_TEST in 8250_dw.c. Otherwise we got a sparse warning: drivers/tty/serial/8250/8250_dw.c:302:46: warning: restricted upf_t degrades to integer drivers/tty/serial/8250/8250_dw.c:302:62: warning: restricted upf_t degrades to integer drivers/tty/serial/8250/8250_dw.c:302:26: warning: incorrect type in assignment (different base types) drivers/tty/serial/8250/8250_dw.c:302:26: expected restricted upf_t [usertype] flags drivers/tty/serial/8250/8250_dw.c:302:26: got unsigned int Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: 8250_dw: clock rate handling for all ACPI platformsHeikki Krogerus1-75/+28
This replaces the Baytrail specific custom set_termios hook with a more generic one where the clock framework is used to set the rate. The method also doesn't need to be limited to just Baytrail, so it's used with all ACPI platforms. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-10serial: samsung: Use %pa to print 'resource_size_t' typeFabio Estevam1-2/+2
When building multi_v7_defconfig with CONFIG_ARM_LPAE=y the following warning is seen: drivers/tty/serial/samsung.c: In function 's3c24xx_serial_init_port': drivers/tty/serial/samsung.c:1229:2: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'resource_size_t' [-Wformat] Use %pa to print 'resource_size_t' type to fix the warning. Reported-by: Olof's autobuilder <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09tty: serial: msm_serial.c: Cleaning up uninitialized variablesRickard Strandqvist1-1/+1
There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09serial: sirf: transfer more bytes once to decrease interruptsQipan Li2-2/+3
the current codes send 1 bytes, then after getting TX done interrupt, send subsequent bytes. it causes redundant interrupts. for example, if we have 3 bytes in TX buffer, the TX flow is: 1. send 1 byte 2. get TX down interrupt 3. send the left 2 bytes 4. get TX down interrupt this patch moves to send more bytes and decrease interrupts, the new flow is: 1. send 3 bytes 2. get TX down interrupt Signed-off-by: Qipan Li <[email protected]> Signed-off-by: Barry Song <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09tty: serial: men_z135_uart: Wakeup UART after transmittingJohannes Thumshirn1-3/+3
Call uart_write_wakeup() after writing the hardware FIFO and updateing the FIFO pointers. This fixes high latency and jitter on PPP over Serial links. Reported-by: Jun Shih <[email protected]> Tested-by: Jun Shih <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09serial: treewide: Remove empty implementations of enable_ms()Alexander Shiyan40-239/+0
Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09serial: core: Make enable_ms() optionalAlexander Shiyan1-6/+11
This patch makes enable_ms() optional, so we can eliminate a lot of empty enable_ms() implementations from driver code. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09serial: samsung: no more support for S5PC100 SoCKukjin Kim1-2/+1
This patch removes s5pc100 related serial. Signed-off-by: Kukjin Kim <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09serial: samsung: no more support for S5P6440 and S5P6450 SoCsKukjin Kim2-2/+0
This patch removes s5p64x0 related serial because of removing support for s5p64x0 SoCs. Signed-off-by: Kukjin Kim <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09serial: samsung: Consider DT alias when probing portsTomasz Figa1-3/+10
Current driver code relies on probe order of particular samsung-uart instances, which makes it impossible to get proper initialization of ports when not all ports are available on board, not even saying of deterministic device naming. This patch fixes this on DT-enabled systems by using DT aliases for ports as instance ID, if specified, or falling back to legacy method otherwise to provide backwards compatibility. Signed-off-by: Tomasz Figa <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09serial: amba-pl010: Use devres APIsTushar Behera1-32/+16
Migrating to use devres managed APIs devm_kzalloc, devm_ioremap and devm_clk_get. Signed-off-by: Tushar Behera <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09serial: amba-pl011: Remove redundant labelTushar Behera1-20/+10
The label 'out' is only used to return the error code. We can return the error code directly and remove 'out' label. Signed-off-by: Tushar Behera <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09serial: samsung: Remove redundant labelTushar Behera1-4/+1
probe_err label only returns the error code. This label can be removed and the error code can be returned directly. Signed-off-by: Tushar Behera <[email protected]> Reviewed-by: Sachin Kamat <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-06-26of: Migrate of_find_node_by_name() users to for_each_node_by_name()Grant Likely1-6/+3
There are a bunch of users open coding the for_each_node_by_name() by calling of_find_node_by_name() directly instead of using the macro. This is getting in the way of some cleanups, and the possibility of removing of_find_node_by_name() entirely. Clean it up so that all the users are consistent. Signed-off-by: Grant Likely <[email protected]> Cc: Rob Herring <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Takashi Iwai <[email protected]>
2014-06-26tty: Update hypervisor tty drivers to use core stdout parsing code.Grant Likely3-70/+17
The evh_bytechan, hvc_opal and hvc_vio drivers all open code the parsing of the stdout node in the device tree. This patch simplifies the driver by removing the duplicated functionality. Signed-off-by: Grant Likely <[email protected]>
2014-06-26of: Enable console on serial ports specified by /chosen/stdout-pathGrant Likely1-0/+3
If the devicetree specifies a serial port as a stdout device, then the kernel can use it as the default console if nothing else was selected on the command line. For any serial port that uses the uart_add_one_port() feature, the uart_add_one_port() has all the information needed to automatically enable the console device, which is what this patch does. With this change applied, a device tree platform can be booted without any console= parameters on the command line and the kernel will still be able to determine its console. Tested on QEMU Versatile model and i.MX Signed-off-by: Grant Likely <[email protected]> Tested-by: Sascha Hauer <[email protected]>
2014-06-25Merge tag 'fixes-for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "A new set of bug fixes for 3.16, containing patches for seven platforms: at91: - drivers/misc fix for Kconfig PWM symbol - correction of several values in DT after conversion to CCF - fix at91sam9261/at91sam9261ek mistake in slow crystal vs. slow RC osc imx: - Use GPIO for card CD/WP on imx51-babbage and eukrea-mbimxsd51, because controller base CD/WP is not working in esdhc driver due to runtime PM support - A couple of random ventana gw5xxx board fixes - Add IMX_IPUV3_CORE back to defconfig, which gets lost when moving IPUv3 driver out of staging tree - Fix enet/fec clock selection on imx6sl - Fix display node on imx53-m53evk board - A couple of Cubox-i updates from Russell, which were omitted from the merge window due to dependency integrator: - fix an OF-related regression against 3.15 mvebu: - mvebu (v7) - Fix broken SoC ID detection - Select ARM_CPU_SUSPEND for v7 - Remove armada38x compatible string (no users yet) - Enable Dove SoC in mvebu_v7_defconfig - kirkwood - Fix phy-connection-type on GuruPlug board qcom: - enable gsbi driver in defconfig - fix section mismatch warning in serial driver samsung: - use WFI macro in platform_do_lowpower because exynos cpuhotplug includes a hardcoded WFI instruction and it causes compile error in Thumb-2 mode. - fix GIC reg sizes for exynos4 SoCs - remove reset timer counter value during boot and resume for mct to fix a big jump in printk timestamps - fix pm code to check cortex-A9 for another exynos SoCs - don't rely on firmware's secondary_cpu_start for mcpm sti: - Ethernet clocks were wrongly defined for STiH415/416 platforms - STiH416 B2020 revision E DTS file name contained uppercase, change to lowercase" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (33 commits) ARM: at91/dt: sam9261: remove slow RC osc ARM: at91/dt: define sam9261ek slow crystal frequency ARM: at91/dt: sam9261: correctly define mainck ARM: at91/dt: sam9n12: correct PLLA ICPLL and OUT values ARM: at91/dt: sam9x5: correct PLLA ICPLL and OUT values misc: atmel_pwm: fix Kconfig symbols ARM: integrator: fix OF-related regression ARM: mvebu: Fix the improper use of the compatible string armada38x using a wildcard ARM: dts: kirkwood: fix phy-connection-type for Guruplug ARM: EXYNOS: Don't rely on firmware's secondary_cpu_start for mcpm ARM: dts: imx51-eukrea-mbimxsd51-baseboard: unbreak esdhc. ARM: dts: imx51-babbage: Fix esdhc setup ARM: dts: mx5: Move the display out of soc {} node ARM: dts: mx5: Fix IPU port node placement ARM: mvebu: select ARM_CPU_SUSPEND for Marvell EBU v7 platforms ARM: mvebu: Fix broken SoC ID detection ARM: imx_v6_v7_defconfig: Enable CONFIG_IMX_IPUV3_CORE ARM: multi_v7_defconfig: Add QCOM GSBI driver ARM: stih41x: Rename stih416-b2020-revE.dts to stih416-b2020e.dts tty: serial: msm: Fix section mismatch warning ...
2014-06-21Merge tag 'tty-3.16-rc2' of ↵Linus Torvalds38-44/+60
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial bugfixes from Greg KH: "Here are some tty / serial driver bugfixes for 3.16-rc2 that resolve some reported issues. The samsung driver build error itself has been reported by a bunch of people, sorry about that one. The others are all tiny and everyone seems to like them in linux-next so far" * tag 'tty-3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty/serial: fix 8250 early console option passing to regular console tty: Correct INPCK handling serial: Fix IGNBRK handling serial: samsung: Fix build error
2014-06-20Merge tag 'sti-fixes-for-v3.16-rc1' of ↵Arnd Bergmann1-1/+1
git://git.stlinux.com/devel/kernel/linux-sti into fixes Merge "STi: DT fixes for v3.16" from Maxime Coquelin: Couple of DT fixes for STi platform issues discovered on V3.16-rc1. The fixes included are: - Ethernet clocks were wrongly defined for STiH415/416 platforms - STiH416 B2020 revision E DTS file name contained uppercase, change to lowercase. * tag 'sti-fixes-for-v3.16-rc1' of git://git.stlinux.com/devel/kernel/linux-sti: (2963 commits) ARM: stih41x: Rename stih416-b2020-revE.dts to stih416-b2020e.dts ARM: STi: DT: Properly define sti-ethclk & stmmaceth for stih415/6 Signed-off-by: Arnd Bergmann <[email protected]>
2014-06-19tty/serial: fix 8250 early console option passing to regular consoleRob Herring2-2/+5
In the conversion to generic early console, the passing of options from the early 8250 console to the regular ttyS console was broken. This resulted in the baud rate changing when switching consoles during boot. This feature allows specifying a single console option on the kernel command line rather than both an early console and regular serial tty console. It would be nice to generalize this feature. However, it only works if the correct baud rate can be probed early which is not the case on many platforms which have non-standard UART clock rates. So for now, this is left as an 8250 specific feature. Reported-and-tested-by: Tony Luck <[email protected]> Signed-off-by: Rob Herring <[email protected]> Cc: Jiri Slaby <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>