- 05 Jan, 2012 10 commits
-
-
Saleem Abdulrasool authored
These methods are invoked if the iMX uart is used in conjuction with kgdb during early boot. In order to access the UART without the interrupts, the kernel uses the basic polling methods for IO with the device. With these methods implemented, it is now possible to enable kgdb during early boot over serial. Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> Signed-off-by: Dirk Behme <dirk.behme@gmail.com> CC: Sascha Hauer <s.hauer@pengutronix.de> CC: Fabio Estevam <festevam@gmail.com> CC: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> CC: linux-serial@vger.kernel.org CC: Alan Cox <alan@linux.intel.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Dirk Behme authored
Factor out the uart save/restore functionality instead of having the same code several times in the driver. Signed-off-by: Dirk Behme <dirk.behme@gmail.com> CC: Saleem Abdulrasool <compnerd@compnerd.org> CC: Sascha Hauer <s.hauer@pengutronix.de> CC: Fabio Estevam <festevam@gmail.com> CC: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> CC: linux-serial@vger.kernel.org CC: Alan Cox <alan@linux.intel.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Uwe Kleine-König authored
When the uart device is instantiated by dt but dt doesn't provide an alias then better let probing fail instead of falling back to an unrelated device id used for the line number and no platform data. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Uwe Kleine-König authored
A quick look at of_alias_get_id shows that in the error case it returns -ENODEV, too, but still it's better style to propagate the value as is. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Alan Cox <alan@linux.intel.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Jeremy Kerr <jeremy.kerr@canonical.com> Cc: Jason Liu <jason.hui@linaro.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Jason Liu <jason.hui@linaro.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Fabio Estevam authored
Allow UART to be a source for wakeup from low power mode. Tested on a MX27PDK by doing: echo enabled > /sys/devices/platform/imx21-uart.0/tty/ttymxc0/power/wakeup echo mem > /sys/power/state and then pressing a key in the console will wakeup the sytem. Suggested-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Tested-by: Richard Zhao <richard.zhao@freescale.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Paul Gortmaker authored
This driver was copied from the original 8250 driver and hence got the DEC alpha errata workaround. But the workaround is ugly and we don't really want it in any more places than it absolutely needs to be. Obviously ARCH=m32r means ARCH != alpha, so just remove the references to the ALPHA_KLUDGE_MCR define. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Uwe Kleine-König authored
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Alan Cox <alan@linux.intel.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Claudio Scordino authored
Patch to fix a spinlock lockup in the driver that sometimes happens when the tasklet starts. Signed-off-by: Claudio Scordino <claudio@evidence.eu.com> Signed-off-by: Dave Bender <codehero@gmail.com> Tested-by: Dave Bender <codehero@gmail.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Zeng Zhaoming authored
Virtual console unicode translation map leaks with following message when enable kmemleak: unreferenced object 0xeb5ec450 (size 192): comm "setfont", pid 665, jiffies 4294899028 (age 3696.220s) hex dump (first 32 bytes): e0 5b 9d eb 00 00 00 00 00 00 00 00 80 b9 ea eb .[.............. b0 5a 9d eb 00 00 00 00 00 00 00 00 00 00 00 00 .Z.............. backtrace: [<c1533f8c>] kmemleak_alloc+0x3c/0xa0 [<c114acc2>] kmem_cache_alloc_trace+0xe2/0x250 [<c13498e8>] con_clear_unimap+0x78/0xd0 [<c1345552>] vt_ioctl+0x1562/0x1d00 [<c133aa00>] tty_ioctl+0x230/0x7c0 [<c1171519>] do_vfs_ioctl+0x79/0x2d0 [<c11717df>] sys_ioctl+0x6f/0x80 [<c156601f>] sysenter_do_call+0x12/0x38 [<ffffffff>] 0xffffffff unreferenced object 0xeb9d5be0 (size 128): comm "setfont", pid 660, jiffies 4294899030 (age 3696.212s) hex dump (first 32 bytes): 60 c2 a6 eb 50 c8 a6 eb c0 54 9d eb 80 59 9d eb `...P....T...Y.. 90 53 9d eb 60 52 9d eb 60 92 9b eb 00 00 00 00 .S..`R..`....... backtrace: [<c1533f8c>] kmemleak_alloc+0x3c/0xa0 [<c114acc2>] kmem_cache_alloc_trace+0xe2/0x250 [<c134938c>] con_insert_unipair+0x7c/0x150 [<c1349f8c>] con_set_unimap+0x15c/0x1f0 [<c13456fb>] vt_ioctl+0x170b/0x1d00 [<c133aa00>] tty_ioctl+0x230/0x7c0 [<c1171519>] do_vfs_ioctl+0x79/0x2d0 [<c11717df>] sys_ioctl+0x6f/0x80 [<c156601f>] sysenter_do_call+0x12/0x38 [<ffffffff>] 0xffffffff The leak caused by con_set_default_unimap() not correct free the old map. Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Uwe Kleine-König authored
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
- 04 Jan, 2012 1 commit
-
-
Yegor Yefremov authored
add support for 400Hv3, 410Hv3 and 800Hv3 Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
- 13 Dec, 2011 3 commits
-
-
Sonic Zhang authored
Blackfin uart supports automatic CTS trigger when hardware flow control is enabled. No need to start and top tx in CTS interrupt. So, remote ASYNC_CTS_FLOW flag. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Sonic Zhang authored
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Paul Gortmaker authored
The recent commit "serial: add irq handler for Freescale 16550 errata" would allow Kconfig choices that had 8250 support as a module and yet still try and build in the errata fix non-modular, resulting in build failures for some non-embedded PPC targets. Since we hook in the errata fix from legacy_serial.c, which is built only for PPC_UDBG_16550, and since the errata is only really relevant for SysRQ on serial console, tighten up the dependencies to be exactly that. We'll get coverage on the relevant Freescale boards because the Kconfig for their CPU types all select the PPC_UDBG_16550 option, and the defconfigs also all select the 8250_CONSOLE option. Also, the 8250_CONSOLE option has a strict dependency on "SERIAL_8250=y" which resolves the reported problem for non Freescale targets. Reported-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Tested-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
- 10 Dec, 2011 17 commits
-
-
Paul Gortmaker authored
Sending a break on the SOC UARTs found in some MPC83xx/85xx/86xx chips seems to cause a short lived IRQ storm (/proc/interrupts typically shows somewhere between 300 and 1500 events). Unfortunately this renders SysRQ over the serial console completely inoperable. The suggested workaround in the errata is to read the Rx register, wait one character period, and then read the Rx register again. We achieve this by tracking the old LSR value, and on the subsequent interrupt event after a break, we don't read LSR, instead we just read the RBR again and return immediately. The "fsl,ns16550" is used in the compatible field of the serial device to mark UARTs known to have this issue. Thanks to Scott Wood for providing the errata data which led to a much cleaner fix. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Paul Gortmaker authored
Currently serial8250_handle_irq is a trivial wrapper around serial8250_handle_port, which actually does all the work. Since there are no other callers of serial8250_handle_port, we can just move it inline into serial8250_handle_irq. This also makes it more clear what functionality any custom IRQ handlers need to provide if not using serial8250_default_handle_irq. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Paul Gortmaker authored
The current 8250 timeout code duplicates the code path in serial8250_default_handle_irq and then serial8250_handle_irq i.e. reading iir, check for IIR_NO_INT, and then calling serial8250_handle_port. So the immediate thought is to replace the duplicated code with a call to serial8250_default_handle_irq. But this highlights a problem. We let 8250 driver variants use their own IRQ handler via specifying their own custom ->handle_irq, but in the event of a timeout, we ignore their handler and implicitly run serial8250_default_handle_irq instead. So, go through the struct to get ->handle_irq and call that, which for most will still be serial8250_default_handle_irq. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Paul Gortmaker authored
For drivers that need to construct their own IRQ handler, the three components are seen in the current handle_port -- i.e. Rx, Tx and modem_status. Make these exported symbols so that "almost" 8250 UARTs can construct their own IRQ handler with these shared components, while working around their own unique errata issues. The function names are given a serial8250 prefix, since they are now entering the global namespace. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Paul Gortmaker authored
The receive_chars() was taking a pointer to a passed in LSR value in status and knocking off bits as it processed them. But since receive_chars isn't returning a value, we can instead pass in a normal non-pointer value for LSR, and simply return the residual (unprocessed) LSR once it is done. The value in this cleanup, is that it clarifies the API of the receive_chars prior to exporting it to other 8250-like drivers for shared usage. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Paul Gortmaker authored
Since we want to promote sharing and move away from one single uart driver with a bunch of platform specific bugfixes all munged into one, relocate some header like material from the C file to the header. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Thorsten Wißmann authored
coding style fixes in n_tty.c Signed-off-by: Maximilian Krger <maxfragg@gmail.com> Signed-off-by: Thorsten Wimann <re06huxa@cip.cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Mayank Rana authored
msm_hs_handle_delta_cts tries to acquire port->lock already acquired by the callee function msm_hs_isr. Change function name to follow "_locked" convention. Signed-off-by: Mayank Rana <mrana@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Mayank Rana authored
Both tx and rx command_ptr_ptr are of type u32*. While allocating memory for it, sizeof(u32 *) is used as part of kmalloc API instead of sizeof(u32). ADM Hardare requires size of command_ptr_ptr as 1 Word. Both sizeof(u32 *) and sizeof(u32) are same on 32-bit architecture whereas sizeof(u32 *) would be different in size compare to sizeof(u32) on anyother architecture. Hence correct usage of sizeof(command_ptr_ptr) for Tx and Rx with kmalloc and dma_(map/unmap)_single APIs. Signed-off-by: Mayank Rana <mrana@codeaurora.org> Reported-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Maciej Szmigiero authored
Current serial_cs driver has a problem when trying to detect whether a card has multiple ports: serial_config() calls pcmcia_loop_config() which iterates over card CIS configurations by calling serial_check_for_multi() for each of them. This function wants to check (and select) a configuration that has either one long I/O window spanning multiple ports or two 8-port windows for two serial ports. Problem is, that every pcmcia_loop_config() iteration only updates the windows (via pcmcia_do_loop_config() in resource[0] and resource[1]) when CONF_AUTO_SET_IO flag is set on the device, which is set only later in the code. Fix it by setting this flag earlier. In addition to this, when multi-port card is detected and it does not have an one, long I/O window multi_config_check_notpicky() tries to locate two I/O windows and assumes they are continuous without checking. On an Argosy RS-COM 2P this selects first configuration, which unfortunately has two non-continuous I/O windows. The net effect is that the second serial port on the card does not work. Fix it by checking whether the windows are really continuous. Signed-off-by: Maciej Szmigiero <mhej@o2.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Wolfram Sang authored
Makes it easier to find all occurences requesting CONF_MODE_B. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Sonic Zhang authored
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Sonic Zhang authored
This patch is similar to that for bfin-uart hardware flow control. Sport emulated serial device may be probed earlier before GPIOLIB is initialized. Requesting and configuring CTS GPIO PIN fails in that early stage. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Sonic Zhang authored
Replace local_irq_disable by local_irq_save. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Sonic Zhang authored
Blackfin hardware CTS control generate interrupt for both CTS on and off. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Sonic Zhang authored
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Sonic Zhang authored
Serial device may be probed earlier before GPIOLIB is initialized. Requesting and configuring CTS GPIO PIN fails in that early stage. Do it when the serial device really starts up. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
- 30 Nov, 2011 3 commits
-
-
Ilya Zykov authored
N_HDLC can spoil tty->flags because use not atomic operations on tty->flags. I use n_hdlc line discipline and it happens. Signed-off-by: Ilya Zykov <ilya@ilyx.ru> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Axel Lin authored
This patch converts the drivers in drivers/tty/serial/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Arnd Bergmann <arnd@arndb.de> Cc: Jamie Iles <jamie@jamieiles.com> Cc: Yoichi Yuasa <yuasa@linux-mips.org> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Axel Lin authored
This patch converts the drivers in drivers/parport/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Ben Dooks <ben@simtec.co.uk> Cc: Derrick J. Brashear <shadow@dementia.org> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
- 27 Nov, 2011 6 commits
-
-
Lars-Peter Clausen authored
In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_driver_register(), so we can drop the manual assignment. The patch was generated using the following coccinelle semantic patch: // <smpl> @@ identifier _driver; @@ struct spi_driver _driver = { .driver = { - .bus = &spi_bus_type, }, }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Dan Williams authored
The semantics of UPF_IIR_ONCE (once per serial irq) are only guaranteed if the kt irq is not shared (once per serial isr in the shared case == potentially unwanted reads of the IIR). Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Dan Williams authored
Workaround dropped notifications in the iir register. Prevent reads coincident with new interrupt notifications by reading the iir at most once per interrupt. Reported-by: Nhan H Mai <nhan.h.mai@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Uwe Kleine-König authored
There is no need to call uart_write_wakeup after each character send. Once at the end of the write sequence is enough. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Uwe Kleine-König authored
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Shubhrajyoti D authored
The function check_modem_status returns an int currently it is stored in a char. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-