From owner-freebsd-current@freebsd.org Mon Jan 21 00:20:58 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E76514AF305 for ; Mon, 21 Jan 2019 00:20:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0F3C8BB4A for ; Mon, 21 Jan 2019 00:20:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82a.google.com with SMTP id k12so21574882qtf.7 for ; Sun, 20 Jan 2019 16:20:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WONFf33CT0BfriCGD+6sm09PHJW1ECIZ2Tn9mBBr33k=; b=j7CVI9I/wUXH/4ITNIEtGdAewHjuBMlaF8NTzXWCKBF7VtWBlkE4BKUsZo/TxlJmfC sef8ANqLF8YHPz3DIhU/mkZzmaoj/1/vQlxkefvRXUUKitbnRaXAi38zaYEOCM0mzC1S 0Tr+soag0iugVYMBP3DCzOBK+pdQFLQ4YHW/k4djBcmYK1yOYyvidVy/OJMBBITie3L1 ZDkUzMGGCFIgYIgn7hg+PCZXcnxqGZ0n0d5pibrVPTavoIVIYBq8HScyxlGm+SENebrp xyLNR3fmYTxX4hSnQnWLdRN20gHgTtKujuqHYQ3eDCmrOubMmyZHo3hDdD5hIDZNBFLY LjJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WONFf33CT0BfriCGD+6sm09PHJW1ECIZ2Tn9mBBr33k=; b=pBNYceiWBat4cxXH8XmZTCvXYSaCbyt6Mse2316OzpKTcKicVax2gfsMmglJYJocbf nikFuj3/FfGMZqwLyGiiRva5rFpb5ekrMYgQtEEhYkFs3IOJyrnrf7acFlS9Hy04Gaq2 0lmMdMoOMnrVwQCUad9TYjAS1DU2qvcpphyodjI3BqBz4zx1kaEej3IiF7jreX9YLOJp +dK0AZ/YsWuf1o7m0GVF0PM7XL8ebPkSl1eypf8o1+z9Nmc+u6B1y/w1W8J1E7yal/GM /rS5qIsuqrKNTVjNlAMLrLGb5V+K11tmM4Febh+BrZioRLOpYL/AyXEesel2XJdkrX5H g6MQ== X-Gm-Message-State: AJcUukduabJOMLuMGsOPhw5YxKxixJ05IJcSmW1toUoJrJeVXdnikqrk WS/znwlFxcDxz+/jq3EgfCd7xxSwSBGuCspFnf7JbVs0CSI= X-Google-Smtp-Source: ALg8bN4I20uL6vh6jcI/Z3YexVt3EysljZpPkJ1E1izjW0iVKyDH3yUhO7ruz2TUmmOwF6IgT2mHb5MDbwKt84e1ZZk= X-Received: by 2002:ac8:42c1:: with SMTP id g1mr25211862qtm.118.1548030057076; Sun, 20 Jan 2019 16:20:57 -0800 (PST) MIME-Version: 1.0 References: <20190120183908.GC78316@home.opsec.eu> <201901201920.x0KJKIEL066339@pdx.rh.CN85.dnsmgr.net> <20190120205811.GA1258@fc.opsec.eu> In-Reply-To: From: Warner Losh Date: Sun, 20 Jan 2019 17:20:46 -0700 Message-ID: Subject: Re: Multiport serial card Exsys EX-44388, where are the devices ? To: Kurt Jaeger Cc: "Rodney W. Grimes" , FreeBSD Current X-Rspamd-Queue-Id: B0F3C8BB4A X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=j7CVI9I/ X-Spamd-Result: default: False [-4.09 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; IP_SCORE(-2.34)[ip: (-7.37), ipnet: 2607:f8b0::/32(-2.40), asn: 15169(-1.85), country: US(-0.08)]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[a.2.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.75)[-0.745,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+,1:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jan 2019 00:20:58 -0000 On Sun, Jan 20, 2019 at 5:09 PM Warner Losh wrote: > > > On Sun, Jan 20, 2019, 4:41 PM Kurt Jaeger >> 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