From owner-freebsd-questions Mon Sep 24 16:37:32 2001 Delivered-To: freebsd-questions@freebsd.org Received: from hal9000.net.au (cu764.adelaide.adsl.on.net [150.101.237.2]) by hub.freebsd.org (Postfix) with ESMTP id 692E637B425; Mon, 24 Sep 2001 16:37:22 -0700 (PDT) Received: (from bruins@localhost) by hal9000.net.au (8.11.1/8.11.1) id f8ONbDo06846; Tue, 25 Sep 2001 07:37:13 +0800 (WST) (envelope-from bruins) Date: Tue, 25 Sep 2001 07:37:13 +0800 From: Mike Bruins To: John Merryweather Cooper Cc: Mike Bruins , freebsd-questions@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: health chip driver - vt82c686 - finishing off Message-ID: <20010925073713.A6802@wall.hal9000.net.au> References: <20010924221149.A4971@wall.hal9000.net.au> <20010924072618.C677@johncoop.MSHOME> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010924072618.C677@johncoop.MSHOME>; from john_m_cooper@yahoo.com on Mon, Sep 24, 2001 at 07:26:18AM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 24, 2001 at 07:26:18AM -0700, John Merryweather Cooper wrote: > > On 2001.09.24 07:11 Mike Bruins wrote: > > Hello, > > > > I have put together most of a device driver for the health > > monitoring chip via technologies vt82c686 function 4 (PCI 3057:1106). > > All the kernel loadable module, device probe/attach code, > > temperature/fan/voltage conversion routines are there. > > I can read the device registers for PCI Vendor/Device, chip enable, > > class, subclass etc. > > > > Basically what I am not able to do is read the values > > hardware offset registers. The call to bus_alloc_resource > > fails (returns null) and I can't work out why. > > > > If anyone could please help with the following questions: > > > > 1. It looks like bus_alloc_resource() gets resources from it's parent > > device driver. > > Does the vt82c686 function 4, talk I2C to it's parent to get > > resources? > > If so, do I need a device driver for this parent? > > Anyone know it's PCI vendor/device chip code? > > > > 2. Perhaps I am going down the wrong path. Ideas, example code > > references appreciated. I have looked at many examples of > > code, but can't work out what is relevent/required for the 686a/b, > > in terms of resources and how it communicates. > > > > 3. The bit of my code that is actually failing is below. > > Like I said, I am pretty much sure the code to this point > > is correct and working as I can print any of the registers > > and they have sane values. > > > > I have tried every conbination I can think of for hwm_io_base_reg > > and the type of resource I am asking for. > > I have read the 686a.pdf file many times, tried all I can think of. > > According to the 686a.pdf the data size is 0x80 bytes. > > > > xmbmon works great (for temperature sorts of things) on my VIA 686B. > You > might want to take a look at that code (it's in ports). Many thanks, I was not aware of this package. I have had a quick peek and it looks to be accessing te offset registers directly, (which it warns about) but this should privide enough functionality to get my code to work. I will spend some time comparing the functionality of each. If there is anything missing in the xmbmon for via functions that I have, I will send patches to the author. It's better to have one package that can support multiple health chips. - mike > > -- > jmc > > MacroHard -- the perfection of form over > substance, marketing over > performance, and greed over > design . . . To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message