linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.cz>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Tony Lindgren <tony@atomide.com>,
	Grant Likely <grant.likely@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] serial: 8250: Make ISA ports optional
Date: Thu, 08 Jan 2015 11:11:51 -0500	[thread overview]
Message-ID: <54AEAC47.1040403@hurleysoftware.com> (raw)
In-Reply-To: <20150108131008.16c9a31c@lxorguk.ukuu.org.uk>

On 01/08/2015 08:10 AM, One Thousand Gnomes wrote:
> On Mon,  5 Jan 2015 22:09:45 -0500
> Peter Hurley <peter@hurleysoftware.com> wrote:
> 
>> Some arches have no need to create unprobed 8250 ports; these phantom
>> ports are primarily required for ISA ports which have no probe
>> mechanism or to provide non-operational ports for userspace to
>> configure (via TIOCSSERIAL and TIOCSERCONFIG ioctls).
>>
>> Provide CONFIG_SERIAL_8250_PHANTOM_UARTS knob to disable phantom port
>> registration; ie., CONFIG_SERIAL_8250_PHANTOM_UARTS=N only registers
>> probed ports (ACPI/PNP, "serial8250" platform devices, PCI, etc).
> 
> Just #define serial8250_isa_devs to 0 on such platforms. gcc should then
> be bright enough to do the rest for you.

Well, this patch has the "advantage" of allowing the user to override
the config and create blank ports anyway.

That said, I'm exploring a completely different approach: I've split the
driver from the port operations. The idea being that the existing
"universal" driver supports everything it does now, while allowing for
a new driver(s) to only support a subset.

At this point, I've only done the actual split. So the "universal" driver
module has:
 * ISA/"serial8250" platform driver
 * PNP init
 * uart driver and console definitions
 * all the existing module parameters
 * all the globals (except the const uart_config[] table)
 * RSA port handling
 * Chained interrupt handling
 * port i/o by timer handling
 * early_serial_setup()
 * sun ttyS shared registration
 * serial8250_ports[] table and how it re-uses existing ports

The "universal" driver also has the sub-driver interface, which is:
 * serial8250_register_8250_port
 * serial8250_unregister_port
 * serial8250_suspend/resume_port
 * serial8250_find_port (hack for 8250_early)
 * serial8250_get_port (hack for runtime pm)

This interface is just storage and minor allocation, since the
port-reuse behavior will be limited to the "universal" driver.
>From a sub-driver perspective, the shared storage is actually
a hindrance, so that reduces the requirement to minor allocation.

And that's where I'm stuck at the moment -- how to share ttyS
minor allocation. ttyS console is a related problem.

Regards,
Peter Hurley

  reply	other threads:[~2015-01-08 16:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-06  3:09 [PATCH] serial: 8250: Make ISA ports optional Peter Hurley
2015-01-06 13:13 ` Arnd Bergmann
2015-01-06 14:32   ` Peter Hurley
2015-01-06 19:43     ` Arnd Bergmann
2015-01-06 21:47       ` Peter Hurley
2015-01-07 10:05         ` Arnd Bergmann
2015-01-08 13:10 ` One Thousand Gnomes
2015-01-08 16:11   ` Peter Hurley [this message]
2015-01-08 22:05     ` Arnd Bergmann
2015-01-08 22:36       ` One Thousand Gnomes
2015-01-08 23:25         ` Peter Hurley
2015-01-09  5:13       ` Peter Hurley
2015-01-09  8:48         ` Arnd Bergmann
2015-01-09 14:14           ` 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=54AEAC47.1040403@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=tony@atomide.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).