Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Oct 2016 14:39:33 +0000 (UTC)
From:      Jared McNeill <jmcneill@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r308105 - head/sys/arm/allwinner
Message-ID:  <201610301439.u9UEdXRX077869@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610301439.u9UEdXRX077869>