1. 26 3月, 2012 1 次提交
  2. 16 3月, 2012 1 次提交
  3. 15 3月, 2012 1 次提交
  4. 14 3月, 2012 1 次提交
  5. 13 3月, 2012 1 次提交
  6. 10 3月, 2012 11 次提交
  7. 09 3月, 2012 9 次提交
    • R
      sh-sci / PM: Avoid deadlocking runtime PM · 048be431
      Rafael J. Wysocki 提交于
      The runtime PM of sh-sci devices is enabled when sci_probe() returns,
      so the pm_runtime_put_sync() executed by driver_probe_device()
      attempts to suspend the device.  Then, in some situations, a
      diagnostic message is printed to the console by one of the runtime
      suspend routines handling the sh-sci device, which causes synchronous
      runtime resume to be started from the device's own runtime suspend
      callback.  This causes rpm_resume() to be run eventually, which sees
      the RPM_SUSPENDING status set by rpm_suspend() and waits for it to
      change.  However, the device's runtime PM status cannot change at
      that point, because the routine that has set it waits for the
      rpm_suspend() to return.  A deadlock occurs as a result.
      
      To avoid that make sci_init_single() increment the device's
      runtime PM usage counter, so that it cannot be suspended by
      driver_probe_device().  That counter has to be decremented
      eventually, so make sci_startup() do that before starting to
      actually use the device and make sci_shutdown() increment it
      again before returning to balance the incrementation carried out by
      sci_startup().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      048be431
    • S
      tty: powerpc: remove SERIAL_ICOM dependency on PPC_ISERIES · c17a9d4c
      Stephen Rothwell 提交于
      The PowerPC legacy iSeries platform is being removed so this is no
      longer selectable.
      
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: linux-serial@vger.kernel.org
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c17a9d4c
    • F
      mpc5200b/uart: select more tolerant uart prescaler on low baudrates · e0955ace
      Frank Benkert 提交于
      In addition to the /32 prescaler, the MPC5200B supports a second
      baudrate prescaler /4 to reach higher baudrates.
      
      The current calculation (introduced with commit 0d1f22e4) in the kernel
      preferes this low prescaler as often as possible, but with some
      imprecise counterparts the communication on low baudrates fails.
      
      According a support-mail from freescale the low prescaler (/4) allows
      just 1% tolerance in bittiming in contrast to 4% of the high prescaler
      (/32).  The prescaler not only affects the baudrate-calculation, but
      also the sampling of the bits on the wire.
      
      With this patch, we use the slightly less precise, but higher tolerant
      prescaler calculation on low baudrates up to (and including) 115200 baud
      and the more precise calculation above.
      
      Tested on a custom MPC5200B board with "fsl,mpc5200b-psc-uart".
      
      Calculation Examples with prescaler (PS) 4 and 32 and divisor (DIV) on
      various baudrates. Real stands for the real baudrate generated and Diff
      for the differences between:
           50 Baud PS 32 DIV 0xa122 Real      50 Diff   0.00%
           75 Baud PS 32 DIV 0x6b6c Real      75 Diff   0.00%
          110 Baud PS 32 DIV 0x493e Real     110 Diff   0.00%
          134 Baud PS 32 DIV 0x3c20 Real     133 Diff   0.75%
          150 Baud PS 32 DIV 0x35b6 Real     150 Diff   0.00%
          200 Baud PS 32 DIV 0x2849 Real     199 Diff   0.50%
          300 Baud PS  4 DIV 0xd6d8 Real     300 Diff   0.00%
                   PS 32 DIV 0x1adb Real     300 Diff   0.00%
          600 Baud PS  4 DIV 0x6b6c Real     600 Diff   0.00%
                   PS 32 DIV 0x0d6e Real     599 Diff   0.17%
         1200 Baud PS  4 DIV 0x35b6 Real    1200 Diff   0.00%
                   PS 32 DIV 0x06b7 Real    1199 Diff   0.08%
         1800 Baud PS  4 DIV 0x23cf Real    1799 Diff   0.06%
                   PS 32 DIV 0x047a Real    1799 Diff   0.06%
         2400 Baud PS  4 DIV 0x1adb Real    2400 Diff   0.00%
                   PS 32 DIV 0x035b Real    2401 Diff - 0.04%
         4800 Baud PS  4 DIV 0x0d6e Real    4799 Diff   0.02%
                   PS 32 DIV 0x01ae Real    4796 Diff   0.08%
         9600 Baud PS  4 DIV 0x06b7 Real    9598 Diff   0.02%
                   PS 32 DIV 0x00d7 Real    9593 Diff   0.07%
        19200 Baud PS  4 DIV 0x035b Real   19208 Diff - 0.04%
                   PS 32 DIV 0x006b Real   19275 Diff - 0.39%
        38400 Baud PS  4 DIV 0x01ae Real   38372 Diff   0.07%
                   PS 32 DIV 0x0036 Real   38194 Diff   0.54%
        57600 Baud PS  4 DIV 0x011e Real   57692 Diff - 0.16%
                   PS 32 DIV 0x0024 Real   57291 Diff   0.54%
        76800 Baud PS  4 DIV 0x00d7 Real   76744 Diff   0.07%
                   PS 32 DIV 0x001b Real   76388 Diff   0.54%
       115200 Baud PS  4 DIV 0x008f Real  115384 Diff - 0.16%
                   PS 32 DIV 0x0012 Real  114583 Diff   0.54%
       153600 Baud PS  4 DIV 0x006b Real  154205 Diff - 0.39%
                   PS 32 DIV 0x000d Real  158653 Diff - 3.29%
       230400 Baud PS  4 DIV 0x0048 Real  229166 Diff   0.54%
                   PS 32 DIV 0x0009 Real  229166 Diff   0.54%
       307200 Baud PS  4 DIV 0x0036 Real  305555 Diff   0.54%
                   PS 32 DIV 0x0007 Real  294642 Diff   4.09%
       460800 Baud PS  4 DIV 0x0024 Real  458333 Diff   0.54%
                   PS 32 DIV 0x0005 Real  412500 Diff  10.48%
       500000 Baud PS  4 DIV 0x0021 Real  500000 Diff   0.00%
                   PS 32 DIV 0x0004 Real  515625 Diff - 3.13%
       576000 Baud PS  4 DIV 0x001d Real  568965 Diff   1.22%
                   PS 32 DIV 0x0004 Real  515625 Diff  10.48%
       614400 Baud PS  4 DIV 0x001b Real  611111 Diff   0.54%
                   PS 32 DIV 0x0003 Real  687500 Diff -11.90%
       921600 Baud PS  4 DIV 0x0012 Real  916666 Diff   0.54%
                   PS 32 DIV 0x0002 Real 1031250 Diff -11.90%
      1000000 Baud PS  4 DIV 0x0011 Real  970588 Diff   2.94%
                   PS 32 DIV 0x0002 Real 1031250 Diff - 3.13%
      1152000 Baud PS  4 DIV 0x000e Real 1178571 Diff - 2.31%
                   PS 32 DIV 0x0002 Real 1031250 Diff  10.48%
      1500000 Baud PS  4 DIV 0x000b Real 1500000 Diff   0.00%
                   PS 32 DIV 0x0001 Real 2062500 Diff -37.50%
      2000000 Baud PS  4 DIV 0x0008 Real 2062500 Diff - 3.13%
                   PS 32 DIV 0x0001 Real 2062500 Diff - 3.13%
      2500000 Baud PS  4 DIV 0x0007 Real 2357142 Diff   5.71%
                   PS 32 DIV 0x0001 Real 2062500 Diff  17.50%
      3000000 Baud PS  4 DIV 0x0006 Real 2750000 Diff   8.33%
                   PS 32 DIV 0x0001 Real 2062500 Diff  31.25%
      3500000 Baud PS  4 DIV 0x0005 Real 3300000 Diff   5.71%
                   PS 32 DIV 0x0001 Real 2062500 Diff  41.07%
      4000000 Baud PS  4 DIV 0x0004 Real 4125000 Diff - 3.13%
                   PS 32 DIV 0x0001 Real 2062500 Diff  48.44%
      Signed-off-by: NFrank Benkert <frank.benkert@avat.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e0955ace
    • J
      TTY: remove serialP.h inclusion from some files · 11ba8899
      Jiri Slaby 提交于
      All of them do not use the ugly interface defined in that header.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      11ba8899
    • J
      TTY: serial, include pci.h in m32r_sio · 8bc87dc9
      Jiri Slaby 提交于
      It uses pointers to pci_dev, but compiler complains it doesn't know
      it:
      In file included from .../m32r_sio.c:53:
      .../m32r_sio.h:21: warning: "struct pci_dev" declared inside parameter list
      .../m32r_sio.h:21: warning: its scope is only this definition or declaration, which is probably not what you want
      .../m32r_sio.h:22: warning: "struct pci_dev" declared inside parameter list
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8bc87dc9
    • J
      TTY: serial, use atomic_inc_return in ioc4_serial · 4da24056
      Jiri Slaby 提交于
      We want to know the value of the atomic variable in intr_connect after
      the increment. But atomic_inc doesn't, per definition, return the
      value.  It is just a pure coincidence that ia64 defines atomic_inc as
      atomic_inc_return.
      
      So fix this mistake by using atomic_inc_return properly.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4da24056
    • J
      TTY: remove unneeded tty->index checks · 410235fd
      Jiri Slaby 提交于
      Checking if tty->index is in bounds is not needed. The tty has the
      index set in the initial open. This is done in get_tty_driver. And it
      can be only in interval <0,driver->num).
      
      So remove the tests which check exactly this interval. Some are
      left untouched as they check against the current backing device count.
      (Leaving apart that the check is racy in most of the cases.)
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      410235fd
    • J
      TTY: remove re-assignments to tty_driver members · 2f16669d
      Jiri Slaby 提交于
      All num, magic and owner are set by alloc_tty_driver. No need to
      re-set them on each allocation site.
      
      pti driver sets something different to what it passes to
      alloc_tty_driver. It is not a bug, since we don't use the lines
      parameter in any way. Anyway this is fixed, and now we do the right
      thing.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NTilman Schmidt <tilman@imap.cc>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2f16669d
    • C
      tty: serial: OMAP: Fix oops due to NULL pdata in DT boot · a5f43138
      Cousson, Benoit 提交于
      The following commit: be4b0281
      (tty: serial: OMAP: block idle while the UART is transferring data in PIO mode),
      is introducing an oops if OMAP is booted using device tree blob because
      the pdata will not be initialized.
      
      Check if pdata is set before de-referencing it.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Reviewed-by: NPaul Walmsley <paul@pwsan.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a5f43138
  8. 07 3月, 2012 1 次提交
  9. 05 3月, 2012 1 次提交
    • S
      pinctrl: API changes to support multiple states per device · 6e5e959d
      Stephen Warren 提交于
      The API model is changed from:
      
      p = pinctrl_get(dev, "state1");
      pinctrl_enable(p);
      ...
      pinctrl_disable(p);
      pinctrl_put(p);
      p = pinctrl_get(dev, "state2");
      pinctrl_enable(p);
      ...
      pinctrl_disable(p);
      pinctrl_put(p);
      
      to this:
      
      p = pinctrl_get(dev);
      s1 = pinctrl_lookup_state(p, "state1");
      s2 = pinctrl_lookup_state(p, "state2");
      pinctrl_select_state(p, s1);
      ...
      pinctrl_select_state(p, s2);
      ...
      pinctrl_put(p);
      
      This allows devices to directly transition between states without
      disabling the pin controller programming and put()/get()ing the
      configuration data each time. This model will also better suit pinconf
      programming, which doesn't have a concept of "disable".
      
      The special-case hogging feature of pin controllers is re-written to use
      the regular APIs instead of special-case code. Hence, the pinmux-hogs
      debugfs file is removed; see the top-level pinctrl-handles files for
      equivalent data.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NDong Aisheng <dong.aisheng@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      6e5e959d
  10. 02 3月, 2012 1 次提交
  11. 25 2月, 2012 4 次提交
  12. 23 2月, 2012 3 次提交
  13. 21 2月, 2012 1 次提交
  14. 11 2月, 2012 1 次提交
  15. 10 2月, 2012 3 次提交
    • P
      tty: serial: omap-serial: wakeup latency constraint is in microseconds, not milliseconds · 19723452
      Paul Walmsley 提交于
      The receive FIFO wakeup latency estimate in the omap-serial driver is
      three orders of magnitude too small.  This effectively prevents the
      MPU from going to a low-power state when CONFIG_CPU_IDLE=y.  This is a
      major power management regression and masks some other FIFO-related
      bugs in the driver.
      
      Fix by correcting the most egregious problem in the RX wakeup latency
      estimate.  There are several other flaws in the estimator; these will
      be fixed by a separate patch series intended for 3.4.
      
      The difference in low-power states with this patch can be observed via
      debugfs in pm_debug/count.
      
      This estimate does not have any effect when CONFIG_CPU_IDLE=n.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Acked-by: NGovindraj.R <govindraj.raja@ti.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      19723452
    • P
      tty: serial: OMAP: block idle while the UART is transferring data in PIO mode · be4b0281
      Paul Walmsley 提交于
      Prevent OMAP UARTs from going idle while they are still transferring
      data in PIO mode.  This works around an oversight in the OMAP UART
      hardware present in OMAP34xx and earlier: an idle UART won't send a
      wakeup when the TX FIFO threshold is reached.  This causes long delays
      during data transmission when the MPU powerdomain enters a low-power
      mode.  The MPU interrupt controller is not able to respond to
      interrupts when it's in a low-power state, so the TX buffer is not
      refilled until another wakeup event occurs.
      
      This fix changes the erratum i291 DMA idle workaround.  Rather than
      toggling between force-idle and no-idle, it will toggle between
      smart-idle and no-idle.  The important part of the workaround is the
      no-idle part, so this shouldn't result in any change in behavior.
      
      This fix should work on all OMAP UARTs.  Future patches intended for
      the 3.4 merge window will make this workaround conditional on a
      "feature" flag, and will use the OMAP36xx+ TX event wakeup support.
      
      Thanks to Kevin Hilman <khilman@ti.com> for mentioning the erratum i291
      workaround, which led to the development of this approach.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Acked-by: NGovindraj.R <govindraj.raja@ti.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      be4b0281
    • P
      tty: serial: OMAP: use a 1-byte RX FIFO threshold in PIO mode · 0ba5f668
      Paul Walmsley 提交于
      In the (default) PIO mode, use a one-byte RX FIFO threshold.  The OMAP
      UART IP blocks do not appear to be capable of waking the system under
      an RX timeout condition.  Since the previous RX FIFO threshold was 16
      bytes, this meant that omap-serial.c did not become aware of any
      received data until all those bytes arrived or until another UART
      interrupt occurred.  This made the serial console and presumably other
      serial applications (GPS, serial Bluetooth) unusable or extremely
      slow.  A 1-byte RX FIFO threshold also allows the MPU to enter a
      low-power consumption state while waiting for the FIFO to fill.
      
      This can be verified using the serial console by comparing the
      behavior when "0123456789abcde" is pasted in from another window, with
      the behavior when "0123456789abcdef" is pasted in.  Since the former
      string is less than sixteen bytes long, the string is not echoed for
      some time, while the latter string is echoed immediately.
      
      DMA operation is unaffected by this patch.
      
      Thanks to Russell King - ARM Linux <linux@arm.linux.org.uk> for some
      additional information on the standard behavior of the RX timeout
      event, which was used to improve this commit description.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Govindraj Raja <govindraj.r@ti.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0ba5f668