1. 25 4月, 2014 1 次提交
  2. 17 4月, 2014 2 次提交
  3. 14 2月, 2014 1 次提交
  4. 18 12月, 2013 6 次提交
  5. 09 12月, 2013 3 次提交
  6. 04 10月, 2013 1 次提交
  7. 13 8月, 2013 1 次提交
  8. 01 8月, 2013 1 次提交
  9. 16 6月, 2013 1 次提交
  10. 21 5月, 2013 2 次提交
  11. 20 4月, 2013 1 次提交
  12. 18 4月, 2013 1 次提交
  13. 04 4月, 2013 1 次提交
  14. 30 3月, 2013 1 次提交
    • C
      ARM: PL011: Add support for Rx DMA buffer polling. · cb06ff10
      Chanho Min 提交于
      In DMA support, The received data is not pushed to tty until the DMA buffer
      is filled. But some megabyte rate chips such as BT expect fast response and
      data should be pushed immediately. In order to fix this issue, We suggest
      the use of the timer for polling DMA buffer.
      In our test, no data loss occurred at high-baudrate as compared with interrupt-
      driven (We tested with 3Mbps).
      We changes:
      
      - We add timer for polling. If we set poll_timer to 10, every 10ms,
       timer handler checks the residue in the dma buffer and transfer data
       to the tty. Also, last_residue is updated for the next polling.
      
      - poll_timeout is used to prevent the timer's system cost.
        If poll_timeout is set to 3000 and no data is received in 3 seconds,
        we inactivate poll timer and driver falls back to interrupt-driven.
        When data is received again in FIFO and UART irq is occurred, we switch
        back to DMA mode and start polling.
      
      - We use consistent DMA mappings to avoid from the frequent cache operation
        of the timer function for default.
      
      - pl011_dma_rx_chars is modified. the pending size is recalculated because
        data can be taken by polling.
      
      - the polling time is adjusted if dma rx poll is enabled but no rate is
        specified. Ideal polling interval to push 1 character at every interval
        is the reciprocal of 'baud rate / 10 line bits per character / 1000 ms
        per sec'. But It is very aggressive to system. Experimentally,
       '10000000 / baud' is suitable to receive dozens of characters. the poll rate
       can be specified statically by dma_rx_poll_rate of the platform data as well.
      
      Changes compared to v1:
       - Use of consistent DMA mappings.
       - Added dma_rx_poll_rate in platform data to specify the polling interval.
       - Added dma_rx_poll_timeout in platform data to specify the polling timeout.
      
      Changes compared to v2:
       - Use of consistent DMA mappings for default.
       - Added dma_rx_poll_enable in platform data to adjust the polling time
         according to the baud rate.
       - remove unnecessary lock from the polling function.
      Signed-off-by: NChanho Min <chanho.min@lge.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cb06ff10
  15. 13 3月, 2013 1 次提交
    • A
      serial: pl011: use generic DMA slave configuration if possible · 787b0c1f
      Arnd Bergmann 提交于
      With the new OF DMA binding, it is possible to completely avoid the
      need for platform_data for configuring a DMA channel. In cases where the
      platform has already been converted, calling dma_request_slave_channel
      should get all the necessary information from the device tree.
      
      This also adds a binding document specific to the pl011 controller,
      and extends the generic primecell binding to mention "dmas" and other
      common properties.
      
      Like the patch that converts the dw_dma controller, this is completely
      untested and is looking for someone to try it out.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: devicetree-discuss@lists.ozlabs.org
      Cc: linux-arm-kernel@lists.infradead.org
      787b0c1f
  16. 16 1月, 2013 2 次提交
    • J
      TTY: switch tty_flip_buffer_push · 2e124b4a
      Jiri Slaby 提交于
      Now, we start converting tty buffer functions to actually use
      tty_port. This will allow us to get rid of the need of tty in many
      call sites. Only tty_port will needed and hence no more
      tty_port_tty_get in those paths.
      
      Now, the one where most of tty_port_tty_get gets removed:
      tty_flip_buffer_push.
      
      IOW we also closed all the races in drivers not using tty_port_tty_get
      at all yet.
      
      Also we move tty_flip_buffer_push declaration from include/linux/tty.h
      to include/linux/tty_flip.h to all others while we are changing it
      anyway.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2e124b4a
    • J
      TTY: switch tty_insert_flip_string · 05c7cd39
      Jiri Slaby 提交于
      Now, we start converting tty buffer functions to actually use
      tty_port. This will allow us to get rid of the need of tty in many
      call sites. Only tty_port will needed and hence no more
      tty_port_tty_get in those paths.
      
      tty_insert_flip_string this time.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      05c7cd39
  17. 26 10月, 2012 1 次提交
  18. 27 9月, 2012 3 次提交
    • A
      tty/serial/amba-pl011: Quiesce interrupts in poll_get_char · 5c8124a0
      Anton Vorontsov 提交于
      We need to quiesce interrupts in the poll_get_char routine, otherwise,
      if used with KGDB NMI debugger, we'll keep reentering the NMI.
      
      Quiescing interrupts is pretty straightforward, except for TXIM
      interrupt. The interrupt has "ready to transmit" meaning, so it's
      almost always raised, and the only way to silence it is to mask it. But
      that's OK, ops->start_tx will unmask it.
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5c8124a0
    • A
      tty/serial/amba-pl011: Implement poll_init callback · b3564c2c
      Anton Vorontsov 提交于
      The callback is used to initialize the hardware, nothing else should be
      done, i.e. we should not request interrupts (but we can and do unmask
      some of them, as they might be useful for NMI entry).
      
      As a side-effect, the patch also fixes a division by zero[1] when booting
      with kgdboc options specified (e.g. kgdboc=ttyAMA0,115200n8). The issue
      happens because serial core calls set_termios callback, but the driver
      doesn't know clock frequency, and thus cannot calculate proper baud rate
      values.
      
      [1]
      WARNING: at drivers/tty/serial/serial_core.c:400 uart_get_baud_rate+0xe8/0x14c()
      Modules linked in:
      [<c0018e50>] (unwind_backtrace+0x0/0xf0) from [<c0020ae8>] (warn_slowpath_common+0x4c/0x64)
      [<c0020ae8>] (warn_slowpath_common+0x4c/0x64) from [<c0020b1c>] (warn_slowpath_null+0x1c/0x24)
      [<c0020b1c>] (warn_slowpath_null+0x1c/0x24) from [<c0185ed8>] (uart_get_baud_rate+0xe8/0x14c)
      [<c0185ed8>] (uart_get_baud_rate+0xe8/0x14c) from [<c0187078>] (pl011_set_termios+0x48/0x278)
      [<c0187078>] (pl011_set_termios+0x48/0x278) from [<c01850b0>] (uart_set_options+0xe8/0x114)
      [<c01850b0>] (uart_set_options+0xe8/0x114) from [<c0185de4>] (uart_poll_init+0xd4/0xe0)
      [<c0185de4>] (uart_poll_init+0xd4/0xe0) from [<c016da8c>] (tty_find_polling_driver+0x100/0x17c)
      [<c016da8c>] (tty_find_polling_driver+0x100/0x17c) from [<c0188538>] (configure_kgdboc+0xc8/0x1b8)
      [<c0188538>] (configure_kgdboc+0xc8/0x1b8) from [<c00088a4>] (do_one_initcall+0x30/0x168)
      [<c00088a4>] (do_one_initcall+0x30/0x168) from [<c033784c>] (do_basic_setup+0x94/0xc8)
      [<c033784c>] (do_basic_setup+0x94/0xc8) from [<c03378e0>] (kernel_init+0x60/0xf4)
      [<c03378e0>] (kernel_init+0x60/0xf4) from [<c00144a0>] (kernel_thread_exit+0x0/0x8)
      ---[ end trace 7d41c9186f342c40 ]---
      Division by zero in kernel.
      [<c0018e50>] (unwind_backtrace+0x0/0xf0) from [<c014546c>] (Ldiv0+0x8/0x10)
      [<c014546c>] (Ldiv0+0x8/0x10) from [<c0187098>] (pl011_set_termios+0x68/0x278)
      [<c0187098>] (pl011_set_termios+0x68/0x278) from [<c01850b0>] (uart_set_options+0xe8/0x114)
      [<c01850b0>] (uart_set_options+0xe8/0x114) from [<c0185de4>] (uart_poll_init+0xd4/0xe0)
      [<c0185de4>] (uart_poll_init+0xd4/0xe0) from [<c016da8c>] (tty_find_polling_driver+0x100/0x17c)
      [<c016da8c>] (tty_find_polling_driver+0x100/0x17c) from [<c0188538>] (configure_kgdboc+0xc8/0x1b8)
      [<c0188538>] (configure_kgdboc+0xc8/0x1b8) from [<c00088a4>] (do_one_initcall+0x30/0x168)
      [<c00088a4>] (do_one_initcall+0x30/0x168) from [<c033784c>] (do_basic_setup+0x94/0xc8)
      [<c033784c>] (do_basic_setup+0x94/0xc8) from [<c03378e0>] (kernel_init+0x60/0xf4)
      [<c03378e0>] (kernel_init+0x60/0xf4) from [<c00144a0>] (kernel_thread_exit+0x0/0x8)
      Division by zero in kernel.
      [<c0018e50>] (unwind_backtrace+0x0/0xf0) from [<c014546c>] (Ldiv0+0x8/0x10)
      [<c014546c>] (Ldiv0+0x8/0x10) from [<c0183a98>] (uart_update_timeout+0x4c/0x5c)
      [<c0183a98>] (uart_update_timeout+0x4c/0x5c) from [<c01870f8>] (pl011_set_termios+0xc8/0x278)
      [<c01870f8>] (pl011_set_termios+0xc8/0x278) from [<c01850b0>] (uart_set_options+0xe8/0x114)
      [<c01850b0>] (uart_set_options+0xe8/0x114) from [<c0185de4>] (uart_poll_init+0xd4/0xe0)
      [<c0185de4>] (uart_poll_init+0xd4/0xe0) from [<c016da8c>] (tty_find_polling_driver+0x100/0x17c)
      [<c016da8c>] (tty_find_polling_driver+0x100/0x17c) from [<c0188538>] (configure_kgdboc+0xc8/0x1b8)
      [<c0188538>] (configure_kgdboc+0xc8/0x1b8) from [<c00088a4>] (do_one_initcall+0x30/0x168)
      [<c00088a4>] (do_one_initcall+0x30/0x168) from [<c033784c>] (do_basic_setup+0x94/0xc8)
      [<c033784c>] (do_basic_setup+0x94/0xc8) from [<c03378e0>] (kernel_init+0x60/0xf4)
      [<c03378e0>] (kernel_init+0x60/0xf4) from [<c00144a0>] (kernel_thread_exit+0x0/0x8)
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b3564c2c
    • L
      serial: pl011: handle corruption at high clock speeds · c5dd553b
      Linus Walleij 提交于
      This works around a few glitches in the ST version of the PL011
      serial driver when using very high baud rates, as we do in the
      Ux500: 3, 3.25, 4 and 4.05 Mbps.
      
      Problem Observed/rootcause:
      
      When using high baud-rates, and the baudrate*8 is getting close to
      the provided clock frequency (so a division factor close to 1), when
      using bursts of characters (so they are abutted), then it seems as if
      there is not enough time to detect the beginning of the start-bit which
      is a timing reference for the entire character, and thus the sampling
      moment of character bits is moving towards the end of each bit, instead
      of the middle.
      
      Fix:
      Increase slightly the RX baud rate of the UART above the theoretical
      baudrate by 5%. This will definitely give more margin time to the
      UART_RX to correctly sample the data at the middle of the bit period.
      
      Also fix the ages old copy-paste error in the very stressed comment,
      it's referencing the registers used in the PL010 driver rather than
      the PL011 ones.
      Signed-off-by: NGuillaume Jaunet <guillaume.jaunet@stericsson.com>
      Signed-off-by: NChristophe Arnal <christophe.arnal@stericsson.com>
      Signed-off-by: NMatthias Locher <matthias.locher@stericsson.com>
      Signed-off-by: NRajanikanth HV <rajanikanth.hv@stericsson.com>
      Cc: stable <stable@vger.kernel.org>
      Cc: Bibek Basu <bibek.basu@stericsson.com>
      Cc: Par-Gunnar Hjalmdahl <par-gunnar.hjalmdahl@stericsson.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c5dd553b
  19. 11 9月, 2012 1 次提交
  20. 06 9月, 2012 2 次提交
  21. 29 6月, 2012 1 次提交
  22. 19 6月, 2012 1 次提交
  23. 13 6月, 2012 1 次提交
    • L
      serial/amba-pl011: move custom pin control to driver · 78d80c5a
      Linus Walleij 提交于
      We had a boot regression in Ux500 in the merge window because
      two orthogonal pin control schemes for the PL011 were merged
      at the same time:
      
      - One using the .init() and .exit() hooks into the platform
        for Ux500 putting the pins into default vs sleep state
        respectively as the port was started/stopped.
        commit a0980660
        "ARM: ux500: switch to using pinctrl for uart0"
      
      - One hogging the default setting at PL011 probe()
        commit 258e0551
        "serial: amba-pl011: adopt pinctrl support"
      
      To get a solution that works for both let's scrap the stuff
      in the platform callbacks, instead have the driver itself
      select default and sleep states when the port is
      started/stopped. Hopefully this works for all clients.
      Platform callbacks are bad for device tree migration anyway,
      so this rids us of another problem in Ux500.
      
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Reported-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Tested-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      78d80c5a
  24. 12 5月, 2012 1 次提交
  25. 19 4月, 2012 1 次提交
  26. 07 4月, 2012 1 次提交
  27. 21 3月, 2012 1 次提交