summaryrefslogtreecommitdiff
path: root/sys/arch/armv7/imx/imxocotp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/armv7/imx/imxocotp.c')
-rw-r--r--sys/arch/armv7/imx/imxocotp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/arch/armv7/imx/imxocotp.c b/sys/arch/armv7/imx/imxocotp.c
index f9d78811c68..e4cd7973223 100644
--- a/sys/arch/armv7/imx/imxocotp.c
+++ b/sys/arch/armv7/imx/imxocotp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxocotp.c,v 1.2 2013/11/06 19:03:07 syl Exp $ */
+/* $OpenBSD: imxocotp.c,v 1.3 2016/08/14 19:08:44 kettenis Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
*
@@ -30,6 +30,9 @@
#include <armv7/imx/imxocotpvar.h>
/* registers */
+#define OCOTP_ANA0 0x4d0
+#define OCOTP_ANA1 0x4e0
+#define OCOTP_ANA2 0x4f0
#define OCOTP_MAC0 0x620
#define OCOTP_MAC1 0x630
@@ -80,3 +83,9 @@ imxocotp_get_ethernet_address(u_int8_t* mac)
mac[1] = value & 0xff;
mac[0] = (value >> 8) & 0xff;
}
+
+uint32_t
+imxocotp_get_temperature_calibration(void)
+{
+ return bus_space_read_4(imxocotp_sc->sc_iot, imxocotp_sc->sc_ioh, OCOTP_ANA1);
+}