xref: /openbmc/linux/arch/m68k/include/asm/intersil.h (revision b4e18b29)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _SUN3_INTERSIL_H
3 #define _SUN3_INTERSIL_H
4 /* bits 0 and 1 */
5 #define INTERSIL_FREQ_32K        0x00
6 #define INTERSIL_FREQ_1M         0x01
7 #define INTERSIL_FREQ_2M         0x02
8 #define INTERSIL_FREQ_4M         0x03
9 
10 /* bit 2 */
11 #define INTERSIL_12H_MODE   0x00
12 #define INTERSIL_24H_MODE   0x04
13 
14 /* bit 3 */
15 #define INTERSIL_STOP            0x00
16 #define INTERSIL_RUN             0x08
17 
18 /* bit 4 */
19 #define INTERSIL_INT_ENABLE     0x10
20 #define INTERSIL_INT_DISABLE    0x00
21 
22 /* bit 5 */
23 #define INTERSIL_MODE_NORMAL     0x00
24 #define INTERSIL_MODE_TEST       0x20
25 
26 #define INTERSIL_HZ_100_MASK	 0x02
27 
28 struct intersil_dt {
29 	unsigned char	csec;
30 	unsigned char	hour;
31 	unsigned char	minute;
32 	unsigned char	second;
33 	unsigned char	month;
34 	unsigned char	day;
35 	unsigned char	year;
36 	unsigned char	weekday;
37 };
38 
39 struct intersil_7170 {
40 	struct intersil_dt counter;
41 	struct intersil_dt alarm;
42 	unsigned char	int_reg;
43 	unsigned char	cmd_reg;
44 };
45 
46 extern volatile char* clock_va;
47 #define intersil_clock ((volatile struct intersil_7170 *) clock_va)
48 #define intersil_clear() (void)intersil_clock->int_reg
49 #endif
50