Commit Graph

455842 Commits

Author SHA1 Message Date
Peter Hurley 9c9928bded tty: Document locking for tty_port_hangup()
The tty lock is held when the tty driver's hangup() method is called
(from the lone call-site, __tty_hangup()). The call-tree audit [1]
of tty_port_hangup() is a closed graph of the callers of
tty_port_hangup(); ie., all callers originate only from __tty_hangup().

Of these callers, none drop the tty lock prior to calling
tty_port_hangup().

[1]
Call-tree audit of tty_port_hangup()

__tty_hangup()
  tty->ops->hangup() --+
                       |
        rs_hangup():arch/ia64/hp/sim/simserial.c
        line_hangup():arch/um/drivers/line.c
        gdm_tty_hangup():drivers/staging/gdm724x/gdm_tty.c
        fwtty_hangup():drivers/staging/fwserial/fwserial.c
        acm_tty_hangup():drivers/usb/class/cdc-acm.c
        serial_hangup():drivers/usb/serial/usb-serial.c
        ipoctal_hangup():drivers/ipack/devices/ipoctal.c
        cy_hangup():drivers/tty/cyclades.c
        isicom_hangup():drivers/tty/isicom.c
        rp_hangup():drivers/tty/rocket.c
        dashtty_hangup():drivers/tty/metag_da.c
        moxa_hangup():drivers/tty/moxa.c
        gsmtty_hangup():drivers/tty/n_gsm.c
        goldfish_tty_hangup():drivers/tty/goldfish.c
        ehv_bc_tty_hangup():drivers/tty/ehv_bytechan.c
        mxser_hangup():drivers/tty/mxser.c
        kgdb_nmi_tty_hangup():drivers/tty/serial/kgdb_nmi.c
        ifx_spi_hangup():drivers/tty/serial/ifx6x60.c
        ntty_hangup():drivers/tty/nozomi.c
        capinc_tty_hangup():drivers/isdn/capi/capi.c
        mgslpc_hangup():drivers/char/pcmcia/synclink_cs.c
        sdio_uart_hangup():drivers/mmc/card/sdio_uart.c
        rfcomm_tty_hangup():net/bluetooth/rfcomm/tty.c
                       |
                       +- tty_port_hangup()

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 16:05:19 -07:00
Peter Hurley c590f6b6cf tty: Document locking for tty_port_block_til_ready()
The tty lock is held when the tty driver's open() method is called
(from tty_open()). The call-tree audit [1] of tty_port_block_til_ready()
is a closed graph of the callers of tty_port_block_til_ready();
ie., all callers originate only from tty_open().

Of these callers, none drop the tty lock.

Also, document tty_port_block_til_ready() may drop and reacquire
the tty lock when blocking, which means the tty or tty_port may have
changed state.

[1]
Call-tree audit of tty_port_block_til_ready()
* does not include call tree of tty_port_open() which is already
  documented in 'tty: Document locking from tty_port_open()'

tty_open()
  tty->ops->open() --+
                     |
        cy_open():drivers/tty/cyclades.c
        rp_open():drivers/tty/rocket.c
        rs_open():drivers/tty/amiserial.c
        moxa_open():drivers/tty/moxa.c
        gsmtty_open():drivers/tty/n_gsm.c
        rs_open():drivers/tty/serial/68328serial.c
        uart_open():drivers/tty/serial/serial_core.c
        isdn_tty_open():drivers/isdn/i4l/isdn_tty.c
        mgslpc_open():drivers/char/pcmcia/synclink_cs.c
                     |
                     +- tty_port_block_til_ready()

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 16:05:19 -07:00
Peter Hurley addd4672bb tty: Document locking for tty_port_open()
The tty lock is held when the tty driver's open method is called
(from the lone call-site, tty_open()). The call-tree audit [1] of
tty_port_open() is a closed graph of the callers of tty_port_open();
ie., all callers originate from only tty_open().

Of these callers, none drop the tty lock.

Also, document that tty_port_block_til_ready() may drop and reacquire
the tty lock when blocking, which means the tty or tty_port may have
changed state.

[1]
Call-tree audit of tty_port_open()

tty_open()
  tty->ops->open() --+
                     |
        rs_open():arch/ia64/hp/sim/simserial.c
       *line_open():arch/um/drivers/line.c
        gdm_tty_open():drivers/staging/gdm724x/gdm_tty.c
        fwtty_open():drivers/staging/fwserial/fwserial.c
        acm_tty_open():drivers/usb/class/cdc-acm.c
        serial_open():drivers/usb/serial/usb-serial.c
        pti_tty_driver_open():drivers/misc/pti.c
        ipoctal_open():drivers/ipack/devices/ipoctal.c
        isicom_open():drivers/tty/isicom.c
        dashtty_open():drivers/tty/metag_da.c
        goldfish_tty_open():drivers/tty/goldfish.c
        ehv_bc_tty_open():drivers/tty/ehv_bytechan.c
        mxser_open():drivers/tty/mxser.c
        kgdb_nmi_tty_open():drivers/tty/serial/kgdb_nmi.c
        ifx_spi_open():drivers/tty/serial/ifx6x60.c
        smd_tty_open():drivers/tty/serial/msm_smd_tty.c
        ntty_open():drivers/tty/nozomi.c
        capinc_tty_open():drivers/isdn/capi/capi.c
        tpk_open():drivers/char/ttyprintk.c
        sdio_uart_open():drivers/mmc/card/sdio_uart.c
        rfcomm_tty_open():net/bluetooth/rfcomm/tty.c
                     |
                     +- tty_port_open()

* line_open() is the .open method for 2 um drivers
  declared in ./arch/um/drivers/stdio_console.c and
  in ./arch/um/drivers/ssl.c, and not called directly

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 16:05:19 -07:00
Peter Hurley 0733db91d0 tty: Document locking for tty_port_close{,start,end}()
The tty lock is held when the tty driver's .close method is called
(from the two lone call-sites of tty_release() and __tty_hangup()).
The call-tree audit[1] of tty_port_close(), tty_port_close_start,
and tty_port_close_end() is a closed graph of the callers of these
3 functions; ie., all callers originate from only tty_release()
or __tty_hangup().

Of these callers, none drop the tty lock.

Also, document tty_port_close_start() may drop and reacquire the
tty lock in tty_wait_until_sent_from_close(), which means the tty
or tty_port may have changed state (but not reopened or hung up).

[1]
Call-tree audit of tty_port_close, tty_port_close_start, and tty_port_close_end()

tty_release()
  tty->ops->close() --+
                      |
__tty_hangup()        |
  tty->ops->close() --+
                      |
                      +- rp_close():drivers/tty/rocket.c -------------------+
                      +- uart_close():drivers/tty/serial/serial_core.c -----+
                      |                                                     +- tty_port_close_start()
                      |
                      |
                      +- close():drivers/tty/synclinkmp.c ------------------+
                      +- rs_close():drivers/tty/amiserial.c ----------------+
                      +- gsmtty_close():drivers/tty/n_gsm.c ----------------+
                      +- mxser_close():drivers/tty/mxser.c -----------------+
                      +- close():drivers/tty/synclink_gt.c -----------------+
                      +- mgsl_close():drivers/tty/synclink.c ---------------+
                      +- isdn_tty_close():drivers/isdn/i4l/isdn_tty.c ------+
                      +- mgslpc_close():drivers/char/pcmcia/synclink_cs.c --+
                      +- ircomm_tty_close():net/irda/ircomm/ircomm_tty.c ---+
                      |                                                     |
        rs_close():arch/ia64/hp/sim/simserial.c                             |
       *line_close():arch/um/drivers/line.c                                 |
        gdm_tty_close():drivers/staging/gdm724x/gdm_tty.c
        fwtty_close():drivers/staging/fwserial/fwserial.c
        acm_tty_close():drivers/usb/class/cdc-acm.c
        serial_close():drivers/usb/serial/usb-serial.c
        pti_tty_driver_close():drivers/misc/pti.c
        ipoctal_close():drivers/ipack/devices/ipoctal.c
        cy_close():drivers/tty/cyclades.c
        isicom_close():drivers/tty/isicom.c
        dashtty_close():drivers/tty/metag_da.c
        moxa_close():drivers/tty/moxa.c
        goldfish_tty_close():drivers/tty/goldfish.c
        ehv_bc_tty_close():drivers/tty/ehv_bytechan.c
        kgdb_nmi_tty_close():drivers/tty/serial/kgdb_nmi.c
        ifx_spi_close():drivers/tty/serial/ifx6x60.c
        smd_tty_close():drivers/tty/serial/msm_smd_tty.c
        ntty_close():drivers/tty/nozomi.c
        capinc_tty_close():drivers/isdn/capi/capi.c
        tpk_close():drivers/char/ttyprintk.c
        sdio_uart_close():drivers/mmc/card/sdio_uart.c                      |
        rfcomm_tty_close():net/bluetooth/rfcomm/tty.c                       |
                      |                                                     |
                      +- tty_port_close():drivers/tty/tty_port.c -----------+
                                                                            |
                                                                            +- tty_port_close_start()
                                                                            +- tty_port_close_end()

* line_close() is the .close method for 2 um drivers,
  declared in ./arch/um/drivers/stdio_console.c and
  in ./arch/um/drivers/ssl.c, and not called directly

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 16:05:19 -07:00
Peter Hurley ed617e4423 tty: Document locking for tty driver methods
The tty core calls the tty driver's open, close and hangup
methods holding the tty lock.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 16:05:19 -07:00
Stefan Agner ed9891bf09 serial: fsl_lpuart: calculate DMA burst
The DMA burst size must match the transmit FIFO depth in order
to make sure all character are transmitted. This patch calculates
DMA burst size by using FIFO depth rather than use the hardcoded
16 bytes. This is required since some UARTs (e.g. UART2 on Vybrid)
have a FIFO depth of 8 bytes.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 16:03:59 -07:00
Stefan Agner 90abef91c5 serial: fsl_lpuart: move DMA RX timeout calculation
The DMA RX timeout calculation is done based on FIFO buffer size and
port timeout when setting up DMA. However, both variables are not
necessarily initialized at DMA initialization time, which can lead
to a division by zero.

Move the timeout calculation to set_termios where both variables
are initialized.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 16:03:59 -07:00
Peter Hurley ae84db9661 serial: core: Preserve termios c_cflag for console resume
When a tty is opened for the serial console, the termios c_cflag
settings are inherited from the console line settings.
However, if the tty is subsequently closed, the termios settings
are lost. This results in a garbled console if the console is later
suspended and resumed.

Preserve the termios c_cflag for the serial console when the tty
is shutdown; this reflects the most recent line settings.

Fixes: Bugzilla #69751, 'serial console does not wake from S3'
Reported-by: Valerio Vanni <valerio.vanni@inwind.it>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:55:32 -07:00
Pradeep Goudagunta b31245b942 serial: tegra: ack the rx dma desc after transfer terminated
The Rx dma descriptor allocated without the DMA_ACK flags so that
once after tarnsfer done or terminated, client can ack the descriptor
to free it for later use.

If the Rx DMA is terminated for some reason then rx-dma descriptor
is not getting acked which causes the memory leak and list of usage
desc to grow continuously.

Hence, acknowledge the rx-dma descriptor once transfer is terminated
to avoid memory leak and desc list to grow.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:53:20 -07:00
Pradeep Goudagunta 5e3dbfca3b serial: tegra: update tx_circular buffer only when TX_DMA is in progress
When channel is require to stop transmit then update the Tx circular
buffer only when DMA based transfer is in progress. If there is no
DMA based transfer then no need to update the Tx buffer.

Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:53:20 -07:00
Arnd Bergmann 080029b149 serial: lpc32xx uart module can't do console
Every uart driver that provides a console driver needs to
be built-in for the console code to work, we get a build
error for modular console drivers.

This changes the SERIAL_HS_LPC32XX_CONSOLE symbol to depend
on the SERIAL_HS_LPC32XX driver being built-in, just like
we do for all the other uart drivers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:48:56 -07:00
Arnd Bergmann 2ee881b74e serial: pxa: fix build with !SERIAL_PXA_CONSOLE
When CONFIG_SERIAL_PXA_CONSOLE is disabled, the serial_pxa_get_poll_char
and serial_pxa_put_poll_char functions are not defined, and we can't
reference them.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:48:41 -07:00
Vineet Gupta 9da433c0a0 ARC: [arcfpga] stdout-path now suffices for earlycon/console
With recent improvements to serial/of core from Grant and Rob,
stdout-path alone suffices for setting up earlycon/console.

arc_uart driver is already equipped to handle that, switch the DT now.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:45:30 -07:00
Vineet Gupta 8c6abf7a9e serial/arc: Enable DT based earlycon
This allows a param less earlycon to pick up the earlyconsole from
chosen/stdout-path

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:45:30 -07:00
Vineet Gupta 1b9bff759b ARC: [arcfpga] RIP early uart platform device stuff
With ARC uart driver switching to generic earlycon, we no longer need
this ugliness. You won't be missed.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:45:30 -07:00
Vineet Gupta 8dbe1d5e09 serial/arc: inline the probe helper
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:45:30 -07:00
Vineet Gupta 91f1b62a9b serial/arc: remove last remanants of platform data
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:45:29 -07:00
Vineet Gupta 2e6fb7cbd0 serial/arc: remove earlyprintk support and switch to earlycon
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:43:27 -07:00
Vineet Gupta 27cfe4ec17 serial/arc: Use generic earlycon infrastructure
With this change both earlyprintk and earlycon coexist
We switch over to latter in next patch

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:43:27 -07:00
Vineet Gupta 5a56d59e85 serial/arc: Remove the workaround for legacy ISS
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:43:27 -07:00
Vineet Gupta 12d15e6f63 serial/arc: Refactor by referencing to uart_port where possible
The ARC UART MMIO helpers would take arc_uart_port and then reference
generic uart_port->membase member. So change them to difrectly refer to
uart_port and fix call sites accordingly.

This removes the need for to_arc_port() converion almost eveeywhere and
makes code a bit easier to read.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:43:27 -07:00
Vineet Gupta 3bce1b70d6 serial/arc: use uart_console_write() helper
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:43:27 -07:00
Heiko Stübner 7d78cbefaa serial: 8250_dw: add ability to handle the peripheral clock
First try to find the named clock variants then fall back to the already
existing handling of a nameless declared baudclk.

This also adds the missing documentation for this already existing variant.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:27:37 -07:00
Andy Shevchenko d8782c7452 serial: 8250_dw: use UPF_* constants when define flags
The flags member has upf_t type and corresponding macros to define them. This
patch converts ASYNC_SKIP_TEST to UPF_SKIP_TEST in 8250_dw.c.

Otherwise we got a sparse warning:
drivers/tty/serial/8250/8250_dw.c:302:46: warning: restricted upf_t degrades to integer
drivers/tty/serial/8250/8250_dw.c:302:62: warning: restricted upf_t degrades to integer
drivers/tty/serial/8250/8250_dw.c:302:26: warning: incorrect type in assignment (different base types)
drivers/tty/serial/8250/8250_dw.c:302:26:    expected restricted upf_t [usertype] flags
drivers/tty/serial/8250/8250_dw.c:302:26:    got unsigned int

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:27:37 -07:00
Heikki Krogerus 4e26b134bd serial: 8250_dw: clock rate handling for all ACPI platforms
This replaces the Baytrail specific custom set_termios hook
with a more generic one where the clock framework is used to
set the rate. The method also doesn't need to be limited to
just Baytrail, so it's used with all ACPI platforms.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:27:37 -07:00
Fabio Estevam 1ff5b64dcc serial: samsung: Use %pa to print 'resource_size_t' type
When building multi_v7_defconfig with CONFIG_ARM_LPAE=y the following warning
is seen:

drivers/tty/serial/samsung.c: In function 's3c24xx_serial_init_port':
drivers/tty/serial/samsung.c:1229:2: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'resource_size_t' [-Wformat]

Use %pa to print 'resource_size_t' type to fix the warning.

Reported-by: Olof's autobuilder <build@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 15:27:37 -07:00
Rickard Strandqvist 2b844ad2bf tty: serial: msm_serial.c: Cleaning up uninitialized variables
There is a risk that the variable will be used without being initialized.

This was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:38:21 -07:00
Qipan Li 7282cec903 serial: sirf: transfer more bytes once to decrease interrupts
the current codes send 1 bytes, then after getting TX done interrupt,
send subsequent bytes. it causes redundant interrupts.
for example, if we have 3 bytes in TX buffer, the TX flow is:
1. send 1 byte
2. get TX down interrupt
3. send the left 2 bytes
4. get TX down interrupt

this patch moves to send more bytes and decrease interrupts, the new
flow is:
1. send 3 bytes
2. get TX down interrupt

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>
2014-07-09 17:37:00 -07:00
Johannes Thumshirn a9977620a4 tty: serial: men_z135_uart: Wakeup UART after transmitting
Call uart_write_wakeup() after writing the hardware FIFO and updateing the FIFO
pointers.

This fixes high latency and jitter on PPP over Serial links.

Reported-by: Jun Shih <Jun.Shih@pason.com>
Tested-by: Jun Shih <Jun.Shih@pason.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@men.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:35:42 -07:00
Alexander Shiyan 8b152f1096 serial: treewide: Remove empty implementations of enable_ms()
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:29:38 -07:00
Alexander Shiyan 1fdc31065f serial: core: Make enable_ms() optional
This patch makes enable_ms() optional, so we can eliminate a lot of
empty enable_ms() implementations from driver code.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:29:38 -07:00
Kukjin Kim 953b53a71b serial: samsung: no more support for S5PC100 SoC
This patch removes s5pc100 related serial.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:23:28 -07:00
Kukjin Kim 1570a5386d serial: samsung: no more support for S5P6440 and S5P6450 SoCs
This patch removes s5p64x0 related serial because of removing
support for s5p64x0 SoCs.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:23:28 -07:00
Tomasz Figa 1e64f48ea7 ARM: dts: SAMSUNG: Add aliases of UART nodes
This patch adds alias entries for UART nodes of all SoCs using
samsung-uart compatible UART controllers, so that the dependency on
probe order is removed and deterministic device naming is assured.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:22:55 -07:00
Tomasz Figa 13a9f6c64f serial: samsung: Consider DT alias when probing ports
Current driver code relies on probe order of particular samsung-uart
instances, which makes it impossible to get proper initialization of
ports when not all ports are available on board, not even saying of
deterministic device naming.

This patch fixes this on DT-enabled systems by using DT aliases for
ports as instance ID, if specified, or falling back to legacy method
otherwise to provide backwards compatibility.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:22:55 -07:00
Tomasz Figa 9b58bec76e Documentation: devicetree: Update samsung UART bindings
The primary purpose of this patch is to add information about (now
required) aliases of UART ports. However the documentation currently is
heavily outdated and so this patch also takes care of this.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:22:55 -07:00
Tushar Behera 44acd26063 serial: amba-pl010: Use devres APIs
Migrating to use devres managed APIs devm_kzalloc, devm_ioremap and
devm_clk_get.

Signed-off-by: Tushar Behera <tushar.b@samsung.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:13:54 -07:00
Tushar Behera 7f6d942a81 serial: amba-pl011: Remove redundant label
The label 'out' is only used to return the error code. We can return the
error code directly and remove 'out' label.

Signed-off-by: Tushar Behera <tushar.b@samsung.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:13:54 -07:00
Tushar Behera 8ad711a98d serial: samsung: Remove redundant label
probe_err label only returns the error code. This label can be removed
and the error code can be returned directly.

Signed-off-by: Tushar Behera <tushar.b@samsung.com>
Reviewed-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 17:13:54 -07:00
Linus Torvalds cd3de83f14 Linux 3.16-rc4 2014-07-06 12:37:51 -07:00
Linus Torvalds 100193f5b7 Devicetree bugfixe for v3.16
Important bug fix for parsing 64-bit addresses on 32-bit platforms.
 Without this patch the kernel will try to use memory ranges that cannot
 be reached.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTuRSlAAoJEMWQL496c2LNyeAP/3xVkBxtXzaLDU39ijCr5x6B
 2PoagkCapWSCp2GXv29wJii3YgO6cVa54T1p6lbDNLkmzLzBrywq8zcLCOgaAh9G
 3QAulbSAW2nBNMf+8tJ/a86PhOLd6414myrtlvS6LdgRhZQKqzXpHQcEAhkJKIQZ
 YNjE6aW5KtKpiRFToXh166AriL0KYHIbyT0AW3ut5gNUSC+I5X7kLMvw4CsfqexQ
 Mf1P5QkK9Bfk6ss9dTwNYLlenjnKiOVEh7wq6MkcK7JDIP5mSfr5+NgGZpqYsKwR
 eF2lJ8zTmQC+Qjfz20b4ZBu935KmjDklQ7q5FQR3kE3kbCVB9lxYijpvb/51x1h9
 ZpU7fG8gv0KneuJazL2SbqIUEN80DgFZMAy34ohyR+PcFcRkv1rHgbGSq840LjDe
 jBs5xVaDqm5eAwYfPS+DYwB/0SFGEeyx4A9EpEpil5/esVeRwsS6HDkmNGfms5OQ
 SRTyDdxFWhdBphbrcBBT93kc06lnXmISNaMj2njmRtiUDOQEFfVol6MXgjligNPE
 yOTODWZmPmnjXH15DmXxWUKyLGgYqruVQthFo9F94eqT4BXJiPICnJ4xt4oRmGGf
 4VexG2NN0dN7TymvLKp0TUIPSYDGCGZpYA0K+82PfHnRd1PinX2iTL1wO02hLn8A
 uNphY1FdjFbwSPJOqj92
 =7+H1
 -----END PGP SIGNATURE-----

Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux

Pull devicetree bugfix from Grant Likely:
 "Important bug fix for parsing 64-bit addresses on 32-bit platforms.
  Without this patch the kernel will try to use memory ranges that
  cannot be reached"

* tag 'dt-for-linus' of git://git.secretlab.ca/git/linux:
  of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch
2014-07-06 12:11:57 -07:00
Linus Torvalds 8addf0c713 SCSI for-linus on 20140705
This is a set of 13 fixes, a MAINTAINERS update and a sparse update.  The
 fixes are mostly correct value initialisations, avoiding NULL derefs and some
 uninitialised pointer avoidance.
 
 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQEcBAABAgAGBQJTuNEhAAoJEDeqqVYsXL0MYC4H/2gpxHA9rELiqPRLJGNjt9v3
 YlGrIwVAAdYLBSgwtkpAYj6oDJtwRmZvP3Saj2n5Lga+32mgFsPjvy+JsM3O41SL
 k5QRlAs10wMbOB/dSoGxFsKdGnig4NolCIe5p0MGQvAbcCvh9z2Tr876ssvSfMCh
 1mh0xmTCIutD7R2f5WjRckA+HZo+qmLLz5ZyogDasI3mSRAHjcZ+j5HdWBQbEsag
 U6lPDR5VpUjGpigwJ+BPWwKTbIAIW1v2TB1YjWSHr5h2QPLBa+hfbyc15S1AjsGb
 9F5/L432yk4UXQUKyKIpCKi8rDCoioM8dt8ofjjTNfNNjDlYRRHKutalef1yOw8=
 =HPXQ
 -----END PGP SIGNATURE-----

Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a set of 13 fixes, a MAINTAINERS update and a sparse update.
  The fixes are mostly correct value initialisations, avoiding NULL
  derefs and some uninitialised pointer avoidance.

  All the patches have been incubated in -next for a few days.  The
  final patch (use the scsi data buffer length to extract transfer size)
  has been rebased to add a cc to stable, but only the commit message
  has changed"

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  [SCSI] use the scsi data buffer length to extract transfer size
  virtio-scsi: fix various bad behavior on aborted requests
  virtio-scsi: avoid cancelling uninitialized work items
  ibmvscsi: Add memory barriers for send / receive
  ibmvscsi: Abort init sequence during error recovery
  qla2xxx: Fix sparse warning in qla_target.c.
  bnx2fc: Improve stats update mechanism
  bnx2fc: do not scan uninitialized lists in case of error.
  fc: ensure scan_work isn't active when freeing fc_rport
  pm8001: Fix potential null pointer dereference and memory leak.
  MAINTAINERS: Update LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) maintainers Email IDs
  be2iscsi: remove potential junk pointer free
  be2iscsi: add an missing goto in error path
  scsi_error: set DID_TIME_OUT correctly
  scsi_error: fix invalid setting of host byte
2014-07-06 12:08:30 -07:00
Linus Torvalds 110e4308f8 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "i915, tda998x and vmwgfx fixes,

  The main one is i915 fix for missing VGA connectors, along with some
  fixes for the tda998x from Russell fixing some modesetting problems.

  (still on holidays, but got a spare moment to find these)"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/vmwgfx: Fix incorrect write to read-only register v2:
  drm/i915: Drop early VLV WA to fix Voltage not getting dropped to Vmin
  drm/i915: only apply crt_present check on VLV
  drm/i915: Wait for vblank after enabling the primary plane on BDW
  drm/i2c: tda998x: add some basic mode validation
  drm/i2c: tda998x: faster polling for edid
  drm/i2c: tda998x: move drm_i2c_encoder_destroy call
2014-07-05 17:13:46 -07:00
Linus Torvalds 75bf757edc ARM: SoC fixes for 3.16-rc
This week's arm-soc fixes:
 
 - A set of of OMAP patches that we had missed Tony's pull request of:
   - Reset fix for am43xx
   - Proper OPP table for omap5
   - Fix for SoC detection of one of the DRA7 SoCs
   - hwmod updates to get SATA and OCP to work on omap5 (drivers merged in 3.16)
   - ... plus a handful of smaller fixes
 - sunxi needed to re-add machine specific restart code that was removed in
   anticipation of a watchdog driver being merged for 3.16, and it didn't make
   it in.
 - Marvell fixes for PCIe on SMP and a big-endian fix.
 - A trivial defconfig update to make my capri test board boot with
   bcm_defconfig again.
 
 ... and a couple of MAINTAINERS updates, one to claim new Keystone
 drivers that have been merged, and one to merge MXS and i.MX (both
 Freescale platforms).
 
 The largest diffs come from the hwmod code for omap5 and the re-add of
 the restart code on sunxi. The hwmod stuff is quite late at this point
 but it slipped through cracks repeatedly while coming up the maintainer
 chain and only affects the one SoC so risk is low.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTuFXOAAoJEIwa5zzehBx30dYQAJ2jfunXR0R4BldQw7UzYoob
 3ht/tgIRglMcGIGbdvwRznOjjAsZTTssUzZvCvdU/B5ckILg7FCsaHFo6eYhB0NE
 bvxpMD1XyfO2JPF1r7jQqQsuwUXWtyAnkxFiuFkeBnriwo69ikbZnPb5g0bcMaXx
 HzPZoSoODn9g2vbgEH3jL3+AClWvHgJ7lXQxUSH9xvCqjqQjiwFx8l6QY/+qgkde
 QuRfZ0UCBuRFpTdR4jfvTIO4mctD6ObfaRRiQpzIQPa8HDGcWmD2LJm+IeCdclFv
 PwINZnf5aICz+CEJa8oo7tyKpEUNQwJL2YPesCXeRnVxcCHMn0UCDuZ3Z2MR3C8I
 w21msVS+bxr+tisj7QY3KCi73DMlTjOPj21OaPrpTAjDI/5tZxTCCvCWctg0aF4S
 HKKETWtrWhN6qiIpkKalCcr6CHlqf9p7QOz7d4yzE89O3thyg7YrRff7KOCtoaZo
 +aJnW7Z3gTuJFWTpAOQL+DeRQsY0ZpYqG6wVc8bIgM+vYYPBJO7mGa2ARBiz4Piw
 a+iEOP3ej8uqa60YfehXRS/YTGnOVkUf9Qk4zmyKjyoXSNhasQDHG/ujb7/hxzpd
 Lq4X2CkLZTOX+kjlXWD7kk3OBhIxdu38UtWPomd3QVZqEg7dCYxQooXuiidqYQ9x
 xquFfKAuIJlvBzVpWIbz
 =J9xD
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Olof Johansson:
 "This week's arm-soc fixes:

   - A set of of OMAP patches that we had missed Tony's pull request of:
     * Reset fix for am43xx
     * Proper OPP table for omap5
     * Fix for SoC detection of one of the DRA7 SoCs
     * hwmod updates to get SATA and OCP to work on omap5 (drivers
       merged in 3.16)
     * ... plus a handful of smaller fixes
   - sunxi needed to re-add machine specific restart code that was
     removed in anticipation of a watchdog driver being merged for 3.16,
     and it didn't make it in.
   - Marvell fixes for PCIe on SMP and a big-endian fix.
   - A trivial defconfig update to make my capri test board boot with
     bcm_defconfig again.

  ... and a couple of MAINTAINERS updates, one to claim new Keystone
  drivers that have been merged, and one to merge MXS and i.MX (both
  Freescale platforms).

  The largest diffs come from the hwmod code for omap5 and the re-add of
  the restart code on sunxi.  The hwmod stuff is quite late at this
  point but it slipped through cracks repeatedly while coming up the
  maintainer chain and only affects the one SoC so risk is low"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  MAINTAINERS: Add few more Keystone drivers
  MAINTAINERS: merge MXS entry into IMX one
  ARM: sunxi: Reintroduce the restart code for A10/A20 SoCs
  ARM: mvebu: fix cpuidle implementation to work on big-endian systems
  ARM: mvebu: update L2/PCIe deadlock workaround after L2CC cleanup
  ARM: mvebu: move Armada 375 external abort logic as a quirk
  ARM: bcm: Fix bcm and multi_v7 defconfigs
  ARM: dts: dra7-evm: remove interrupt binding
  ARM: OMAP2+: Fix parser-bug in platform muxing code
  ARM: DTS: dra7/dra7xx-clocks: ATL related changes
  ARM: OMAP2+: drop unused function
  ARM: dts: am43x-epos-evm: Add Missing cpsw-phy-sel for am43x-epos-evm
  ARM: dts: omap5: Update CPU OPP table as per final production Manual
  ARM: DRA722: add detection of SoC information
  ARM: dts: Enable twl4030 off-idle configuration for selected omaps
  ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods
  ARM: OMAP2+: hwmod: Change hardreset soc_ops for AM43XX
2014-07-05 16:57:12 -07:00
Linus Torvalds 549f11c9f0 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:
 "A few minor fixlets in ARM SoC irq drivers and a fix for a memory leak
  which I introduced in the last round of cleanups :("

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Fix memory leak when calling irq_free_hwirqs()
  irqchip: spear_shirq: Fix interrupt offset
  irqchip: brcmstb-l2: Level-2 interrupts are edge sensitive
  irqchip: armada-370-xp: Mask all interrupts during initialization.
2014-07-05 16:56:14 -07:00
Dave Airlie dfd7aecfd6 Merge tag 'drm-intel-fixes-2014-07-03' of git://anongit.freedesktop.org/drm-intel
Fixes for 3.16-rc3; most importantly Jesse brings back VGA he took away
on a bunch of machines. Also a vblank fix for BDW and a power workaround
fix for VLV.

* tag 'drm-intel-fixes-2014-07-03' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Drop early VLV WA to fix Voltage not getting dropped to Vmin
  drm/i915: only apply crt_present check on VLV
  drm/i915: Wait for vblank after enabling the primary plane on BDW
2014-07-06 07:49:59 +10:00
Dave Airlie 80e6e6b176 Merge branch 'vmwgfx-fixes-3.16' of git://people.freedesktop.org/~thomash/linux
fix to a 3.15 commit.

* 'vmwgfx-fixes-3.16' of git://people.freedesktop.org/~thomash/linux:
  drm/vmwgfx: Fix incorrect write to read-only register v2:
2014-07-06 07:49:28 +10:00
Dave Airlie d808e62f7f Merge branch 'tda998x-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox
mode fixes for tda998x.

* 'tda998x-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox:
  drm/i2c: tda998x: add some basic mode validation
  drm/i2c: tda998x: faster polling for edid
  drm/i2c: tda998x: move drm_i2c_encoder_destroy call
2014-07-06 07:48:26 +10:00
Keith Busch 8844aad89e genirq: Fix memory leak when calling irq_free_hwirqs()
irq_free_hwirqs() always calls irq_free_descs() with a cnt == 0
which makes it a no-op since the interrupt count to free is
decremented in itself.

Fixes: 7b6ef12625

Signed-off-by: Keith Busch <keith.busch@intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Link: http://lkml.kernel.org/r/1404167084-8070-1-git-send-email-keith.busch@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2014-07-05 21:42:08 +02:00
Linus Torvalds e1a08b855f ARM64 fixes:
- Exception level check at boot time (for completeness, not triggering
   any bug before)
 - I/D-cache synchronisation logic for huge pages
 - Config symbol typo
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (GNU/Linux)
 
 iQIcBAABAgAGBQJTt+DiAAoJEGvWsS0AyF7xufkP/RLthhgr6OJJW2UF1uLKa4VC
 ouRCPLsMvTk8KGOOYOq//2tnM0B3ZR5489YQouiVA9a0QW6R1QNkGeWdB9q/6hyG
 YhfS+yRyq4+xtv1qKrwD2LF2AJ9Wb6q6E4NwkuqNiYQN4c9npImouZ70PZRqj7Qw
 y8xf1mstaIiQZBqfkIt6o6lKBwlFPvcXrDLEwG4leg03AetbW9OkLaSOTtSOIHw3
 jHwpiKonKhN0j1gzJp4quLLu6NtdiFeNmXv0qSRdX+sRQpkSkO8cV0bSWNiEO501
 W2allUz9a9rY+zkYXByIoJNe04lrTPYye+rc4TtCnGXp+rE82aIz6hHLPFGzfnGH
 j2uBJZho90uY23wN/sxtfTlXvRnYpni9jb+dtQGa2GkcB/hlh+4+ge2BCJ7EjDN8
 n0UZGMRLa3odi+t5n3cSt+jNnjCimtrDbFsq+Zs97QMV/0T2XjV1rwGsZKXj2EDR
 7EFm5dAR/9OjTmy7DCEQOcsiyBpvH2X0rJeE44SoVWTY/qIoebVnwsDxsExK3wn8
 6AdYGEg4eZefC2sELoTPddP1FquUd7sFr+AIfvclmrgaoaWH34i1UMe7vmvODeki
 5Mt85cg2qhKLE5+EOfMdzB6ztazRkY1Kw7t7vghSpW3Q0Q1lteuHAfLVlEAOuzT7
 cDeJrERLoJJ4xTjDZ9a+
 =1PCg
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull ARM64 fixes from Catalin Marinas:
 - Exception level check at boot time (for completeness, not triggering
   any bug before)
 - I/D-cache synchronisation logic for huge pages
 - Config symbol typo

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: fix el2_setup check of CurrentEL
  arm64: mm: Make icache synchronisation logic huge page aware
  arm64: mm: Fix horrendous config typo
2014-07-05 10:12:52 -07:00