From owner-freebsd-acpi@FreeBSD.ORG Tue Aug 25 22:47:00 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 76FFC106568C; Tue, 25 Aug 2009 22:47:00 +0000 (UTC) (envelope-from kindman@amc-os.com) Received: from smtpfb2-g21.free.fr (smtpfb2-g21.free.fr [212.27.42.10]) by mx1.freebsd.org (Postfix) with ESMTP id 7A89A8FC18; Tue, 25 Aug 2009 22:46:57 +0000 (UTC) Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by smtpfb2-g21.free.fr (Postfix) with ESMTP id 35036D1A198; Wed, 26 Aug 2009 00:27:59 +0200 (CEST) Received: from smtp4-g21.free.fr (localhost [127.0.0.1]) by smtp4-g21.free.fr (Postfix) with ESMTP id 19DE94C8090; Wed, 26 Aug 2009 00:27:50 +0200 (CEST) Received: from kindman (blackforest.amc-os.net [88.174.102.207]) by smtp4-g21.free.fr (Postfix) with SMTP id E7C894C8072; Wed, 26 Aug 2009 00:27:47 +0200 (CEST) Message-ID: <604B96C6CF22447EACE5BD9719DDE1F5@kindman> From: "Aurélien Méré" To: "Andriy Gapon" , , References: <4A9412ED.6080309@freebsd.org> <4A94242B.7090806@freebsd.org> Date: Wed, 26 Aug 2009 00:27:41 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Original Cc: Subject: Re: AMD SB700 SMBus controller driver 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, 25 Aug 2009 22:47:00 -0000 Could you please forward me the patch to make it work in polling mode ? I'd like to test it as I've been trying to make intpm work with a SB400 (which should be quite the same as yours) but system hangs when I try to force polling mode (didn't have the specs nor all the differences you just presented). And btw, I didn't find any implementation using interrupt neither but I'm ready to test your updated version. Thanks, Aurélien ----- Original Message ----- From: "Andriy Gapon" To: ; Sent: Tuesday, August 25, 2009 7:49 PM Subject: AMD SB700 SMBus controller driver > > According to SB700 specifications its SMBus controller is very similar to > one in > PIIX4. > The differences that I see so far: > > 1. Interrupt Line/Interrupt Pin PCI configuration registers (0x3c, 0x3d) > do not > specify interrupt number that the controller could use: >> This register specifies which interrupt pin the device issue >> This module does not generate interrupt but contains the >> actual interrupt controller. This register is hardcoded to 0. > > 2. I2CbusConfig register (0xd2) uses bit #1 to indicate whether SMI or > regular > interrupt is used in interrupt mode; PIIX4 uses bit 3. > > I couldn't get our intpm driver to work with this hardware by simply > adding PCI id > and tweaking 0xd2 bits meaning. > > I could get it to work by forcing polling mode. It appears that Linux > driver for > this HW always uses polling mode, and OpenBSD and NetBSD drivers would use > it with > this HW too. > > I am still trying to get interrupt mode to work. > I set 0xd2 to enable regular interrupt generation (it is set to SMI after > boot). > SB700 specifications say at one place that SMB interrupt is connected to > INTIN20 > pin of IO-APIC in APIC mode. I tried setting up IRQ20 in the driver but no > interrupts are generated. And there are no stray interrupts either. > So I am not sure - either this HW doesn't generate normal interrupts at > all, or > they to a different pin, or additional setup is required, or I am doing > something > wrong. > > Anyway, I plan to produce an updated version of intpm driver with > possibility of > forced or auto-detected polling mode and support for PCI id of SB700 SMBus > controller and its peculiarities. > > -- > Andriy Gapon > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >