Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Update for proplib(3) API changes.



details:   https://anonhg.NetBSD.org/src/rev/4ec0f7969e1a
branches:  trunk
changeset: 934274:4ec0f7969e1a
user:      simonb <simonb%NetBSD.org@localhost>
date:      Wed Jun 10 07:34:19 2020 +0000

description:
Update for proplib(3) API changes.

diffstat:

 sys/arch/evbmips/cavium/autoconf.c  |  18 +++++++++---------
 sys/arch/mips/cavium/dev/if_cnmac.c |  12 ++++++------
 2 files changed, 15 insertions(+), 15 deletions(-)

diffs (101 lines):

diff -r dddb50315c43 -r 4ec0f7969e1a sys/arch/evbmips/cavium/autoconf.c
--- a/sys/arch/evbmips/cavium/autoconf.c        Wed Jun 10 03:39:03 2020 +0000
+++ b/sys/arch/evbmips/cavium/autoconf.c        Wed Jun 10 07:34:19 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.5 2020/05/31 04:56:35 simonb Exp $      */
+/*     $NetBSD: autoconf.c,v 1.6 2020/06/10 07:34:19 simonb Exp $      */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2020/05/31 04:56:35 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.6 2020/06/10 07:34:19 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -131,17 +131,17 @@
        enaddr[3] = (mac_lo >> 16) & 0xff;
        enaddr[4] = (mac_lo >> 8) & 0xff;
        enaddr[5] = mac_lo & 0xff;
-       pd = prop_data_create_data(enaddr, ETHER_ADDR_LEN);
+       pd = prop_data_create_copy(enaddr, ETHER_ADDR_LEN);
        KASSERT(pd != NULL);
        prop_dictionary_set_and_rel(dict, "mac-address", pd);
 
        /* ethernet phy address */
        switch (octeon_btinfo.obt_board_type) {
        case BOARD_TYPE_UBIQUITI_E100:
-               pn = prop_number_create_integer(0x07 - unit);
+               pn = prop_number_create_signed(0x07 - unit);
                break;
        default:
-               pn = prop_number_create_integer(-1);
+               pn = prop_number_create_signed(-1);
                break;
        }
        KASSERT(pn != NULL);
@@ -157,12 +157,12 @@
        /* ethernet rgmii phy dependent timing parameter. */
        switch (octeon_btinfo.obt_board_type) {
        case BOARD_TYPE_UBIQUITI_E100:
-               tx = prop_number_create_integer(16);
-               rx = prop_number_create_integer(0);
+               tx = prop_number_create_signed(16);
+               rx = prop_number_create_signed(0);
                break;
        default:
-               tx = prop_number_create_integer(0);
-               rx = prop_number_create_integer(0);
+               tx = prop_number_create_signed(0);
+               rx = prop_number_create_signed(0);
                break;
        }
        KASSERT(tx != NULL);
diff -r dddb50315c43 -r 4ec0f7969e1a sys/arch/mips/cavium/dev/if_cnmac.c
--- a/sys/arch/mips/cavium/dev/if_cnmac.c       Wed Jun 10 03:39:03 2020 +0000
+++ b/sys/arch/mips/cavium/dev/if_cnmac.c       Wed Jun 10 07:34:19 2020 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: if_cnmac.c,v 1.20 2020/06/05 09:18:35 simonb Exp $     */
+/*     $NetBSD: if_cnmac.c,v 1.21 2020/06/10 07:34:19 simonb Exp $     */
 
 #include <sys/cdefs.h>
 #if 0
-__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.20 2020/06/05 09:18:35 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.21 2020/06/10 07:34:19 simonb Exp $");
 #endif
 
 #include "opt_octeon.h"
@@ -408,10 +408,10 @@
 
        clk = prop_dictionary_get(dict, "rgmii-tx");
        KASSERT(clk != NULL);
-       sc->sc_gmx_port->sc_clk_tx_setting = prop_number_integer_value(clk);
+       sc->sc_gmx_port->sc_clk_tx_setting = prop_number_signed_value(clk);
        clk = prop_dictionary_get(dict, "rgmii-rx");
        KASSERT(clk != NULL);
-       sc->sc_gmx_port->sc_clk_rx_setting = prop_number_integer_value(clk);
+       sc->sc_gmx_port->sc_clk_rx_setting = prop_number_signed_value(clk);
 }
 
 /* ---- submodules */
@@ -505,7 +505,7 @@
        KASSERT(dict != NULL);
        ea = prop_dictionary_get(dict, "mac-address");
        KASSERT(ea != NULL);
-       memcpy(enaddr, prop_data_data_nocopy(ea), size);
+       memcpy(enaddr, prop_data_value(ea), size);
 }
 
 /* ---- media */
@@ -562,7 +562,7 @@
        phy = prop_dictionary_get(device_properties(sc->sc_dev), "phy-addr");
        KASSERT(phy != NULL);
 
-       mii_attach(sc->sc_dev, mii, 0xffffffff, prop_number_integer_value(phy),
+       mii_attach(sc->sc_dev, mii, 0xffffffff, prop_number_signed_value(phy),
            MII_OFFSET_ANY, MIIF_DOPAUSE);
 
        /* XXX XXX XXX */



Home | Main Index | Thread Index | Old Index