Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 May 2011 04:24:07 +0000 (21:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 May 2011 04:24:07 +0000 (21:24 -0700)
* 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (23 commits)
  sh: Ignore R_SH_NONE module relocations.
  SH: SE7751: Fix pcibios_map_platform_irq prototype.
  sh: remove warning and warning_symbol from struct stacktrace_ops
  sh: wire up sys_sendmmsg.
  clocksource: sh_tmu: Runtime PM support
  clocksource: sh_tmu: __clocksource_updatefreq_hz() update
  clocksource: sh_cmt: Runtime PM support
  clocksource: sh_cmt: __clocksource_updatefreq_hz() update
  dmaengine: shdma: synchronize RCU before freeing, simplify spinlock
  dmaengine: shdma: add runtime- and system-level power management
  dmaengine: shdma: fix locking
  sh: sh-sci: sh7377 and sh73a0 build fixes
  sh: cosmetic improvement: use an existing pointer
  serial: sh-sci: suspend/resume wakeup support V2
  serial: sh-sci: Runtime PM support
  sh: select IRQ_FORCED_THREADING.
  sh: intc: Set virtual IRQs as nothread.
  sh: fixup fpu.o compile order
  i2c: add a module alias to the sh-mobile driver
  ALSA: add a module alias to the FSI driver
  ...

1  2 
drivers/tty/serial/sh-sci.c

@@@ -1,4 -1,6 +1,4 @@@
  /*
 - * drivers/serial/sh-sci.c
 - *
   * SuperH on-chip serial module support.  (SCI with no FIFO / with FIFO)
   *
   *  Copyright (C) 2002 - 2011  Paul Mundt
@@@ -41,6 -43,7 +41,7 @@@
  #include <linux/platform_device.h>
  #include <linux/serial_sci.h>
  #include <linux/notifier.h>
+ #include <linux/pm_runtime.h>
  #include <linux/cpufreq.h>
  #include <linux/clk.h>
  #include <linux/ctype.h>
@@@ -560,6 -563,9 +561,9 @@@ static void sci_break_timer(unsigned lo
  {
        struct sci_port *port = (struct sci_port *)data;
  
+       if (port->enable)
+               port->enable(&port->port);
        if (sci_rxd_in(&port->port) == 0) {
                port->break_flag = 1;
                sci_schedule_break_timer(port);
                sci_schedule_break_timer(port);
        } else
                port->break_flag = 0;
+       if (port->disable)
+               port->disable(&port->port);
  }
  
  static int sci_handle_errors(struct uart_port *port)
@@@ -837,6 -846,8 +844,8 @@@ static void sci_clk_enable(struct uart_
  {
        struct sci_port *sci_port = to_sci_port(port);
  
+       pm_runtime_get_sync(port->dev);
        clk_enable(sci_port->iclk);
        sci_port->port.uartclk = clk_get_rate(sci_port->iclk);
        clk_enable(sci_port->fclk);
@@@ -848,6 -859,8 +857,8 @@@ static void sci_clk_disable(struct uart
  
        clk_disable(sci_port->fclk);
        clk_disable(sci_port->iclk);
+       pm_runtime_put_sync(port->dev);
  }
  
  static int sci_request_irq(struct sci_port *port)
@@@ -1756,6 -1769,8 +1767,8 @@@ static int __devinit sci_init_single(st
                sci_port->enable = sci_clk_enable;
                sci_port->disable = sci_clk_disable;
                port->dev = &dev->dev;
+               pm_runtime_enable(&dev->dev);
        }
  
        sci_port->break_timer.data = (unsigned long)sci_port;
         *
         * For the muxed case there's nothing more to do.
         */
-       port->irq               = p->irqs[SCIx_TXI_IRQ];
+       port->irq               = p->irqs[SCIx_RXI_IRQ];
  
        if (p->dma_dev)
                dev_dbg(port->dev, "DMA device %p, tx %d, rx %d\n",
@@@ -1936,6 -1951,7 +1949,7 @@@ static int sci_remove(struct platform_d
        clk_put(port->iclk);
        clk_put(port->fclk);
  
+       pm_runtime_disable(&dev->dev);
        return 0;
  }