From owner-freebsd-arm@FreeBSD.ORG Tue Mar 6 16:09:15 2007 Return-Path: X-Original-To: freebsd-arm@freebsd.org Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF5CB16A400 for ; Tue, 6 Mar 2007 16:09:15 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id 5CCE213C494 for ; Tue, 6 Mar 2007 16:09:15 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 1C47334547; Tue, 6 Mar 2007 18:09:13 +0200 (EET) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 68073-10; Tue, 6 Mar 2007 18:09:10 +0200 (EET) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 2BD8A34546; Tue, 6 Mar 2007 18:09:10 +0200 (EET) Message-ID: <45ED9225.1070704@bulinfo.net> Date: Tue, 06 Mar 2007 18:09:09 +0200 From: Krassimir Slavchev User-Agent: Thunderbird 1.5 (X11/20060201) MIME-Version: 1.0 To: "M. Warner Losh" References: <45EC2667.9040004@bulinfo.net> <20070305.072919.2010473806.imp@bsdimp.com> <45EC2BF9.2000804@bulinfo.net> <20070305.074920.-1090027333.imp@bsdimp.com> In-Reply-To: <20070305.074920.-1090027333.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: IIC support? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2007 16:09:15 -0000 M. Warner Losh wrote: > In message: <45EC2BF9.2000804@bulinfo.net> > Krassimir Slavchev writes: > : M. Warner Losh wrote: > : > In message: <45EC2667.9040004@bulinfo.net> > : > Krassimir Slavchev writes: > : > : Warner Losh wrote: > : > : >> I have problems to access the iic eeprom from userland. Even after set > : > : >> SCAN_IICBUS in iicbus.c nothing has been detected. I have made some > : > : >> tests from the bootloader to read/write from/to the eeprom and they work. > : > : >> Is there any known problems with TWI or any differences between board > : > : >> settings? > : > : >> > : > : > > : > : > The IIC bus is not a self enumerating bus. Bad things happen when you > : > : > go out and try to 'probe' it, although often you can get away with > : > : > that. FreeBSD takes a conservative approach. You need hints for each > : > : > iic device on bus that you have on your board. > : > : > > : > : > > : > : Ok, that was just for testing. > : > : > : > : I am trying to write a driver for pcf8563 (RTC similar to ds1672) but > : > : when I call the iicbus_transfer() function the iicbus_transfer_gen() is > : > : called instead of at91_twi_transfer(). > : > : In the kernel config file I have: > : > : ... > : > : device at91_twi > : > : device iicbus > : > : ... > : > : > : > : Is this correct or I miss something else? > : > > : > Should be correct. What version of FreeBSD are you using? > : > > : 7.0-CURRENT, 2 days old > > OK. I'll take a look to see if there are unmerged patches from p4. > I'm nearly positive that I fixed this... > > When iicbus_transfer() is called with parent device then the right function is called. If this is correct then ds1672 and ad7418 drivers should be corrected. > Warner > > Best Regards