]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/dtt.h
Add PCI support for MPC8250 Boards (PM825 module)
[karo-tx-uboot.git] / include / dtt.h
1 /*
2  * (C) Copyright 2001
3  * Erik Theisen,  Wave 7 Optics, etheisen@mindspring.com.
4  *
5  * See file CREDITS for list of people who contributed to this
6  * project.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of
11  * the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21  * MA 02111-1307 USA
22  */
23
24 /*
25  * Digital Thermometers and Thermostats.
26  */
27 #ifndef _DTT_H_
28 #define _DTT_H_
29
30 #if defined(CONFIG_DTT_LM75) || defined(CONFIG_DTT_DS1621)
31 #define CONFIG_DTT                              /* We have a DTT */
32
33 #define DTT_COMMERCIAL_MAX_TEMP 70              /* 0 - +70 C */
34 #define DTT_INDUSTRIAL_MAX_TEMP 85              /* -40 - +85 C */
35 #define DTT_AUTOMOTIVE_MAX_TEMP 105             /* -40 - +105 C */
36 #ifndef CFG_DTT_MAX_TEMP
37 #define CFG_DTT_MAX_TEMP DTT_COMMERCIAL_MAX_TEMP
38 #endif
39 #ifndef CFG_DTT_HYSTERESIS
40 #define CFG_DTT_HYSTERESIS      5               /* 5 C */
41 #endif
42
43 extern int dtt_init (void);
44 extern int dtt_read(int sensor, int reg);
45 extern int dtt_write(int sensor, int reg, int val);
46 extern int dtt_get_temp(int sensor);
47 #endif
48
49 #if defined(CONFIG_DTT_LM75)
50 #define DTT_READ_TEMP           0x0
51 #define DTT_CONFIG              0x1
52 #define DTT_TEMP_HYST           0x2
53 #define DTT_TEMP_SET            0x3
54 #endif
55
56 #if defined(CONFIG_DTT_DS1621)
57 #define DTT_READ_TEMP           0xAA
58 #define DTT_READ_COUNTER        0xA8
59 #define DTT_READ_SLOPE          0xA9
60 #define DTT_WRITE_START_CONV    0xEE
61 #define DTT_WRITE_STOP_CONV     0x22
62 #define DTT_TEMP_HIGH           0xA1
63 #define DTT_TEMP_LOW            0xA2
64 #define DTT_CONFIG              0xAC
65 #endif
66
67 #endif /* _DTT_H_ */