summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vt: Don't check KD_GRAPHICS when binding/unbindingDaniel Vetter2015-05-101-20/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was introduced in commit 6db4063c5b72b46e9793b0f141a7a3984ac6facf Author: Antonino A. Daplas <adaplas@gmail.com> Date: Mon Jun 26 00:27:12 2006 -0700 [PATCH] VT binding: Add sysfs control to the VT layer with the justification "In addition, if any of the consoles are in KD_GRAPHICS mode, binding and unbinding will not succeed. KD_GRAPHICS mode usually indicates that the underlying console hardware is used for other purposes other than displaying text (ie X). This feature should prevent binding/unbinding from interfering with a graphics application using the VT." I think we should lift this artificial restriction though: - KD_GRAPHICS doesn't get cleaned up automatically, which means it's easy to have terminals stuck in KD_GRAPHICS when hacking around on X. - X doesn't really care, especially with drm where kms already blocks fbdev (and hence fbcon) when there's an active compositor. - This is a root-only interface with a separate .config option and it's possible to hang your machine already anyway if you unload/reload drivers and don't know what you're doing. With this patch i915.ko module reloading works again reliably, something in the recent fedora upgrades broke things. Cc: Antonino A. Daplas <adaplas@gmail.com> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: fix console lock vs. kernfs s_active lock orderImre Deak2015-05-101-10/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently there is a lock order problem between the console lock and the kernfs s_active lock of the console driver's bind sysfs entry. When writing to the sysfs entry the lock order is first s_active then console lock, when unregistering the console driver via do_unregister_con_driver() the order is the opposite. See the below bugzilla reference for one instance of a lockdep backtrace. Fix this by unregistering the console driver from a deferred work, where we can safely drop the console lock while unregistering the device and corresponding sysfs entries (which in turn acquire s_active). Note that we have to keep the console driver slot in the registered_con_driver array reserved for the driver that's being unregistered until it's fully removed. Otherwise a concurrent call to do_register_con_driver could try to reuse the same slot and fail when registering the corresponding device with a minor index that's still in use. Note that the referenced bug report contains two dmesg logs with two distinct lockdep reports: [1] is about a locking scenario involving s_active, console_lock and the fb_notifier list lock, while [2] is about a locking scenario involving only s_active and console_lock. In [1] locking fb_notifier triggers the lockdep warning only because of its dependence on console_lock, otherwise case [1] is the same s_active<->console_lock dependency problem fixed by this patch. Before this change we have the following locking scenarios involving the 3 locks: a) via do_unregister_framebuffer()->...->do_unregister_con_driver(): 1. console lock 2. fb_notifier lock 3. s_active lock b) for example via give_up_console()->do_unregister_con_driver(): 1. console lock 2. s_active lock c) via vt_bind()/vt_unbind(): 1. s_active lock 2. console lock Since c) is the console bind sysfs entry's write code path we can't change the locking order there. We can only fix this issue by removing s_active's dependence on the other two locks in a) and b). We can do this only in the vt code which owns the corresponding sysfs entry, so that after the change we have: a) 1. console lock 2. fb_notifier lock b) 1. console lock c) 1. s_active lock 2. console lock d) in the new con_driver_unregister_callback(): 1. s_active lock [1] https://bugs.freedesktop.org/attachment.cgi?id=87716 [2] https://bugs.freedesktop.org/attachment.cgi?id=107602 v2: - get console_lock earlier in con_driver_unregister_callback(), so we protect the following console driver field assignments there - add code coment explaining the reason for deferring the sysfs entry removal - add a third paragraph to the commit message explaining why there are two distinct lockdep reports and that this issue is independent of fb/fbcon. (Peter Hurley) v3: - clarify further the third paragraph v4: - rebased on v4 of patch 1/3 Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty/hvc: remove celleb-only beat driverDaniel Axtens2015-05-103-142/+0Star
| | | | | | | | | | | | | | | The beat hvc driver is only used by celleb. celleb has been dropped [1], so drop the drivers. [1] http://patchwork.ozlabs.org/patch/451730/ CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org> CC: Jiri Slaby <jslaby@suse.cz> CC: Valentin Rothberg <valentinrothberg@gmail.com> CC: mpe@ellerman.id.au CC: linuxppc-dev@lists.ozlabs.org Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/tty/nozomi.c: rename CONFIG_MAGICValentin Rothberg2015-05-101-4/+4
| | | | | | | | | The CONFIG_ prefix is reserved for Kconfig options in Make and CPP syntax. CONFIG_MAGIC is a file local CPP identifier so change the prefix to apply to Kconfig's naming convention. Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: msm_smd_tty: Remove unused driverStephen Boyd2015-05-103-241/+0Star
| | | | | | | | | | | This code is no longer used now that mach-msm has been removed. Delete it. Cc: David Brown <davidb@codeaurora.org> Cc: Bryan Huntsman <bryanh@codeaurora.org> Cc: Daniel Walker <dwalker@fifo99.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* fbcon: use the cursor blink interval provided by vtScot Doyle2015-05-102-5/+6
| | | | | | | | | | vt now provides a cursor blink interval via vc_data. Use this interval instead of the currently hardcoded 200 msecs. Store it in fbcon_ops to avoid locking the console in cursor_timer_handler(). Signed-off-by: Scot Doyle <lkml14@scotdoyle.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: add cursor blink interval escape sequenceScot Doyle2015-05-102-0/+10
| | | | | | | | | | | | | | | Add an escape sequence to specify the current console's cursor blink interval. The interval is specified as a number of milliseconds until the next cursor display state toggle, from 50 to 65535. /proc/loadavg did not show a difference with a one msec interval, but the lower bound is set to 50 msecs since slower hardware wasn't tested. Store the interval in the vc_data structure for later access by fbcon, initializing the value to fbcon's current hardcoded value of 200 msecs. Signed-off-by: Scot Doyle <lkml14@scotdoyle.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: tegra: Correct error handling on DMA setupJon Hunter2015-05-101-23/+28
| | | | | | | | | | | | | | Function tegra_uart_dma_channel_allocate() does not check that dma_map_single() mapped the DMA buffer correctly. Add a check for this and appropriate error handling. Furthermore, if dmaengine_slave_config() (called by tegra_uart_dma_channel_allocate()) fails, then memory allocated/mapped is not freed/unmapped. Therefore, call tegra_uart_dma_channel_free() instead of just dma_release_channel() if dmaengine_slave_config() fails. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: tegra: Correct shutdown of UARTsJon Hunter2015-05-101-7/+4Star
| | | | | | | | | | | | | | | | | | | There are two issues in the shutdown path of the UARTs which are: 1. The function tegra_uart_shutdown() calls tegra_uart_flush_buffer() to stop DMA TX transfers. However, tegra_uart_flush_buffer() is called after the DMA channels have already been freed and so actually does nothing. 2. The function that frees the DMA channels (tegra_uart_dma_channel_free()), unmaps the dma buffer before freeing the DMA channel and does not ensure the DMA has been stopped. Resolve this by fixing the code in tegra_uart_dma_channel_free() to ensure the DMA is stopped, free the DMA channel and then unmap the DMA buffer. Finally, remove the unnecessary call to tegra_uart_flush_buffer(). Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: tegra: Fix cookie used by TX channelJon Hunter2015-05-101-1/+1
| | | | | | | | The DMA cookie for the RX channel is being used by the TX channel. Therefore, fix driver to use the correct DMA cookie for the TX channel. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: tegra: Use unsigned types for RX and TX byte countsJon Hunter2015-05-101-7/+8
| | | | | | | | | | | The function tty_insert_flip_string() takes an argument "size" which is of type size_t. This is an unsigned type. Update the count, rx_bytes_requested and tx_bytes_requested in the tegra serial driver to be unsigned integers so that an unsigned type is passed to tty_insert_flip_string(). Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: tegra: handle race condition on uart rx sideShardar Shariff Md2015-05-101-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tegra serial driver has two paths through which receive data is copied up to the tty layer. These are: 1. DMA completion callback 2. UART RX interrupt A UART RX interrupt occurs for either RX_TIMEOUT (data has been sitting in the Rx FIFO for more than 4 character times without being read because there is not enough data to reach the trigger level), End of Receive Data event (receiver detects that data stops coming in for more than 4 character times) or a receive error. In the RX interrupt path, the following happens ... - All RX DMA transfers are stopped - Any data in the DMA buffer and RX FIFO are copied up to the tty layer. - DMA is restarted/primed for the RX path In the DMA completion callback, the DMA buffer is copied up to the tty layer but there is no check to see if the RX interrupt could have occurred between the DMA interrupt firing the the DMA callback running. Hence, if a RX interrupt was to occur shortly after the DMA completion interrupt, it is possible that the RX interrupt path has already copied the DMA buffer before the DMA callback has been called. Therefore, when the DMA callback is called, if the DMA is already in-progress, then this indicates that the UART RX interrupt has already occurred and there is nothing to do in the DMA callback. This race condition can cause duplicated data to be received. Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com> [jonathanh@nvidia.com: Moved async_tx_ack() call to after check to see if DMA has completed because if the DMA is in progress we do not need to ACK yet. Changed the print from dev_info to dev_debug. Updated changelog to add more commentary on the race condition based upon feedback from author.] Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: tegra: check the count and read if any from dmaShardar Shariff Md2015-05-101-4/+6
| | | | | | | | | | | | | | | | | | It is only necessary to read data from the dma buffer when the count value is non-zero and hence, tegra_uart_copy_rx_to_tty() so only be called when this is the case. Although, this was being tested for in two places, there is a third place where this was not tested. However, instead of adding another if-statement prior to calling tegra_uart_copy_rx_to_tty(), move the test inside the function. Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com> [jonathanh@nvidia.com: Re-worked patch to move the check for the count value inside the function tegra_uart_copy_rx_to_tty(). Updated changelog with more commentary.] Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: tegra: Add delay after enabling FIFO modeJon Hunter2015-05-101-0/+10
| | | | | | | | | For all tegra devices (up to t210), there is a hardware issue that requires software to wait for 3 UART clock periods after enabling the TX fifo, otherwise data could be lost. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: tegra: Correct delay after TX flushJon Hunter2015-05-101-2/+22
| | | | | | | | | | | For all tegra devices (up to t210), there is a hardware issue that requires software to wait for 32 UART clock periods for the flush to propagate otherwise TX data could be post. Add a helper function to wait for N UART clock periods and update delay following FIFO flush to be 32 UART clock cycles. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: of_serial: do not set port.type twiceMasahiro Yamada2015-05-101-1/+0Star
| | | | | | | | | The port.type has already been set by of_platform_serial_setup() called from a few lines above. Setting it to the same value is redundant. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250: do not copy port.fifosize member twiceMasahiro Yamada2015-05-101-1/+0Star
| | | | | | | | | The port.fifosize member has already been copied at 8 lines above. Maybe the compiler optimization can clean it away, but just in case. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: xuartps: add __init to earlycon write methodMasahiro Yamada2015-05-101-1/+2
| | | | | | | | Early console functions are only used during the early boot stage. This change just saves a small amount of memory footprint. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250: Do nothing if nr_uarts=0Jan Kiszka2015-05-101-1/+7
| | | | | | | | | | | | When nr_uarts was set to 0 (via config or 8250_core.nr_uarts), we crash early on x86 because serial8250_isa_init_ports dereferences base_ops which remains NULL. In fact, there is nothing to do for all the callers of serial8250_isa_init_ports if there are no uarts. Based on suggestions by Peter Hurley. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: samsung: Constify platform_device_idKrzysztof Kozlowski2015-05-101-1/+1
| | | | | | | | The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: samsung: Staticize local symbolKrzysztof Kozlowski2015-05-101-1/+1
| | | | | | | Staticize symbols not exported and not used outside of file. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: mxs: Constify platform_device_idKrzysztof Kozlowski2015-05-101-1/+1
| | | | | | | | The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: imx: Constify platform_device_idKrzysztof Kozlowski2015-05-101-1/+1
| | | | | | | | The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sh-sci: Remove obsolete comment about overrun detectionGeert Uytterhoeven2015-05-101-5/+0Star
| | | | | | | | The code it refers to was removed in commit b545e4f40613be70 ("serial: sh-sci: Compute overrun_bit without using baud rate algo"). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sh-sci: Don't set SCLSR bits in the SCxSR error maskGeert Uytterhoeven2015-05-101-1/+2
| | | | | | | | | | | | error_mask is the union of all error indicating bits in the SCxSR register, while overrun_mask may apply to a different register (SCLSR), depending on the SCI variant. Hence overrun_mask should only be ORed into error_mask if it applies to the SCxSR register. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sh-sci: Use the correct register for overrun checksGeert Uytterhoeven2015-05-101-25/+15Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The various SCI implementations use 3 different methods to signal overrun errors: - Bit SCI_ORER in register SCxSR on SCI, - Bit SCIFA_ORER in register SCxSR on SCIFA and SCIFB, and SCIF on SH7705/SH7720/SH7721, - Bit SCLSR_ORER in (optional!) register SCLSR on (H)SCIF. However: 1. sci_handle_fifo_overrun() a. handles (H)SCIF and SCIFA/SCIFB only, b. treats SCIF on SH7705/SH7720/SH7721 incorrectly, 2. sci_mpxed_interrupt() a. treats SCIF on SH7705/SH7720/SH7721 incorrectly, b. ignores that not all SCIFs have the SCLSR register, causing "Invalid register access" WARN()ings. To fix the above: 1. Determine and store the correct register enum during initialization, 2. Replace the duplicated buggy switch statements by using the stored register enum, 3. Add the missing existence check to sci_mpxed_interrupt(). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sh-sci: Replace hardcoded overrun bit valuesGeert Uytterhoeven2015-05-102-15/+16
| | | | | | | | | Add the missing overrun bit definition for (H)SCIF. Replace overrun_bit by overrun_mask, so we can use the existing defines instead of hardcoded values. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sh-sci: Replace hardcoded values in SCxSR_*_CLEAR macrosGeert Uytterhoeven2015-05-101-10/+34
| | | | | | | | | | | | | | | | | | | | | | Add the missing overrun error bit in SCxSR on SCIFA/SCIFB and SCIF on SH7705/SH7720/SH7721. Document what the corresponding bit(s) on plain SCIF are used for. Sort the components of SCIF_DEFAULT_ERROR_MASK by reverse definition order. Replace the hardcoded values in the SCxSR_*_CLEAR macros by proper defines. Use bit masks (negations of sets of bits) to make it more obvious which bits are being cleared. Assembler output (on sh) was compared before and after this commit: - For the first branch of the big "#if defined(...) || ..." construct, the code has changed slightly, as 32-bit bitmasks can be loaded in a single instruction, unlike the old large 16-bit constants (the SCxSR register is 16 bit, so we don't care about the top 16 bits), - For the second branch, the generated code is identical. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sh-sci: Standardize on using the BIT() macro to define register bitsGeert Uytterhoeven2015-05-102-45/+47
| | | | | Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sh-sci: Document remaining FIFO Control Register bitsGeert Uytterhoeven2015-05-101-3/+3
| | | | | Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sh-sci: Add SCIFA/B SCPCR register definitionsGeert Uytterhoeven2015-05-102-0/+32
| | | | | | | | | | Add the register definitions for the Serial Port Control and Data Registers on SCIFA/SCIFB, which are needed for RTS/CTS pin control. Extracted from patches by Magnus Damm <damm+renesas@opensource.se>. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sh-sci: Add (H)SCIF RTS/CTS pin data register bit definitionsGeert Uytterhoeven2015-05-101-0/+2
| | | | | | | | | | Add the missing register bit definitions to set the RTS pin and read the CTS pin on (H)SCIF. Extracted from patches by Magnus Damm <damm+renesas@opensource.se>. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sh-sci: Move private definitions to private header fileGeert Uytterhoeven2015-05-102-73/+77
| | | | | | | | | | | | | Move private register definitions and enums from the public <linux/serial_sci.h> header file to the driver private "sh-sci.h" header file. The common Serial Control Register definitions are left in the public header file, as they're needed to fill in plat_sci_port.scscr on legacy systems not using DT. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: tty_ldsem.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-1/+2
| | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: tty_buffer.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-1/+2
| | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: synclinkmp.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-4/+8
| | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: synclink_gt.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-5/+10
| | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: synclink.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-5/+10
| | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: mpsc.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-9/+16
| | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: ioc4_serial.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-3/+6
| | | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Pat Gefre <pfg@sgi.com> CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: ioc3_serial.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-1/+2
| | | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Pat Gefre <pfg@sgi.com> CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: icom.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-5/+6
| | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: hvcs.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-2/+2
| | | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> CC: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: hvc_console.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-1/+2
| | | | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> CC: Tomoki Sekiyama <tomoki.sekiyama@hds.com> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: crisv10.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-4/+8
| | | | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Mikael Starvik <starvik@axis.com> CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
* tty: consolemap.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-23/+37
| | | | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> CC: Takashi Iwai <tiwai@suse.de> CC: Imre Deak <imre.deak@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: amiserial.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-1/+2
| | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: 68328serial.c: move assignment out of if () blockGreg Kroah-Hartman2015-05-101-1/+2
| | | | | | | | | | We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sirf: use uart_port's fifosize for fifo related operationQipan Li2015-05-102-44/+33Star
| | | | | | | | | | | | | | | In SiRF platform, there are different fifo size of uart and usp, with the fifosize configuration changes in different chips, we can not use port line to decide how to check FIFO full,empty and level. There is a direct mapping between FIFO HW register layout with fifo size, so move to use fifosize as the input to check fifo status. Signed-off-by: Qipan Li <Qipan.Li@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: sirf: use dynamic method allocate uart structureQipan Li2015-05-102-69/+23Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In different platform of SiRF SoCs, there is no same uart and usp-uart numbers, it is not convenient to use hard-coded ports array and port lines. here we drop the hard-coded ports table , and drop "cell-index". then move to use alias id to get line. for example: aliases { serial0 = &uart0; serial1 = &uart1; serial2 = &uart2; serial3 = &uart3; serial4 = &uart4; serial5 = &uart5; serial6 = &uart6; serial9 = &usp2; }; at the same, enlarge the max port number according to the chip with the most UART. Signed-off-by: Qipan Li <Qipan.Li@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>