Module Name:    src
Committed By:   jmcneill
Date:           Sun Dec 13 11:51:13 UTC 2015

Modified Files:
        src/sys/dev/ofw: ofw_subr.c openfirm.h

Log Message:
add an addr_shift parameter to of_enter_i2c_devs


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ofw/ofw_subr.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ofw/openfirm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ofw/ofw_subr.c
diff -u src/sys/dev/ofw/ofw_subr.c:1.25 src/sys/dev/ofw/ofw_subr.c:1.26
--- src/sys/dev/ofw/ofw_subr.c:1.25	Sun Dec 13 11:00:01 2015
+++ src/sys/dev/ofw/ofw_subr.c	Sun Dec 13 11:51:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw_subr.c,v 1.25 2015/12/13 11:00:01 jmcneill Exp $	*/
+/*	$NetBSD: ofw_subr.c,v 1.26 2015/12/13 11:51:13 jmcneill Exp $	*/
 
 /*
  * Copyright 1998
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.25 2015/12/13 11:00:01 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.26 2015/12/13 11:51:13 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -377,7 +377,8 @@ of_get_mode_string(char *buffer, int len
  * This is used by the i2c bus attach code to do direct configuration.
  */
 void
-of_enter_i2c_devs(prop_dictionary_t props, int ofnode, size_t cell_size)
+of_enter_i2c_devs(prop_dictionary_t props, int ofnode, size_t cell_size,
+    int addr_shift)
 {
 	int node, len;
 	char name[32], compatible[32];
@@ -412,7 +413,7 @@ of_enter_i2c_devs(prop_dictionary_t prop
 		} else {
 			continue;
 		}
-		addr >>= 1;
+		addr >>= addr_shift;
 		if (addr == 0) continue;
 
 		if (array == NULL)

Index: src/sys/dev/ofw/openfirm.h
diff -u src/sys/dev/ofw/openfirm.h:1.31 src/sys/dev/ofw/openfirm.h:1.32
--- src/sys/dev/ofw/openfirm.h:1.31	Sat Dec 12 22:22:51 2015
+++ src/sys/dev/ofw/openfirm.h	Sun Dec 13 11:51:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: openfirm.h,v 1.31 2015/12/12 22:22:51 jmcneill Exp $	*/
+/*	$NetBSD: openfirm.h,v 1.32 2015/12/13 11:51:13 jmcneill Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -118,6 +118,6 @@ boolean_t	of_to_dataprop(prop_dictionary
 int	*of_network_decode_media(int, int *, int *);
 char	*of_get_mode_string(char *, int);
 
-void	of_enter_i2c_devs(prop_dictionary_t, int, size_t);
+void	of_enter_i2c_devs(prop_dictionary_t, int, size_t, int);
 
 #endif /*_OPENFIRM_H_*/

Reply via email to