summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-11-16 00:09:32 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-11-16 00:09:32 +0000
commit6e7040a382a4960b942e4ccd16c90f91039cc824 (patch)
treee244b50f9f1f978e7cca144107ca6228263d1574 /sys/arch
parentf107fd127d1e8d610de6fece78f1f18af52b6afb (diff)
some older apple machines did not have a 'regs' property for i2c devices,
but 'i2c-address'. some have both. crazy. ok drahn
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/dev/maci2c.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/macppc/dev/maci2c.c b/sys/arch/macppc/dev/maci2c.c
index 5b99452f577..554e543b9f8 100644
--- a/sys/arch/macppc/dev/maci2c.c
+++ b/sys/arch/macppc/dev/maci2c.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maci2c.c,v 1.2 2005/11/15 16:23:34 deraadt Exp $ */
+/* $OpenBSD: maci2c.c,v 1.3 2005/11/16 00:09:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -55,7 +55,8 @@ maciic_attach(struct device *parent, struct device *self, void *aux)
printf("\n");
for (node = OF_child(iba->iba_node); node; node = OF_peer(node)) {
- if (OF_getprop(node, "reg", &reg, sizeof reg) != sizeof reg)
+ if (OF_getprop(node, "reg", &reg, sizeof reg) != sizeof reg &&
+ OF_getprop(node, "i2c-address", &reg, sizeof reg) != sizeof reg)
continue;
ia.ia_tag = iba->iba_tag;
ia.ia_addr = (reg >> 1);