Deleted Added
full compact
mv_ts.c (281085) mv_ts.c (300421)
1/*-
2 * Copyright (c) 2012 Hiroki Sato <hrs@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * Driver for on-die thermal sensor in 88F6282 and 88F6283.
27 */
28
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2012 Hiroki Sato <hrs@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * Driver for on-die thermal sensor in 88F6282 and 88F6283.
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/arm/mv/mv_ts.c 281085 2015-04-04 21:34:26Z andrew $");
30__FBSDID("$FreeBSD: head/sys/arm/mv/mv_ts.c 300421 2016-05-22 13:58:32Z loos $");
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/module.h>
36#include <sys/bus.h>
37#include <sys/sysctl.h>
38

--- 36 unchanged lines hidden (view full) ---

75
76 return (0);
77}
78
79#define MV_TEMP_VALID_BIT (1 << 9)
80#define MV_TEMP_SENS_OFFS 10
81#define MV_TEMP_SENS_MASK 0x1ff
82#define MV_TEMP_SENS_READ_MAX 16
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/module.h>
36#include <sys/bus.h>
37#include <sys/sysctl.h>
38

--- 36 unchanged lines hidden (view full) ---

75
76 return (0);
77}
78
79#define MV_TEMP_VALID_BIT (1 << 9)
80#define MV_TEMP_SENS_OFFS 10
81#define MV_TEMP_SENS_MASK 0x1ff
82#define MV_TEMP_SENS_READ_MAX 16
83#define TZ_ZEROC 2732
83#define TZ_ZEROC 2731
84#define MV_TEMP_CONVERT(x) ((((322 - x) * 100000) / 13625) + TZ_ZEROC)
85
86/*
87 * MSB LSB
88 * 0000 0000 0000 0000 0000 0000 0000 0000
89 * ^- valid bit
90 * |---------|
91 * ^--- temperature (9 bits)

--- 89 unchanged lines hidden ---
84#define MV_TEMP_CONVERT(x) ((((322 - x) * 100000) / 13625) + TZ_ZEROC)
85
86/*
87 * MSB LSB
88 * 0000 0000 0000 0000 0000 0000 0000 0000
89 * ^- valid bit
90 * |---------|
91 * ^--- temperature (9 bits)

--- 89 unchanged lines hidden ---