From owner-svn-src-head@freebsd.org Sun Oct 30 14:39:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96CFDC25534; Sun, 30 Oct 2016 14:39:34 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66E70145A; Sun, 30 Oct 2016 14:39:34 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9UEdXeU077870; Sun, 30 Oct 2016 14:39:33 GMT (envelope-from jmcneill@FreeBSD.org) Received: (from jmcneill@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9UEdXRX077869; Sun, 30 Oct 2016 14:39:33 GMT (envelope-from jmcneill@FreeBSD.org) Message-Id: <201610301439.u9UEdXRX077869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmcneill set sender to jmcneill@FreeBSD.org using -f From: Jared McNeill Date: Sun, 30 Oct 2016 14:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308105 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Sun, 30 Oct 2016 14:39:34 -0000 Author: jmcneill Date: Sun Oct 30 14:39:33 2016 New Revision: 308105 URL: https://svnweb.freebsd.org/changeset/base/308105 Log: Fix H3 temperature reporting. The formula in for V1.0 of the H3 datasheet seems to be incorrect, so use the same method of conversion as the H3 BSP instead. Modified: head/sys/arm/allwinner/aw_thermal.c Modified: head/sys/arm/allwinner/aw_thermal.c ============================================================================== --- head/sys/arm/allwinner/aw_thermal.c Sun Oct 30 12:15:33 2016 (r308104) +++ head/sys/arm/allwinner/aw_thermal.c Sun Oct 30 14:39:33 2016 (r308105) @@ -109,9 +109,9 @@ __FBSDID("$FreeBSD$"); #define H3_ADC_ACQUIRE_TIME 0x3f #define H3_FILTER 0x6 #define H3_INTC 0x191000 -#define H3_TEMP_BASE 2794000 +#define H3_TEMP_BASE 1794000 #define H3_TEMP_MUL 1000 -#define H3_TEMP_DIV -14882 +#define H3_TEMP_DIV -8253 #define H3_CLK_RATE 4000000 #define TEMP_C_TO_K 273