Date: Sun, 20 Jan 2019 17:20:46 -0700 From: Warner Losh <imp@bsdimp.com> To: Kurt Jaeger <pi@freebsd.org> Cc: "Rodney W. Grimes" <freebsd-rwg@pdx.rh.cn85.dnsmgr.net>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: Multiport serial card Exsys EX-44388, where are the devices ? Message-ID: <CANCZdfrVJthJGEedCNZ-nnt88Mi1xD-0HFaJXKpFGVyuPSvVhA@mail.gmail.com> In-Reply-To: <CANCZdfoBpt5vjzAfazX7ezLhEYRQfhEK5xPHGM3_SYy_QctUOw@mail.gmail.com> References: <20190120183908.GC78316@home.opsec.eu> <201901201920.x0KJKIEL066339@pdx.rh.CN85.dnsmgr.net> <20190120205811.GA1258@fc.opsec.eu> <CANCZdfoBpt5vjzAfazX7ezLhEYRQfhEK5xPHGM3_SYy_QctUOw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 20, 2019 at 5:09 PM Warner Losh <imp@bsdimp.com> wrote: > > > On Sun, Jan 20, 2019, 4:41 PM Kurt Jaeger <pi@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrVJthJGEedCNZ-nnt88Mi1xD-0HFaJXKpFGVyuPSvVhA>