lkml.org 
[lkml]   [2003]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.072 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site