summaryrefslogtreecommitdiff
path: root/drivers/serial
AgeCommit message (Collapse)Author
2011-05-27serial-core: keep value of console cflag in uart_update_termiosAlexandre Courbot
uart_update_termios is called on console resume and restores the line parameters using cons->cflag before resetting it. However code in uart_resume_port does the same afterwards, applying a 0 value to the port's cflag and erasing the correct setting. This patch preserves the value of cflag in uart_update_termios to prevent this and allow the serial console to restore properly even if there is no program using it on user side. Serial code has been largely refactored upstream in the upstream kernel and faulty code apparently removed. Fixes bug 831077 Change-Id: Ia894f971d9b6bb0c6103dbca9d169dc2a2148f84 Reviewed-on: http://git-master/r/33098 Reviewed-by: Alex Courbot <acourbot@nvidia.com> Tested-by: Alex Courbot <acourbot@nvidia.com> Reviewed-by: David Schalig <dschalig@nvidia.com> Reviewed-by: Janne Hellsten <jhellsten@nvidia.com>
2011-05-09serial: core: Restore termios settings on resume console portsVandana Salve
The commit 4547be7 rewrites suspend and resume functions. According to this rewrite, when a serial port is a printk console device and can suspend(without set no_console_suspend flag), it will definitely call set_termios function during its resume, but parameter termios isn't initialized, this will pass an unpredictable config to the serial port. If this serial port is not a userspace opened tty device , a suspend and resume action will make this serial port unusable. I.E. ttyS0 is a printk console device, ttyS1 or keyboard+display is userspace tty device, a suspend/resume action will make ttyS0 unusable. If a serial port is both a printk console device and an opened tty device, this issue can be overcome because it will call set_termios again with the correct parameter in the uart_change_speed function. Refer to the deleted content of commit 4547be7, revert parts relate to restore settings into parameter termios. It is safe because if a serial port is a printk console only device, the only meaningful field in termios is c_cflag and its old config is saved in uport->cons->cflag, if this port is also an opened tty device, it will clear uport->cons->cflag in the uart_open and the old config is saved in tty->termios. refer http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.37.y.git; a=commit;h=891b9dd10764352926e1e107756aa229dfa2c210 cherry-pick the changes from the kernel 2.6.37 commit id :891b9dd10764352926e1e107756aa229dfa2c210 Cherry-picked http://git-master/r/#change,20302 Bug 819016 Change-Id: Ic7ce0a6d595c0e1f65285d7978db93be12158f0f Reviewed-on: http://git-master/r/30680 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-04-01merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: drivers/serial/tegra_hsuart.c drivers/usb/host/ehci-tegra.c Change-Id: Ief6c03a63615a41e85de59ad14dedef309d0b2fb
2011-03-28serial: 8250: support auto control of RTSCTS on tegra typePradeep Goudagunta
Add UART_CAP_HW_CTSRTS flag to tegra type for supporting auto control of RTSCTS. Bug 803910 Change-Id: I7b69e4b203e66903ba5755338fcb55f4a87b9a43 Reviewed-on: http://git-master/r/24463 Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-03-22Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
2011-03-22serial: tegra_hsuart: Make sure current byte rx complete in suspendAndrei Warkentin
Make sure that the last byte has been received by the uart during suspend after RTS is deasserted. Change-Id: I3517ec058fdca912ff5ad8770d2b1c5015385385 Signed-off-by: Andrei Warkentin <andreiw@motorola.com> Signed-off-by: Colin Cross <ccross@android.com>
2011-03-22serial: tegra_hsuart: Call complete callbacks when cancelling reqsColin Cross
Updates the tegra_hsuart driver to match the changes in the Tegra dma engine. Change-Id: Iaaf8770166156c1a6d889a6a11bae517626781ee Signed-off-by: Colin Cross <ccross@android.com>
2011-03-08tegra hsuart: Clean tx_bytes in tegra_flush_bufferVictor Ryabukhin
tx_bytes might contain amount of bytes which should be transmitted after next "tx empty" interrupt. If we clear xmit circular buffer, tx_bytes should also be set to 0, otherwise it will lead to crash in fill_tx_fifo. Bug 794635 Change-Id: Ia34aba33dd09730c8f91d19e5c103cf1060a357e Reviewed-on: http://git-master/r/21844 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2011-03-07merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: arch/arm/mach-tegra/include/mach/system.h arch/arm/mach-tegra/include/mach/usb_phy.h arch/arm/mach-tegra/usb_phy.c drivers/usb/host/ehci-tegra.c drivers/video/tegra/dc/dc.c drivers/video/tegra/dc/hdmi.c include/linux/tegra_usb.h Change-Id: Ic1f4f2b360893e8de6b867a8ecc239aca02367da
2011-03-01Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
2011-03-01serial: tegra_hsuart: Clean-up FIFO flush and set baudrate operations.Andrei Warkentin
Do necessary waits and fifo clear according to NV. Also use 115200 as the rate set while bringing-up rx dma during init, to decrease start-up time. Change-Id: I5211c75607cf2880ab2b1c22ab30f2c265534a1c Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
2011-02-22serial: core: skip call set_termios/console_start when no_console_suspendpuneet saxena
The commit 4547be7 rewrites suspend and resume functions, this introduces a problem on the OMAP3EVM platoform. when the kernel boots with no_console_suspend and we suspend the kernel, then resume it, the serial console will be not usable. This problem should be common for all platforms. The cause for this problem is that when enter suspend, if we choose no_console_suspend, the console_stop will be skiped. But in resume function, the console port will be set to uninitialized state by calling set_termios function and the console_start is called without checking whether the no_console_suspend is set, Now fix it. Refer http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.37.y.git; a=commit;h=ca2e71aa8cfb0056ce720f3fd53f59f5fac4a3e1 for cherry-pick the changes from the kernel 2.6.37, commit id as ca2e71aa8cfb0056ce720f3fd53f59f5fac4a3e1 Bug 758845 Change-Id: Ib83494b2b13cd7179d3ae173be328c8cd776d431 Signed-off-by: puneet saxena <puneets@nvidia.com> Reviewed-on: http://git-master/r/19590 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2011-02-22arm: tegra: hsuart: Support for Bluetooth wakeupPradeep Goudagunta
Added support to tegra_hsuart driver for bluetooth wakeup. Bug 773186 Change-Id: Id8f1face1b99942fd13949d0815a1dedd1a5a5d0 Reviewed-on: http://git-master/r/19586 Reviewed-by: Anantha Idapalapati <aidapalapati@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Anantha Idapalapati <aidapalapati@nvidia.com>
2011-02-03arm: serial: tegra: add PORT_TEGRA port typePradeep Goudagunta
added new entry for PORT_TEGRA in serial8250 driver and updated flags and type of debug uart. Bug : 782543 Change-Id: I3e6c59f7a24731e92bd48197c6b1b22acdba8a8f Reviewed-on: http://git-master/r/17995 Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Shail Dave <sdave@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com>
2011-02-02arm: tegra_hsuart: Add wake_peer operationNitin Kumbhar
Recently wake_peer op was added to uart_ops. Add this op for tegra_hsuart allowing a platform to implement peer specific wakeup. BUG 781303 Change-Id: Icfbac324815d7737c0e0820e57a2e8d844855ba0 Reviewed-on: http://git-master/r/17993 Tested-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2010-12-23merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: arch/arm/mach-tegra/board-ventana-power.c drivers/mfd/tps6586x.c Change-Id: Ic8c46d4251d6e71fa2900b7e876f87e256299bc4
2010-12-21Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
Conflicts: drivers/usb/gadget/composite.c Change-Id: I1a332ec21da62aea98912df9a01cf0282ed50ee1
2010-12-21Merge commit 'v2.6.36.2' into linux-tegra-2.6.36Colin Cross
2010-12-13[armi]tegra: serial: Removing tx workqueue.Laxman Dewangan
Following are changes: - Removed the tx workqueue and start next trsnafer in tx dma complete callback only. - Remove the wait for tx fifo empty before starting next transfer. The uart controller req dma/gen interrupt only when trigger level reached. bug 765172 Change-Id: I1cc9c528451c7d0f733c16c8b64ca79cdab31d64 Reviewed-on: http://git-master/r/12697 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2010-12-09serial: mfd: adjust the baud rate settingFeng Tang
commit a5880a9e5bb40fbae55de60051d69a29091053c3 upstream. Previous baud rate setting code only has been tested with 3.5M/9600/ 115200/230400/460800 bps, and recently we got a 3M bps device to test, which needs to modify current MUL register setting, and with this patch 2.5M/2M/1.5M/1M/0.5M should also work as they just use a MUL value scale down from 3M's. Also got some reference register setting from silicon guys for different baud rates, which tries to keep the pre-scalar register value to 16. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-24Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
2010-11-24serial: tegra_hsuart: Use resources instead of platform data.Jaikumar Ganesh
Use resources to pass data to tegra_hsuart to set mapbase, irq. Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
2010-11-04Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
2010-11-04serial: tegra_hsuart: Fix sleeping while atomicColin Cross
Move the flush_work outside of stop_tx, do it during suspend and shutdown instead. Move the tty portion of the tx work into the dma complete callback, and only handle polling on the fifo and then requeuing the dma in the work function. Change-Id: I56db6504d35e5e7019379dc8a4323b4a27c72e59 Signed-off-by: Colin Cross <ccross@android.com>
2010-10-28Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
2010-10-28serial: tegra_hsuart: Remove suspend log spamColin Cross
Change-Id: I22045608426ff317e6dd7e6f4c8b408f40aeb75f Signed-off-by: Colin Cross <ccross@android.com>
2010-10-27[ARM] tegra: hsuart: use a workqueue in the tx dma callbackIliyan Malchev
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-21Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
2010-10-21Merge commit 'v2.6.36' into linux-tegra-2.6.36Colin Cross
2010-10-19SERIAL: ioc3_serial: Return -ENOMEM on memory allocation failureJulia Lawall
In this code, 0 is returned on memory allocation failure, even though other failures return -ENOMEM or other similar values. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression ret; expression x,e1,e2,e3; @@ ret = 0 ... when != ret = e1 *x = \(kmalloc\|kcalloc\|kzalloc\)(...) ... when != ret = e2 if (x == NULL) { ... when != ret = e3 return ret; } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> To: Pat Gefre <pfg@sgi.com> Cc: kernel-janitors@vger.kernel.org Cc: linux-ia64@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1704/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-10-18Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
Change-Id: I200eea8eecc5afb9eb1595f2b5357315b0b14808
2010-10-18[arm/tegra]serial:rewrite interrupt handlerJay Cheng
rewrite interrupt handler to prevent race condition between dma operation and serial isr. Change-Id: I4464ba882f39ff1dc2423241f6582df687057420 Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2010-10-15Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
2010-10-15Merge commit 'v2.6.36-rc8' into linux-tegra-2.6.36Colin Cross
2010-10-14Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36Colin Cross
2010-10-14[arm]: tegra: serial: DMA allocation fix.Mike Corrigan
Handle the case where DMA channels cannot be allocated and PIO must be used. Fixed a typo for forcing RX to use PIO. Change-Id: I167184f9ce936d4a08dd9919ae4f8b0d9ad7e0c4 Signed-off-by: Mike Corrigan <michael.corrigan@motorola.com>
2010-10-06Merge branch 'android-2.6.36' into android-tegra-2.6.36Colin Cross
Conflicts: drivers/input/touchscreen/Kconfig Change-Id: Ifc75266e258f9513d78c47c12e2f1de1d2344f02
2010-10-06[ARM] tegra: tegra_hsuart: fix a typoIliyan Malchev
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-06[ARM] serial: update tegra_hsuart to use PTR_ERRless dma APIErik Gilling
Change-Id: I071d99032995c878bc1d563cda56602f5410ab43 Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-06serial: tegra_hsuart: Fix typo preventing non 8-bit modesColin Cross
Change-Id: Ife085017dd7a956c46ad4077c5bbf33d5a049f3d Signed-off-by: Colin Cross <ccross@android.com>
2010-10-06serial: tegra_hsuart: fix receive DMA, RTS, timeout, and tx triggerJay Cheng
initialize baud rate and configuration settings to safe default values when receive DMA is in use, so that the DMA request may be enqueued at initialization time re-enqueue the receive DMA buffer immediately it is dequeued by the DMA threshold callback and the receive ISR, rather than waiting for the DMA complete callback originally fixed by Gary King <gking@nvidia.com> Fixing tx trigger level setting: On tegra uart, the FCR setting for different tx trigger level is not same as the 16550 tx trigger level setting. The tegra uart have the setting in reverse direction on tx fifo attention level: b00 for 16 bytes attention level. b01 for 8 byte attention level. b10 for 4 byte attention level b11 for 1 byte attention level. The rx trigger attention level match with the standard uart FCR register setttings. Also fixing the typo in code when setting DTR. originally fixed by Laxman Dewangan (ldewangan@nvidia.com) Change-Id: Iea00478f143e61c604828035c6c92d614fa7cccb Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2010-10-06serial: tegra_hsuart: Fix void return type on writel accessorsColin Cross
Signed-off-by: Colin Cross <ccross@google.com>
2010-10-06serial: tegra_hsuart: fix section mismatch errorGary King
Change-Id: Ib4c1872c691a98f11bc7c8553df41bec93f64285 Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06serial: tegra_hsuart: Cleanups and bug fixesColin Cross
tegra_start_tx was called directly by the serial core, as well as from dma and serial interrupts to queue the next block of data. Separate out the "queue next data" functionality into tegra_start_next_tx. Also fixes TX PIO by adjusting FIFO sizes and prevents last characters from getting lost by spinning on TEMT before disabling clocks. Change-Id: If8ce15490f77dcbde48f1e64959d5c3f0ec35120 Signed-off-by: Colin Cross <ccross@android.com>
2010-10-06serial: tegra_hsuart: Fix DMA receive, drop err in dma callbacksColin Cross
Change-Id: I4c4bc12e8c883912f8979b75a8eb418a62e77f94 Signed-off-by: Colin Cross <ccross@android.com>
2010-10-06serial: Add tegra_hsuart driverColin Cross
Change-Id: Ic2d0a43ac3597c8a270758af6ea3090acdd0fe7f Signed-off-by: Colin Cross <ccross@android.com>
2010-10-01drivers/serial/mrst_max3110.c needs linux/irq.hAndrew Morton
sparc64 allmodconfig: drivers/serial/mrst_max3110.c: In function `serial_m3110_startup': drivers/serial/mrst_max3110.c:470: error: `IRQ_TYPE_EDGE_FALLING' undeclared (first use in this function) Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-01drivers/serial/mfd.c needs slab.hAndrew Morton
alpha allmodconfig: drivers/serial/mfd.c:144: error: implicit declaration of function 'kzalloc' drivers/serial/mfd.c:144: warning: assignment makes pointer from integer without a cast Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-29serial_core: Add wake_peer uart operation which is called before starting ↵San Mehat
UART TX. The idea here is to provide a mechanism where we can wakeup our peer before sending data. Signed-off-by: San Mehat <san@google.com>
2010-09-20serial: mfd: fix bug in serial_hsu_remove()Feng Tang
Medfield HSU driver deal with 4 pci devices(3 uart ports + 1 dma controller), so in pci remove func, we need handle them differently Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>