Module Name: src Committed By: pgoyette Date: Sun Jul 10 04:44:47 UTC 2016
Modified Files: src/share/man/man4: piixpm.4 src/sys/dev/pci: piixpm.c Log Message: The piixpm(4) driver also supports AMD's HUDSON chipset's SMBus function. >From OpenBSD, verified. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/piixpm.4 cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/piixpm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/man/man4/piixpm.4 diff -u src/share/man/man4/piixpm.4:1.6 src/share/man/man4/piixpm.4:1.7 --- src/share/man/man4/piixpm.4:1.6 Tue Mar 18 18:20:39 2014 +++ src/share/man/man4/piixpm.4 Sun Jul 10 04:44:47 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: piixpm.4,v 1.6 2014/03/18 18:20:39 riastradh Exp $ +.\" $NetBSD: piixpm.4,v 1.7 2016/07/10 04:44:47 pgoyette Exp $ .\" $OpenBSD: piixpm.4,v 1.9 2006/01/18 03:06:33 brad Exp $ .\" .\" Copyright (c) 2004, 2005 Alexander Yurchenko <gra...@openbsd.org> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd March 26, 2008 +.Dd July 10, 2016 .Dt PIIXPM 4 .Os .Sh NAME @@ -42,6 +42,8 @@ ATI SB200, SB300, SB400, SB600, SB700, S Intel 82371AB (PIIX4), 82440MX .It Serverworks OSB4, OSB5, OSB6, HT1000SB +.It +AMD HUDSON .El .Sh SEE ALSO .Xr iic 4 , Index: src/sys/dev/pci/piixpm.c diff -u src/sys/dev/pci/piixpm.c:1.47 src/sys/dev/pci/piixpm.c:1.48 --- src/sys/dev/pci/piixpm.c:1.47 Thu Dec 10 05:29:41 2015 +++ src/sys/dev/pci/piixpm.c Sun Jul 10 04:44:47 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: piixpm.c,v 1.47 2015/12/10 05:29:41 pgoyette Exp $ */ +/* $NetBSD: piixpm.c,v 1.48 2016/07/10 04:44:47 pgoyette Exp $ */ /* $OpenBSD: piixpm.c,v 1.20 2006/02/27 08:25:02 grange Exp $ */ /* @@ -22,7 +22,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.47 2015/12/10 05:29:41 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.48 2016/07/10 04:44:47 pgoyette Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -144,6 +144,11 @@ piixpm_match(device_t parent, cfdata_t m case PCI_PRODUCT_SERVERWORKS_HT1000SB: return 1; } + case PCI_VENDOR_AMD: + switch (PCI_PRODUCT(pa->pa_id)) { + case PCI_PRODUCT_AMD_HUDSON_SMB: + return 1; + } } return 0; @@ -205,7 +210,15 @@ piixpm_attach(device_t parent, device_t nopowermanagement: - /* SB800 rev 0x40+ needs special initialization */ + /* SB800 rev 0x40+ and AMD HUDSON need special initialization */ + if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_AMD && + PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_AMD_HUDSON_SMB) { + if (piixpm_sb800_init(sc) == 0) { + goto attach_i2c; + } + aprint_normal_dev(self, "SMBus initialization failed\n"); + return; + } if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_ATI && PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ATI_SB600_SMB && PCI_REVISION(pa->pa_class) >= 0x40) { @@ -213,7 +226,7 @@ nopowermanagement: sc->sc_numbusses = 4; goto attach_i2c; } - aprint_normal_dev(self, "SMBus disabled\n"); + aprint_normal_dev(self, "SMBus initialization failed\n"); return; }