1. 21 1月, 2011 1 次提交
    • D
      kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT · 6a108a14
      David Rientjes 提交于
      The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
      is used to configure any non-standard kernel with a much larger scope than
      only small devices.
      
      This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
      references to the option throughout the kernel.  A new CONFIG_EMBEDDED
      option is added that automatically selects CONFIG_EXPERT when enabled and
      can be used in the future to isolate options that should only be
      considered for embedded systems (RISC architectures, SLOB, etc).
      
      Calling the option "EXPERT" more accurately represents its intention: only
      expert users who understand the impact of the configuration changes they
      are making should enable it.
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NDavid Woodhouse <david.woodhouse@intel.com>
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Cc: Greg KH <gregkh@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Robin Holt <holt@sgi.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6a108a14
  2. 14 1月, 2011 1 次提交
  3. 13 1月, 2011 1 次提交
  4. 12 1月, 2011 1 次提交
  5. 10 1月, 2011 1 次提交
  6. 07 1月, 2011 1 次提交
  7. 06 1月, 2011 7 次提交
    • R
      ARM: PL011: add DMA burst threshold support for ST variants · 38d62436
      Russell King 提交于
      ST Micro variants has some specific dma burst threshold compensation,
      which allows them to make better use of a DMA controller.  Add support
      to set this up.
      
      Based on a patch from Linus Walleij.
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      38d62436
    • R
      ARM: PL011: Add support for transmit DMA · 68b65f73
      Russell King 提交于
      Add DMA engine support for transmit to the PL011 driver.  Based on a
      patch from Linus Walliej, with the following changes:
      
      - remove RX DMA support.  As PL011 doesn't give us receive timeout
        interrupts, we only get notified of received data when the RX DMA
        has completed.  This rather sucks for interactive use of the TTY.
      
      - remove abuse of completions.  Completions are supposed to be for
        events, not to tell what condition buffers are in.  Replace it with
        a simple 'queued' bool.
      
      - fix locking - it is only safe to access the circular buffer with the
        port lock held.
      
      - only map the DMA buffer when required - if we're ever behind an IOMMU
        this helps keep IOMMU usage down, and also ensures that we're legal
        when we change the scatterlist entry length.
      
      - fix XON/XOFF sending - we must send XON/XOFF characters out as soon
        as possible - waiting for up to 4095 characters in the DMA buffer
        to be sent first is not acceptable.
      
      - fix XON/XOFF receive handling - we need to stop DMA when instructed
        to by the TTY layer, and restart it again when instructed to.  There
        is a subtle problem here: we must not completely empty the circular
        buffer with DMA, otherwise we will not be notified of XON.
      
      - change the 'enable_dma' flag into a 'using DMA' flag, and track
        whether we can use TX DMA by whether the channel pointer is non-NULL.
        This gives us more control over whether we use DMA in the driver.
      
      - we don't need to have the TX DMA buffer continually allocated for
        each port - instead, allocate it when the port starts up, and free
        it when it's shut down.  Update the 'using DMA' flag if we get
        the buffer, and adjust the TTY FIFO size appropriately.
      
      - if we're going to use PIO to send characters, use the existing IRQ
        based functionality rather than reimplementing it.  This also ensures
        we call uart_write_wakeup() at the appropriate time, otherwise we'll
        stall.
      
      - use DMA engine helper functions for type safety.
      
      - fix init when built as a module - we can't have to initcall functions,
        so we must settle on one.  This means we can eliminate the deferred
        DMA initialization.
      
      - there is no need to terminate transfers on a failed prep_slave_sg()
        call - nothing has been setup, so nothing needs to be terminated.
        This avoids a potential deadlock in the DMA engine code
        (tasklet->callback->failed prepare->terminate->tasklet_disable
         which then ends up waiting for the tasklet to finish running.)
      
      - Dan says that the submission callback should not return an error:
        | dma_submit_error() is something I should have removed after commit
        | a0587bcf "ioat1: move descriptor allocation from submit to prep" all
        | errors should be notified by prep failing to return a descriptor
        | handle.  Negative dma_cookie_t values are only returned by the
        | dma_async_memcpy* calls which translate a prep failure into -ENOMEM.
        So remove the error handling at that point.  This also solves the
        potential deadlock mentioned in the previous comment.
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      68b65f73
    • R
      ARM: PL011: Ensure IRQs are disabled in UART interrupt handler · 963cc981
      Russell King 提交于
      As the DMA support introduces a separate interrupt-time callback, our
      interrupt handler will not be the only handler which takes the port
      lock, so we need to ensure that IRQs are disabled.  We must use the
      _irqsave variant so we don't inadvertently enable interrupts.
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      963cc981
    • R
      ARM: PL011: Separate hardware FIFO size from TTY FIFO size · ffca2b11
      Russell King 提交于
      With DMA support, we need to tell the TTY subsystem that the DMA buffer
      is the size of the FIFO, otherwise things like tty_wait_until_sent()
      will time out too early.  Keep (and use) the hardware value separately
      from the port->fifosize.
      
      This was part of a larger patch from Linus Walleij, with a little
      modification.
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      ffca2b11
    • R
      ARM: PL011: Allow better handling of vendor data · c19f12b5
      Russell King 提交于
      Rather than copying all vendor data into the port structure, copy
      just that which is frequently used, and keep a pointer to the
      remaining vendor data structure.  This makes it easier to add
      vendor quirks in the future.
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      c19f12b5
    • R
      ARM: PL011: Ensure error flags are clear at startup · 5063e2c5
      Russell King 提交于
      The error flags weren't being cleared upon UART startup, which
      can cause problems when we add DMA support.  It's good practice
      to ensure that these flags are cleared anyway, so let's do so.
      
      This was part of a larger patch from Linus Walleij.
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      5063e2c5
    • R
      ARM: PL011: include revision number in boot-time port printk · e8a7ba86
      Russell King 提交于
      Include the revision number of the PL011 primecell in the boot-time
      port printk to allow proper identification of the peripheral.
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      e8a7ba86
  8. 05 1月, 2011 2 次提交
  9. 04 1月, 2011 1 次提交
  10. 30 12月, 2010 1 次提交
  11. 17 12月, 2010 3 次提交
  12. 14 12月, 2010 1 次提交
  13. 11 12月, 2010 5 次提交
    • O
      8250: fix uninitialized FIFOs · e4f05af1
      Ondrej Puzman 提交于
      I have found a bug in 8250.c driver which causes that 16550A uart FIFOs
      are not turned on during initialization if they are manually configured
      by setserial. UART is then working only as plain 16450 without FIFOs. On
      systems with higher interrupt latency this causes buffer overruns and
      loss of received data when using higher communication speeds.
      
      I'm working for a company which produces industrial computers. These
      devices typically contain high number (8 or more) of traditional 16550A
      uarts - we use TL16C554A chips, but that is not much relevant. UARTs are
      connected to the CPU by ISA bus (Celeron based devices) or LPC bus (Atom
      based devices).
      
      In the Linux the UARTs are using standard 8250.c driver and are
      initialized using setserial command:
      setserial /dev/ttyS4 uart 16550A port 0x3E0 irq 10 baud_base 115200
      
      This executes the UART initialization through serial8250_startup()
      function. At the beginning of the function up->capabilities is
      initialized from uart_config:
       up->capabilities = uart_config[up->port.type].flags;
      Please note that neither up->port.fifosize nor up->tx_loadsz is
      initialized here!!
      
      Later in the same function serial8250_clear_fifos() is called and
      disables FIFOs. The above comment says that they will be reenabled in
      set_termios (they won't ...)
      
      After serial8250_startup() the serial8250_set_termios() is called. In
      this function the following check fails because up->port.fifosize is
      zero because it is not initialized correctly.
      
              if (up->capabilities & UART_CAP_FIFO && up->port.fifosize > 1) {
                      if (baud < 2400)
                              fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1;
                      else
                              fcr = uart_config[up->port.type].fcr;
              }
      
      fcr variable remains zero and in the end the FCR register is set to zero
      which results in disabled FIFOs even if the UART type is 16550A. This is
      also true for other types of UARTs with FIFOs.
      
      If the UART is autoconfigured via 'setserial /dev/ttySx autoconfig' then
      port.fifosize and tx_loadsz are initialized correctly in the
      autoconfig() function and the UART is working correctly then.
      
      I checked the source codes and I can say that this bug is present in
      2.6.x series of kernels for a couple of years. Namely I can confirm its
      presence in 2.6.16.57, 2.6.32.24 and 2.6.36.1 (tested all of them on our
      hardware).
      
      I think it was not noticed before because not many people use manually
      configured non PNP UARTs on ISA/LPC bus these days. Also the data loss
      caused by buffer overruns occures only if  IRQ latency is higher then
      time needed to receive one character on given communication speed.
      For example our hardware looses received characters only if the UARTs
      are connected throught LPC bus with SERIRQ (serial IRQ transport) and
      not if they are connected to ISA bus because LPC SERIRQ has higher
      interrupt latency then parallel ISA interupt lines.
      
      Here is the patch to correct the bug created against 2.6.36.1:
      Signed-off-by: NOndrej Puzman <puzman@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e4f05af1
    • J
      8250: add a UPIO_DWAPB32 for 32 bit accesses · a3ae0fc3
      Jamie Iles 提交于
      Some platforms contain a Synopsys DesignWare APB UART that is attached
      to a 32-bit APB bus where sub-word accesses are not allowed. Add a new
      IO type (UPIO_DWAPB32) that performs 32 bit acccesses to the UART.
      
      v2:
      	- don't test for 32 bit in the output fast path, provide a
      	  separate dwabp32_serial_out() function. Refactor
      	  dwabp_serial_out() so that we can reuse the LCR saving
      	  code.
      v3:
      	- rebased on top of "8250: use container_of() instead of
      	  casting"
      Signed-off-by: NJamie Iles <jamie@jamieiles.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a3ae0fc3
    • J
      8250: use container_of() instead of casting · 49d5741b
      Jamie Iles 提交于
      The 8250 driver structure uart_8250_port took advantage of the fact
      that the struct uart_port was the first member of its structure and
      used an explicit cast to convert to the derived class. Replace the
      explicit casts with container_of() for safety and clarity.
      Signed-off-by: NJamie Iles <jamie@jamieiles.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      49d5741b
    • C
      serial: omap-serial: Add support for kernel debugger · 1b41dbc1
      Cosmin Cojocar 提交于
      The kgdb invokes the poll_put_char and poll_get_char when communicating
      with the host. This patch also changes the initialization order because the
      kgdb will check at the very beginning, if there is a valid serial
      driver.
      Signed-off-by: NCosmin Cojocar <cosmin.cojocar@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1b41dbc1
    • R
      serial: fix pch_uart kconfig & build · 5ac387d9
      Randy Dunlap 提交于
      The dma_request_channel/dma_release_channel interfaces are not
      built when DMADEVICES is not enabled, so make the driver depend on
      DMADEVICES.  Also, the help text says that the driver enables & uses
      PCH_DMA, which is not enabled, so select that.
      
      ERROR: "__dma_request_channel" [drivers/serial/pch_uart.ko] undefined!
      ERROR: "dma_release_channel" [drivers/serial/pch_uart.ko] undefined!
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
      Reported-by: NZimny Lech <napohybelskurwysynom2010@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5ac387d9
  14. 10 12月, 2010 1 次提交
  15. 01 12月, 2010 7 次提交
  16. 18 11月, 2010 2 次提交
    • M
      ARM: mach-shmobile: Initial AG5 and AG5EVM support · 6d9598e2
      Magnus Damm 提交于
      This patch adds initial support for Renesas SH-Mobile AG5.
      
      At this point the AG5 CPU support is limited to the ARM
      core, SCIF serial and a CMT timer together with L2 cache
      and the GIC. The AG5EVM board also supports Ethernet.
      
      Future patches will add support for GPIO, INTCS, CPGA
      and platform data / driver updates for devices such as
      IIC, LCDC, FSI, KEYSC, CEU and SDHI among others.
      
      The code in entry-macro.S will be cleaned up when the
      ARM IRQ demux code improvements have been merged.
      
      Depends on the AG5EVM mach-type recently registered but
      not yet present in arch/arm/tools/mach-types.
      
      As the AG5EVM board comes with 512MiB memory it is
      recommended to turn on HIGHMEM.
      
      Many thanks to Yoshii-san for initial bring up.
      Signed-off-by: NMagnus Damm <damm@opensource.se>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      6d9598e2
    • A
      BKL: remove extraneous #include <smp_lock.h> · 451a3c24
      Arnd Bergmann 提交于
      The big kernel lock has been removed from all these files at some point,
      leaving only the #include.
      
      Remove this too as a cleanup.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      451a3c24
  17. 17 11月, 2010 4 次提交