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

From: Tom Rini
Date: Tue Sep 09 2003 - 14:28:21 EST


On Tue, Sep 09, 2003 at 03:12:30PM -0400, Stuart MacDonald wrote:
> From: linux-kernel-owner@xxxxxxxxxxxxxxx
[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/

Attachment: pgp00001.pgp
Description: PGP signature