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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to