From owner-freebsd-acpi@FreeBSD.ORG Tue Sep 8 20:09:37 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E83F3106568F; Tue, 8 Sep 2009 20:09:37 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 03D4D8FC12; Tue, 8 Sep 2009 20:09:36 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA07503; Tue, 08 Sep 2009 23:09:34 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1] helo=edge.pp.kiev.ua) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Ml70Q-0001Cl-HD; Tue, 08 Sep 2009 23:09:34 +0300 Message-ID: <4AA6B9FC.1070205@freebsd.org> Date: Tue, 08 Sep 2009 23:09:32 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.22 (X11/20090723) MIME-Version: 1.0 To: John Baldwin References: <4AA41D4A.4080805@freebsd.org> <200909081335.50980.jhb@freebsd.org> In-Reply-To: <200909081335.50980.jhb@freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: intpm: add support for AMD SBxxx SMBus controller X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 20:09:38 -0000 on 08/09/2009 20:35 John Baldwin said the following: > On Sunday 06 September 2009 4:36:26 pm Andriy Gapon wrote: >> Please review the included patch that adds support from SMBus controller found >> in AMD SB600/700/710/750 south-bridges (not sure about SB800). >> As I understand, this controller works only in polling mode, so support for this >> mode was enabled in the code. >> >> There are two places that I was not sure about, so I marked them with XXX. >> The static variable intsmb_cfg_irq9 would be problematic if there are multiple >> SMBus controllers in a system. > > I would move this into the softc and set it in the attach() routine by > duplicating that bit of the switch() statement in attach(). OK, thank you for the idea. >> Also, PCI_INTR_SMB_IRQ_AMD is probably not the best name. Maybe something like >> PCI_INTR_SMB_IRQ_OTHER or just PCI_INTR_SMB_IRQ would be better? > > I would maybe just change the driver to print the value in hex instead of > bogus and not add a #define for '2'. The PIIX4 datasheet says '2' is a > reserved value for that field FWIW. But, OTOH, SB700 datasheet says '2' is a regular interrupt. Although it is quite unclear from that datasheet what that interrupt might be and if interrupt-driven configuration is possible at all. -- Andriy Gapon