aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/bfin_uart.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-12-14Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds1-1/+0
Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-11-06serial: core: Pass termios to set_ldisc() notificationsPeter Hurley1-2/+3
UART drivers which enable modem status interrupts when switching to N_PPS line discipline need to determine if modem status interrupts should be disabled when switching from N_PPS. Specifically, the set_ldisc() notification needs to evaluate UART_ENABLE_MS() which requires termios->c_cflag. Convert in-tree UART drivers to new interface. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20tty: serial: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-09-23serial: bfin-uart: Fix auto CTSPeter Hurley1-1/+2
Commit 64851636d568ae9f167cd5d1dcdbfe17e6eef73c, serial: bfin-uart: Remove ASYNC_CTS_FLOW flag for hardware automatic CTS, open-codes uart_handle_cts_change() when CONFIG_SERIAL_BFIN_HARD_CTSRTS to skip start and stop tx. But the CTS interrupt handler _still_ calls uart_handle_cts_change(); only call uart_handle_cts_change() if !CONFIG_SERIAL_BFIN_HARD_CTSRTS. cc: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23serial: core: Privatize tty->hw_stoppedPeter Hurley1-7/+7
tty->hw_stopped is not used by the tty core and is thread-unsafe; hw_stopped is a member of a bitfield whose fields are updated non-atomically and no lock is suitable for serializing updates. Replace serial core usage of tty->hw_stopped with uport->hw_stopped. Use int storage which works around Alpha EV4/5 non-atomic byte storage, since uart_port uses different locks to protect certain fields within the structure. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10serial: blackfin: Fix CTS flow controlPeter Hurley1-5/+8
blackfin uart port drivers mistakenly set the struct uart_port flags bit UPF_BUG_THRE (which only has meaning to the 8250 core) while trying to set ASYNC_CTS_FLOW. Uart port drivers can override termios settings based on actual hardware support in their .set_termios method; the serial core sets the appropriate port flags based on the overrides. Overriding only the initial termios settings is accomplished by only perform those overrides if the old termios parameter is NULL. CC: Sonic Zhang <sonic.zhang@analog.com> CC: adi-buildroot-devel@lists.sourceforge.net Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09serial: treewide: Remove empty implementations of enable_ms()Alexander Shiyan1-9/+0
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19serial: Fix IGNBRK handlingPeter Hurley1-1/+1
If IGNBRK is set without either BRKINT or PARMRK set, some uart drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the line discipline, when it should send either nothing or the TTYBREAK flag set. This happens because the read_status_mask masks out the BI condition, which uart_insert_char() then interprets as a normal 0x00 byte. SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General Terminal Interface - Input Modes, states: "If IGNBRK is set, a break condition detected on input shall be ignored; that is, not put on the input queue and therefore not read by any process." Fix read_status_mask to include the BI bit if IGNBRK is set; the lsr status retains the BI bit if a BREAK is recv'd, which is subsequently ignored in uart_insert_char() when masked with the ignore_status_mask. Affected drivers: 8250 - all serial_txx9 mfd amba-pl010 amba-pl011 atmel_serial bfin_uart dz ip22zilog max310x mxs-auart netx-serial pnx8xxx_uart pxa sb1250-duart sccnxp serial_ks8695 sirfsoc_uart st-asc vr41xx_siu zs sunzilog fsl_lpuart sunsab ucc_uart bcm63xx_uart sunsu efm32-uart pmac_zilog mpsc msm_serial m32r_sio Unaffected drivers: omap-serial rp2 sa1100 imx icom Annotated for fixes: altera_uart mcf Drivers without break detection: 21285 xilinx-uartps altera_jtaguart apbuart arc-uart clps711x max3100 uartlite msm_serial_hs nwpserial lantiq vt8500_serial Unknown: samsung mpc52xx_uart bfin_sport_uart cpm_uart/core Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag' Reported-by: Ivan <athlon_@mail.ru> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16tty: Remove unnecessary semicolonsJoe Perches1-2/+2
These aren't necessary after switch and while blocks. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-07serial: bfin_uart: remove deprecated IRQF_DISABLEDMichael Opdenacker1-1/+1
This patch proposes to remove the use of the IRQF_DISABLED flag It's a NOOP since 2.6.35 and it will be removed one day. Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26serial: bfin_uart: Remove casting the return value which is a void pointerJingoo Han1-9/+6
Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-12serial: bfin_uart: Fix incorrect placement of __initdataSachin Kamat1-3/+3
__initdata should be placed between the variable name and equal sign for the variable to be placed in the intended section. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31serial: use dev_get_platdata()Jingoo Han1-5/+6
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-26serial: bfin_uart: Remove redundant testing for ifdef CONFIG_SERIAL_BFIN_MODULEAxel Lin1-4/+0
No idea why we have redundant testing for ifdef CONFIG_SERIAL_BFIN_MODULE, check it once is enough. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-18TTY: serial/bfin_uart, unbreak build with KGDB enabledJiri Slaby1-23/+0
There are no (and never were any) kgdb fields in uart_ops. Setting them produces a build error: drivers/tty/serial/bfin_uart.c:1054:2: error: unknown field 'kgdboc_port_startup' specified in initializer drivers/tty/serial/bfin_uart.c:1054:2: warning: initialization from incompatible pointer type [enabled by default] drivers/tty/serial/bfin_uart.c:1054:2: warning: (near initialization for 'bfin_serial_pops.ioctl') [enabled by default] drivers/tty/serial/bfin_uart.c:1055:2: error: unknown field 'kgdboc_port_shutdown' specified in initializer drivers/tty/serial/bfin_uart.c:1055:2: warning: initialization from incompatible pointer type [enabled by default] drivers/tty/serial/bfin_uart.c:1055:2: warning: (near initialization for 'bfin_serial_pops.poll_init') [enabled by default] Remove them. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15TTY: switch tty_flip_buffer_pushJiri Slaby1-7/+3
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. Now, the one where most of tty_port_tty_get gets removed: tty_flip_buffer_push. IOW we also closed all the races in drivers not using tty_port_tty_get at all yet. Also we move tty_flip_buffer_push declaration from include/linux/tty.h to include/linux/tty_flip.h to all others while we are changing it anyway. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-13Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-1/+1
Pull trivial branch from Jiri Kosina: "Usual stuff -- comment/printk typo fixes, documentation updates, dead code elimination." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) HOWTO: fix double words typo x86 mtrr: fix comment typo in mtrr_bp_init propagate name change to comments in kernel source doc: Update the name of profiling based on sysfs treewide: Fix typos in various drivers treewide: Fix typos in various Kconfig wireless: mwifiex: Fix typo in wireless/mwifiex driver messages: i2o: Fix typo in messages/i2o scripts/kernel-doc: check that non-void fcts describe their return value Kernel-doc: Convention: Use a "Return" section to describe return values radeon: Fix typo and copy/paste error in comments doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c various: Fix spelling of "asynchronous" in comments. Fix misspellings of "whether" in comments. eisa: Fix spelling of "asynchronous". various: Fix spelling of "registered" in comments. doc: fix quite a few typos within Documentation target: iscsi: fix comment typos in target/iscsi drivers treewide: fix typo of "suport" in various comments and Kconfig treewide: fix typo of "suppport" in various comments ...
2012-11-21serial: bfin_uart: Don't switch baud rate untill the transfer buffer is empty.Sonic Zhang1-0/+9
set_termios may be invoked before the former data transfer is completed. Block until the tranfer is done. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21tty: remove use of __devexitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Acked-by: Tobias Klauser <tklauser@distanz.ch> Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Tony Prisk <linux@prisktech.co.nz> Acked-by: David Brown <davidb@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21tty: serial: remove use of __devexit_pBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Alan Cox <alan@linux.intel.com> Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Tony Prisk <linux@prisktech.co.nz> Acked-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-15serial: bfin-uart: avoid dead lock in rx irq handler in smp kernelSteven Miao1-4/+3
Disabing dma irq and lock bottom half in smp kernel doesn't ensure exclusive uart access. Call spin_lock_irqsave() instead. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-28Merge branch 'master' into for-nextJiri Kosina1-1/+1
Sync up with Linus' tree to be able to apply Cesar's patch against newer version of the code. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-10-25tty: Fix typo in tty driversMasanari Iida1-1/+1
Correct spelling typo in debug messages within tty drivers. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-07-16tty: move the termios object into the ttyAlan Cox1-1/+1
This will let us sort out a whole pile of tty related races. The alternative would be to keep points and refcount the termios objects. However 1. They are tiny anyway 2. Many devices don't use the stored copies 3. We can remove a pty special case Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17serial: bfin_uart: Make MMR access compatible with 32 bits bf609 style controller.Sonic Zhang1-16/+4
Simplify serial data width calculation and adapt to bf609 LCR bit mask. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17serial: bfin_uart: RTS and CTS MMRs can be either 16-bit width or 32-bit width.Sonic Zhang1-12/+10
Change hardware flow control code to adapt to both bf5xx and bf60x. Disabled serial device before set termios for bf60x. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17serial: bfin_uart: narrow the reboot condition in DMA tx interruptSonic Zhang1-1/+1
Check if xmit buffer pointers are set to zero. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17serial: bfin_uart: Adapt bf5xx serial driver to bf60x serial4 controller.Sonic Zhang1-19/+13
The serial4 controller on bf60x is an enhanced version of serial controller on bf5xx. MMR size is 32 bits other than 16 bits. MMR GCTL, MCR and LCR are combined into one control MMR. MSR and LSR are combined into one status MMR. This patch adapts current bf5xx serial driver to serial4 controller on bf60x. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-13serial: bfin-uart: Don't access tty circular buffer in TX DMA interrupt after it is reset.Sonic Zhang1-3/+5
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>
2011-12-13serial: bfin-uart: Remove ASYNC_CTS_FLOW flag for hardware automatic CTS.Sonic Zhang1-3/+14
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>
2011-12-13serial: bfin-uart: Enable hardware automatic CTS only when CTS pin is available.Sonic Zhang1-9/+10
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09serial: bfin-uart: remove redundant CTS check for hardware CTS control.Sonic Zhang1-23/+1
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>
2011-12-09serial: bfin-uart: Add tty ASYNC_CTS_FLOW flag to do CTS flow control.Sonic Zhang1-1/+3
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>
2011-12-09serial: bfin-uart: Request CTS GPIO PIN when the serial device starts up.Sonic Zhang1-10/+9
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>
2011-09-22TTY: irq: Remove IRQF_DISABLEDYong Zhang1-4/+4
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled], We run all interrupt handlers with interrupts disabled and we even check and yell when an interrupt handler returns with interrupts enabled (see commit [b738a50a: genirq: Warn when handler enables interrupts]). So now this flag is a NOOP and can be removed. Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Acked-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23serial:bfin_uart: Put TX IRQ in individual platform resource.Sonic Zhang1-14/+22
Serial TX IRQ is not RX IRQ plus 1 in some blackfin chips. Give individual platform resources to both TX and RX irqs. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23serial:blackfin: rename Blackfin serial driver to bfin_uart.cSonic Zhang1-0/+1603
bfin_5xx.c is not a general name for all Blackfin chips. 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>