linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Russell King <rmk@arm.linux.org.uk>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.linuxppc.org
Subject: Re: Serial core problems on embedded PPC)
Date: Mon, 29 Jul 2002 12:07:03 -0700	[thread overview]
Message-ID: <20020729190703.GB12964@opus.bloom.county> (raw)
In-Reply-To: <20020729181352.27999@192.168.4.1>


On Mon, Jul 29, 2002 at 08:13:52PM +0200, Benjamin Herrenschmidt wrote:

> >> a. architectures provide a sub-module to 8250.c which contains the
> >>    per-port details, rather than a table in serial.h.  This would
> >>    ideally mean removing serial.h completely.  The relevant object
> >>    would be linked into 8250.c when 8250.c is built as a module.
> >
> >I think this would work best.  On PPC this would allow us to change the
> >mess of include/asm-ppc/serial.h into a slightly cleaner Makefile
> >(especially if we do the automagic <platforms/platform.h> or
> ><asm/platform.h> bit that's been talked about in the past) magic and we
> >could use that object file as well in the bootwrapper as well.
>
> Especially, please, let's avoid once for all statically defined table,
> on PPC (specifically on pmac) the table is really dynamic, and
> the "legacy ports" (if any) may not be ttyS0..1, but could well be
> 2..3, or higher, all this having to be decided at runtime for both
> built-in driver and modular (so eraly_serial_setup isn't good).

Well, on pmac yes.  But for a good hunk of the rest of the PPC world the
inital ports are static (and as long as new ports, ie pcmcia stuff, is
handled sanely anyhow, I don't think this is an issue).

> I quite like the sub-module mecanism. I'd rather have it done the
> opposite though. I don't care that much about sharing those files
> with the bootloader, and i'd rather see the core serial code beeing
> a submodule of the arch specific module.

Then how do you propose to keep the bootloader working and kill off the
ugly ugly include/asm-ppc/serial.h ?

> Typically, that would give us:
>
>  - 8250_legacy.c would load 8250 core, probe legacy ports and
> instanciate them for typical x86 setup
>  - 8250_ppc.c would instanciate known ports on PReP or CHRP machines
> and do nothing on pmac
>  - 8250_pci.c would be a pci_driver and instanciate ports for a given
> PCI card
>  - 8250_cs.c would be a pcmcia driver and instanciate ports for a
> given PCMCIA modem card
>
> etc... And of course, we can have an arbitrary set of the above loaded
> instanciating ports are they are found.

I _think_ the 8250_cs.c case is seperate in this case.  But most of what
you describe would work fine in the arch-is-a-submodule case.  What I
was thinking of was some makefile bits to something like:
# The true legacy ports, prep/chrp/others.  With a _machine test or
# something.
serial-$(CONFIG_ALL_PPC) += legacy.o
# K2 uses the legacy locations too
serial-$(CONFIG_K2) += legacy.o
# These boards make use of iomem_base/reg shift
serial-$(CONFIG_A) += a_serial.o
serial-$(CONFIG_B) += b_serial.o
...

obj-$(CONFIG_SERIAL_8250) += $(serial-y)

Or so.  Maybe with a rule to turn $(serial-y) into arch_serial.o or
something.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2002-07-29 19:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-29  4:08 Serial core problems on embedded PPC David Gibson
2002-07-29  9:00 ` Russell King
2002-07-29 14:44   ` Tom Rini
2002-07-29 17:17     ` 3 Serial issues up for discussion (was: Re: Serial core problems on embedded PPC) Russell King
2002-07-29 17:43       ` Tom Rini
2002-07-29 18:13         ` Benjamin Herrenschmidt
2002-07-29 19:07           ` Tom Rini [this message]
2002-07-29 19:09           ` Dan Malek
2002-07-29 19:46             ` Remco Treffkorn
2002-07-29 20:18               ` Russell King
2002-07-30  2:54               ` 3 Serial issues up for discussion David S. Miller
2002-07-29 18:15         ` 3 Serial issues up for discussion (was: Re: Serial core problems on embedded PPC) Matt Porter
2002-07-29 17:47       ` [parisc-linux] " Christoph Plattner
2002-07-29 22:19       ` Matthew Wilcox
2002-07-30  2:51       ` 3 Serial issues up for discussion David S. Miller
2002-08-02  6:01     ` symbol card with orinoco_cs on mpc823 shaowei dai
2002-08-02  6:23       ` David Gibson
2002-08-02  6:36         ` Matthew Locke
2002-08-02  7:01           ` shaowei dai
     [not found]       ` <3D4AC468.83BCD667@opensource.se>
2002-08-03  1:30         ` shaowei dai
2002-07-30  1:12   ` Serial core problems on embedded PPC David Gibson

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=20020729190703.GB12964@opus.bloom.county \
    --to=trini@kernel.crashing.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=rmk@arm.linux.org.uk \
    /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).