summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/ofwi2c.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-06-14 01:15:20 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-06-14 01:15:20 +0000
commit45923ad8dcc1575cd5409dcbae1eaa9af4dcb692 (patch)
tree1afde14edd65ab5f223742281df64fa45b02713c /sys/arch/sparc64/dev/ofwi2c.c
parent885d192adb7db427b5e2d7f0227e94844c0fa6cc (diff)
support the iic busses on the ultrasparc III machines (something is still
wrong, likely clocking); tested to not break older machines by dlg & djm
Diffstat (limited to 'sys/arch/sparc64/dev/ofwi2c.c')
-rw-r--r--sys/arch/sparc64/dev/ofwi2c.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/sparc64/dev/ofwi2c.c b/sys/arch/sparc64/dev/ofwi2c.c
index d56c2e90485..bca19895827 100644
--- a/sys/arch/sparc64/dev/ofwi2c.c
+++ b/sys/arch/sparc64/dev/ofwi2c.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofwi2c.c,v 1.3 2006/02/09 12:16:25 dlg Exp $ */
+/* $OpenBSD: ofwi2c.c,v 1.4 2006/06/14 01:15:19 deraadt Exp $ */
/*
* Copyright (c) 2006 Theo de Raadt
@@ -46,7 +46,8 @@ ofwiic_pci_scan(struct device *self, struct i2cbus_attach_args *iba, void *aux)
if (name[0] == '\0')
continue;
- if (strcmp(name, "i2c-smbus") == 0)
+ if (strcmp(name, "i2c-smbus") == 0 ||
+ strcmp(name, "i2c") == 0)
ofwiic_scan(self, iba, &node);
}
}
@@ -75,7 +76,7 @@ ofwiic_scan(struct device *self, struct i2cbus_attach_args *iba, void *aux)
memset(&ia, 0, sizeof(ia));
ia.ia_tag = iba->iba_tag;
- ia.ia_addr = reg[1] >> 1;
+ ia.ia_addr = (reg[0] << 7) | (reg[1] >> 1);
ia.ia_name = name;
ia.ia_cookie = &node;