Re: New serial card development

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 29, 2012 at 3:04 PM, Matt Schulte
<matts@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, Oct 23, 2012 at 1:38 PM, Greg KH <greg@xxxxxxxxx> wrote:
>> On Tue, Oct 23, 2012 at 11:31:41AM -0500, Matt Schulte wrote:
>>> On Tue, Oct 23, 2012 at 11:27 AM, Matt Schulte
>>> <matts@xxxxxxxxxxxxxxxxxxxx> wrote:
>>> > On Fri, Oct 19, 2012 at 4:21 PM, Theodore Ts'o <tytso@xxxxxxx> wrote:
>>> >> Alan's advice to get your card working as a basic serial card is very
>>> >> good one.  Get basic functionality working, and then you can add the
>>> >> support for the extra bits later....
>>> >
>>> > I can see the logic in getting it working as a basic serial card
>>> > first.  I think at minimum I would still need to implement the extra
>>> > divisor calculations to get accurate bit rates.
>>> >
>>> > So when it works as a basic serial card, I assume you would want me to
>>> > use the default PCI IDs to keep it more generic.  Then would I add my
>>> > own PCI IDs and refer them back to the generic port?
>>> >
>
> I am working to get the Exar devices added to the 8250 driver.  I
> think I get most of what I need to make happen until I get to the
> detection of the EFR register.  Can someone explain to me what is
> going on here and where the Exar device is supposed to end up?  It
> seems to me that I would expect them to show up somewhere around :
>
> /*
>  * Exar uarts have EFR in a weird location
>  */
>
> But instead I am getting my UARTs detected as EFRv1, iir=3 and marked
> as type=ST16650.
>
> For reference the Exar chips have EFR located at an address of 1001
> (UART_XR_EFR).  There isn't anything special that has to be done to
> access this location, just look at 1001.

I was able to work my way through the funky EFR detection.  Hopefully
you guys will like what I did when you see the patch.

Next I need to know the channel number of a given UART port.  If I
have a 4 port UART I need to know that a given channel is 0,1,2 or 3.
If I have an 8 port UART I need to know if a given channel is
0,1,2,3,4,5,6 or 7.

The only way that I can find to get this number is using the idx
variable that is passed to the port's .setup operation.  Would I be
able to add a member to the uart_port structure so that I could store
this number inside my UARTs setup function?

Something like:

struct uart_port {
.
.
.
unsigned int channel;
};

pci_myuart_setup(struct serial_private *priv,
                const struct pciserial_board *board,
                struct uart_8250_port *port, int idx)
{
...
        port->port.channel = idx;
        return pci_default_setup(priv, board, port, idx);
}

Thank you,
Matt Schulte
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux