From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 5 05:10:45 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E2AFE16A401 for ; Mon, 5 Feb 2007 05:10:45 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 860C313C48D for ; Mon, 5 Feb 2007 05:10:45 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id l1558k4l021108; Sun, 4 Feb 2007 22:08:52 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 04 Feb 2007 22:09:21 -0700 (MST) Message-Id: <20070204.220921.-566238288.imp@bsdimp.com> To: freebsd-hackers@dino.sk From: "M. Warner Losh" In-Reply-To: <200702042135.25962.freebsd-hackers@dino.sk> References: <200702040918.37825.freebsd-hackers@dino.sk> <20070204.132150.1288664462.imp@bsdimp.com> <200702042135.25962.freebsd-hackers@dino.sk> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 04 Feb 2007 22:08:52 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Geode SC1100 i2c bus X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Feb 2007 05:10:46 -0000 In message: <200702042135.25962.freebsd-hackers@dino.sk> Milan Obuch writes: : On Sunday 04 February 2007 21:21, M. Warner Losh wrote: : > In message: <200702040918.37825.freebsd-hackers@dino.sk> : > : > Milan Obuch writes: : > : On Sunday 04 February 2007 01:21, perryh@pluto.rain.com wrote: : > : > > > The ACB is at the same level than Uart, so I had a look at sio : > : > > > source and got a big headache. I'm not really used to drivers : > : > > > nor kernel programming stuff, that's why I need your help. : > : > > : > : > > Why do you compare ACB and UART? In FreeBSD, sio is serial i/o : > : > > controller, not superIO, maybe you are confused... ACB and UART : > : > > does not have much in common... : > : > : > : > As I read the OP, both the ACB and the serial are in the same chip : > : > (the superIO), so it would seem reasonable to expect that the method : > : > of accessing the device registers in the (currently unsupported) ACB : > : > might be similar to the method of accessing the device registers in : > : > the (supported) serial port. : > : : > : You are right from the point of view 'how to access registers'. But what : > : OP wrote could be understand another way, too - he tried to modify sio to : > : create acb driver, which would not achieve the correct results. There is : > : i2c infrastructure in FreeBSD, acb driver should fit into its place there : > : and it is not that easy - I tried to understand it, but nobody could/was : > : willing to/did not care to help me understand it. : > : > I'm happy to help you understand it. : > : > Warner : > : : Great, I will go through the code and will ask. What made me not achieve : progress was lack of docs - this area is, ehm, under-documented, and lack of : description in pcf, the only i2c hardware controller in source tree : currently. pcf isn't the only i2c hardware controller in the tree. I personally comitted at91_twi.c quite some time ago. : Correct me, if I am wrong and there are more - but not smbus, they : are not the same thing, even if very near to each other. SMbus : controller in FreeBSD does not expose i2c device to userland, as far : as I read it, but this was some time ago. smbus has a higher level interface than i2c, so doesn't expose i2c to userland because it can't. : I need some time to prepare myself, but I would like to get this working. : There are some projects waiting for it... Sure thing. Like I said, I've done a lot with i2c in FreeBSD lately... Warner