From owner-freebsd-questions@FreeBSD.ORG Sat Mar 24 06:31:59 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 482AB16A400 for ; Sat, 24 Mar 2007 06:31:59 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.184]) by mx1.freebsd.org (Postfix) with ESMTP id 3308813C45B for ; Sat, 24 Mar 2007 06:31:59 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin04-en2 [10.13.10.149]) by smtpout.mac.com (Xserve/smtpout14/MantshX 4.0) with ESMTP id l2O6AnZ3019335; Fri, 23 Mar 2007 23:10:49 -0700 (PDT) Received: from [192.168.1.2] (c-24-6-177-228.hsd1.ca.comcast.net [24.6.177.228]) (authenticated bits=0) by mac.com (Xserve/smtpin04/MantshX 4.0) with ESMTP id l2O6AkHb024682 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 23 Mar 2007 23:10:47 -0700 (PDT) In-Reply-To: <200703240449.l2O4n159087350@lava.sentex.ca> References: <200703240449.l2O4n159087350@lava.sentex.ca> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <7FF1D403-84EB-4FD3-A183-46BBC484F9D3@mac.com> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Fri, 23 Mar 2007 23:10:09 -0700 To: Mike Tancsa X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: freebsd-questions@freebsd.org Subject: Re: fixing a PUC / uart speed issue X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2007 06:31:59 -0000 On Mar 23, 2007, at 9:49 PM, Mike Tancsa wrote: > Hi, > I have a mini-pci UART that has a problem with its speed. When I > connect to it at 300bps the other side sees this as 1200. e.g. > > Other PC PUC device > 4800 1200 > 9600 2400 > 19200 4800 *snip* > I am guessing something needs to be changed in the puc driver for it ? > > /* Oxford Semiconductor OX16PCI954 PCI UARTs */ > { "Oxford Semiconductor OX16PCI954 UARTs", > { 0x1415, 0x9501, 0, 0 }, > { 0xffff, 0xffff, 0, 0 }, > { > { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ }, > { PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ }, > { PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ }, > { PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ }, > }, > }, > > > but what ? Try changing the frequency from COM_FREQ to (4 * COM_FREQ). The frequency is driving the baudrate generator and given that the baudrate is off by a factor of 4, it follows that we program the baudrate generator with a divisor that corresponds to a frequency that's off by a factor of 4 as well. HTH, -- Marcel Moolenaar xcllnt@mac.com