Re: OXSEMI 16C950/4 detection patch for 2.3.99-pre1

From: =?ISO-8859-1?Q? (jazz@static.co.kr)
Date: Mon Mar 20 2000 - 11:02:20 EST


Dear Ted,

  Without channel reset, id1,id2,id3 were equal to 0x40. I'm not sure
whether it's depends on chip revision. anyway, channel reset was required
for our board (or PCI954 chip)
  I'll show you some part of refrence driver source for Window NT provided
by oxsemi as the following.
  source: nt950.c funtion : OX950_CHANNEL_RESET,OX950_ID_PORT

//**************************************************************************
***
// INITIALISATION FUNCTIONS

void OX950_CHANNEL_RESET(PSERIAL_DEVICE_EXTENSION ext){
        PUCHAR base = (PUCHAR) ext->Controller;
        //Performs a full software reset on the specified base
        //and also clears the associated sofware data
        WR(LCR, 0, base); // To ensure not 0xBF
        OX950_WR_ICR(CKS, 0, ext); // CKS not cleared by writing CSR
        OX950_WR_ICR(CSR, 0, ext); // Soft reset
        // Also reset the mimic registers
        ext->MimicACR = 0;
        ext->MimicMCR = 0;
        ext->MimicLCR = 0;
}

BOOLEAN OX950_ID_PORT(PSERIAL_DEVICE_EXTENSION ext){
        UCHAR id1, id2, id3, rev;
        BOOLEAN supported = FALSE;

        // Reads the 950 ID registers and dumps the formated
        // UART ID to the debug terminal if a 95x is detected
        // Returns TRUR if a 95x device is found at the given
        // address, otherwise FALSE

        // A good place to perform a channel reset so we know
        // the exact state of the device from here on

        OX950_CHANNEL_RESET(ext);

        id1 = OX950_RD_ICR(ID1, ext);
        if(id1==0x16){
                id2 = OX950_RD_ICR(ID2, ext);
                id3 = OX950_RD_ICR(ID3, ext);
            .
            .

>
> >I've been working with 2.3.99-pre1 with our multiport card. And I found
> >a problem on detecting oxsemi chip on kernel 2.3.99-pre1.
> >
> >
> >// channel reset before read IDs
> > serial_outp(info, UART_LCR, 0); // to ensure not 0xBF
> > serial_icr_write(info,UART_CKS,0);
> > serial_icr_write(info,UART_CSR,0); // software reset
> > .
> >
> >Above 3 lines should be added before reading IDs of 950.
>
> Why do you need to do this? The clock select register is automatically
> reset to zero after a hardware reset, and I don't see anything in the
> 16C950 data sheet which indicates that resetting the UART is necessary
> before reading the ID bytes.
>
> I have some 16C950 and 16C954 boards, and their of these lines are
> necessary.
>
> >If you're interesting about OX16PCI954 based multi port card, Please
> >send me e-mail. I have some evaluation boards for developer. Thanks.
>
> I'll send you my U.S. Mail address under separate cover.
>
> - Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:30 EST