Re: Multiport serial card Exsys EX-44388, where are the devices ?

From: Warner Losh <imp_at_bsdimp.com>
Date: Sun, 20 Jan 2019 17:20:46 -0700
On Sun, Jan 20, 2019 at 5:09 PM Warner Losh <imp_at_bsdimp.com> wrote:

>
>
> On Sun, Jan 20, 2019, 4:41 PM Kurt Jaeger <pi_at_freebsd.org wrote:
>
>> Hi!
>>
>> > Well no longer needed as puc0 has found and allocated the
>> > device(s) which would of shown up had you done this before
>> > you fixed puc0 to find them.
>>
>> The problem is that the found 4 uarts are not 8 uarts, and they do not
>> seem to work (tested using kermit), either 8-(
>>
>> Any hints on how to debug this ?
>>
>
> You need to look to get the register width right.
>

Hit send too quick... I was going to say you needed to make sure that the
register width and strides were right, but they look to be because NetBSD
has

        /* SystemBase SB16C1058 UARTs */
        {   "SystemBase SB16C1058",
            {   PCI_VENDOR_SYSTEMBASE, PCI_PRODUCT_SYSTEMBASE_SB16C1058, 0,
0 },
            {   0xffff, 0xffff,                                          0,
0 },
            {
                { PUC_PORT_TYPE_COM, PCI_BAR0, 0x00, COM_FREQ },
                { PUC_PORT_TYPE_COM, PCI_BAR0, 0x08, COM_FREQ },
                { PUC_PORT_TYPE_COM, PCI_BAR0, 0x10, COM_FREQ },
                { PUC_PORT_TYPE_COM, PCI_BAR0, 0x18, COM_FREQ },
                { PUC_PORT_TYPE_COM, PCI_BAR0, 0x20, COM_FREQ },
                { PUC_PORT_TYPE_COM, PCI_BAR0, 0x28, COM_FREQ },
                { PUC_PORT_TYPE_COM, PCI_BAR0, 0x30, COM_FREQ },
                { PUC_PORT_TYPE_COM, PCI_BAR0, 0x38, COM_FREQ },
            },
        },

for this card. so there's 4 UARTs per bar, like you are seeing. You have
DEFAULT_RCLK * 8. COM_FREQ in NetBSD is defined:
sys/dev/ic/comreg.h:#define COM_FREQ 1843200 /* 16-bit baud rate divisor */

and FreeBSD's DEFAULT_RCLK is
sys/dev/puc/puc_cfg.h:#define DEFAULT_RCLK 1843200

so at a guess you need to remove the *8 to make things work. Otherwise you
are sending data 8 times too slow.

Warner
Received on Sun Jan 20 2019 - 23:20:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:20 UTC