1. 29 5月, 2014 1 次提交
  2. 25 4月, 2014 3 次提交
    • D
      serial: samsung: Change barrier() to cpu_relax() in console output · f94b0572
      Doug Anderson 提交于
      The two functions to write out to the console (one used in normal
      console mode and one in polling console mode) were slightly different.
      One used a barrier() in its loop and the other a cpu_relax().  The
      barrier() really doesn't do anything since we're using rd_regl() to
      read the port anyway.  Switch it to cpu_relax() to make things
      consistent.
      
      No known bugs / issues are fixed by this change--it just makes things
      more consistent.
      Signed-off-by: NDoug Anderson <dianders@chromium.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f94b0572
    • D
      serial: samsung: don't check config for every character · ab88c8dc
      Doug Anderson 提交于
      The s3c24xx_serial_console_putchar() is _only_ ever used by
      s3c24xx_serial_console_write() and is called in a loop (indirectly
      through uart_console_write()).  There's no reason to call
      s3c24xx_port_configured() for every iteration through the loop.  Move
      it outside the loop.
      Signed-off-by: NDoug Anderson <dianders@chromium.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ab88c8dc
    • D
      serial: samsung: Use the passed in "port", fixing kgdb w/ no console · bb7f09ba
      Doug Anderson 提交于
      The two functions in the samsung serial driver used for writing
      characters out to the port were inconsistent about whether they used
      the passed in "port" or the global "cons_uart".  There was no reason
      to use the global and the use of the global in
      s3c24xx_serial_put_poll_char() caused a crash in the case where you
      used the serial port for kgdboc but not for console.
      
      Fix it so we used the passed in variable.
      
      Note that this doesn't fix all problems with the samsung serial
      driver.  Specifically:
      * s3c24xx_serial_console_putchar() is still 99% identical to
        s3c24xx_serial_put_poll_char() (the function signature is different,
        but that's about it).  A future patch will make them slightly less
        identical and judging by other serial drivers we may need yet more
        differences eventually.
      * The samsung serial driver still doesn't allow you to have more than
        one console port since it still uses the global cons_uart in
        s3c24xx_serial_console_write().
      Signed-off-by: NDoug Anderson <dianders@chromium.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bb7f09ba
  3. 14 2月, 2014 1 次提交
  4. 09 12月, 2013 1 次提交
    • H
      serial: samsung: move clock deactivation below uart registration · 0da3336f
      Heiko Stübner 提交于
      Commit 60e93575 (serial: samsung: enable clock before clearing pending
      interrupts during init) added handling of the controller clock during init.
      
      On most systems this clock is also one of the baud_clock sources and
      possibly used by the earlycon and thus already enabled by the bootloader.
      
      Therefore a gap exists between s3c24xx_serial_init_port disabling the
      clock and an attached console reenabling it, making the transition from
      earlycon to regular console possibly hang the system - as seen on my
      S3C2442 based Freerunner today.
      
      Therefore move the disabling of the clock from s3c24xx_serial_init_port
      below the uart port registration, effectively creating an overlap and
      keeping the clock running non-stop if the console wants to grab this port.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0da3336f
  5. 27 9月, 2013 2 次提交
  6. 28 8月, 2013 1 次提交
    • V
      tty: serial: samsung: drop uart_port->lock before calling tty_flip_buffer_push() · f5693ea2
      Viresh Kumar 提交于
      The current driver triggers a lockdep warning for if tty_flip_buffer_push() is
      called with uart_port->lock locked. This never shows up on UP kernels and comes
      up only on SMP kernels.
      
      Crash looks like this (produced with samsung.c driver):
      
      -----
      [<c0014d58>] (unwind_backtrace+0x0/0xf8) from [<c0011908>] (show_stack+0x10/0x14)
      [<c0011908>] (show_stack+0x10/0x14) from [<c035da34>] (dump_stack+0x6c/0xac)
      [<c035da34>] (dump_stack+0x6c/0xac) from [<c01b59ac>] (do_raw_spin_unlock+0xc4/0xd8)
      [<c01b59ac>] (do_raw_spin_unlock+0xc4/0xd8) from [<c03627e4>] (_raw_spin_unlock_irqrestore+0xc/0)
      [<c03627e4>] (_raw_spin_unlock_irqrestore+0xc/0x38) from [<c020a1a8>] (s3c24xx_serial_rx_chars+0)
      [<c020a1a8>] (s3c24xx_serial_rx_chars+0x12c/0x260) from [<c020aae8>] (s3c64xx_serial_handle_irq+)
      [<c020aae8>] (s3c64xx_serial_handle_irq+0x48/0x60) from [<c006aaa0>] (handle_irq_event_percpu+0x)
      [<c006aaa0>] (handle_irq_event_percpu+0x50/0x194) from [<c006ac20>] (handle_irq_event+0x3c/0x5c)
      [<c006ac20>] (handle_irq_event+0x3c/0x5c) from [<c006d864>] (handle_fasteoi_irq+0x80/0x13c)
      [<c006d864>] (handle_fasteoi_irq+0x80/0x13c) from [<c006a4a4>] (generic_handle_irq+0x20/0x30)
      [<c006a4a4>] (generic_handle_irq+0x20/0x30) from [<c000f454>] (handle_IRQ+0x38/0x94)
      [<c000f454>] (handle_IRQ+0x38/0x94) from [<c0008538>] (gic_handle_irq+0x34/0x68)
      [<c0008538>] (gic_handle_irq+0x34/0x68) from [<c00123c0>] (__irq_svc+0x40/0x70)
      Exception stack(0xc04cdf70 to 0xc04cdfb8)
      df60:                                     00000000 00000000 0000166e 00000000
      df80: c04cc000 c050278f c050278f 00000001 c04d444c 410fc0f4 c03649b0 00000000
      dfa0: 00000001 c04cdfb8 c000f758 c000f75c 60070013 ffffffff
      [<c00123c0>] (__irq_svc+0x40/0x70) from [<c000f75c>] (arch_cpu_idle+0x28/0x30)
      [<c000f75c>] (arch_cpu_idle+0x28/0x30) from [<c0054888>] (cpu_startup_entry+0x5c/0x148)
      [<c0054888>] (cpu_startup_entry+0x5c/0x148) from [<c0497aa4>] (start_kernel+0x334/0x38c)
      BUG: spinlock lockup suspected on CPU#0, kworker/0:1/360
       lock: s3c24xx_serial_ports+0x1d8/0x370, .magic: dead4ead, .owner: <none>/-1, .owner_cpu: -1
      CPU: 0 PID: 360 Comm: kworker/0:1 Not tainted 3.11.0-rc6-next-20130819-00003-g75485f1 #2
      Workqueue: events flush_to_ldisc
      [<c0014d58>] (unwind_backtrace+0x0/0xf8) from [<c0011908>] (show_stack+0x10/0x14)
      [<c0011908>] (show_stack+0x10/0x14) from [<c035da34>] (dump_stack+0x6c/0xac)
      [<c035da34>] (dump_stack+0x6c/0xac) from [<c01b581c>] (do_raw_spin_lock+0x100/0x17c)
      [<c01b581c>] (do_raw_spin_lock+0x100/0x17c) from [<c03628a0>] (_raw_spin_lock_irqsave+0x20/0x28)
      [<c03628a0>] (_raw_spin_lock_irqsave+0x20/0x28) from [<c0203224>] (uart_start+0x18/0x34)
      [<c0203224>] (uart_start+0x18/0x34) from [<c01ef890>] (__receive_buf+0x4b4/0x738)
      [<c01ef890>] (__receive_buf+0x4b4/0x738) from [<c01efb44>] (n_tty_receive_buf2+0x30/0x98)
      [<c01efb44>] (n_tty_receive_buf2+0x30/0x98) from [<c01f2ba8>] (flush_to_ldisc+0xec/0x138)
      [<c01f2ba8>] (flush_to_ldisc+0xec/0x138) from [<c0031af0>] (process_one_work+0xfc/0x348)
      [<c0031af0>] (process_one_work+0xfc/0x348) from [<c0032138>] (worker_thread+0x138/0x37c)
      [<c0032138>] (worker_thread+0x138/0x37c) from [<c0037a7c>] (kthread+0xa4/0xb0)
      [<c0037a7c>] (kthread+0xa4/0xb0) from [<c000e5f8>] (ret_from_fork+0x14/0x3c)
      -----
      
      Release the port lock before calling tty_flip_buffer_push() and reacquire it
      after the call.
      
      Similar stuff was already done for few other drivers in the past, like:
      
      commit 2389b272
      Author: Thomas Gleixner <tglx@linutronix.de>
      Date:   Tue May 29 21:53:50 2007 +0100
      
          [ARM] 4417/1: Serial: Fix AMBA drivers locking
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f5693ea2
  7. 01 8月, 2013 1 次提交
  8. 19 6月, 2013 1 次提交
  9. 04 6月, 2013 2 次提交
  10. 21 5月, 2013 1 次提交
  11. 12 4月, 2013 3 次提交
    • A
      tty: serial/samsung: fix modular build · 84f57d9e
      Arnd Bergmann 提交于
      There are a few bugs in the samsung serial driver when built as a
      loadable module, which makes the console code unavailable, as well as
      giving no access to the 'printascii' early debug function. This adds
      the appropriate compile time conditionals.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      84f57d9e
    • A
      tty: serial/samsung: make register definitions global · 9ee51f01
      Arnd Bergmann 提交于
      The registers for the Samsung S3C serial port are currently defined in
      the platform specific arch/arm/plat-samsung/include/plat/regs-serial.h
      file, which is not visible to multiplatform capable drivers.
      
      Unfortunately, it is not possible to move the file into a more local
      place as we should normally try to, because the same registers
      may be used in one of four places:
      
      * In the driver itself
      * In platform-independent ARM code for early debug output
      * In platform_data definitions
      * In the Samsung platform power management code
      
      I have also found no way to logically split out a platform_data
      file, other than possibly move everything into
      include/linux/platform_data, which also felt wrong. The only
      part of this file that makes sense to keep specific to the s3c24xx
      platform are the virtual and physical addresses defined here,
      which are needed in no other location.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9ee51f01
    • A
      tty: serial/samsung: prepare for common clock API · 17efd2b7
      Arnd Bergmann 提交于
      With the common clock interface, there is no way to provide the
      "clock_source" sysfs attribute for the samsung serial ports. Given that
      this file was purely informational and had fixed contents, we have reason
      to believe that no user space programs were relying on it.
      
      The sysfs file is not documented in the ABI docs.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      17efd2b7
  12. 29 3月, 2013 3 次提交
  13. 16 1月, 2013 4 次提交
  14. 27 11月, 2012 2 次提交
  15. 22 11月, 2012 3 次提交
  16. 25 10月, 2012 1 次提交
  17. 27 9月, 2012 1 次提交
  18. 17 9月, 2012 1 次提交
  19. 06 9月, 2012 2 次提交
  20. 27 7月, 2012 1 次提交
  21. 17 7月, 2012 1 次提交
  22. 13 6月, 2012 3 次提交
  23. 10 4月, 2012 1 次提交