All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH 0/7] serial: 8250: restart console after suspend
Date: Thu, 22 Jan 2015 12:24:24 -0500	[thread overview]
Message-ID: <1421947471-6396-1-git-send-email-peter@hurleysoftware.com> (raw)

Hi Greg,

This series fixes 8250 console resume from system sleep when the
console has been powered down, even though consoles aren't
suspending (eg., no_console_suspend on the kernel command line).

Patch 1 refactors the overly-complicated fall-through logic for
determining if the port should be shutdown.

Patches 2-5 refactor serial8250_do_set_termios() so that the
divisor programming can be used to reprogram the divisor when the
port has been powered-down during system sleep.

[ Patch 3, "serial: 8250: Refactor LCR computation" is, strictly
  speaking, not a required cleanup for this series. However, it
  will facilitate re-use by the omap_8250 driver.
]

Patch 6 implements the console restart by cribbing from an idea
first put forth by Doug Anderson <dianders@chromium.org> to
use the scratch register to discover the port has been powered-down.
This patch implements this restart for all 8250 drivers _except_
omap_8250 (which has a different divisor scheme) and 8250_dw
which unfortunately declares itself to be a PORT_8250 type (fixing
this in the 8250_dw driver will enable console restart for DW ports).

Patch 7 is a straggler fix which became obvious once all the
refactoring cleaned up serial8250_do_set_termios().

Regards,

Peter Hurley (7):
  serial: core: Simplify console suspend logic in uart_suspend_port()
  serial: 8250: Move UART_BUG_QUOT workaround
  serial: 8250: Refactor LCR computation
  serial: 8250: Refactor divisor programming
  serial: 8250: Refactor XR17V35X divisor calculation
  serial: 8250: Use canary to restart console after suspend
  serial: 8250: Prevent concurrent updates to shadow registers

 drivers/tty/serial/8250/8250_core.c | 187 ++++++++++++++++++++++++------------
 drivers/tty/serial/serial_core.c    |  35 ++++---
 include/linux/serial_8250.h         |   3 +
 3 files changed, 144 insertions(+), 81 deletions(-)

-- 
2.2.2

             reply	other threads:[~2015-01-22 17:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 17:24 Peter Hurley [this message]
2015-01-22 17:24 ` [PATCH 1/7] serial: core: Simplify console suspend logic in uart_suspend_port() Peter Hurley
2015-01-22 17:24 ` [PATCH 2/7] serial: 8250: Move UART_BUG_QUOT workaround Peter Hurley
2015-01-22 17:24 ` [PATCH 3/7] serial: 8250: Refactor LCR computation Peter Hurley
2015-01-22 17:24 ` [PATCH 4/7] serial: 8250: Refactor divisor programming Peter Hurley
2015-01-22 17:24 ` [PATCH 5/7] serial: 8250: Refactor XR17V35X divisor calculation Peter Hurley
2015-01-22 17:46   ` Peter Hurley
2015-01-22 17:24 ` [PATCH 6/7] serial: 8250: Use canary to restart console after suspend Peter Hurley
2015-01-22 17:24 ` [PATCH 7/7] serial: 8250: Prevent concurrent updates to shadow registers Peter Hurley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421947471-6396-1-git-send-email-peter@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.