summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/68328serial.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next' of ↵Linus Torvalds2013-05-101-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: "The bulk of the changes are generalizing the ColdFire v3 core support and adding in 537x CPU support. Also a couple of other bug fixes, one to fix a reintroduction of a past bug in the romfs filesystem nommu support." * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: enable Timer on coldfire 532x m68knommu: fix ColdFire 5373/5329 QSPI base address m68knommu: add support for configuring a Freescale M5373EVB board m68knommu: add support for the ColdFire 537x family of CPUs m68knommu: make ColdFire M532x platform support more v3 generic m68knommu: create and use a common M53xx ColdFire class of CPUs m68k: remove unused asm/dbg.h m68k: Set ColdFire ACR1 cache mode depending on kernel configuration romfs: fix nommu map length to keep inside filesystem m68k: clean up unused "config ROMVECSIZE"
| * m68k: remove unused asm/dbg.hGreg Ungerer2013-04-291-1/+0
| | | | | | | | | | | | | | | | The contents of the m68k asm/dbg.h are never used, remove the file and remove the one reference to it. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
* | TTY: cleanup tty->hw_stopped usesJiri Slaby2013-03-181-6/+3
|/ | | | | | | | | tty->hw_stopped is set only by drivers to remember HW state. If it is never set to 1 in a particular driver, there is no need to check it in the driver at all. Remove such checks. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: serial/68328serial.c: remove unnecessary null pointer checkCong Ding2013-01-171-1/+1
| | | | | | | | The pointer info is dereferened in line 1009, so it is not necessary to check null again in line 1012. Signed-off-by: Cong Ding <dinggnu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: switch tty_schedule_flipJiri Slaby2013-01-151-11/+4
| | | | | | | | | | | | 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. This is the last one: tty_schedule_flip Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: switch tty_insert_flip_charJiri Slaby2013-01-151-1/+1
| | | | | | | | | | | | | 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. tty_insert_flip_char is the next one to proceed. This one is used all over the code, so the patch is huge. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: call tty_port_destroy in the rest of driversJiri Slaby2012-11-151-0/+2
| | | | | | | | | | | | | | | | After commit "TTY: move tty buffers to tty_port", the tty buffers are not freed in some drivers. This is because tty_port_destructor is not called whenever a tty_port is freed. This was an assumption I counted with but was unfortunately untrue. So fix the drivers to fulfil this assumption. To be sure, the TTY buffers (and later some stuff) are gone along with the tty_port, we have to call tty_port_destroy at tear-down places. This is mostly where the structure containing a tty_port is freed. This patch does exactly that -- put tty_port_destroy at those places. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: use tty_port_link_deviceJiri Slaby2012-08-131-6/+9
| | | | | | | | | | | | | | So now for those drivers that can use neither tty_port_install nor tty_port_register_driver but still have tty_port available before tty_register_driver we use newly added tty_port_link_device. The rest of the drivers that still do not provide tty_struct <-> tty_port link will have to be converted to implement tty->ops->install. 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>
* TTY: 68328serial, fix compilationJiri Slaby2012-08-101-4/+4
| | | | | | | | | | | | | | | | | | tty_struct->termios is no longer a pointer. This was changed recently by "tty: move the termios object into the tty". But 68328serial was not changed, so we now have a compilation error: 68328serial.c: In function 'change_speed': 68328serial.c:518:22: error: invalid type argument of '->' (have 'struct ktermios') 68328serial.c: In function 'rs_set_ldisc': 68328serial.c:620:31: error: invalid type argument of '->' (have 'struct ktermios') 68328serial.c: In function 'rs_set_termios': 68328serial.c:988:20: error: invalid type argument of '->' (have 'struct ktermios') Fix that now. 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>
* TTY: 68328serial, use tty_port_block_til_readyJiri Slaby2012-04-091-91/+5
| | | | | | | | | | | | | | | | Since the code is identical, use the tty_port_block_til_ready helper instead of re-implemented variant. The code does not perform rtsdts handling, hence we do not need to provide tty port hooks for them. The default ones will be used instead. The only necessary thing is to provide tty_port_operations. It is empty, but has to be there... Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: 68328serial, use tty from tty_portJiri Slaby2012-04-091-6/+6
| | | | | | | | | | And refcount that properly. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: 68328serial, propagate ttyJiri Slaby2012-04-091-26/+27
| | | | | | | | | | | | We need tty at some places, but info->tty might be NULL at those. Let us propagate tty from callers where we know we have a valid tty. This will make a switch to tty refcounting simpler. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: 68328serial, use flags from tty_portJiri Slaby2012-04-091-21/+18
| | | | | | | | Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: 68328serial, use close_delay/closing_wait from tty_portJiri Slaby2012-04-091-15/+11
| | | | | | | | Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: 68328serial, use open/close_wait from tty_portJiri Slaby2012-04-091-10/+6
| | | | | | | | Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: 68328serial, add tty_portJiri Slaby2012-04-091-20/+20
| | | | | | | | | | And use count and blocked_count from that. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: 68328serial, remove 68328serial.hJiri Slaby2012-04-091-3/+76
| | | | | | | | | | All the needed stuff is moved to 68328serial.c now. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: 68328serial, use ulong flags for interrupts statusJiri Slaby2012-04-091-2/+4
| | | | | | | | | | | | | flags passed to local_irq_save/restore should be ulong. Switch tehem to that. Otherwise we get compilation warnings: .../68328serial.c:248:9: warning: comparison of distinct pointer types lacks a cast [enabled by default] .../68328serial.c:257:9: warning: comparison of distinct pointer types lacks a cast [enabled by default] Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: 68328serial, remove garbageJiri Slaby2012-04-091-19/+0
| | | | | | | | | | | - empty functions - unused global variables Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: 68328serial, remove unused stuff from m68k_serialJiri Slaby2012-04-091-32/+4
| | | | | | | | | | | | | | | Not everything from struct m68k_serial is really used. So remove unused or only-set members of that structure. Next step is to move it to 68328serial.c and remove 68328serial.h completely. This change also takes status_handle and batten_down_hatches away since they use break_abort but do nothing. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: 68328serial, remove serial_state and friendsJiri Slaby2012-04-091-33/+22
| | | | | | | | | | | | serial_state in 68328serial.h is a duplicated structure. One is defined in linux/serial.h. So let us use that instead. And since the serial flags are identical, use ones from there too. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer <gerg@uclinux.org> Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Remove all #inclusions of asm/system.hDavid Howells2012-03-281-1/+0
| | | | | | | | | Remove all #inclusions of asm/system.h preparatory to splitting and killing it. Performed with the following command: perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *` Signed-off-by: David Howells <dhowells@redhat.com>
* TTY: remove unneeded tty->index checksJiri Slaby2012-03-081-7/+2
| | | | | | | | | | | | | Checking if tty->index is in bounds is not needed. The tty has the index set in the initial open. This is done in get_tty_driver. And it can be only in interval <0,driver->num). So remove the tests which check exactly this interval. Some are left untouched as they check against the current backing device count. (Leaving apart that the check is racy in most of the cases.) Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: irq: Remove IRQF_DISABLEDYong Zhang2011-09-221-1/+1
| | | | | | | | | | | | | | 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>
* TTY: serial, remove dead code from 68328Jiri Slaby2011-09-221-35/+0
| | | | | | | | | | | | The code is dead at least since 2002. So remove it to not distort git grep output (about port.tty usage). Remove the whole do_softirq tasklet as it's noop now. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* arch, mm: filter disallowed nodes from arch specific show_mem functionsDavid Rientjes2011-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Architectures that implement their own show_mem() function did not pass the filter argument to show_free_areas() to appropriately avoid emitting the state of nodes that are disallowed in the current context. This patch now passes the filter argument to show_free_areas() so those nodes are now avoided. This patch also removes the show_free_areas() wrapper around __show_free_areas() and converts existing callers to pass an empty filter. ia64 emits additional information for each node, so skip_free_areas_zone() must be made global to filter disallowed nodes and it is converted to use a nid argument rather than a zone for this use case. Signed-off-by: David Rientjes <rientjes@google.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: James Bottomley <jejb@parisc-linux.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge 2.6.38-rc6 into tty-nextGreg Kroah-Hartman2011-02-241-14/+13
|\ | | | | | | | | | | | | This was to resolve a merge issue with drivers/char/Makefile and drivers/tty/serial/68328serial.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * m68knommu: fix dereference of port.ttyGreg Ungerer2011-02-161-15/+14
| | | | | | | | | | | | | | | | The struct_tty associated with a port is now a direct pointer from within the local private driver info struct. So fix all uses of it. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
* | tty: now phase out the ioctl file pointer for goodAlan Cox2011-02-171-1/+1
| | | | | | | | | | | | | | | | | | Only oddities here are a couple of drivers that bogusly called the ldisc helpers instead of returning -ENOIOCTLCMD. Fix the bug and the rest goes away. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | 68328serial: remove unsed m68k_serial->tqueue_hangupTejun Heo2011-02-031-23/+0
|/ | | | | | | | m68k_serial->tqueue_hangup is unused. Remove it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tty: move drivers/serial/ to drivers/tty/serial/Greg Kroah-Hartman2011-01-131-0/+1472
The serial drivers are really just tty drivers, so move them to drivers/tty/ to make things a bit neater overall. This is part of the tty/serial driver movement proceedure as proposed by Arnd Bergmann and approved by everyone involved a number of months ago. Cc: Arnd Bergmann <arnd@arndb.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Rogier Wolff <R.E.Wolff@bitwizard.nl> Cc: Michael H. Warfield <mhw@wittsend.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud