From owner-svn-src-all@FreeBSD.ORG Wed Oct 23 14:06:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EECA9421; Wed, 23 Oct 2013 14:06:41 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC2A921A4; Wed, 23 Oct 2013 14:06:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9NE6ffa099619; Wed, 23 Oct 2013 14:06:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9NE6fEA099618; Wed, 23 Oct 2013 14:06:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201310231406.r9NE6fEA099618@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 23 Oct 2013 14:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256969 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2013 14:06:42 -0000 Author: nwhitehorn Date: Wed Oct 23 14:06:41 2013 New Revision: 256969 URL: http://svnweb.freebsd.org/changeset/base/256969 Log: Use OF_getencprop() in preference to OF_getprop() for numerical quantities. Since all supported PowerPC systems are big-endian, this is a no-op, but this is preparatory work to moving this to /sys/dev/ofw. Modified: head/sys/powerpc/powerpc/nexus.c Modified: head/sys/powerpc/powerpc/nexus.c ============================================================================== --- head/sys/powerpc/powerpc/nexus.c Wed Oct 23 14:06:07 2013 (r256968) +++ head/sys/powerpc/powerpc/nexus.c Wed Oct 23 14:06:41 2013 (r256969) @@ -248,9 +248,9 @@ nexus_attach(device_t dev) * Some important numbers */ sc->acells = 2; - OF_getprop(node, "#address-cells", &sc->acells, sizeof(sc->acells)); + OF_getencprop(node, "#address-cells", &sc->acells, sizeof(sc->acells)); sc->scells = 1; - OF_getprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); + OF_getencprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); /* * Now walk the OFW tree and attach top-level devices. @@ -564,7 +564,7 @@ nexus_setup_dinfo(device_t dev, phandle_ } resource_list_init(&ndi->ndi_rl); - nreg = OF_getprop_alloc(node, "reg", sizeof(*reg), (void **)®); + nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); if (nreg == -1) nreg = 0; if (nreg % (sc->acells + sc->scells) != 0) { @@ -591,7 +591,7 @@ nexus_setup_dinfo(device_t dev, phandle_ } free(reg, M_OFWPROP); - nintr = OF_getprop_alloc(node, "interrupts", sizeof(*intr), + nintr = OF_getencprop_alloc(node, "interrupts", sizeof(*intr), (void **)&intr); if (nintr > 0) { iparent = 0;