File: intersil.h

package info (click to toggle)
linux 6.16.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,724,628 kB
  • sloc: ansic: 26,562,645; asm: 271,329; sh: 144,039; python: 72,469; makefile: 57,135; perl: 36,821; xml: 19,553; cpp: 5,820; yacc: 4,915; lex: 2,955; awk: 1,667; sed: 28; ruby: 25
file content (49 lines) | stat: -rw-r--r-- 1,134 bytes parent folder | download | duplicates (42)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _SUN3_INTERSIL_H
#define _SUN3_INTERSIL_H
/* bits 0 and 1 */
#define INTERSIL_FREQ_32K        0x00
#define INTERSIL_FREQ_1M         0x01
#define INTERSIL_FREQ_2M         0x02
#define INTERSIL_FREQ_4M         0x03

/* bit 2 */
#define INTERSIL_12H_MODE   0x00
#define INTERSIL_24H_MODE   0x04

/* bit 3 */
#define INTERSIL_STOP            0x00
#define INTERSIL_RUN             0x08

/* bit 4 */
#define INTERSIL_INT_ENABLE     0x10
#define INTERSIL_INT_DISABLE    0x00

/* bit 5 */
#define INTERSIL_MODE_NORMAL     0x00
#define INTERSIL_MODE_TEST       0x20

#define INTERSIL_HZ_100_MASK	 0x02

struct intersil_dt {
	unsigned char	csec;
	unsigned char	hour;
	unsigned char	minute;
	unsigned char	second;
	unsigned char	month;
	unsigned char	day;
	unsigned char	year;
	unsigned char	weekday;
};

struct intersil_7170 {
	struct intersil_dt counter;
	struct intersil_dt alarm;
	unsigned char	int_reg;
	unsigned char	cmd_reg;
};

extern volatile char* clock_va;
#define intersil_clock ((volatile struct intersil_7170 *) clock_va)
#define intersil_clear() (void)intersil_clock->int_reg
#endif