Messages in this thread | | | Date | Tue, 9 Sep 2003 12:23:12 -0700 | From | Tom Rini <> | Subject | Re: [PATCH] Make the Startech UART detection 'more correct'. |
| |
On Tue, Sep 09, 2003 at 03:12:30PM -0400, Stuart MacDonald wrote: > From: linux-kernel-owner@vger.kernel.org [snip] > > 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/ [unhandled content-type:application/pgp-signature] | |