1. 07 11月, 2014 7 次提交
    • J
      serial: mxs-auart: clean get_mctrl and set_mctrl · 42b4eba0
      Janusz Uzycki 提交于
      Russell King:
      The only thing which the .get_mctrl method is supposed to do is
      to return the state of the /input/ lines, which are CTS, DCD, DSR, RI.
      The output line state is stored in port->mctrl, and is added to
      the returned value by serial_core when it's required.
      RTS output state should not be returned from the .get_mctrl method.
      
      This patch removes ctrl variable from mxs_auart_port
      and removes useless reading back RTS line.
      
      The ctrl variable in mxs_auart_port duplicated mctrl,
      member of uart_port structure in serial_core.h.
      The removed code from mxs_auart_set_mctrl() and mxs_auart_get_mctrl
      duplicated uart_update_mctrl() and uart_tiocmget()
      in serial_core.c.
      Signed-off-by: NJanusz Uzycki <j.uzycki@elproma.com.pl>
      Reviewed-by: NRichard Genoud <richard.genoud@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      42b4eba0
    • C
      tty/serial: at91: fix rx ring buffer management · 66f37aaf
      Cyrille Pitchen 提交于
      This patch swaps the use "tail" and "head" to fit the semantic of the linux
      circular buffer documentation:
      - head: the point at which the producer (the DMA controller) inserts items.
      - tail: the point at which the consumer (the serial framework) finds the next
              item.
      
      Besides the former code of the rx ring buffer didn't manage the case where
      head < tail, which might lead to loss of data. To fix this bug the data are now
      sent from the DMA buffer to the serial framework in two steps:
      1 - First, we test if head < tail. If so, we copy the data from tail to the end
          of the DMA buffer then reset tail to zero.
      2 - Finally, we copy data from tail to head then set tail to head.
      
      In addition, since tty_insert_flip_string() may now be called twice,
      atmel_flip_buffer_rx_dma() becomes less efficient than moving the calls
      dma_sync_sg_for_cpu(), dma_sync_sg_for_device(), tty_insert_flip_string() and
      tty_flip_buffer_push() directly into atmel_rx_from_dma().
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      66f37aaf
    • J
    • J
      serial: ralink: adds Mediatek MT7620 serial · e8ec4192
      John Crispin 提交于
      Add the config symbol for Mediatek MT7620 SoC to the SERIAL_8250_RT288X
      dependencies.
      Signed-off-by: NJohn Crispin <blogic@openwrt.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e8ec4192
    • J
      serial: of: add a PORT_RT2880 definition · 9b8777e3
      John Crispin 提交于
      The Ralink RT2880 SoC and its successors have an internal 8250 core. This core
      needs the same quirks applied as the AMD AU1xxx uart. In addition to these
      quirks, the ports memory region is only 0x100 unlike the AU1xxx which has a
      size of 0x1000.
      Signed-off-by: NJohn Crispin <blogic@openwrt.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9b8777e3
    • N
      tty: serial: omap: Increase max consoles and add check to prevent crash · 7af0ea5d
      Nishanth Menon 提交于
      Increase the maximum number of consoles possible to 10 since DRA7 now
      has the maximum number of consoles possible. without doing this, for
      example, enabling DRA7 UART10 results in internal data structures and
      console cannot match up and we endup with a crash as follows:
      
      [    1.903503] omap_uart 48424000.serial: [UART-1]: failure [serial_omap_probe]: -22
      [    1.911437] omap_uart: probe of 48424000.serial failed with error -22
      [    1.920379] Unable to handle kernel NULL pointer dereference at virtual address 00000004
      [    1.928894] pgd = c0004000
      [    1.931732] [00000004] *pgd=00000000
      [    1.935485] Internal error: Oops: 5 [#1] SMP ARM
      [    1.940338] Modules linked in:
      [    1.943542] CPU: 1 PID: 12 Comm: kworker/1:0 Tainted: G        W      3.18.0-rc1-00001-g8821bc4-dirty #6
      [    1.953521] task: ed8a2d00 ti: ed8a4000 task.ti: ed8a4000
      [    1.959197] PC is at process_one_work+0x38/0x4a4
      [    1.964050] LR is at 0x0
      [    1.966705] pc : [<c00548e0>]    lr : [<00000000>]    psr: 40000093
      [    1.966705] sp : ed8a5ea8  ip : ed8a5ec8  fp : eeb9abc0
      [    1.978759] r10: ed8a4000  r9 : 00000008  r8 : ed842458
      [    1.984252] r7 : 00000000  r6 : eeb9abc0  r5 : ed842440  r4 : edbf26a8
      [    1.991119] r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : 00000000
      [    1.997985] Flags: nZcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      [    2.005767] Control: 10c5387d  Table: 8000406a  DAC: 00000015
      [    2.011810] Process kworker/1:0 (pid: 12, stack limit = 0xed8a4248)
      [    2.018371] Stack: (0xed8a5ea8 to 0xed8a6000)
      [    2.022949] 5ea0:                   00000001 00000000 60000093 c008346c 00000001 ed8a5ec8
      [    2.031555] 5ec0: c0054de4 eeb9abc0 ed8a4000 ed842458 00000008 ed8a4000 eeb9abc0 ed842440
      [    2.040161] 5ee0: eeb9abc0 eeb9abf0 ed8a4000 ed842458 00000008 ed8a4000 eeb9abc0 c0054ec4
      [    2.048767] 5f00: ed8a4000 eeb9ac4c a0000053 00000000 ed845bc0 ed842440 c0054d80 00000000
      [    2.057342] 5f20: 00000000 00000000 00000000 c005999c 00000001 00000000 c05eaa64 ed842440
      [    2.065948] 5f40: 00000000 00000000 dead4ead ffffffff ffffffff c097c680 00000000 00000000
      [    2.074554] 5f60: c078acd4 ed8a5f64 ed8a5f64 00000000 00000000 dead4ead ffffffff ffffffff
      [    2.083160] 5f80: c097c680 00000000 00000000 c078acd4 ed8a5f90 ed8a5f90 600000d3 ed845bc0
      [    2.091766] 5fa0: c00598d4 00000000 00000000 c000e668 00000000 00000000 00000000 00000000
      [    2.100341] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      [    2.108947] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 90005148 11010482
      [    2.117553] [<c00548e0>] (process_one_work) from [<c0054ec4>] (worker_thread+0x144/0x498)
      [    2.126159] [<c0054ec4>] (worker_thread) from [<c005999c>] (kthread+0xc8/0xe4)
      [    2.133758] [<c005999c>] (kthread) from [<c000e668>] (ret_from_fork+0x14/0x2c)
      [    2.141357] Code: e1a04001 e1a05000 e893000f e31e0004 (e5978004)
      [    2.147766] ---[ end trace 5798e2803311b69f ]---
      <snip>
      
      The final solution is to transition off to use 8250 driver and no
      dependency on console structures and move away from omap-serial
      driver, hence no major cleanups are done for this driver, so add a
      simple check to prevent future crashes in a similar manner in case of
      platform with additional ports.
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Acked-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7af0ea5d
    • P
      serial: pl011: Fix build breakage with !CONFIG_DMA_ENGINE · 36f339d1
      Peter Hurley 提交于
      Commit 479e9b94 ("serial: Refactor uart_flush_buffer() from
      uart_close") refactored the uart_flush_buffer() in uart_close() into
      those drivers that define a flush_buffer() method. However, in the
      amba-pl011 driver configured without CONFIG_DMA_ENGINE, flush_buffer()
      is a NULL method, so the direct call fails to compile.
      
      Check and call the flush_buffer() method through the ops table instead.
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      36f339d1
  2. 06 11月, 2014 33 次提交