xref: /titanic_52/usr/src/uts/sun4u/sys/i2c/clients/ics951601.h (revision d58fda4376e4bf67072ce2e69f6f47036f9dbb68)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_ICS951601_H
28 #define	_ICS951601_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * Header file for ICS951601, a general purpose PCI clock generator
38  * and an I2C client.
39  */
40 
41 /*
42  * Clock numbers needed by the driver to uniquely identify a clock.
43  */
44 #define	ICS951601_PCI2B_2	0x580
45 #define	ICS951601_PCI2B_1	0x540
46 #define	ICS951601_PCI2B_0	0x520
47 #define	ICS951601_PCI2A_2	0x480
48 #define	ICS951601_PCI2A_1	0x440
49 #define	ICS951601_PCI2A_0	0x420
50 #define	ICS951601_PCI1B_2	0x410
51 #define	ICS951601_PCI1B_1	0x408
52 #define	ICS951601_PCI1B_0	0x404
53 #define	ICS951601_PCI1A_7	0x380
54 #define	ICS951601_PCI1A_6	0x340
55 #define	ICS951601_PCI1A_5	0x320
56 #define	ICS951601_PCI1A_4	0x310
57 #define	ICS951601_PCI1A_3	0x308
58 #define	ICS951601_PCI1A_2	0x304
59 #define	ICS951601_PCI1A_1	0x302
60 #define	ICS951601_PCI1A_0	0x301
61 
62 /*
63  * The actions which are supported for a given clock.
64  */
65 #define	ICS951601_READ_CLOCK		0x1000
66 #define	ICS951601_MODIFY_CLOCK		0x2000
67 
68 /*
69  * The possible values for any clock
70  */
71 #define	ICS951601_CLOCK_SET	1
72 #define	ICS951601_CLOCK_CLEAR	0
73 
74 /*
75  * Open and close system calls.
76  *
77  *	0 on success
78  *	-1 on error, errno is set:
79  *	ENXIO	- Device not found or not available
80  *	EBUSY	- The channel is in use by another
81  *	EPERM	- Permission denied - not super user
82  */
83 #ifdef	__cplusplus
84 }
85 #endif
86 
87 #endif	/* _ICS951601_H */
88