1. 05 10月, 2015 3 次提交
    • M
      serial: 8250: simplify ralink/alchemy register remap selection · 9b2256c8
      Mans Rullgard 提交于
      Some SoCs, including Ralink/Mediatek and Alchemy Au1xxx, have a
      16550-like UART with a non-standard register layout.  These are
      supported by a simple mapping table in 8250_port.c  Rather than
      list every SoC type using this access mode in the ifdefs there,
      allow selecting the SERIAL_8250_RT288X Kconfig option with any
      system and default it to y for the known cases needing it.  The
      help text is reworded accordingly.
      
      This change simplifies adding support for other SoCs also using
      the same UART.
      
      The name of the option is a little misleading, but not knowing
      the true origin of this UART, it is as good a choice as any.
      Signed-off-by: NMans Rullgard <mans@mansr.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9b2256c8
    • T
      serial: 8250: Fix autoconfig_irq() to avoid race conditions · 9a23a1d1
      Taichi Kageyama 提交于
      The following race conditions can happen when a serial port is used
      as console.
      
      Case1: CPU_B is used to detect an interrupt from a serial port,
             but it can have interrupts disabled during the waiting time.
      Case2: CPU_B clears UART_IER just after CPU_A sets UART_IER and then
             a serial port may not make an interrupt.
      Case3: CPU_A sets UART_IER just after CPU_B clears UART_IER.
             This is an unexpected behavior for serial8250_console_write().
      
      CPU_A [autoconfig_irq]      |  CPU_B [serial8250_console_write]
      ----------------------------|---------------------------------------
                                  |
      probe_irq_on()              |  spin_lock_irqsave(&port->lock,)
      serial_outp(,UART_IER,0x0f) |  serial_out(,UART_IER,0)
      udelay(20);                 |  uart_console_write()
      probe_irq_off()             |
                                  |  spin_unlock_irqrestore(&port->lock,)
      
      Case1 and 2 can make autoconfig_irq() failed.
      In these cases, the console doesn't work in interrupt mode and
      "input overrun" (which can make operation mistakes) can happen
      on some systems. Especially in the Case1, It is known that the
      problem happens with high rate every boot once it occurs
      because the boot sequence is always almost same.
      
      port mutex makes sure that the autoconfig operation is exclusive of
      any other concurrent HW access except by the console operation.
      console lock is required in autoconfig_irq().
      Signed-off-by: NTaichi Kageyama <t-kageyama@cp.jp.nec.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Reviewed-by: NPeter Hurley <peter@hurleysoftware.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9a23a1d1
    • M
      serial: don't register CIR serial ports · e4fda3a0
      Maciej S. Szmigiero 提交于
      CIR type serial ports aren't real serial ports.
      
      This is just a way to prevent legacy 8250 serial
      driver from probing and eventually binding some
      resources.
      
      Since in current state such ports aren't providing
      any real functionality and it is not possible
      to change their type via setserial/ioctl(TIOCSSERIAL)
      (due to UPF_FIXED_PORT flag set on them)
      it is simpler and cleaner to not register them at all
      with serial core.
      
      Print a short message in this case so it is known
      to user what has happened.
      
      This way checks for PORT_8250_CIR in serial port
      callbacks can be removed too, since they won't
      ever be called.
      Signed-off-by: NMaciej Szmigiero <mail@maciej.szmigiero.name>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4fda3a0
  2. 23 9月, 2015 1 次提交
  3. 24 7月, 2015 3 次提交
  4. 01 6月, 2015 1 次提交
  5. 11 5月, 2015 2 次提交
  6. 07 5月, 2015 2 次提交
  7. 15 4月, 2015 1 次提交
  8. 10 4月, 2015 2 次提交
  9. 27 3月, 2015 14 次提交
  10. 26 3月, 2015 6 次提交
  11. 07 3月, 2015 2 次提交
  12. 07 2月, 2015 1 次提交
  13. 03 2月, 2015 2 次提交