From owner-svn-src-head@FreeBSD.ORG Fri Aug 8 06:29:30 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEDD6615 for ; Fri, 8 Aug 2014 06:29:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAB14219D for ; Fri, 8 Aug 2014 06:29:30 +0000 (UTC) Received: from nwhitehorn (uid 1171) (envelope-from nwhitehorn@FreeBSD.org) id 2cb1 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Fri, 08 Aug 2014 06:29:30 +0000 From: Nathan Whitehorn Date: Fri, 8 Aug 2014 06:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269702 - head/sys/arm/samsung/exynos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e46e4a.2cb1.29e4e203@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2014 06:29:31 -0000 Author: nwhitehorn Date: Fri Aug 8 06:29:30 2014 New Revision: 269702 URL: http://svnweb.freebsd.org/changeset/base/269702 Log: Use OF_getencprop() in preference to OF_getprop() and manual byte-swapping. Modified: head/sys/arm/samsung/exynos/chrome_kb.c head/sys/arm/samsung/exynos/exynos5_fimd.c head/sys/arm/samsung/exynos/exynos5_usb_phy.c Modified: head/sys/arm/samsung/exynos/chrome_kb.c ============================================================================== --- head/sys/arm/samsung/exynos/chrome_kb.c Fri Aug 8 06:22:32 2014 (r269701) +++ head/sys/arm/samsung/exynos/chrome_kb.c Fri Aug 8 06:29:30 2014 (r269702) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -57,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -741,18 +739,18 @@ parse_dts(struct ckb_softc *sc) if ((len = OF_getproplen(node, "google,key-rows")) <= 0) return (ENXIO); - OF_getprop(node, "google,key-rows", &dts_value, len); - sc->rows = fdt32_to_cpu(dts_value); + OF_getencprop(node, "google,key-rows", &dts_value, len); + sc->rows = dts_value; if ((len = OF_getproplen(node, "google,key-columns")) <= 0) return (ENXIO); - OF_getprop(node, "google,key-columns", &dts_value, len); - sc->cols = fdt32_to_cpu(dts_value); + OF_getencprop(node, "google,key-columns", &dts_value, len); + sc->cols = dts_value; if ((len = OF_getproplen(node, "freebsd,intr-gpio")) <= 0) return (ENXIO); - OF_getprop(node, "freebsd,intr-gpio", &dts_value, len); - sc->gpio = fdt32_to_cpu(dts_value); + OF_getencprop(node, "freebsd,intr-gpio", &dts_value, len); + sc->gpio = dts_value; if (OF_hasprop(node, "freebsd,keymap")) { keymap_prop = "freebsd,keymap"; Modified: head/sys/arm/samsung/exynos/exynos5_fimd.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_fimd.c Fri Aug 8 06:22:32 2014 (r269701) +++ head/sys/arm/samsung/exynos/exynos5_fimd.c Fri Aug 8 06:29:30 2014 (r269702) @@ -50,8 +50,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include -#include #include #include #include @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" #include -#include #include #include @@ -213,37 +212,37 @@ get_panel_info(struct fimd_softc *sc, st /* panel size */ if ((len = OF_getproplen(node, "panel-size")) <= 0) return (ENXIO); - OF_getprop(node, "panel-size", &dts_value, len); - panel->width = fdt32_to_cpu(dts_value[0]); - panel->height = fdt32_to_cpu(dts_value[1]); + OF_getencprop(node, "panel-size", dts_value, len); + panel->width = dts_value[0]; + panel->height = dts_value[1]; /* hsync */ if ((len = OF_getproplen(node, "panel-hsync")) <= 0) return (ENXIO); - OF_getprop(node, "panel-hsync", &dts_value, len); - panel->h_back_porch = fdt32_to_cpu(dts_value[0]); - panel->h_pulse_width = fdt32_to_cpu(dts_value[1]); - panel->h_front_porch = fdt32_to_cpu(dts_value[2]); + OF_getencprop(node, "panel-hsync", dts_value, len); + panel->h_back_porch = dts_value[0]; + panel->h_pulse_width = dts_value[1]; + panel->h_front_porch = dts_value[2]; /* vsync */ if ((len = OF_getproplen(node, "panel-vsync")) <= 0) return (ENXIO); - OF_getprop(node, "panel-vsync", &dts_value, len); - panel->v_back_porch = fdt32_to_cpu(dts_value[0]); - panel->v_pulse_width = fdt32_to_cpu(dts_value[1]); - panel->v_front_porch = fdt32_to_cpu(dts_value[2]); + OF_getencprop(node, "panel-vsync", dts_value, len); + panel->v_back_porch = dts_value[0]; + panel->v_pulse_width = dts_value[1]; + panel->v_front_porch = dts_value[2]; /* clk divider */ if ((len = OF_getproplen(node, "panel-clk-div")) <= 0) return (ENXIO); - OF_getprop(node, "panel-clk-div", &dts_value, len); - panel->clk_div = fdt32_to_cpu(dts_value[0]); + OF_getencprop(node, "panel-clk-div", dts_value, len); + panel->clk_div = dts_value[0]; /* backlight pin */ if ((len = OF_getproplen(node, "panel-backlight-pin")) <= 0) return (ENXIO); - OF_getprop(node, "panel-backlight-pin", &dts_value, len); - panel->backlight_pin = fdt32_to_cpu(dts_value[0]); + OF_getencprop(node, "panel-backlight-pin", dts_value, len); + panel->backlight_pin = dts_value[0]; return (0); } Modified: head/sys/arm/samsung/exynos/exynos5_usb_phy.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_usb_phy.c Fri Aug 8 06:22:32 2014 (r269701) +++ head/sys/arm/samsung/exynos/exynos5_usb_phy.c Fri Aug 8 06:29:30 2014 (r269702) @@ -43,13 +43,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include -#include #include #include @@ -158,8 +156,8 @@ vbus_on(struct usb_phy_softc *sc) /* Power pin */ if ((len = OF_getproplen(node, "vbus-supply")) <= 0) return (-1); - OF_getprop(node, "vbus-supply", &dts_value, len); - pin = fdt32_to_cpu(dts_value[0]); + OF_getencprop(node, "vbus-supply", dts_value, len); + pin = dts_value[0]; gpio_dev = devclass_get_device(devclass_find("gpio"), 0); if (gpio_dev == NULL) {