summaryrefslogtreecommitdiff
path: root/drivers/tty
AgeCommit message (Collapse)Author
2012-03-20Merge branch 'next/fixes-non-critical' into next/driversArnd Bergmann
Conflicts: arch/arm/mach-lpc32xx/clock.c arch/arm/mach-pxa/pxa25x.c arch/arm/mach-pxa/pxa27x.c The conflicts with pxa are non-obvious, we have multiple branches adding and removing the same clock settings. According to Haojian Zhuang, removing the sa1100 rtc dummy clock is the correct fix here. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-03-20Merge tag 'tty-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/ttyLinus Torvalds
Pull TTY/serial patches from Greg KH: "tty and serial merge for 3.4-rc1 Here's the big serial and tty merge for the 3.4-rc1 tree. There's loads of fixes and reworks in here from Jiri for the tty layer, and a number of patches from Alan to help try to wrestle the vt layer into a sane model. Other than that, lots of driver updates and fixes, and other minor stuff, all detailed in the shortlog." * tag 'tty-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (132 commits) serial: pxa: add clk_prepare/clk_unprepare calls TTY: Wrong unicode value copied in con_set_unimap() serial: PL011: clear pending interrupts serial: bfin-uart: Don't access tty circular buffer in TX DMA interrupt after it is reset. vt: NULL dereference in vt_do_kdsk_ioctl() tty: serial: vt8500: fix annotations for probe/remove serial: remove back and forth conversions in serial_out_sync serial: use serial_port_in/out vs serial_in/out in 8250 serial: introduce generic port in/out helpers serial: reduce number of indirections in 8250 code serial: delete useless void casts in 8250.c serial: make 8250's serial_in shareable to other drivers. serial: delete last unused traces of pausing I/O in 8250 pch_uart: Add module parameter descriptions pch_uart: Use existing default_baud in setup_console pch_uart: Add user_uartclk parameter pch_uart: Add Fish River Island II uart clock quirks pch_uart: Use uartclk instead of base_baud mpc5200b/uart: select more tolerant uart prescaler on low baudrates tty: moxa: fix bit test in moxa_start() ...
2012-03-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
2012-03-16powerpc/hvc_udbg: Don't crash when udbg_putc is NULLBenjamin Herrenschmidt
Also while at it, add some help text indicating why you shouldn't enable that driver under normal circumstances Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-15serial: pxa: add clk_prepare/clk_unprepare callsPhilipp Zabel
This patch adds clk_prepare/clk_unprepare calls to the serial/pxa driver by using the helper functions clk_prepare_enable and clk_disable_unprepare. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Cc: Haojian Zhuang <haojian.zhuang@marvell.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15TTY: Wrong unicode value copied in con_set_unimap()Liz Clark
Bugzilla 40012: PIO_UNIMAP bug: error updating Unicode-to-font map https://bugzilla.kernel.org/show_bug.cgi?id=40012 The unicode font map for the virtual console is a 32x32x64 table which allocates rows dynamically as entries are added. The unicode value increases sequentially and should count all entries even in empty rows. The defect is when copying the unicode font map in con_set_unimap(), the unicode value is not incremented properly. The wrong unicode value is entered in the new font map. Signed-off-by: Liz Clark <liz.clark@hp.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-14serial: PL011: clear pending interruptsLinus Walleij
Chanho Min reported that when the boot loader transfers control to the kernel, there may be pending interrupts causing the UART to lock up in an eternal loop trying to pick tokens from the FIFO (since the RX interrupt flag indicates there are tokens) while in practice there are no tokens - in fact there is only a pending IRQ flag. This patch address the issue with a combination of two patches suggested by Russell King that clears and mask all interrupts at probe() and clears any pending error and RX interrupts at port startup time. We suspect the spurious interrupts are a side-effect of switching the UART from FIFO to non-FIFO mode. Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com> Reported-by: Chanho Min <chanho0207@gmail.com> Suggested-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Jong-Sung Kim <neidhard.kim@lge.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-13hvc_xen: introduce HVC_XEN_FRONTENDStefano Stabellini
Introduce a new config option HVC_XEN_FRONTEND to enable/disable the xenbus based pv console frontend. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-03-13hvc_xen: implement multiconsole supportStefano Stabellini
This patch implements support for multiple consoles: consoles other than the first one are setup using the traditional xenbus and grant-table based mechanism. We use a list to keep track of the allocated consoles, we don't expect too many of them anyway. Changes in v3: - call hvc_remove before removing the console from xenconsoles; - do not lock xencons_lock twice in the destruction path; - use the DEFINE_XENBUS_DRIVER macro. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-03-13hvc_xen: support PV on HVM consolesStefano Stabellini
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-03-13serial: bfin-uart: Don't access tty circular buffer in TX DMA interrupt ↵Sonic Zhang
after it is reset. When kernel reboot, tty circular buffer is reset before last TX DMA interrupt is called, while the buffer tail is updated in TX DMA interrupt handler. So, don't update the buffer tail if it is reset. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-12vt: NULL dereference in vt_do_kdsk_ioctl()Dan Carpenter
We forgot to set the "key_map" variable here, so it's still NULL. This was introduced recently in 079c9534a9 "vt:tackle kbd_table". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-12tty: serial: vt8500: fix annotations for probe/removeWolfram Sang
Fixes: WARNING: drivers/tty/serial/built-in.o(.data+0x30): Section mismatch in reference from the variable vt8500_platform_driver to the function .init.text:vt8500_serial_probe() The variable vt8500_platform_driver references the function __init vt8500_serial_probe() And mark the remove pointer while we are here. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09serial: remove back and forth conversions in serial_out_syncPaul Gortmaker
The two callers to serial_out_sync() have a struct port right there in scope, but then pass in a struct 8250_port which then is locally resolved back to a struct port. Delete the needless back and forth and just pass in the struct port directly. Rename the function to have "_port" in its name, so the name <--> args relationship is consistent with the other serial_in/out vs serial_port_in/out function classes. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09serial: use serial_port_in/out vs serial_in/out in 8250Paul Gortmaker
The serial_in and serial_out helpers are expecting to operate on an 8250_port struct. These in turn go after the contained normal port struct which actually has the actual in/out accessors. But what is happening in some cases, is that a function is passed in a port struct, and it runs container_of to get the 8250_port struct, and then it uses serial_in/out helpers on that. But when you do, it goes full circle, since it jumps back inside the 8250_port to find the contained port struct (which we already knew!). So, if we are operating in a scope where we know the struct port, then use the serial_port_in/out helpers and avoid the bouncing around. If we don't have the struct port handy, and it isn't worth making a local for it, then just leave things as-is which uses the serial_in/out helpers that will resolve the 8250_port onto the struct port. Mostly, gcc figures this out on its own -- so this doesn't bring to the table any revolutionary runtime delta. However, it is somewhat misleading to always hammer away on 8250 structs, when the actual underlying property isn't at all 8250 specific -- and this change makes that clear. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09serial: reduce number of indirections in 8250 codePaul Gortmaker
The serial_8250_port struct contains within a serial_port struct and many times one or the other, or both are in scope within functions via a passed in arg, or via container_of. However there are a lot of cases where we have access directly to the port pointer, but yet go through the parent 8250_port structure instead to get it. These should just use the port struct directly. Similarly there are cases where it makes sense (from a code cleanliness point of view) to declare a local for the port struct, so we aren't going through the parent 8250_port struct repeatedly to get to it. We get a small reduction in text size, but it appears that gcc was smart enough to internally be doing most of this already, so the readability improvement is the larger gain. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09serial: delete useless void casts in 8250.cPaul Gortmaker
These might have worked some magic with an ancient gcc back in 1992, but "objdump --disassemble" on gcc 4.6 on x86-64 shows identical output before and after this commit. Send the casts and their hysterical rasins to the bitbucket. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09serial: make 8250's serial_in shareable to other drivers.Paul Gortmaker
Currently 8250.c has serial_in and serial_out as shortcuts to doing the port I/O. They are implemented as macros a ways down in the file. This isn't by accident, but is implicitly required, so cpp doesn't mangle other instances of the common string "serial_in", as it exists as a field in the port struct itself. The above mangling avoidance violates the principle of least surprise, and it also prevents the shortcuts from being relocated up to the top of file, or into 8250.h -- either being a better location than the current one. Move them to 8250.h so other 8250-like drivers can also use the shortcuts, and in the process, make the conflicting names go away by using static inlines instead of macros. The object file size remains unchanged with this modification. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09serial: delete last unused traces of pausing I/O in 8250Paul Gortmaker
This is the last traces of pausing I/O that we had back some twenty years ago. Probably was only required for 8MHz ISA cards running "on the edge" at 12MHz. Anyway it hasn't been in use for years, so lets just bury it for good. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09pch_uart: Add module parameter descriptionsDarren Hart
Document default_baud and user_uartclk module parameters. Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Tomoya MORINAGA <tomoya.rohm@gmail.com> CC: Feng Tang <feng.tang@intel.com> CC: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09pch_uart: Use existing default_baud in setup_consoleDarren Hart
Rather than hardcode 9600, use the existing default_baud parameter (which also defaults to 9600). Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Tomoya MORINAGA <tomoya.rohm@gmail.com> CC: Feng Tang <feng.tang@intel.com> CC: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09pch_uart: Add user_uartclk parameterDarren Hart
For cases where boards with non-default clocks are not yet added to the kernel or when the clock varies across hardware revisions, it is useful to be able to specify the UART clock on the kernel command line. Add the user_uartclk parameter and prefer it, if set, to the default and board specific UART clock settings. Specify user_uartclock on the command-line with "pch_uart.user_uartclk=48000000". Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Tomoya MORINAGA <tomoya.rohm@gmail.com> CC: Feng Tang <feng.tang@intel.com> CC: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09pch_uart: Add Fish River Island II uart clock quirksDarren Hart
Add support for the Fish River Island II (FRI2) UART clock following the CM-iTC quirk handling mechanism. Depending on the firmware installed on the device, the FRI2 uses a 48MHz or a 64MHz UART clock. This is detected with DMI strings. Add similar UART clock quirk handling to the pch_console_setup() function to enable kernel messages on boards with non-standard UART clocks. Per Alan's suggestion, abstract out UART clock selection into pch_uart_get_uartclk() to avoid code duplication. Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Tomoya MORINAGA <tomoya.rohm@gmail.com> CC: Feng Tang <feng.tang@intel.com> CC: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09pch_uart: Use uartclk instead of base_baudDarren Hart
The term "base baud" refers to the fastest baud rate the device can communicate at. This is clock/16. pch_uart is using base_baud as the clock itself. Rename the variables to be semantically correct. Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Tomoya MORINAGA <tomoya.rohm@gmail.com> CC: Feng Tang <feng.tang@intel.com> CC: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09sh-sci / PM: Avoid deadlocking runtime PMRafael J. Wysocki
The runtime PM of sh-sci devices is enabled when sci_probe() returns, so the pm_runtime_put_sync() executed by driver_probe_device() attempts to suspend the device. Then, in some situations, a diagnostic message is printed to the console by one of the runtime suspend routines handling the sh-sci device, which causes synchronous runtime resume to be started from the device's own runtime suspend callback. This causes rpm_resume() to be run eventually, which sees the RPM_SUSPENDING status set by rpm_suspend() and waits for it to change. However, the device's runtime PM status cannot change at that point, because the routine that has set it waits for the rpm_suspend() to return. A deadlock occurs as a result. To avoid that make sci_init_single() increment the device's runtime PM usage counter, so that it cannot be suspended by driver_probe_device(). That counter has to be decremented eventually, so make sci_startup() do that before starting to actually use the device and make sci_shutdown() increment it again before returning to balance the incrementation carried out by sci_startup(). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-03-09tty: powerpc: remove SERIAL_ICOM dependency on PPC_ISERIESStephen Rothwell
The PowerPC legacy iSeries platform is being removed so this is no longer selectable. Cc: Alan Cox <alan@linux.intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-serial@vger.kernel.org Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09tty: powerpc: remove hvc_iseriesStephen Rothwell
The PowerPC legacy iSeries platform is being removed, so this code is no longer needed. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-08mpc5200b/uart: select more tolerant uart prescaler on low baudratesFrank Benkert
In addition to the /32 prescaler, the MPC5200B supports a second baudrate prescaler /4 to reach higher baudrates. The current calculation (introduced with commit 0d1f22e4) in the kernel preferes this low prescaler as often as possible, but with some imprecise counterparts the communication on low baudrates fails. According a support-mail from freescale the low prescaler (/4) allows just 1% tolerance in bittiming in contrast to 4% of the high prescaler (/32). The prescaler not only affects the baudrate-calculation, but also the sampling of the bits on the wire. With this patch, we use the slightly less precise, but higher tolerant prescaler calculation on low baudrates up to (and including) 115200 baud and the more precise calculation above. Tested on a custom MPC5200B board with "fsl,mpc5200b-psc-uart". Calculation Examples with prescaler (PS) 4 and 32 and divisor (DIV) on various baudrates. Real stands for the real baudrate generated and Diff for the differences between: 50 Baud PS 32 DIV 0xa122 Real 50 Diff 0.00% 75 Baud PS 32 DIV 0x6b6c Real 75 Diff 0.00% 110 Baud PS 32 DIV 0x493e Real 110 Diff 0.00% 134 Baud PS 32 DIV 0x3c20 Real 133 Diff 0.75% 150 Baud PS 32 DIV 0x35b6 Real 150 Diff 0.00% 200 Baud PS 32 DIV 0x2849 Real 199 Diff 0.50% 300 Baud PS 4 DIV 0xd6d8 Real 300 Diff 0.00% PS 32 DIV 0x1adb Real 300 Diff 0.00% 600 Baud PS 4 DIV 0x6b6c Real 600 Diff 0.00% PS 32 DIV 0x0d6e Real 599 Diff 0.17% 1200 Baud PS 4 DIV 0x35b6 Real 1200 Diff 0.00% PS 32 DIV 0x06b7 Real 1199 Diff 0.08% 1800 Baud PS 4 DIV 0x23cf Real 1799 Diff 0.06% PS 32 DIV 0x047a Real 1799 Diff 0.06% 2400 Baud PS 4 DIV 0x1adb Real 2400 Diff 0.00% PS 32 DIV 0x035b Real 2401 Diff - 0.04% 4800 Baud PS 4 DIV 0x0d6e Real 4799 Diff 0.02% PS 32 DIV 0x01ae Real 4796 Diff 0.08% 9600 Baud PS 4 DIV 0x06b7 Real 9598 Diff 0.02% PS 32 DIV 0x00d7 Real 9593 Diff 0.07% 19200 Baud PS 4 DIV 0x035b Real 19208 Diff - 0.04% PS 32 DIV 0x006b Real 19275 Diff - 0.39% 38400 Baud PS 4 DIV 0x01ae Real 38372 Diff 0.07% PS 32 DIV 0x0036 Real 38194 Diff 0.54% 57600 Baud PS 4 DIV 0x011e Real 57692 Diff - 0.16% PS 32 DIV 0x0024 Real 57291 Diff 0.54% 76800 Baud PS 4 DIV 0x00d7 Real 76744 Diff 0.07% PS 32 DIV 0x001b Real 76388 Diff 0.54% 115200 Baud PS 4 DIV 0x008f Real 115384 Diff - 0.16% PS 32 DIV 0x0012 Real 114583 Diff 0.54% 153600 Baud PS 4 DIV 0x006b Real 154205 Diff - 0.39% PS 32 DIV 0x000d Real 158653 Diff - 3.29% 230400 Baud PS 4 DIV 0x0048 Real 229166 Diff 0.54% PS 32 DIV 0x0009 Real 229166 Diff 0.54% 307200 Baud PS 4 DIV 0x0036 Real 305555 Diff 0.54% PS 32 DIV 0x0007 Real 294642 Diff 4.09% 460800 Baud PS 4 DIV 0x0024 Real 458333 Diff 0.54% PS 32 DIV 0x0005 Real 412500 Diff 10.48% 500000 Baud PS 4 DIV 0x0021 Real 500000 Diff 0.00% PS 32 DIV 0x0004 Real 515625 Diff - 3.13% 576000 Baud PS 4 DIV 0x001d Real 568965 Diff 1.22% PS 32 DIV 0x0004 Real 515625 Diff 10.48% 614400 Baud PS 4 DIV 0x001b Real 611111 Diff 0.54% PS 32 DIV 0x0003 Real 687500 Diff -11.90% 921600 Baud PS 4 DIV 0x0012 Real 916666 Diff 0.54% PS 32 DIV 0x0002 Real 1031250 Diff -11.90% 1000000 Baud PS 4 DIV 0x0011 Real 970588 Diff 2.94% PS 32 DIV 0x0002 Real 1031250 Diff - 3.13% 1152000 Baud PS 4 DIV 0x000e Real 1178571 Diff - 2.31% PS 32 DIV 0x0002 Real 1031250 Diff 10.48% 1500000 Baud PS 4 DIV 0x000b Real 1500000 Diff 0.00% PS 32 DIV 0x0001 Real 2062500 Diff -37.50% 2000000 Baud PS 4 DIV 0x0008 Real 2062500 Diff - 3.13% PS 32 DIV 0x0001 Real 2062500 Diff - 3.13% 2500000 Baud PS 4 DIV 0x0007 Real 2357142 Diff 5.71% PS 32 DIV 0x0001 Real 2062500 Diff 17.50% 3000000 Baud PS 4 DIV 0x0006 Real 2750000 Diff 8.33% PS 32 DIV 0x0001 Real 2062500 Diff 31.25% 3500000 Baud PS 4 DIV 0x0005 Real 3300000 Diff 5.71% PS 32 DIV 0x0001 Real 2062500 Diff 41.07% 4000000 Baud PS 4 DIV 0x0004 Real 4125000 Diff - 3.13% PS 32 DIV 0x0001 Real 2062500 Diff 48.44% Signed-off-by: Frank Benkert <frank.benkert@avat.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08tty: moxa: fix bit test in moxa_start()Dan Carpenter
This is supposed to be doing a shift before the comparison instead of just doing a bitwise AND directly. The current code means the start() just returns without doing anything. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jiri Slaby <jslaby@suse.cz> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial, use tty_port_close_startJiri Slaby
Again, no need to duplicate the code. Let's use the helper. Amiserial changes are only free of compilation errors. I have no access to the hardware. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial, use tty_port_close_endJiri Slaby
Hmm, the code was sleeping with interrupts disabled. This was not good. Fix this by turning interrupts at an appropriate place. (The race is protected by CLOSING flag.) After the move, the code is identical to tty_port_close_end, so use it! Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial, use tty_port_block_til_readyJiri Slaby
Hmm, 150 lines of duplicated stuff is gone now. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial, provide carrier helpersJiri Slaby
This is a preparation for a switch to tty_port_block_til_ready. We need amiga_carrier_raised and amiga_dtr_rts. The implementation is taken from startup, shutdown and current block_til_ready. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial no longer needs serialPJiri Slaby
amiserial is the last user of serialP.h. Let's move struct serial_state directly to amiserial and remove serialP crap from includes. Finally, remove the header from the tree completely. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial, stop using serial_state->{irq,type,line}Jiri Slaby
* instead of line, use tty->index or iterator... * irq and type are left unset. So get rid of them. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial, define local tty_port pointerJiri Slaby
And use it to make the code more readable. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial/simserial, use flags from tty_portJiri Slaby
This changes flags' type to ulong which is appropriate for all the set/clear_bits performed in the drivers.. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial/simserial, use count from tty_portJiri Slaby
Nothing special. Just remove count from serial_state and change all users to use tty_port. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial/simserial, use close delays from tty_portJiri Slaby
Note that previously simserial set the delay to 0. So we preserve that. BUT, is it correct? Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial/simserial, use tty_portJiri Slaby
Add tty_port to serial_state and start using common tty port members from tty_port in amiserial and simserial. The rest will follow one by one. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial, pass tty down to functionsJiri Slaby
This avoids pain with tty refcounting and touching tty_port in the future. It allows us to remove some info->tty tests because the tty passed down to them can never be NULL. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial, simplify set_serial_infoJiri Slaby
Do not copy whole serial_state. We only need to know whether the speed is to be changed. Hence store the info in advance and use it later. A simple bool is enough. Also remove reduntant assignments and move the tests directly to the 'if'. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: serialP, merge serial_state and async_structJiri Slaby
This is the final step to get rid of the one of the structures. A further cleanup will follow. And I struct serial_state deserves cease to exist after a switch to tty_port too. While changing the lines, it removes also pointless tty->driver_data casts. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial, remove IRQ_portsJiri Slaby
They used to work as a storage for 'info' pointer used in ISRs. They are not really needed. Just pass the pointer through request_irq to the handlers. It was set to NULL and tested in the ISRs, but we do not need the tests as we disable all the interrupts at the same places where NULL sets were. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: simserial/amiserial, use one instance of other membersJiri Slaby
This means: * close_delay * closing_wait * line * port * xmit_fifo_size This actually fixes a bug in amiserial. It initializes one and uses the other of the close delays. Yes, duplicating structure members is evil. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial, use only one copy of async flagsJiri Slaby
Huh, why would one want to store two copies of them? Get rid of the one from async_struct. That structure is going away as a whole soon. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: amiserial, remove tasklet for tty_wakeupJiri Slaby
tty_wakeup is safe to be called from all contexts. No need to schedule a tasklet for that. Let's call it directly like in other drivers. This allows us to kill another member of async_struct structure. (If we remove the dummy uses in simserial.) Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: serialP, remove unused materialJiri Slaby
First, remove unused macro and rs_multiport_struct structure. Nobody uses them at all. Further, the 2 drivers (they are below) which use the rest of structures from serialP.h (async_struct and serial_state) do not use all the members. Remove the members: * which are unused or * which are only initialized and never used for something real. Everybody should avoid the structures with a looong distance. Finally, remove the ALPHA kludge MCR quirks. They are 1:1 copy from 8250.h. No need to redefine them here. The 2 promised users of the structures: arch/ia64/hp/sim/simserial.c drivers/tty/amiserial.c Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: remove serialP.h inclusion from some filesJiri Slaby
All of them do not use the ugly interface defined in that header. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: serial, include pci.h in m32r_sioJiri Slaby
It uses pointers to pci_dev, but compiler complains it doesn't know it: In file included from .../m32r_sio.c:53: .../m32r_sio.h:21: warning: "struct pci_dev" declared inside parameter list .../m32r_sio.h:21: warning: its scope is only this definition or declaration, which is probably not what you want .../m32r_sio.h:22: warning: "struct pci_dev" declared inside parameter list Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>