Thread (10 messages) 10 messages, 8 authors, 2003-11-04

Re: [PATCH] Make the Startech UART detection 'more correct'.

From: Tom Rini <hidden>
Date: 2003-09-09 19:25:47
Also in: lkml

Possibly related (same subject, not in this thread)

On Tue, Sep 09, 2003 at 03:12:30PM -0400, Stuart MacDonald wrote:
From: linux-kernel-owner@vger.kernel.org 
[snip]
quoted
I'd suggest something like:

	serial_outp(port, UART_LCR, UART_LCR_DLAB);
	efr = serial_in(port, UART_EFR);
	if ((efr & 0xfc) == 0) {
		serial_out(port, UART_EFR, 0xac | (efr & 3));
		/* if top 6 bits return zero, its motorola */
		if (serial_in(port, UART_EFR) == (efr & 3)) {
			/* motorola port */
		} else {
			/* ST16C650V1 port */
		}
		/* restore old value */
		serial_outb(port, UART_EFR, efr);
	}

If you can guarantee that the lower two bits will always be 
zero, you can
drop the frobbing to ignore/preseve the lower two bits.
Does the Motorola chip have an ID register at all? Certainly using the
fifo size is a weak test and should only be a last resort.
No, there is not an ID on the motorola duarts.

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

Attachments

  • (unnamed) [application/pgp-signature] 189 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help