ARM: bcmring: move cfg_global header to mach/

Platforms should not have header files outside of include/mach,
and bcmring is the only one that has one just under include/,
so move that away.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
ARM: bcmring: remove include/csp/ subdir

The csp/*.h headers get into the way of multiplatform
kernels and are generally not needed anyway. This removes
the ones that are completely free of content and moves
the other ones to mach/csp/, which already holds a bunch
of these.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
ARM: bcmring: use proper MMIO accessors

A lot of code in bcmring just dereferences pointers to MMIO
locations, which is not safe. This annotates the pointers
correctly using __iomem and uses readl/write to access them.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
delete seven tty headers

Commit 51c9d654c2def97827395a7fbfd0c6f865c26544 ("Staging: delete tty
drivers") left seven headers unused: nothing in the tree includes them
anymore. Two of those headers were still exported, but since nothing in
the kernel actually uses the things those two headers provide, that
seems pointless. Delete these seven tty headers too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Jiri Slaby <jslaby@suse.cz>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Delete generic_serial.h

Commit bb2a97e9ccd525dd9c3326988e8c676d15d3e12a ("Staging: delete
generic_serial drivers") left generic_serial.h unused: nothing in the
tree includes it anymore. It is still exported, but since nothing in the
kernel uses the named constants this header provides, that seems
pointless. Delete this header too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
serial: samsung: Remove NULL checking for baud clock

Signed-off-by: Kyoungil Kim <ki0351.kim@samsung.com>
Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
serial: samsung: protect NULL dereference of clock name

When priting the serial clock source, if clock source name is null,
kernel reference NULL point.

Signed-off-by: KeyYoung Park <keyyoung.park@samsung.com>
Signed-off-by: Huisung Kang <hs1218.kang@samsung.com>
Signed-off-by: Kyoungil Kim <ki0351.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
serial/imx: make devdata member point to const data

This is only cosmetic for now. In case that

	http://mid.gmane.org/1335171381-24869-1-git-send-email-u.kleine-koenig@pengutronix.de

will be applied, it fixes a warning

	drivers/tty/serial/imx.c: In function 'serial_imx_probe_dt':
	drivers/tty/serial/imx.c:1430:17: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

though.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
serial: Add driver for LPC32xx High Speed UARTs

This patch adds a driver for the 3 High Speed UARTs of the LPC32xx SoC that
support up to 921600bps. These UARTs are different from the 4 "Standard" UARTs
of the LPC32xx.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8250_pci: Remove duplicate struct pciserial_board

pbn_exsys_4055 is the same thing as pbn_b2_4_115200 so replace it with
the standard pattern.

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
TTY: cyclades, add local pointer for card

cy_pci_probe and cy_detect_isa reference cy_card[card_no] many times.
It makes the code hard to read. Let us add a local variable holding a
pointer to the card indexed by card_no and use that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
TTY: ircomm, add tty_port

And use close/open_wait from there.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
TTY: ircomm, use close times from tty_port

Switch to tty_port->close_delay and closing_wait.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
TTY: ircomm, use open counts from tty_port

Switch to tty_port->count and blocked_open.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
TTY: ircomm, use flags from tty_port

Switch to tty_port->flags. And while at it, remove redefined flags for
them.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
TTY: ircomm, revamp locking

Use self->spinlock only for ctrl_skb and tx_skb. TTY stuff is now
protected by tty_port->lock. This is needed for further cleanup (and
conversion to tty_port helpers).

This also closes the race in the end of close.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
TTY: ircomm, use tty from tty_port

This also includes a switch to tty refcounting. It makes sure, the
code no longer can access a freed TTY struct.

Sometimes the only thing needed is to pass tty down to the callies.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
TTY: ircomm, define local tty_port

In some functions we use tty_port heavily. So let us have a local
pointer to that variable instead of having self->port all over the
code.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
TTY: ircomm, define carrier routines

These will be used by the tty_port wait_til_ready later. (Now they are
used by our code.)

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
TTY: ircomm, use tty_port_close_end helper

Again, the code is identical, so leverage the helper code.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>