16552 UART detection

From: David Howells
Date: Wed Mar 10 2004 - 09:31:47 EST



Hi Russell,

Would something like the following be a reasonable way of detecting a NatSemi
PC16552 UART?:

if type == 16650A
then
set LCR.DLAB to 1
if EFR bits 7-3 are 0
then
set EFR to 0xff
if EFR == 0x07
then
set type to 16552
set EFR to 0
fi
else
restore EFR to previous value
fi
fi

This needs to be inserted before the test for the StarTech ST16650.

I've implemented by the attached patch against a 2.4.18 kernel.

David


Attachment: serial-16652.patch
Description: Binary data