All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David H. Lynch Jr." <dhlii@dlasys.net>
To: linux-serial@vger.kernel.org, jacmet@sunsite.dk
Subject: Re: [RFC][PATCH] Xilinx uartlite serial driver
Date: Tue, 03 Oct 2006 06:27:06 -0400	[thread overview]
Message-ID: <45223AFA.5080502@dlasys.net> (raw)
In-Reply-To: <20060913100110.1e33d885@localhost.localdomain>

Olof Johansson wrote:
> On Wed, 13 Sep 2006 15:39:09 +0200 Peter Korsgaard <jacmet@sunsite.dk> wrote:
>
>   
>>>>>>> "Peter" == Peter Korsgaard <jacmet@sunsite.dk> writes:
>>>>>>>               
>>  Olof> 2. There seems to be some timeout issues with tx_empty.
>>
>>  Peter> Huh, that's odd - I haven't noticed that. I'll test it again and get
>>  Peter> back to you.
>>
>> Ahh, found it - I didn't update the uart timeout in set_termios so it
>> used a very long timeout. Please give the updated patch a try.
>>     
>
> Looks good. Thanks.
>   

Peter;

	I spent the better part of the past 4 days trying to move to your driver.
	
	The ulite_console_write() performance issue seems to be related to
using uart_console_write() to output the string. I can recreate the
problem - though not quite as bad, in my own driver by using that
instead of a simple internal puts(). It is possible that some paramater
or something needs tweeked somewhere to make uart_console_write()
perform better. That is beyond my current knowledge. I would hope there
is something because it appears serial console drivers are to be using
uart_console_write(), and I have seen tty's run faster than what I get
with it.

	I am supporting the Pico E series of boards. They frequently do not
have a PIC and therefor no serial interupts. Your driver does not have
any support for running polled, and adding working polling was less than
trivial. That is critical for my environment.

	I was having sufficient problems, I reverted to your base driver
without any of my own patches and tried to get it working using an E12
with interrupt support.
	Once your driver switched from the ulite_console output to fully up and
interrupt driven, it started dropping characters all over.
	I was never able to get any permutation of your driver to accept input.
	The missing early_serial_setup(struct uart_port*) routine I mentioned
earlier, seems to be somewhat less critical than I thought.
providing a completely empty stub seems to keep make happy and as best
as I can tell works.
	That said numerous ppc, mips, and a few other boards call
early_serial_setup() either for KGDB support or for early console text
support - passing a uart_port structure. Typically this only for 8250's
or the few other serial ports with boot to bash serial support. But I
have code to provide boot-bash UartLite support.
	This raises another issue. Your driver pulls memory and irq information
from platform device structures using IORESOURCE_MEM and IORESOURCE_IRQ
- perfectly resonable, but most of the 8250 based systems - particularly
the XILINX ml300, and ml403 have a uart_port structure embedded in their
platform data instead, and that is consistent with what
early_serial_setup() passes to the driver. A quick grep of
drivers/serial seemed to indicate no consistency passing configuration
data. But boot-bash serial IO will be easier if you follow the pattern
used for the 8250 in the Xilinx ml300/ml403.

	Finally, for boot-bash serial support it makes sense to extract the
register/bit defines into a separate include/linux/serial_uartlite.h
as there will be other code that uses them. I deliberately chose to name
all the values exactly as the 8250 defines - even thought I do not like
some of the names, UART_LSR_THRE means the same thing in every driver I
deal with wither it is an 8250, UartLite, Keyhole or even in another OS.
But that is personal preference.

	Eventually, I gave up and reverted back to my own driver. Patching
yours for early serial, tracking down the input problem, the output
problem, and adding polling was a larger undertaking, considering I have
a driver that works for me. Your driver did provoke me to check
my own in a pure interrupt driven environment and I have a problem of
my own their I need to fix.

	
	





-- 
Dave Lynch 					  	    DLA Systems
Software Development:  				         Embedded Linux
717.627.3770 	       dhlii@dlasys.net 	  http://www.dlasys.net
fax: 1.253.369.9244 			           Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too
numerous to list.

"Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction."
Albert Einstein



-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  parent reply	other threads:[~2006-10-03 10:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-11 14:23 [RFC][PATCH] Xilinx uartlite serial driver Peter Korsgaard
2006-05-11 22:20 ` Russell King
2006-05-16  9:48   ` Peter Korsgaard
2006-05-16 12:09     ` Sylvain Munaut
2006-05-16 12:53     ` Russell King
2006-05-16 13:03       ` Peter Korsgaard
2006-06-02 16:47         ` Russell King
2006-05-16 13:03       ` Sylvain Munaut
2006-05-16 13:07         ` Peter Korsgaard
2006-08-22 15:13 ` Peter Korsgaard
2006-09-12 14:33   ` Olof Johansson
2006-09-13  5:56     ` Peter Korsgaard
2006-09-13 13:39       ` Peter Korsgaard
2006-09-13 15:01         ` Olof Johansson
2006-09-29 19:04           ` David H. Lynch Jr.
2006-09-29 19:57           ` David H. Lynch Jr.
2006-10-04 15:45             ` Peter Korsgaard
2006-10-06  4:14               ` David H. Lynch Jr.
2006-09-30  9:25           ` David H. Lynch Jr.
2006-10-04 16:01             ` Peter Korsgaard
2006-10-06  4:15               ` David H. Lynch Jr.
2006-10-03 10:27           ` David H. Lynch Jr. [this message]
     [not found]           ` <451CDA3D.2060109@dlasys.net>
2006-10-04 15:41             ` Peter Korsgaard
2006-10-06  4:13               ` David H. Lynch Jr.
2006-10-06  4:14               ` David H. Lynch Jr.
2006-10-06  4:14               ` David H. Lynch Jr.
2006-10-19 23:06         ` Olof Johansson
2006-10-20 12:22           ` Peter Korsgaard
2006-09-28 10:14       ` David H. Lynch Jr.
2006-10-04 15:34         ` Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2006-10-13 14:12 David H. Lynch Jr.
2006-10-13 14:45 ` Peter Korsgaard

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=45223AFA.5080502@dlasys.net \
    --to=dhlii@dlasys.net \
    --cc=jacmet@sunsite.dk \
    --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.