From 5c6a275d22890d00126f51fb7cbff1aa01948aca Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 1 Jan 2006 20:52:29 +0000 Subject: switch from macppc-specific maciic(4) driver to the generic iic(4), after teaching it to use a function pointer to get back to the OFW scan.. this will also help the sparc64 later; ok kettenis --- sys/dev/pci/alipm.c | 5 +++-- sys/dev/pci/amdiic.c | 5 +++-- sys/dev/pci/ichiic.c | 5 +++-- sys/dev/pci/piixpm.c | 5 +++-- sys/dev/pci/viapm.c | 5 +++-- 5 files changed, 15 insertions(+), 10 deletions(-) (limited to 'sys/dev/pci') diff --git a/sys/dev/pci/alipm.c b/sys/dev/pci/alipm.c index dc0ba3885a5..4c7588a3156 100644 --- a/sys/dev/pci/alipm.c +++ b/sys/dev/pci/alipm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alipm.c,v 1.3 2005/12/27 20:42:38 kettenis Exp $ */ +/* $OpenBSD: alipm.c,v 1.4 2006/01/01 20:52:26 deraadt Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -211,9 +211,10 @@ alipm_attach(struct device *parent, struct device *self, void *aux) sc->sc_smb_tag.ic_acquire_bus = alipm_smb_acquire_bus; sc->sc_smb_tag.ic_release_bus = alipm_smb_release_bus; sc->sc_smb_tag.ic_exec = alipm_smb_exec; + + bzero(&iba, sizeof iba); iba.iba_name = "iic"; iba.iba_tag = &sc->sc_smb_tag; - iba.iba_scan = 1; config_found(&sc->sc_dev, &iba, iicbus_print); } diff --git a/sys/dev/pci/amdiic.c b/sys/dev/pci/amdiic.c index 2f47ff88340..55430a6e0bc 100644 --- a/sys/dev/pci/amdiic.c +++ b/sys/dev/pci/amdiic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdiic.c,v 1.1 2005/12/31 06:20:22 grange Exp $ */ +/* $OpenBSD: amdiic.c,v 1.2 2006/01/01 20:52:26 deraadt Exp $ */ /* * Copyright (c) 2005 Alexander Yurchenko @@ -186,9 +186,10 @@ amdiic_attach(struct device *parent, struct device *self, void *aux) sc->sc_i2c_tag.ic_acquire_bus = amdiic_i2c_acquire_bus; sc->sc_i2c_tag.ic_release_bus = amdiic_i2c_release_bus; sc->sc_i2c_tag.ic_exec = amdiic_i2c_exec; + + bzero(&iba, sizeof iba); iba.iba_name = "iic"; iba.iba_tag = &sc->sc_i2c_tag; - iba.iba_scan = 1; config_found(self, &iba, iicbus_print); return; diff --git a/sys/dev/pci/ichiic.c b/sys/dev/pci/ichiic.c index 1a834e0d741..263a345e3be 100644 --- a/sys/dev/pci/ichiic.c +++ b/sys/dev/pci/ichiic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ichiic.c,v 1.5 2005/12/25 18:46:24 grange Exp $ */ +/* $OpenBSD: ichiic.c,v 1.6 2006/01/01 20:52:26 deraadt Exp $ */ /* * Copyright (c) 2005 Alexander Yurchenko @@ -160,9 +160,10 @@ ichiic_attach(struct device *parent, struct device *self, void *aux) sc->sc_i2c_tag.ic_acquire_bus = ichiic_i2c_acquire_bus; sc->sc_i2c_tag.ic_release_bus = ichiic_i2c_release_bus; sc->sc_i2c_tag.ic_exec = ichiic_i2c_exec; + + bzero(&iba, sizeof iba); iba.iba_name = "iic"; iba.iba_tag = &sc->sc_i2c_tag; - iba.iba_scan = 1; config_found(self, &iba, iicbus_print); return; diff --git a/sys/dev/pci/piixpm.c b/sys/dev/pci/piixpm.c index a9abf0c22d7..6bde78086b5 100644 --- a/sys/dev/pci/piixpm.c +++ b/sys/dev/pci/piixpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: piixpm.c,v 1.8 2005/12/28 20:10:44 grange Exp $ */ +/* $OpenBSD: piixpm.c,v 1.9 2006/01/01 20:52:27 deraadt Exp $ */ /* * Copyright (c) 2005 Alexander Yurchenko @@ -159,9 +159,10 @@ piixpm_attach(struct device *parent, struct device *self, void *aux) sc->sc_i2c_tag.ic_acquire_bus = piixpm_i2c_acquire_bus; sc->sc_i2c_tag.ic_release_bus = piixpm_i2c_release_bus; sc->sc_i2c_tag.ic_exec = piixpm_i2c_exec; + + bzero(&iba, sizeof iba); iba.iba_name = "iic"; iba.iba_tag = &sc->sc_i2c_tag; - iba.iba_scan = 1; config_found(self, &iba, iicbus_print); return; diff --git a/sys/dev/pci/viapm.c b/sys/dev/pci/viapm.c index 13dd90ee1f9..80fb6f86eb4 100644 --- a/sys/dev/pci/viapm.c +++ b/sys/dev/pci/viapm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viapm.c,v 1.3 2006/01/01 18:40:08 kettenis Exp $ */ +/* $OpenBSD: viapm.c,v 1.4 2006/01/01 20:52:27 deraadt Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -204,9 +204,10 @@ viapm_attach(struct device *parent, struct device *self, void *aux) sc->sc_i2c_tag.ic_acquire_bus = viapm_i2c_acquire_bus; sc->sc_i2c_tag.ic_release_bus = viapm_i2c_release_bus; sc->sc_i2c_tag.ic_exec = viapm_i2c_exec; + + bzero(&iba, sizeof iba); iba.iba_name = "iic"; iba.iba_tag = &sc->sc_i2c_tag; - iba.iba_scan = 1; config_found(self, &iba, iicbus_print); return; -- cgit v1.2.3