From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Kumar Gala <kumar.gala@freescale.com>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: serial8250_init and platform_device
Date: Thu, 20 Jan 2005 11:43:28 +0000 [thread overview]
Message-ID: <20050120114328.A3110@flint.arm.linux.org.uk> (raw)
In-Reply-To: <F8A43C8A-6AB2-11D9-9DDC-000393DBC2E8@freescale.com>; from kumar.gala@freescale.com on Thu, Jan 20, 2005 at 01:14:49AM -0600
On Thu, Jan 20, 2005 at 01:14:49AM -0600, Kumar Gala wrote:
> I dont get how it is you dont have more platform_devices register than
> you should based on how serial8250_init works if you have additional
> code registering a serial8250 device. For example,
> arch/arm/mach-s3c2410/mach-vr1000.c will register one serial8250
> device, and it appears to me that serial8250_init will register a 2nd.
> Is this the expected behavior or am I missing something?
I don't understand what you're saying, sorry.
serial8250_init() registers an "ISA compatibility" 8250 device for those
architectures which haven't converted themselves to the new scheme.
It then creates all the 8250 ports from 0..UART_NR. In the case of an
architecture which doesn't have any SERIAL_PORT_DFNS defined (eg, ARM)
these are just dummy placeholder registrations.
We then register the device driver, which allows us to pick up on the
platform devices. This causes the placeholder registrations to be
reassigned to the platform devices on a first come first served basis
via the standard registration call serial8250_register_port().
While you can have both the "ISA compatibility" scheme and the
"platform device" scheme contain the same port description, you'll
only end up with just the one port registered in the end. That just
happens to be correct and desired behaviour.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
next prev parent reply other threads:[~2005-01-20 11:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-20 7:14 serial8250_init and platform_device Kumar Gala
2005-01-20 11:43 ` Russell King [this message]
2005-01-20 15:23 ` Kumar Gala
2005-01-20 15:44 ` Russell King
2005-01-20 19:06 ` Kumar Gala
2005-01-20 19:38 ` Russell King
2005-01-20 19:50 ` Greg KH
2005-01-20 20:10 ` Russell King
2005-01-20 20:25 ` Kumar Gala
2005-02-01 8:41 ` Greg KH
2005-01-20 20:26 ` Kumar Gala
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=20050120114328.A3110@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=kumar.gala@freescale.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox