Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Aug 2003 09:35:36 +0200
From:      Igor Pokrovsky <igor.pokrovsky@cnrm.meteo.fr>
To:        Igor Pokrovsky <igor.pokrovsky@cnrm.meteo.fr>, Bruce M Simpson <bms@spc.org>, freebsd-hackers@freebsd.org
Subject:   Re: PCI quirk
Message-ID:  <20030820073535.GA331@exmatis1.cnrm.meteo.fr>
In-Reply-To: <20030818141852.GA40572@exmatis1.cnrm.meteo.fr>
References:  <20030818124841.GA35843@exmatis1.cnrm.meteo.fr> <20030818141217.GD21219@spc.org> <20030818141852.GA40572@exmatis1.cnrm.meteo.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 18, 2003 at 04:18:52PM +0200, Igor Pokrovsky wrote:
> On Mon, Aug 18, 2003 at 03:12:17PM +0100, Bruce M Simpson wrote:
> > On Mon, Aug 18, 2003 at 02:48:41PM +0200, Igor Pokrovsky wrote:
> > > Hello all,
> > > 
> > > I'd like to add a PCI quirk, which will enable SMBus on boot
> > > (it gets disabled by BIOS). What is the best place in kernel
> > > to do this? I looked through PCI sources, but haven't found
> > > any suitable place for that (not like in USB case).
> > 
> > This sounds like perhaps you need to add a patch tied to your southbridge.
> > 
> > Generally the SMBus interface hangs off the southbridge or a power management
> > controller. But you haven't told us which one, so any advice we may be able
> > to give you is largely academic.
> > 
> > Do you know the PCI ID of the *function* that implements the SMBus interface
> > in your system? If so, grep through the kernel source and find which driver
> > is attached to it, if any. If not, pciconf -lv is a good place to start.
> 
> Yes, I have all information.
> 
> I need to do the similar thing in kernel:
> pciconf -w -h pci0:31:0 0xf2 0
> 
> Generally according to datashit I have to turn off zero and third bits of 0xf2,
> but in fact zeroing whole 2 bytes of 0xf2 works also. And I'm searching for a
> right place to add this.

Just add-on to my last post.
I found probably correct way to enable SMBus, but I still don't know where to
add the following code:

	pcicfgregs p = {-1, 0, 31, 0};
        pci_cfgwrite(&probe, 0xf2, 0, 2);

Is there any gurus around?

-ip

-- 
"It's Like This"

Even the samurai
have teddy bears,
and even the teddy bears
get drunk.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030820073535.GA331>