1
0
Fork 0
Commit Graph

2144 Commits (fe47755852d1f299b55a6e6594bb6e082ac103d4)

Author SHA1 Message Date
Huang Shijie 7cb92fd2a0 serial: imx: optimization: remove the workqueues for DMA
I worried that the delay of the sdma_run_channel0() maybe too long for
interrupt context, so I added the workqueues for RX/TX DMA.

But tested with bluetooth device, I find that the delay of sdma_run_channel0()
is about 8us (tested in imx6dl sabreauto board). I think the delay
is acceptable.

This patch removes the RX/TX workqueues for DMA, it makes the
code more clear.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:25:30 -07:00
Roel Kluin d969de8d83 serial: vt8500: add missing braces
Due to missing braces on an if statement, in presence of a device_node a
port was always assigned -1, regardless of any alias entries in the
device tree. Conversely, if device_node was NULL, an unitialized port
ended up being used.

This patch adds the missing braces, fixing the issues.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:22:16 -07:00
Huang Shijie f0ef8834b2 serial: imx: use the dmaengine_tx_status
Use the dmaengine_tx_status to simplify the code, do not change any logic.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:19:55 -07:00
Huang Shijie 947c74eba8 serial: imx: fix the wrong number of scatterlist entries when xmit->head is 0
When the (xmit->tail > xmit->head) is true and the xmit->head is 0,
we only need one DMA scatterlist in actually. Current code uses two DMA
scatterlists in this case, this is obviously wrong.

This patch fixes it.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:19:54 -07:00
Huang Shijie 1ce43e58d4 serial: imx: check the DMA for imx_tx_empty
Assume the following situation:

  If the DMA is enabled, and the a TX DMA operation is working,
But we have not issued the TX DMA operation (or we have issued the
TX DMA operation with dma_async_issue_pending(), but the DMA has not
started to move the data from the memory to the TXFIFO).

At this time, we may get the wrong status of the transmitter when we
call the imx_tx_empty. In such situation, only check the USR2_TXDC
does not enough for us.

This patch checks the DMA's situation, and return 0 when the TX DMA is
working.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:19:54 -07:00
Huang Shijie eb56b7edae serial: imx: implement the flush_buffer hook
The current driver does not implement the flush_buffer hook for
uart_ops. When we enable the DMA for the driver, and test it with Bluetooth,
we may meet the following bug for TX:

    [1] User application may call the flush operation at any time.
        The uart_flush_buffer() calls the uart_circ_clear() to set
        the xmit->head and xmit->tail with 0.

    [2] The TX DMA callback can be called at any time too.
        The dma_tx_call() will update the xmit->tail.

    If [2] occurs just after the [1], we will get the wrong xmit->tail.

This patch implements the flush_buffer hook to fix this issue.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:19:54 -07:00
Linus Walleij 3592501054 serial: pch_uart: remove reference to .set_wake()
This callback is gone and not coming back, so will not be
supported later.

Cc: Johan Hovold <jhovold@gmail.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:16:19 -07:00
Linus Walleij c38c4454d8 serial: mpc52xx: remove reference to .set_wake()
This callback is gone and not coming back, so will not be
supported later.

Cc: Gerhard Sittig <gsi@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:16:19 -07:00
Linus Walleij adedb75072 serial: sa1100: delete .set_wake callback
This callback is unused by the serial core since pre-git days
and is not coming back. Delete it. Enabling wakeup on the
SA1100 platforms should be done in the suspend() callback
so the platform hook is left in the serial port struct for
later enablement.

Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:16:18 -07:00
Linus Walleij e701bcadb2 serial: omap: delete .set_wake callback
This callback is unused by the serial core since pre-git days
and is not coming back. Delete it. Enabling wakeup on the
OMAP serial driver is done through other runpaths these days.

Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:16:18 -07:00
Roel Kluin c476f6584b tty: incorrect test of echo_buf() result for ECHO_OP_START
test echo_buf() result for ECHO_OP_START

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:12:13 -07:00
Joe Perches fc811472c2 tty: Remove unnecessary semicolons
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-16 13:08:16 -07:00
Bin Gao b6951b8a63 serial: mrst_max3110: Fix race condition between spi transfers
There is a race between termios configuration and xmit that can cause the
intel_mid_ssp_spi driver to stall.

Serializing spi transactions fixes the problem.

Signed-off-by: Bin Gao <bin.gao@intel.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:08:16 -07:00
Feng Tang 09238443c6 serial: mrst_max3110: Check the irq number before enable/disabe irq in PM hooks
We should check the validity of the irq number before calling
disable_irq() and enable_irq() in the suspend/resume function,
as "max->irq == 0" means the irq is not enabled for max3110
device, otherwise it will hurt device whose irq number is really 0.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:08:15 -07:00
Shinya Kuribayashi 12082ba2cb serial8250-em: convert to clk_prepare/unprepare
Add calls to clk_prepare and unprepare so that EMMA Mobile EV2 can
migrate to the common clock framework.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
[takashi.yoshii.ze@renesas.com: edited for conflicts]
Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:07:14 -07:00
Ben Hutchings 8eaede49df sysrq: Allow magic SysRq key functions to be disabled through Kconfig
Turn the initial value of sysctl kernel.sysrq (SYSRQ_DEFAULT_ENABLE)
into a Kconfig variable.

Original version by Bastian Blank <waldi@debian.org>.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:01:44 -07:00
Benjamin Herrenschmidt 5c94913c5f tty/hvc_opal: powerpc: Make OPAL HVC device tree accesses endian safe
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-11 16:48:54 +11:00
Benjamin Herrenschmidt 99fc1d91b8 powerpc/hvsi: Fix endian issues in HVSI driver
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-11 16:48:53 +11:00
Rob Herring 5af5073004 drivers: clean-up prom.h implicit includes
Powerpc is a mess of implicit includes by prom.h. Add the necessary
explicit includes to drivers in preparation of prom.h cleanup.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
2013-10-09 20:04:04 -05:00
Greg Kroah-Hartman b4e788df8d Revert "serial: i.MX: evaluate linux,stdout-path property"
This reverts commit f7d2c0bbdb, as it
causes build errors when the driver is built as a module.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-07 19:06:59 -07:00
Michael Opdenacker 190c6cc328 serial: bfin_uart: remove deprecated IRQF_DISABLED
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-10-07 00:13:58 -07:00
Michael Opdenacker cf81e054d6 serial: tegra: remove deprecated IRQF_DISABLED
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-10-07 00:13:58 -07:00
Greg Kroah-Hartman 97a7729a5c Merge 3.12-rc4 into tty-next
We want the tty fixes in this branch as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06 17:28:16 -07:00
Hector Palacios 9987f76ad2 serial: mxs-auart: set the FIFO size to DMA buffer size
When DMA is enabled (with hardware flow control enabled) the FIFO size
must be set to the size of the DMA buffer, as this is the size the tty
subsystem can use.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-05 18:03:01 -07:00
David Vrabel a9fbf4d591 xen/hvc: allow xenboot console to be used again
Commit d0380e6c3c (early_printk:
consolidate random copies of identical code) added in 3.10 introduced
a check for con->index == -1 in early_console_register().

Initialize index to -1 for the xenboot console so earlyprintk=xen
works again.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 16:12:58 -07:00
Michal Simek 7ea816a0c3 serial: Remove unnecessary amba_set_drvdata()
Driver core clears the driver data to NULL after device_release
or on probe failure, so just remove it from here.

Driver core change:
"device-core: Ensure drvdata = NULL when no driver is bound"
(sha1: 0998d06310)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 16:09:47 -07:00
Tim Kryger c49436b657 serial: 8250_dw: Improve unwritable LCR workaround
When configured with UART_16550_COMPATIBLE=NO or in versions prior to
the introduction of this option, the Designware UART will ignore writes
to the LCR if the UART is busy.  The current workaround saves a copy of
the last written LCR and re-writes it in the ISR for a special interrupt
that is raised when a write was ignored.

Unfortunately, interrupts are typically disabled prior to performing a
sequence of register writes that include the LCR so the point at which
the retry occurs is too late.  An example is serial8250_do_set_termios()
where an ignored LCR write results in the baud divisor not being set and
instead a garbage character is sent out the transmitter.

Furthermore, since serial_port_out() offers no way to indicate failure,
a serious effort must be made to ensure that the LCR is actually updated
before returning back to the caller.  This is difficult, however, as a
UART that was busy during the first attempt is likely to still be busy
when a subsequent attempt is made unless some extra action is taken.

This updated workaround reads back the LCR after each write to confirm
that the new value was accepted by the hardware.  Should the hardware
ignore a write, the TX/RX FIFOs are cleared and the receive buffer read
before attempting to rewrite the LCR out of the hope that doing so will
force the UART into an idle state.  While this may seem unnecessarily
aggressive, writes to the LCR are used to change the baud rate, parity,
stop bit, or data length so the data that may be lost is likely not
important.  Admittedly, this is far from ideal but it seems to be the
best that can be done given the hardware limitations.

Lastly, the revised workaround doesn't touch the LCR in the ISR, so it
avoids the possibility of a "serial8250: too much work for irq" lock up.
This problem is rare in real situations but can be reproduced easily by
wiring up two UARTs and running the following commands.

  # stty -F /dev/ttyS1 echo
  # stty -F /dev/ttyS2 echo
  # cat /dev/ttyS1 &
  [1] 375
  # echo asdf > /dev/ttyS1
  asdf

  [   27.700000] serial8250: too much work for irq96
  [   27.700000] serial8250: too much work for irq96
  [   27.710000] serial8250: too much work for irq96
  [   27.710000] serial8250: too much work for irq96
  [   27.720000] serial8250: too much work for irq96
  [   27.720000] serial8250: too much work for irq96
  [   27.730000] serial8250: too much work for irq96
  [   27.730000] serial8250: too much work for irq96
  [   27.740000] serial8250: too much work for irq96

Signed-off-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 16:08:03 -07:00
Greg Kroah-Hartman af8c5b8deb serial: 8250_pci: clean up printk() calls
Move the printk() calls to to dev_*() instead, to tie into the dynamic
debugging infrastructure.

Also change some "raw" printk() calls to dev_err() to provide a better
error message to userspace so it can properly identify the device and
not just have to guess.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 19:09:37 -07:00
Bartlomiej Zolnierkiewicz f829452390 TTY: bfin_jtag_comm: fix incorrect placement of __initdata tag
__initdata tag should be placed between the variable name and equal
sign for the variable to be placed in the intended .init.data section.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 19:09:37 -07:00
Peter Hurley f8747d4a46 tty: Fix pty master read() after slave closes
Commit f95499c303,
  n_tty: Don't wait for buffer work in read() loop
creates a race window which can cause a pty master read()
to miss the last pty slave write(s) and return -EIO instead,
thus signalling the pty slave is closed. This can happen when
the pty slave is written and immediately closed but before the
tty buffer i/o loop receives the new input; the pty master
read() is scheduled, sees its read buffer is empty and the
pty slave has been closed, and exits.

Because tty_flush_to_ldisc() has significant performance impact
for parallel i/o, rather than revert the commit, special case this
condition (ie., when the read buffer is empty and the 'other' pty
has been closed) and, only then, wait for buffer work to complete
before re-testing if the read buffer is still empty.

As before, subsequent pty master reads return any available data
until no more data is available, and then returns -EIO to
indicate the pty slave has closed.

Reported-by: Mikael Pettersson <mikpelinux@gmail.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Tested-by: Mikael Pettersson <mikpelinux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 19:05:56 -07:00
Konrad Rzeszutek Wilk 04b772d2b8 xen/hvc: If we use xen_raw_printk let it also work on HVM guests.
The xen_raw_printk works great for debugging purposes. We use
for PV guests and we can also use it for HVM guests.

However, for HVM guests we have a fallback of using the 0xe9
port in case the hypervisor does not support an HVM guest of
using the console_io hypercall. As such lets use 0xe9 during
early bootup, and once the hyper-page is setup and if the
console_io hypercall is supported - use that. Otherwise we
will fallback to using the 0xe9 after early bootup.

We also alter the return value for dom0_write_console to return
an error value instead of zero. The HVC API has been supporting
returning error values for quite some time.

P.S.
To use (and to see the output in the Xen ring buffer) one has to build
the hypervisor with 'debug=y'.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[v1: ifdef xen_cpuid_base as it is X86 specific]
2013-09-30 09:05:45 -04:00
Greg Kroah-Hartman 4ceedcf815 Merge 3.12-rc3 into tty-next
We want the tty/serial fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-29 18:44:13 -07:00
Linus Torvalds 26c019fc85 TTY/Serial fixes for 3.12-rc3
Here are some serial at tty driver fixes for 3.12-rc3
 
 The serial driver fixes some kref leaks, documentation is moved to the proper
 places, and the tty and n_tty fixes resolve some reported regressions.  There
 is still one outstanding tty regression fix that isn't in here yet, as I want
 to test it out some more, it will be sent for 3.12-rc4 if it checks out.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.21 (GNU/Linux)
 
 iEYEABECAAYFAlJIhfAACgkQMUfUDdst+yl+ywCdEKd9jfuZhU0RZ+j3wJIHXwBM
 WFwAoIUPOI0CqKM1cLC/YIZwyn/pKjfY
 =zkas
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are some serial at tty driver fixes for 3.12-rc3

  The serial driver fixes some kref leaks, documentation is moved to the
  proper places, and the tty and n_tty fixes resolve some reported
  regressions.  There is still one outstanding tty regression fix that
  isn't in here yet, as I want to test it out some more, it will be sent
  for 3.12-rc4 if it checks out"

* tag 'tty-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: ar933x_uart: move devicetree binding documentation
  tty: Fix SIGTTOU not sent with tcflush()
  n_tty: Fix EOF push index when termios changes
  serial: pch_uart: remove unnecessary tty_port_tty_get
  serial: pch_uart: fix tty-kref leak in dma-rx path
  serial: pch_uart: fix tty-kref leak in rx-error path
  serial: tegra: fix tty-kref leak
2013-09-29 13:47:00 -07:00
Heikki Krogerus 0585557391 serial: 8250_dw: fix broken function call
The stub for dw8250_probe_acpi() is missing an argument.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-27 17:39:11 -07:00
Heikki Krogerus b15e5691cc serial: 8250_pci: add support for Intel BayTrail
Intel BayTrail has two HS-UARTs with 64 byte fifo, support
for DMA and support for 16750 compatible Auto Flow Control.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-27 17:39:11 -07:00
Adam Borowski 3415097ff0 vt: properly ignore xterm-256 colour codes
This is not a bug on our side, but a misdesign in ITU T.416, yet with
all popular terminals supporting these codes, people consider this to
be a bug in Linux.  By breaking the design principles behind SGR codes
(gracefully ignoring unsupported ones should not require knowing about
them), 256 colour ones tend to turn blinking on before invoking an
arbitrary unrelated command.

This commit doesn't add such support, merely skips such codes without
ill effects.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:58:27 -07:00
Adam Borowski 6454588092 vt: break a couple of obsolete SCOish codes.
No modern terminal supports them, and SGR 38 conflicts with detecting
xterm-256 colours.  This also makes SGR 39 consistent with other popular
terminals.  Neither are used by ncurses' terminfo.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:58:26 -07:00
Ben Hutchings 1926d0aeec hvc_vio: Do not override preferred console set by kernel parameter
The original version of this was done by Bastian Blank, who wrote:

> The problem is the following:
> - Architecture specific code sets preferred console to something bogus.
> - Command line handling tries to set preferred console but is overruled
>   by the old setting.
>
> The udbg0 console is a boot console and independant.

References: http://bugs.debian.org/492703
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:56:15 -07:00
Uwe Kleine-König 216fce2e78 serial: clps711x: drop needless devm_clk_put
The nice thing about devm_* is that the driver doesn't need to free the
resources but the driver core takes care about that.

These calls were introduced in commit c08f015 (serial: clps711x: Using
CPU clock subsystem for getting base UART speed).

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:44:46 -07:00
Wei Yongjun 7a95b815da serial: sccnxp: missing uart_unregister_driver() on error in sccnxp_probe()
Add the missing uart_unregister_driver() before return
from sccnxp_probe() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:44:45 -07:00
Alexey Pelykh 18d8519d35 OMAP/serial: Fix Mode13 vs Mode16 priority
Make Mode16 more preferred than Mode13, to match TRM baudrates table.

Signed-off-by: Alexey Pelykh <alexey.pelykh@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:41:40 -07:00
Alexey Pelykh 4250b5d9a4 OMAP/serial: Fix misnamed variable
Fix misnamed variable to eliminate confusion.

Signed-off-by: Alexey Pelykh <alexey.pelykh@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:41:39 -07:00
Qipan Li 59f8a62c25 serial: sirf: don't submit dma desc after timeout irqs occur
In rx timeout ISR and tasklet, we don't issue new dma desc as rx_done ISR
will do that.

Signed-off-by: Qipan Li <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:41:39 -07:00
Jingoo Han 66be084885 serial: 8250_pci: remove unnecessary pci_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:41:39 -07:00
Jingoo Han b9465f4dcf serial: txx9: remove unnecessary pci_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:41:38 -07:00
Jingoo Han f8bf876209 serial: mfd: remove unnecessary pci_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:41:38 -07:00
Olof Johansson a50c44ce24 serial: imx: Change cast to handle 64-bit resource_size_t
This resolves a warning where resource_size_t is larger than void *:

  drivers/tty/serial/imx.c:1542:6: warning: cast to pointer from integer
  	of different size [-Wint-to-pointer-cast]

Since iomem_base is a void *, casting to unsigned long is safe.

It's unclear to me that this comparison is truly needed, but it's there
on several other drivers as well.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:41:38 -07:00
José Miguel Gonçalves 2d1e5a4896 serial: samsung: add support for manual RTS setting
The Samsung serial driver currently does not support setting the
RTS pin with an ioctl(TIOCMSET) call. This patch adds this support.

Changes in v2:
 - Preserve the RTS pin's manual setting  in set_termios() also when
   enabling CRTSCTS.

Signed-off-by: José Miguel Gonçalves <jose.goncalves@inov.pt>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 15:41:38 -07:00
Jingoo Han 4190390ad2 serial: mpc512x: Remove casting the return value which is a void pointer
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: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:29:59 -07:00
Jingoo Han d4aab2064a serial: samsung: Remove casting the return value which is a void pointer
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: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:29:59 -07:00
Jingoo Han 7a89c79a94 serial: ifx6x60: Remove casting the return value which is a void pointer
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: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:29:58 -07:00
Jingoo Han aaba105e66 serial: bfin_sport_uart: Remove casting the return value which is a void pointer
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: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:29:58 -07:00
Jingoo Han 0e03e3f8ea serial: bfin_uart: Remove casting the return value which is a void pointer
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-09-26 14:29:58 -07:00
Jingoo Han 5c02fab62e serial: mpsc: Remove casting the return value which is a void pointer
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: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:29:58 -07:00
Jingoo Han 0d8570ad7e serial: arc_uart: Remove casting the return value which is a void pointer
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: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:29:58 -07:00
Heikki Krogerus 7fb8c56c7f serial: 8250_dw: provide a filter for DMA channel detection
The channel IDs are set to -1 by default. It will prevent
dmaengine from trying to provide the first free channel if
it fails to allocate exclusive channel. This will fix an
issue with ACPI enumerated UARTs that do not support DMA
but still end up getting a DMA channel incorrectly.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:27:24 -07:00
Heikki Krogerus fe95855539 serial: 8250_dw: don't limit DMA support to ACPI
It should be available for DT users as well. This does not
enable DMA by default except with ACPI. DT users can enable
DMA based on a property.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:27:24 -07:00
Heikki Krogerus 2797f6fb67 serial: 8250: don't change the fifo trigger level when using dma
DMA engines usually expect the fifo trigger level to be
aligned with the burst size. It should not be changed even
with small baud rates. This will fix an issue with
Designware DMA engine where the data can not be transferred
over UART with lower baud rates then 2400.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:27:24 -07:00
Ben Hutchings 52592da32b serial: pch_uart: Add MODULE_DEVICE_TABLE
pch_uart currently isn't auto-loaded if built as a module.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:26:10 -07:00
Ben Hutchings 12d493c791 serial: mfd: Replace MODULE_ALIAS with MODULE_DEVICE_TABLE
This is a PCI driver and should be auto-loaded based on PCI ID.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:26:08 -07:00
Dave Jones 965e260a06 tty: serial: Restrict ST ASC driver to only build on !ARM when COMPILE_TEST is set.
The Kconfig for this option suggests it's only relevant on STi SoCs,
so add depends to have it not show up on archs that won't ever run it.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:25:26 -07:00
Fabio Estevam e2c2725338 serial: imx: Use NULL as the last argument of add_preferred_console()
Commit f7d2c0bbd (serial: i.MX: evaluate linux,stdout-path property) introduced
the following sparse warning:

drivers/tty/serial/imx.c:1916:77: warning: Using plain integer as NULL pointer

Pass NULL as the last argument of add_preferred_console() instead of zero.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 14:25:26 -07:00
Rob Herring f377775dc0 TTY: hvc_dcc: probe for a JTAG connection before registering
Enabling the ARM DCC console and using without a JTAG connection will
simply hang the system. Since distros like to turn on all options, this
is a reoccurring problem to debug. We can do better by checking if
anything is attached and handling characters. There is no way to probe
this, so send a newline and check that it is handled.

Cc: Paolo Pisati <paolo.pisati@canonical.com>
Cc: Tim Gardner <tim.gardner@canonical.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 18:10:56 -07:00
Peter Hurley 469d6d0631 tty: Remove unused drop() method from tty_port interface
Although originally conceived as a hook for port drivers to know
when a port reference is dropped, no driver uses this method.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 18:08:34 -07:00
Peter Hurley e3bfea23a6 tty: Prevent tty_port destruction if tty not released
If the tty driver mistakenly drops the last port reference
before the tty has been released, issue a diagnostic and
abort the port destruction.

This will leak memory and may zombify the port, but might
otherwise keep the machine in runnable state.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 18:08:34 -07:00
Peter Hurley 103fcbe2ee n_tty: Style fix in n_tty_set_termios
Remove braces from single-statement conditional in
n_tty_set_termios.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 18:05:36 -07:00
Peter Hurley c786f74e0b n_tty: Remove unnecessary local variable
Flatten conditional evaluation in n_tty_set_termios; remove
canon_change.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 18:05:32 -07:00
Peter Hurley 1cb40d0872 n_tty: Remove superfluous reader wakeup
n_tty's .set_termios method unconditionally performs reader wakeup;
remove extra reader wakeup for canonical mode changes.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 17:55:11 -07:00
Peter Hurley 5cec7bf699 tty: Fix SIGTTOU not sent with tcflush()
Commit 'e7f3880cd9b98c5bf9391ae7acdec82b75403776'
  tty: Fix recursive deadlock in tty_perform_flush()
introduced a regression where tcflush() does not generate
SIGTTOU for background process groups.

Make sure ioctl(TCFLSH) calls tty_check_change() when
invoked from the line discipline.

Cc: stable@vger.kernel.org # v3.10+
Reported-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 17:52:17 -07:00
Oleg Nesterov 03e1261778 tty: disassociate_ctty() sends the extra SIGCONT
Starting from v3.10 (probably commit f91e2590410b: "tty: Signal
foreground group processes in hangup") disassociate_ctty() sends SIGCONT
if tty && on_exit.  This breaks LSB test-suite, in particular test8 in
_exit.c and test40 in sigcon5.c.

Put the "!on_exit" check back to restore the old behaviour.

Review by Peter Hurley:
 "Yes, this regression was introduced by me in that commit.  The effect
  of the regression is that ptys will receive a SIGCONT when, in similar
  circumstances, ttys would not.

  The fact that two test vectors accidentally tripped over this
  regression suggests that some other apps may as well.

  Thanks for catching this"

Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reported-by: Karel Srot <ksrot@redhat.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-09-17 21:53:32 -04:00
Peter Hurley 93a8d4163e n_tty: Fix EOF push index when termios changes
Commit 40d5e0905a,
'n_tty: Fix EOF push handling' introduced a subtle state
change error wrt EOF push handling when the termios is
changed from non-canonical to canonical mode.

Reset line_start to the current read_tail index, not 0.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 10:10:51 -07:00
Johan Hovold 0b53861230 serial: pch_uart: remove unnecessary tty_port_tty_get
Remove unused tty-reference from dma-rx path which was left after the
recent tty-port conversions.

Also remove a redundant port initialisation while at it.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 10:05:47 -07:00
Johan Hovold 19b85cfb19 serial: pch_uart: fix tty-kref leak in dma-rx path
Fix tty_kref leak when tty_buffer_request room fails in dma-rx path.

Note that the tty ref isn't really needed anymore, but as the leak has
always been there, fixing it before removing should makes it easier to
backport the fix.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 10:05:47 -07:00
Johan Hovold fc0919c68c serial: pch_uart: fix tty-kref leak in rx-error path
Fix tty-kref leak introduced by commit 384e301e ("pch_uart: fix a
deadlock when pch_uart as console") which never put its tty reference.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 10:05:47 -07:00
Johan Hovold cfd29aa0e8 serial: tegra: fix tty-kref leak
Fix potential tty-kref leak in stop_rx path.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 10:05:47 -07:00
Martin Schwidefsky 0244ad004a Remove GENERIC_HARDIRQ config option
After the last architecture switched to generic hard irqs the config
options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
for !CONFIG_GENERIC_HARDIRQS can be removed.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-09-13 15:09:52 +02:00
Linus Torvalds 8b8a7df9a1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
 "A new driver for slidebar on Ideapad laptops and a bunch of assorted
  driver fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (32 commits)
  Input: add SYN_MAX and SYN_CNT constants
  Input: max11801_ts - convert to devm
  Input: egalax-ts - fix typo and improve text
  Input: MAINTAINERS - change maintainer for cyttsp driver
  Input: cyttsp4 - kill 'defined but not used' compiler warnings
  Input: add driver for slidebar on Lenovo IdeaPad laptops
  Input: omap-keypad - set up irq type from DT
  Input: omap-keypad - enable wakeup capability for keypad.
  Input: omap-keypad - clear interrupts on open
  Input: omap-keypad - convert to threaded IRQ
  Input: omap-keypad - use bitfiled instead of hardcoded values
  Input: cyttsp4 - remove useless NULL test from cyttsp4_watchdog_timer()
  Input: wacom - fix error return code in wacom_probe()
  Input: as5011 - fix error return code in as5011_probe()
  Input: keyboard, serio - simplify use of devm_ioremap_resource
  Input: tegra-kbc - simplify use of devm_ioremap_resource
  Input: htcpen - fix incorrect placement of __initdata
  Input: qt1070 - add power management ops
  Input: wistron_btns - add MODULE_DEVICE_TABLE
  Input: wistron_btns - mark the Medion MD96500 keymap as tested
  ...
2013-09-07 10:38:46 -07:00
Linus Torvalds dccfd1e439 ARM: SoC DT updates for 3.12
Device tree and bindings updates for 3.12.
 
 General additions of various on-chip and on-board peripherals on various
 platforms as support gets added. Some of the bigger changes are:
 
 - Addition of (new) PCI-e support on Tegra.
 - More Tegra4 support, including PMC configuration for Dalmore.
 - Addition of a new board for Exynos4 (trats2) and more bindings for 4x12 IP.
 - Addition of Allwinner A20 and A31 SoC and board files.
 - Move of the ST Ericsson device tree files to now use ste-* prefix.
 - More move of hardware description of shmobile platforms to DT.
 - Two new board dts files for Freescale MXs.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJSKhJrAAoJEIwa5zzehBx3O6YP/AzskDtXdgdaopgZXVQxCIhE
 svby8xG2pcFvuAYEv7KNwgk02oC+B5JrUj7ZG42IOPeVo4HN7k80ehxmP5MZwnqs
 LpvBRXqUGAzEoJRhCD/lF4tuw+J5R/XgVWkIVz4nQ8tLdsSWJ3QY5LSS6ePTP6Qi
 2B3AbeW/7DSada7lHJE9CqIX5xienLo4YgfCWXHNT8ouFGfqKjBxqIbCFyvzrGfs
 jSsIsqy1IO0hnk61yHtbPCRl9FJg2rbVwqHBZvKHMW0ls19Q42chlK/dPO5JCb4w
 VWMqbdOr8fnbqzicVqUPbShYZjgEd5I6PUgZMXJqEacgX9dj3SfOOtcR9kfrntHE
 of7Wi3FzVzWTzclRnub9nHrBIwvThAr+WX+mvbZrD+tuQte8qkFZXO9mw5/hRA7M
 K1O1HgaH1R1Xcdo69EWx9o94NYJ9Vs9F6wmS2+nb1B8u83Ee2Uq0GES5oyYqhU56
 qg8FOMYUBDwXlHpjt1qiSwAYrabdCyxMx8lt351bxmiyKRFx0hmyGsv6HvlHJ7Oz
 hn6xHcNyIoCIuOvWxiLmKKU2ameDn16uSd71MSwomnQ+U4V+QzoqQ4QDgYD6Sgd5
 5fln3OYV3JniWeYFw9DkSLKQTYBodz06wA+XOurcNWs3Ls0E9GilKFixKC6GoEVC
 uIywadgelMfDux8GGD3x
 =1GuI
 -----END PGP SIGNATURE-----

Merge tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC DT updates from Olof Johansson:
 "Device tree and bindings updates for 3.12.

  General additions of various on-chip and on-board peripherals on
  various platforms as support gets added.  Some of the bigger changes
  are:

   - Addition of (new) PCI-e support on Tegra.
   - More Tegra4 support, including PMC configuration for Dalmore.
   - Addition of a new board for Exynos4 (trats2) and more bindings for
     4x12 IP.
   - Addition of Allwinner A20 and A31 SoC and board files.
   - Move of the ST Ericsson device tree files to now use ste-* prefix.
   - More move of hardware description of shmobile platforms to DT.
   - Two new board dts files for Freescale MXs"

* tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (177 commits)
  dts: Rename DW APB timer compatible strings
  dts: Deprecate ALTR as a vendor prefix
  of: add vendor prefix for Altera Corp.
  ARM: at91/dt: sam9x5ek: add sound configuration
  ARM: at91/dt: sam9x5ek: enable SSC
  ARM: at91/dt: sam9x5ek: add WM8731 codec
  ARM: at91/dt: sam9x5: add SSC DMA parameters
  ARM: at91/dt: add at91rm9200 PQFP package version
  ARM: at91: at91rm9200: set default mmc0 pinctrl-names
  ARM: at91: at91sam9n12: correct pin number of gpio-key
  ARM: at91: at91sam9n12: add qt1070 support
  ARM: at91: at91sam9n12: add pinctrl of TWI
  ARM: at91: Add PMU support for sama5d3
  ARM: at91: at91sam9260: add missing pinctrl-names on mmc
  ARM: tegra: configure power off for Dalmore
  ARM: DT: binding fixup to align with vendor-prefixes.txt (DT)
  ARM: dts: add sdio blocks to bcm28155-ap board
  ARM: dts: align sdio numbers to HW definition
  ARM: sun7i: Add Olimex A20-Olinuxino-Micro support
  ARM: sun7i: Add Allwinner A20 DTSI
  ...
2013-09-06 13:26:27 -07:00
Linus Torvalds 4de9ad9bc0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull Tile arch updates from Chris Metcalf:
 "These changes bring in a bunch of new functionality that has been
  maintained internally at Tilera over the last year, plus other stray
  bits of work that I've taken into the tile tree from other folks.

  The changes include some PCI root complex work, interrupt-driven
  console support, support for performing fast-path unaligned data
  fixups by kernel-based JIT code generation, CONFIG_PREEMPT support,
  vDSO support for gettimeofday(), a serial driver for the tilegx
  on-chip UART, KGDB support, more optimized string routines, support
  for ftrace and kprobes, improved ASLR, and many bug fixes.

  We also remove support for the old TILE64 chip, which is no longer
  buildable"

* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (85 commits)
  tile: refresh tile defconfig files
  tile: rework <asm/cmpxchg.h>
  tile PCI RC: make default consistent DMA mask 32-bit
  tile: add null check for kzalloc in tile/kernel/setup.c
  tile: make __write_once a synonym for __read_mostly
  tile: remove support for TILE64
  tile: use asm-generic/bitops/builtin-*.h
  tile: eliminate no-op "noatomichash" boot argument
  tile: use standard tile_bundle_bits type in traps.c
  tile: simplify code referencing hypervisor API addresses
  tile: change <asm/system.h> to <asm/switch_to.h> in comments
  tile: mark pcibios_init() as __init
  tile: check for correct compiler earlier in asm-offsets.c
  tile: use standard 'generic-y' model for <asm/hw_irq.h>
  tile: use asm-generic version of <asm/local64.h>
  tile PCI RC: add comment about "PCI hole" problem
  tile: remove DEBUG_EXTRA_FLAGS kernel config option
  tile: add virt_to_kpte() API and clean up and document behavior
  tile: support FRAME_POINTER
  tile: support reporting Tilera hypervisor statistics
  ...
2013-09-06 11:14:33 -07:00
Linus Torvalds 39eda2aba6 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc updates from Ben Herrenschmidt:
 "Here's the powerpc batch for this merge window.  Some of the
  highlights are:

   - A bunch of endian fixes ! We don't have full LE support yet in that
     release but this contains a lot of fixes all over arch/powerpc to
     use the proper accessors, call the firmware with the right endian
     mode, etc...

   - A few updates to our "powernv" platform (non-virtualized, the one
     to run KVM on), among other, support for bridging the P8 LPC bus
     for UARTs, support and some EEH fixes.

   - Some mpc51xx clock API cleanups in preparation for a clock API
     overhaul

   - A pile of cleanups of our old math emulation code, including better
     support for using it to emulate optional FP instructions on
     embedded chips that otherwise have a HW FPU.

   - Some infrastructure in selftest, for powerpc now, but could be
     generalized, initially used by some tests for our perf instruction
     counting code.

   - A pile of fixes for hotplug on pseries (that was seriously
     bitrotting)

   - The usual slew of freescale embedded updates, new boards, 64-bit
     hiberation support, e6500 core PMU support, etc..."

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (146 commits)
  powerpc: Correct FSCR bit definitions
  powerpc/xmon: Fix printing of set of CPUs in xmon
  powerpc/pseries: Move lparcfg.c to platforms/pseries
  powerpc/powernv: Return secondary CPUs to firmware on kexec
  powerpc/btext: Fix CONFIG_PPC_EARLY_DEBUG_BOOTX on ppc32
  powerpc: Cleanup handling of the DSCR bit in the FSCR register
  powerpc/pseries: Child nodes are not detached by dlpar_detach_node
  powerpc/pseries: Add mising of_node_put in delete_dt_node
  powerpc/pseries: Make dlpar_configure_connector parent node aware
  powerpc/pseries: Do all node initialization in dlpar_parse_cc_node
  powerpc/pseries: Fix parsing of initial node path in update_dt_node
  powerpc/pseries: Pack update_props_workarea to map correctly to rtas buffer header
  powerpc/pseries: Fix over writing of rtas return code in update_dt_node
  powerpc/pseries: Fix creation of loop in device node property list
  powerpc: Skip emulating & leave interrupts off for kernel program checks
  powerpc: Add more exception trampolines for hypervisor exceptions
  powerpc: Fix location and rename exception trampolines
  powerpc: Add more trap names to xmon
  powerpc/pseries: Add a warning in the case of cross-cpu VPA registration
  powerpc: Update the 00-Index in Documentation/powerpc
  ...
2013-09-06 10:49:42 -07:00
Linus Torvalds 2e515bf096 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree from Jiri Kosina:
 "The usual trivial updates all over the tree -- mostly typo fixes and
  documentation updates"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (52 commits)
  doc: Documentation/cputopology.txt fix typo
  treewide: Convert retrun typos to return
  Fix comment typo for init_cma_reserved_pageblock
  Documentation/trace: Correcting and extending tracepoint documentation
  mm/hotplug: fix a typo in Documentation/memory-hotplug.txt
  power: Documentation: Update s2ram link
  doc: fix a typo in Documentation/00-INDEX
  Documentation/printk-formats.txt: No casts needed for u64/s64
  doc: Fix typo "is is" in Documentations
  treewide: Fix printks with 0x%#
  zram: doc fixes
  Documentation/kmemcheck: update kmemcheck documentation
  doc: documentation/hwspinlock.txt fix typo
  PM / Hibernate: add section for resume options
  doc: filesystems : Fix typo in Documentations/filesystems
  scsi/megaraid fixed several typos in comments
  ppc: init_32: Fix error typo "CONFIG_START_KERNEL"
  treewide: Add __GFP_NOWARN to k.alloc calls with v.alloc fallbacks
  page_isolation: Fix a comment typo in test_pages_isolated()
  doc: fix a typo about irq affinity
  ...
2013-09-06 09:36:28 -07:00
Benjamin Herrenschmidt 91c2beb56b Merge remote-tracking branch 'agust/next' into next
From Anatolij:
<<
There are cleanups for some mpc5121 specific drivers and DTS files
in preparation to switch mpc5121 clock support to a clock driver
based on common clock framework. Additionally Sebastian fixed the
mpc52xx PIC driver so that it builds when using older gcc versions.
>>
2013-09-05 16:43:30 +10:00
Joe Perches 9e03aa2f83 treewide: Convert retrun typos to return
Tyops should be fixed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-09-04 12:26:36 +02:00
Chris Metcalf b5c6c1a72a tilegx: Add tty serial support for TILE-Gx on-chip UART
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-03 14:50:40 -04:00
Linus Torvalds 2f01ea908b TTY/Serial driver patches for 3.12-rc1
Here's the big tty/serial driver pull request for 3.12-rc1.
 
 Lots of n_tty reworks to resolve some very long-standing issues, removing the
 3-4 different locks that were taken for every character.  This code has been
 beaten on for a long time in linux-next with no reported regressions.
 
 Other than that, a range of serial and tty driver updates and revisions.  Full
 details in the shortlog.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.21 (GNU/Linux)
 
 iEYEABECAAYFAlIlI6UACgkQMUfUDdst+ym7kgCgmysv/TVeqsdvmkiO2eEB4+xs
 ddwAoMqkJ/enCJ2f+fC8y2Wz+5+kDrU7
 =CiCp
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial driver patches from Greg KH:
 "Here's the big tty/serial driver pull request for 3.12-rc1.

  Lots of n_tty reworks to resolve some very long-standing issues,
  removing the 3-4 different locks that were taken for every character.
  This code has been beaten on for a long time in linux-next with no
  reported regressions.

  Other than that, a range of serial and tty driver updates and
  revisions.  Full details in the shortlog"

* tag 'tty-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (226 commits)
  hvc_xen: Remove unnecessary __GFP_ZERO from kzalloc
  serial: imx: initialize the local variable
  tty: ar933x_uart: add device tree support and binding documentation
  tty: ar933x_uart: allow to build the driver as a module
  ARM: dts: msm: Update uartdm compatible strings
  devicetree: serial: Document msm_serial bindings
  serial: unify serial bindings into a single dir
  serial: fsl-imx-uart: Cleanup duplicate device tree binding
  tty: ar933x_uart: use config_enabled() macro to clean up ifdefs
  tty: ar933x_uart: remove superfluous assignment of ar933x_uart_driver.nr
  tty: ar933x_uart: use the clk API to get the uart clock
  tty: serial: cpm_uart: Adding proper request of GPIO used by cpm_uart driver
  serial: sirf: fix the amount of serial ports
  serial: sirf: define macro for some magic numbers of USP
  serial: icom: move array overflow checks earlier
  TTY: amiserial, remove unnecessary platform_set_drvdata()
  serial: st-asc: remove unnecessary platform_set_drvdata()
  msm_serial: Send more than 1 character on the console w/ UARTDM
  msm_serial: Add support for non-GSBI UARTDM devices
  msm_serial: Switch clock consumer strings and simplify code
  ...
2013-09-03 11:38:36 -07:00
Joe Perches 2d1d3f3ae9 hvc_xen: Remove unnecessary __GFP_ZERO from kzalloc
kzalloc already adds this __GFP_ZERO.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30 14:11:28 -07:00
Huang Shijie b09c74ae12 serial: imx: initialize the local variable
The slave_config is not initialized, so some of its fields may
be set with random data which may causes the failure in the following
dmaengine_prep_slave_sg().

This patch fixes this issue.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30 14:11:28 -07:00
Gabor Juhos dd910d98a2 tty: ar933x_uart: add device tree support and binding documentation
Modify the probe routine to get the port line number
from device tree if the 'of_node' is populated in the
platform device. The driver can be built as module,
thus add an OF specific module device table as well
to support module auto loading.

This makes it possible to use the driver for AR9330
UART devices specified in device tree.

Cc: devicetree@vger.kernel.org
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30 14:11:27 -07:00
Gabor Juhos 284301ef7c tty: ar933x_uart: allow to build the driver as a module
Change the SERIAL_AR933X Kconfig option from
'bool' to 'tristate' in order to allow to build
the driver as a module. Also extend the help text
of the option to reflect that.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30 12:14:16 -07:00
Dinh Nguyen 13960b47dc dts: Deprecate ALTR as a vendor prefix
Because most of the vendor prefixes are lower case, deprecate
the vendor prefix "ALTR" in place of "altr" for Altera Corp..

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-08-29 12:58:55 -07:00
Gabor Juhos 1241553513 tty: ar933x_uart: use config_enabled() macro to clean up ifdefs
Add a new ar933x_uart_console_enabled() helper function
which uses the config_enable(CONFIG_SERIAL_AR933X_CONSOLE)
macro to decide if the console support is enabled or not.

Remove the 'ifdef CONFIG_SERIAL_AR933X_CONSOLE' statements
and use the new helper function to conditionally enable
console support instead.

If CONFIG_SERIAL_AR933X_CONSOLE is not enabled, the new
helper function will become a null stub which allows the
compiler to optimize out the unused console specific
functions/variables.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-28 16:00:42 -07:00
Gabor Juhos 0710e5626f tty: ar933x_uart: remove superfluous assignment of ar933x_uart_driver.nr
The 'nr' field of the 'ar933x_uart_driver' structure
is already initialized with the same value in the static
declaration. Remove the superfluous assignment in the
module init routine.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-28 16:00:42 -07:00
Gabor Juhos 15ef17f622 tty: ar933x_uart: use the clk API to get the uart clock
The AR933x UARTs are only used on the Atheros AR933x
SoCs. The base clock frequency of the UART is passed
to the driver via platform data. The SoC support code
implements the generic clock API, and the clock rate
can be retrieved via that.

Update the code to get the clock rate via the generic
clock API instead of using the platform data.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-28 16:00:42 -07:00
Christophe Leroy a416bfa2a6 tty: serial: cpm_uart: Adding proper request of GPIO used by cpm_uart driver
cpm_uart serial driver uses GPIO for control signals. In order to be used
properly, GPIOs have to be reserved. Comment in gpiolib.c considers illegal
the use of GPIOs without requesting them. In addition, the direction of the
GPIO has to be set properly.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 22:06:22 -07:00
Benjamin Herrenschmidt 1042092167 Merge branch 'merge' into next
Merge recent fixes to lparcfg so subsequent patches can move
the whole file to arch/powerpc/platforms/pseries
2013-08-28 11:17:32 +10:00
Qipan Li b60dfbae41 serial: sirf: fix the amount of serial ports
SiRFprimaII has three uart ports and three USP-based ports, so there
are totally six lines instead of five.

Signed-off-by: Qipan Li <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:25:44 -07:00
Qipan Li 459f15c45e serial: sirf: define macro for some magic numbers of USP
this patch clears some magic numbers for offset and bitshift
of USP registers.

Signed-off-by: Qipan Li <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:25:44 -07:00
Dan Carpenter 4f03ffcd3e serial: icom: move array overflow checks earlier
This code does an annoying thing where it writes to the array and then
checks later for array overflows.  I don't know if it's actually
possible to overflow but let's check before using the array index.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:24:33 -07:00
Jingoo Han 1b2a405bba TTY: amiserial, remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:24:33 -07:00
Jingoo Han 46ddeff30e serial: st-asc: remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:24:33 -07:00