Module Name:    src
Committed By:   thorpej
Date:           Fri Jul 22 19:57:25 UTC 2022

Modified Files:
        src/sys/arch/evbppc/mpc85xx: machdep.c

Log Message:
Stop using deprecated proplib functions.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/evbppc/mpc85xx/machdep.c

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

Modified files:

Index: src/sys/arch/evbppc/mpc85xx/machdep.c
diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.45 src/sys/arch/evbppc/mpc85xx/machdep.c:1.46
--- src/sys/arch/evbppc/mpc85xx/machdep.c:1.45	Thu Mar  3 06:28:04 2022
+++ src/sys/arch/evbppc/mpc85xx/machdep.c	Fri Jul 22 19:57:25 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.45 2022/03/03 06:28:04 riastradh Exp $	*/
+/*	$NetBSD: machdep.c,v 1.46 2022/07/22 19:57:25 thorpej Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.45 2022/03/03 06:28:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.46 2022/07/22 19:57:25 thorpej Exp $");
 
 #include "opt_altivec.h"
 #include "opt_ddb.h"
@@ -305,7 +305,10 @@ static const struct cpunode_locators mpc
 		1 + ilog2(DEVDISR_TSEC4),
 		{ SVR_MPC8548v1 >> 16, SVR_MPC8572v1 >> 16 } },
 #endif
-	{ "diic", I2C1_BASE, 2*I2C_SIZE, 0,
+	{ "diic", I2C1_BASE, I2C_SIZE, 0,
+		1, { ISOURCE_I2C },
+		1 + ilog2(DEVDISR_I2C) },
+	{ "diic", I2C2_BASE, I2C_SIZE, 1,
 		1, { ISOURCE_I2C },
 		1 + ilog2(DEVDISR_I2C) },
 	/* MPC8572 doesn't have any GPIO */
@@ -1352,7 +1355,7 @@ mpc85xx_extirq_setup(void)
 #endif
 	prop_array_t extirqs = prop_array_create_with_capacity(n);
 	for (u_int i = 0; i < n; i++) {
-		prop_string_t ps = prop_string_create_cstring_nocopy(names[i]);
+		prop_string_t ps = prop_string_create_nocopy(names[i]);
 		prop_array_set(extirqs, i, ps);
 		prop_object_release(ps);
 	}
@@ -1365,13 +1368,13 @@ mpc85xx_pci_setup(const char *name, uint
 {
 	prop_dictionary_t pci_intmap = prop_dictionary_create();
 	KASSERT(pci_intmap != NULL);
-	prop_number_t mask = prop_number_create_unsigned_integer(intmask);
+	prop_number_t mask = prop_number_create_unsigned(intmask);
 	KASSERT(mask != NULL);
 	prop_dictionary_set(pci_intmap, "interrupt-mask", mask);
 	prop_object_release(mask);
-	prop_number_t pn_ist = prop_number_create_unsigned_integer(ist);
+	prop_number_t pn_ist = prop_number_create_unsigned(ist);
 	KASSERT(pn_ist != NULL);
-	prop_number_t pn_intr = prop_number_create_unsigned_integer(inta);
+	prop_number_t pn_intr = prop_number_create_unsigned(inta);
 	KASSERT(pn_intr != NULL);
 	prop_dictionary_t entry = prop_dictionary_create();
 	KASSERT(entry != NULL);
@@ -1388,7 +1391,7 @@ mpc85xx_pci_setup(const char *name, uint
 		snprintf(prop_name, sizeof(prop_name), "%06x", i + intrinc);
 		entry = prop_dictionary_create();
 		KASSERT(entry != NULL);
-		pn_intr = prop_number_create_unsigned_integer(va_arg(ap, u_int));
+		pn_intr = prop_number_create_unsigned(va_arg(ap, u_int));
 		KASSERT(pn_intr != NULL);
 		prop_dictionary_set(entry, "interrupt", pn_intr);
 		prop_dictionary_set(entry, "type", pn_ist);

Reply via email to