linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] serial: Hack up 8520.c for evil device tree hookin.
@ 2011-03-17  1:26 David Daney
       [not found] ` <1300325167-26433-1-git-send-email-ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
  2011-03-17  1:46 ` [RFC PATCH 0/2] serial: Hack up 8520.c for evil device tree hookin Alan Cox
  0 siblings, 2 replies; 17+ messages in thread
From: David Daney @ 2011-03-17  1:26 UTC (permalink / raw)
  To: linux-serial-u79uwXL29TY76Z2rM5mHXA, gregkh-l3A5Bk7waGM,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: David Daney

I wanted to get some feedback on my attempts to control my serial
device registration with device tree data.

It was suggested by Grant Likely that I could use of_serial.c for my
purposes.  However I think it is simpler to do my own registration
code, because I need to set my own device type, required port flags,
and I/O functions, instead of using general purpose ones.  Adding this
to of_serial.c would be quite ugly, so I would like to keep it with my
chip/board code.

This leads to a problem: You cannot call serial8250_register_port()
until the 8250.c driver is registered.  of_serial.c is lucky that it
comes after 8250.c in the make file so that the device initcall order
is correct.  When I put the code in my board's serial.c file, I am not
so lucky.  To get the initialization order correct, I add a notifier
chain to 8250.c

What say you all to this approach?

David Daney (2):
  serial: 8250: Add a notifier chain for driver registration.
  MIPS: Octeon: Use device tree to register serial ports.

 arch/mips/cavium-octeon/serial.c |  140 ++++++++++++++++----------------------
 drivers/tty/serial/8250.c        |   20 ++++++
 include/linux/serial_8250.h      |   21 ++++++
 3 files changed, 101 insertions(+), 80 deletions(-)

-- 
1.7.2.3

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-03-18  5:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-17  1:26 [RFC PATCH 0/2] serial: Hack up 8520.c for evil device tree hookin David Daney
     [not found] ` <1300325167-26433-1-git-send-email-ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2011-03-17  1:26   ` [RFC PATCH 1/2] serial: 8250: Add a notifier chain for driver registration David Daney
     [not found]     ` <1300325167-26433-2-git-send-email-ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2011-03-17 12:18       ` Alan Cox
2011-03-17 16:42         ` David Daney
2011-03-17 18:25         ` Grant Likely
     [not found]           ` <20110317182510.GN9597-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-03-17 18:42             ` David Daney
2011-03-17 18:47               ` Grant Likely
     [not found]                 ` <20110317184723.GQ9597-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-03-17 19:24                   ` Alan Cox
2011-03-17 19:31                     ` Grant Likely
     [not found]                       ` <20110317193149.GD12824-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-03-17 20:13                         ` David Daney
2011-03-17 20:31                           ` Grant Likely
2011-03-17 23:48                         ` Alan Cox
2011-03-18  5:18                           ` Grant Likely
2011-03-17  1:26   ` [RFC PATCH 2/2] MIPS: Octeon: Use device tree to register serial ports David Daney
2011-03-17 18:28     ` Grant Likely
2011-03-17 18:35       ` David Daney
2011-03-17  1:46 ` [RFC PATCH 0/2] serial: Hack up 8520.c for evil device tree hookin Alan Cox

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).