xref: /illumos-gate/usr/src/uts/common/sys/sservice.h (revision 2d6eb4a5)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*8134ee03Srw  * Common Development and Distribution License (the "License").
6*8134ee03Srw  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*8134ee03Srw  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef	_SSERVICE_H
277c478bd9Sstevel@tonic-gate #define	_SSERVICE_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
307c478bd9Sstevel@tonic-gate extern "C" {
317c478bd9Sstevel@tonic-gate #endif
327c478bd9Sstevel@tonic-gate 
337c478bd9Sstevel@tonic-gate typedef int(f_tt)(int, ...);	/* for lint - cc -v quieting */
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate /*
367c478bd9Sstevel@tonic-gate  * identifiers for all SS functions implemented
377c478bd9Sstevel@tonic-gate  */
387c478bd9Sstevel@tonic-gate #define	SS_GetAdapter		0
397c478bd9Sstevel@tonic-gate #define	SS_GetPage		1
407c478bd9Sstevel@tonic-gate #define	SS_GetSocket		2
417c478bd9Sstevel@tonic-gate #define	SS_GetStatus		3
427c478bd9Sstevel@tonic-gate #define	SS_GetWindow		4
437c478bd9Sstevel@tonic-gate #define	SS_InquireAdapter	5
447c478bd9Sstevel@tonic-gate #define	SS_InquireSocket	6
457c478bd9Sstevel@tonic-gate #define	SS_InquireWindow	7
467c478bd9Sstevel@tonic-gate #define	SS_ResetSocket		8
477c478bd9Sstevel@tonic-gate #define	SS_SetPage		9
487c478bd9Sstevel@tonic-gate #define	SS_SetAdapter		10
497c478bd9Sstevel@tonic-gate #define	SS_SetSocket		11
507c478bd9Sstevel@tonic-gate #define	SS_SetWindow		12
517c478bd9Sstevel@tonic-gate #define	SS_SetIRQHandler	13
527c478bd9Sstevel@tonic-gate #define	SS_ClearIRQHandler	14
537c478bd9Sstevel@tonic-gate #define	CSGetActiveDip		98
547c478bd9Sstevel@tonic-gate #define	CSInitDev		99
557c478bd9Sstevel@tonic-gate #define	CSRegister		100
567c478bd9Sstevel@tonic-gate #define	CSCISInit		101
577c478bd9Sstevel@tonic-gate #define	CSUnregister		102
587c478bd9Sstevel@tonic-gate 
597c478bd9Sstevel@tonic-gate /*
607c478bd9Sstevel@tonic-gate  * XXX
617c478bd9Sstevel@tonic-gate  */
627c478bd9Sstevel@tonic-gate #define	CISGetAddress		103
637c478bd9Sstevel@tonic-gate #define	CISSetAddress		104
647c478bd9Sstevel@tonic-gate #define	CSCardRemoved		105
657c478bd9Sstevel@tonic-gate #define	CSGetCookiesAndDip	106
667c478bd9Sstevel@tonic-gate 
677c478bd9Sstevel@tonic-gate /*
687c478bd9Sstevel@tonic-gate  * returns a la Socket Services
697c478bd9Sstevel@tonic-gate  */
707c478bd9Sstevel@tonic-gate 
717c478bd9Sstevel@tonic-gate #define	SUCCESS		0x00
727c478bd9Sstevel@tonic-gate #define	BAD_ADAPTER		0x01
737c478bd9Sstevel@tonic-gate #define	BAD_ATTRIBUTE	0x02
747c478bd9Sstevel@tonic-gate #define	BAD_BASE		0x03
757c478bd9Sstevel@tonic-gate #define	BAD_EDC		0x04
767c478bd9Sstevel@tonic-gate #define	BAD_IRQ		0x06
777c478bd9Sstevel@tonic-gate #define	BAD_OFFSET		0x07
787c478bd9Sstevel@tonic-gate #define	BAD_PAGE		0x08
797c478bd9Sstevel@tonic-gate #define	READ_FAILURE		0x09
807c478bd9Sstevel@tonic-gate #define	BAD_SIZE		0x0a
817c478bd9Sstevel@tonic-gate #define	BAD_SOCKET		0x0b
827c478bd9Sstevel@tonic-gate #define	BAD_TYPE		0x0d
837c478bd9Sstevel@tonic-gate #define	BAD_VCC		0x0e
847c478bd9Sstevel@tonic-gate #define	BAD_VPP		0x0f
857c478bd9Sstevel@tonic-gate #define	BAD_WINDOW		0x11
867c478bd9Sstevel@tonic-gate #define	WRITE_FAILURE	0x12
877c478bd9Sstevel@tonic-gate #define	NO_CARD		0x14
887c478bd9Sstevel@tonic-gate #define	BAD_FUNCTION		0x15
897c478bd9Sstevel@tonic-gate #define	BAD_MODE		0x16
907c478bd9Sstevel@tonic-gate #define	BAD_SPEED		0x17
917c478bd9Sstevel@tonic-gate #define	BUSY			0x18
927c478bd9Sstevel@tonic-gate #define	NO_RESOURCE		0x20
937c478bd9Sstevel@tonic-gate 
947c478bd9Sstevel@tonic-gate /* events for callback */
957c478bd9Sstevel@tonic-gate 				/* card related events */
967c478bd9Sstevel@tonic-gate #define	PCE_CARD_REMOVAL	0 /* card removed */
977c478bd9Sstevel@tonic-gate #define	PCE_CARD_INSERT		1 /* card inserted */
987c478bd9Sstevel@tonic-gate #define	PCE_CARD_READY		2 /* ready state changed */
997c478bd9Sstevel@tonic-gate #define	PCE_CARD_BATTERY_WARN	3 /* battery is getting low */
1007c478bd9Sstevel@tonic-gate #define	PCE_CARD_BATTERY_DEAD	4 /* battery is dead */
1017c478bd9Sstevel@tonic-gate #define	PCE_CARD_STATUS_CHANGE	5 /* card status change for I/O card */
1027c478bd9Sstevel@tonic-gate #define	PCE_CARD_WRITE_PROTECT	6 /* card write protect status change */
1037c478bd9Sstevel@tonic-gate #define	PCE_CARD_RESET		7 /* client requested reset complete */
1047c478bd9Sstevel@tonic-gate #define	PCE_CARD_UNLOCK		8 /* lock has been unlocked (opt) */
1057c478bd9Sstevel@tonic-gate #define	PCE_CLIENT_INFO		9 /* someone wants client information */
1067c478bd9Sstevel@tonic-gate #define	PCE_EJECTION_COMPLETE	10 /* Motor has finished ejecting card */
1077c478bd9Sstevel@tonic-gate #define	PCE_EJECTION_REQUEST	11 /* request to eject card */
1087c478bd9Sstevel@tonic-gate #define	PCE_ERASE_COMPLETE	12 /* a Flash Erase request completed */
1097c478bd9Sstevel@tonic-gate #define	PCE_EXCLUSIVE_COMPLETE	13
1107c478bd9Sstevel@tonic-gate #define	PCE_EXCLUSIVE_REQUEST	14
1117c478bd9Sstevel@tonic-gate #define	PCE_INSERTION_COMPLETE	15
1127c478bd9Sstevel@tonic-gate #define	PCE_INSERTION_REQUEST	16
1137c478bd9Sstevel@tonic-gate #define	PCE_REGISTRATION_COMPLETE	17
1147c478bd9Sstevel@tonic-gate #define	PCE_RESET_COMPLETE	18
1157c478bd9Sstevel@tonic-gate #define	PCE_RESET_PHYSICAL	19
1167c478bd9Sstevel@tonic-gate #define	PCE_RESET_REQUEST	20
1177c478bd9Sstevel@tonic-gate #define	PCE_TIMER_EXPIRED	21
1187c478bd9Sstevel@tonic-gate 
1197c478bd9Sstevel@tonic-gate /* added for SPARC CPR support */
1207c478bd9Sstevel@tonic-gate #define	PCE_PM_RESUME		22
1217c478bd9Sstevel@tonic-gate #define	PCE_PM_SUSPEND		23
1227c478bd9Sstevel@tonic-gate 
1237c478bd9Sstevel@tonic-gate /* added for dynamic nexus registration */
1247c478bd9Sstevel@tonic-gate #define	PCE_SS_INIT_STATE	24 /* SS init state */
1257c478bd9Sstevel@tonic-gate #define	PCE_ADD_SOCKET		25 /* add a new socket */
1267c478bd9Sstevel@tonic-gate #define	PCE_DROP_SOCKET		26 /* drop an existing socket */
1277c478bd9Sstevel@tonic-gate 
1287c478bd9Sstevel@tonic-gate #define	PCE_DEV_IDENT		30 /* The nexus has identified the device */
1297c478bd9Sstevel@tonic-gate #define	PCE_INIT_DEV		31 /* asking for a device */
1307c478bd9Sstevel@tonic-gate 
1317c478bd9Sstevel@tonic-gate #define	PCE_E2M(event)		(1 << (event))
1327c478bd9Sstevel@tonic-gate 
1337c478bd9Sstevel@tonic-gate /* event callback uses an indirect call -- make it look like a function */
1347c478bd9Sstevel@tonic-gate #define	CS_EVENT(event, socket, arg)	(*pcmcia_cs_event) (event, socket, arg)
1357c478bd9Sstevel@tonic-gate 
1367c478bd9Sstevel@tonic-gate /* values for "socket number" field for PCE_SS_INIT_STATE event */
1377c478bd9Sstevel@tonic-gate #define	PCE_SS_STATE_INIT	0x0001  /* SS ready for callbacks */
1387c478bd9Sstevel@tonic-gate #define	PCE_SS_STATE_DEINIT	0x0002  /* SS not ready for callbacks */
1397c478bd9Sstevel@tonic-gate 
1407c478bd9Sstevel@tonic-gate /*
1417c478bd9Sstevel@tonic-gate  * The following structure is to support CSRegister
1427c478bd9Sstevel@tonic-gate  */
1437c478bd9Sstevel@tonic-gate typedef struct csregister {
1447c478bd9Sstevel@tonic-gate 	uint32_t	cs_magic;		/* magic number */
1457c478bd9Sstevel@tonic-gate 	uint32_t		cs_version;		/* CS version number */
1467c478bd9Sstevel@tonic-gate 						/* CS entry point */
1477c478bd9Sstevel@tonic-gate 	int		(*cs_card_services)(int, ...);
1487c478bd9Sstevel@tonic-gate 						/* CS event entry point */
1497c478bd9Sstevel@tonic-gate 	f_tt		*cs_event;
1507c478bd9Sstevel@tonic-gate } csregister_t;
1517c478bd9Sstevel@tonic-gate 
1527c478bd9Sstevel@tonic-gate /* GetAdapter(get_adapter_t) */
1537c478bd9Sstevel@tonic-gate 
1547c478bd9Sstevel@tonic-gate typedef struct get_adapter {
1557c478bd9Sstevel@tonic-gate 	unsigned	state;		/* adapter hardware state */
1567c478bd9Sstevel@tonic-gate 	irq_t		SCRouting;	/* status change IRQ routing */
1577c478bd9Sstevel@tonic-gate } get_adapter_t;
1587c478bd9Sstevel@tonic-gate 
1597c478bd9Sstevel@tonic-gate /* IRQ definitions */
1607c478bd9Sstevel@tonic-gate #define	IRQ_ENABLE	0x8000
1617c478bd9Sstevel@tonic-gate 
1627c478bd9Sstevel@tonic-gate /* GetPage(get_page_t) */
1637c478bd9Sstevel@tonic-gate 
1647c478bd9Sstevel@tonic-gate typedef struct get_page {
1657c478bd9Sstevel@tonic-gate 	unsigned	window;		/* window number */
1667c478bd9Sstevel@tonic-gate 	unsigned	page;		/* page number within window */
1677c478bd9Sstevel@tonic-gate 	unsigned	state;		/* page state: */
1687c478bd9Sstevel@tonic-gate 					/*
1697c478bd9Sstevel@tonic-gate 					 * PS_ATTRIBUTE
1707c478bd9Sstevel@tonic-gate 					 * PS_COMMON
1717c478bd9Sstevel@tonic-gate 					 * PS_IO (for DoRight?)
1727c478bd9Sstevel@tonic-gate 					 * PS_ENABLED
1737c478bd9Sstevel@tonic-gate 					 * PS_WP
1747c478bd9Sstevel@tonic-gate 					 */
1757c478bd9Sstevel@tonic-gate 	off_t		offset;		/* PC card's memory offset */
1767c478bd9Sstevel@tonic-gate } get_page_t;
1777c478bd9Sstevel@tonic-gate 
1787c478bd9Sstevel@tonic-gate /*
1797c478bd9Sstevel@tonic-gate  * PS flags
1807c478bd9Sstevel@tonic-gate  */
1817c478bd9Sstevel@tonic-gate 
1827c478bd9Sstevel@tonic-gate #define	PS_ATTRIBUTE	0x01
1837c478bd9Sstevel@tonic-gate #define	PS_ENABLED	0x02
1847c478bd9Sstevel@tonic-gate #define	PS_WP		0x04
1857c478bd9Sstevel@tonic-gate #define	PS_IO		0x08	/* needed? for DoRight */
1867c478bd9Sstevel@tonic-gate 
1877c478bd9Sstevel@tonic-gate /* GetSocket(get_socket_t) */
1887c478bd9Sstevel@tonic-gate 
1897c478bd9Sstevel@tonic-gate typedef struct get_socket {
1907c478bd9Sstevel@tonic-gate 	unsigned	socket;		/* socket number */
1917c478bd9Sstevel@tonic-gate 	unsigned	SCIntMask;	/* status change interrupt mask */
1927c478bd9Sstevel@tonic-gate 	unsigned	VccLevel;	/* VCC voltage in 1/10 volt */
1937c478bd9Sstevel@tonic-gate 	unsigned	Vpp1Level;	/* VPP1 voltage in 1/10 volt */
1947c478bd9Sstevel@tonic-gate 	unsigned	Vpp2Level;	/* VPP2 voltage in 1/10 volt */
1957c478bd9Sstevel@tonic-gate 	unsigned	state;		/* latched status change signals */
1967c478bd9Sstevel@tonic-gate 	unsigned	CtlInd;		/* controls and indicators */
1977c478bd9Sstevel@tonic-gate 	irq_t		IRQRouting;	/* I/O IRQ routing */
1987c478bd9Sstevel@tonic-gate 	unsigned	IFType;		/* memory-only or memory & I/O */
1997c478bd9Sstevel@tonic-gate } get_socket_t;
2007c478bd9Sstevel@tonic-gate 
2017c478bd9Sstevel@tonic-gate /* GetStatus(get_ss_status_t) */
2027c478bd9Sstevel@tonic-gate 
2037c478bd9Sstevel@tonic-gate typedef struct get_ss_status {
2047c478bd9Sstevel@tonic-gate 	unsigned	socket;		/* socket number */
2057c478bd9Sstevel@tonic-gate 	unsigned	CardState;	/* real-time card state */
2067c478bd9Sstevel@tonic-gate 	unsigned	SocketState;	/* latched status change signals */
2077c478bd9Sstevel@tonic-gate 	unsigned	CtlInd;		/* controls and indicators */
2087c478bd9Sstevel@tonic-gate 	irq_t		IRQRouting;	/* I/O IRQ routing */
2097c478bd9Sstevel@tonic-gate 	unsigned	IFType;		/* memory-only or memory & I/O */
2107c478bd9Sstevel@tonic-gate } get_ss_status_t;
2117c478bd9Sstevel@tonic-gate 
2127c478bd9Sstevel@tonic-gate /*
2137c478bd9Sstevel@tonic-gate  * Socket specific flags and capabilities
2147c478bd9Sstevel@tonic-gate  */
2157c478bd9Sstevel@tonic-gate 
2167c478bd9Sstevel@tonic-gate #define	SBM_WP		0x01
2177c478bd9Sstevel@tonic-gate #define	SBM_LOCKED	0x02
2187c478bd9Sstevel@tonic-gate #define	SBM_EJECT	0x04
2197c478bd9Sstevel@tonic-gate #define	SBM_INSERT	0x08
2207c478bd9Sstevel@tonic-gate #define	SBM_BVD1	0x10
2217c478bd9Sstevel@tonic-gate #define	SBM_BVD2	0x20
2227c478bd9Sstevel@tonic-gate #define	SBM_RDYBSY	0x40
2237c478bd9Sstevel@tonic-gate #define	SBM_CD		0x80
2247c478bd9Sstevel@tonic-gate 
2257c478bd9Sstevel@tonic-gate 				/* capabilities only */
2267c478bd9Sstevel@tonic-gate #define	SBM_LOCK	0x10
2277c478bd9Sstevel@tonic-gate #define	SBM_BATT	0x20
2287c478bd9Sstevel@tonic-gate #define	SBM_BUSY	0x40
2297c478bd9Sstevel@tonic-gate #define	SBM_XID		0x80
2307c478bd9Sstevel@tonic-gate 
2317c478bd9Sstevel@tonic-gate /* GetWindow(get_window_t) */
2327c478bd9Sstevel@tonic-gate typedef uint32_t speed_t;	/* memory speed in nanoseconds */
2337c478bd9Sstevel@tonic-gate 
2347c478bd9Sstevel@tonic-gate typedef struct get_window {
2357c478bd9Sstevel@tonic-gate 	unsigned		window;	/* window number */
2367c478bd9Sstevel@tonic-gate 	unsigned		socket;	/* socket this window is assigned to */
2377c478bd9Sstevel@tonic-gate 	unsigned		size;	/* size in bytes */
2387c478bd9Sstevel@tonic-gate 	unsigned		state;	/* current state of window hardware */
2397c478bd9Sstevel@tonic-gate 	uint_t			speed;	/* speed in nanoseconds */
2407c478bd9Sstevel@tonic-gate 	uint_t			base;
2417c478bd9Sstevel@tonic-gate 	ddi_acc_handle_t	handle;		/* base addr in host space */
2427c478bd9Sstevel@tonic-gate } get_window_t;
2437c478bd9Sstevel@tonic-gate 
2447c478bd9Sstevel@tonic-gate /*
2457c478bd9Sstevel@tonic-gate  * window flags (state and capabilities)
2467c478bd9Sstevel@tonic-gate  */
2477c478bd9Sstevel@tonic-gate #define	WS_IO		0x01
2487c478bd9Sstevel@tonic-gate #define	WS_ENABLED	0x02
2497c478bd9Sstevel@tonic-gate #define	WS_16BIT	0x04
2507c478bd9Sstevel@tonic-gate #define	WS_PAGED	0x80
2517c478bd9Sstevel@tonic-gate #define	WS_EISA		0x10
2527c478bd9Sstevel@tonic-gate #define	WS_CENABLE	0x20
2537c478bd9Sstevel@tonic-gate #define	WS_EXACT_MAPIN	0x40	/* map exactly what's asked for */
2547c478bd9Sstevel@tonic-gate 
2557c478bd9Sstevel@tonic-gate /* Inquire Adapter(inquire_adapter_t) */
2567c478bd9Sstevel@tonic-gate 
2577c478bd9Sstevel@tonic-gate typedef struct inquire_adapter {
2587c478bd9Sstevel@tonic-gate 	unsigned	NumSockets;	/* number of sockets */
2597c478bd9Sstevel@tonic-gate 	unsigned	NumWindows;	/* number of windows */
2607c478bd9Sstevel@tonic-gate 	unsigned	NumEDCs;	/* number of EDCs */
2617c478bd9Sstevel@tonic-gate 
2627c478bd9Sstevel@tonic-gate 	unsigned	AdpCaps;	/* adapter power capabilities */
2637c478bd9Sstevel@tonic-gate 	irq_t		ActiveHigh;	/* active high status change IRQ */
2647c478bd9Sstevel@tonic-gate 	irq_t		ActiveLow;	/* active low status change IRQ */
2657c478bd9Sstevel@tonic-gate 	int		NumPower;	/* number of power entries */
2667c478bd9Sstevel@tonic-gate 	struct power_entry {
2677c478bd9Sstevel@tonic-gate 		unsigned	PowerLevel;	/* voltage in 1/10 volt */
2687c478bd9Sstevel@tonic-gate 		unsigned	ValidSignals;	/* voltage is valid for: */
2697c478bd9Sstevel@tonic-gate 						/*
2707c478bd9Sstevel@tonic-gate 						 * VCC
2717c478bd9Sstevel@tonic-gate 						 * VPP1
2727c478bd9Sstevel@tonic-gate 						 * VPP2
2737c478bd9Sstevel@tonic-gate 						 * if none are set, this is end
2747c478bd9Sstevel@tonic-gate 						 * of list
2757c478bd9Sstevel@tonic-gate 						 */
2767c478bd9Sstevel@tonic-gate 	} *power_entry;
2777c478bd9Sstevel@tonic-gate 	int		NumInterrupts; /* number of interrupts supportable */
2787c478bd9Sstevel@tonic-gate 	struct intr_entry {
2797c478bd9Sstevel@tonic-gate 		int	pri;
2807c478bd9Sstevel@tonic-gate 		int	intr;
2817c478bd9Sstevel@tonic-gate 	}		*AvailInterrupts; /* array of intrs, one per intr */
2827c478bd9Sstevel@tonic-gate 	uint_t		ResourceFlags; /* resource allocation requirements */
2837c478bd9Sstevel@tonic-gate } inquire_adapter_t;
2847c478bd9Sstevel@tonic-gate 
2857c478bd9Sstevel@tonic-gate #define	VCC	0x80
2867c478bd9Sstevel@tonic-gate #define	VPP1	0x40
2877c478bd9Sstevel@tonic-gate #define	VPP2	0x20
2887c478bd9Sstevel@tonic-gate #define	V_MASK	(VCC|VPP1|VPP2)
2897c478bd9Sstevel@tonic-gate 
2907c478bd9Sstevel@tonic-gate #define	RES_OWN_IRQ	0x0001	/* adapter owns own IRQ resources */
2917c478bd9Sstevel@tonic-gate #define	RES_OWN_IO	0x0002	/* adapter owns own I/O resources */
2927c478bd9Sstevel@tonic-gate #define	RES_OWN_MEM	0x0004	/* adapter owns own memory resources */
2937c478bd9Sstevel@tonic-gate #define	RES_IRQ_NEXUS	0x0008	/* adapter/nexus must multiplex IRQs */
2947c478bd9Sstevel@tonic-gate #define	RES_IRQ_SHAREABLE	0x0010 /* IRQ can be shared */
2957c478bd9Sstevel@tonic-gate 
2967c478bd9Sstevel@tonic-gate /* InquireSocket(inquire_socket_t) */
2977c478bd9Sstevel@tonic-gate 
2987c478bd9Sstevel@tonic-gate typedef struct inquire_socket {
2997c478bd9Sstevel@tonic-gate 	unsigned	socket;		/* socket number */
3007c478bd9Sstevel@tonic-gate 	unsigned	SCIntCaps;	/* status change interrupt events */
3017c478bd9Sstevel@tonic-gate 	unsigned	SCRptCaps;	/* reportable status change events */
3027c478bd9Sstevel@tonic-gate 	unsigned	CtlIndCaps;	/* controls and indicators */
3037c478bd9Sstevel@tonic-gate 	unsigned	SocketCaps;	/* socket capabilities */
3047c478bd9Sstevel@tonic-gate 	irq_t		ActiveHigh;	/* active high status change IRQ */
3057c478bd9Sstevel@tonic-gate 	irq_t		ActiveLow;	/* active low status change IRQ */
3067c478bd9Sstevel@tonic-gate } inquire_socket_t;
3077c478bd9Sstevel@tonic-gate 
3087c478bd9Sstevel@tonic-gate /* InquireWindow(inquire_window_t) */
3097c478bd9Sstevel@tonic-gate 
3107c478bd9Sstevel@tonic-gate typedef struct memwin_char {
3117c478bd9Sstevel@tonic-gate 	unsigned	MemWndCaps;	/* memory window characteristcs */
3127c478bd9Sstevel@tonic-gate 	baseaddr_t	FirstByte;	/* first byte in host space */
3137c478bd9Sstevel@tonic-gate 	baseaddr_t	LastByte;	/* last byte in host space */
3147c478bd9Sstevel@tonic-gate 	unsigned	MinSize;	/* minimum window size */
3157c478bd9Sstevel@tonic-gate 	unsigned	MaxSize;	/* maximum window size */
3167c478bd9Sstevel@tonic-gate 	unsigned	ReqGran;	/* window size constraints */
3177c478bd9Sstevel@tonic-gate 	unsigned	ReqBase;	/* base address alignment boundry */
3187c478bd9Sstevel@tonic-gate 	unsigned	ReqOffset;	/* offset alignment boundry */
3197c478bd9Sstevel@tonic-gate 	unsigned	Slowest;	/* slowest speed in nanoseconds */
3207c478bd9Sstevel@tonic-gate 	unsigned	Fastest;	/* fastest speed in nanoseconds */
3217c478bd9Sstevel@tonic-gate } mem_win_char_t;
3227c478bd9Sstevel@tonic-gate 
3237c478bd9Sstevel@tonic-gate typedef struct iowin_char {
3247c478bd9Sstevel@tonic-gate 	unsigned	IOWndCaps;	/* I/O window characteristcs */
3257c478bd9Sstevel@tonic-gate 	baseaddr_t	FirstByte;	/* first byte in host space */
3267c478bd9Sstevel@tonic-gate 	baseaddr_t	LastByte;	/* last byte in host space */
3277c478bd9Sstevel@tonic-gate 	unsigned	MinSize;	/* minimum window size */
3287c478bd9Sstevel@tonic-gate 	unsigned	MaxSize;	/* maximum window size */
3297c478bd9Sstevel@tonic-gate 	unsigned	ReqGran;	/* window size constraints */
3307c478bd9Sstevel@tonic-gate 	unsigned	AddrLines;	/* number of address lines decoded */
3317c478bd9Sstevel@tonic-gate 	unsigned	EISASlot;	/* EISA I/O address decoding */
3327c478bd9Sstevel@tonic-gate } iowin_char_t;
3337c478bd9Sstevel@tonic-gate 
3347c478bd9Sstevel@tonic-gate typedef struct inquire_window {
3357c478bd9Sstevel@tonic-gate 	unsigned	window;		/* window number */
3367c478bd9Sstevel@tonic-gate 	unsigned	WndCaps;	/* window capabilities */
3377c478bd9Sstevel@tonic-gate 	socket_enum_t	Sockets;	/* window<->socket assignment mask */
3387c478bd9Sstevel@tonic-gate 	/* note that we always declare both forms */
3397c478bd9Sstevel@tonic-gate 	mem_win_char_t	mem_win_char;
3407c478bd9Sstevel@tonic-gate 	iowin_char_t	iowin_char;
3417c478bd9Sstevel@tonic-gate } inquire_window_t;
3427c478bd9Sstevel@tonic-gate 
3437c478bd9Sstevel@tonic-gate 
3447c478bd9Sstevel@tonic-gate /* interface definitions */
3457c478bd9Sstevel@tonic-gate #define	IF_CARDBUS	0x00	/* CardBus interface */
3467c478bd9Sstevel@tonic-gate #define	IF_IO		0x01	/* IO + memory */
3477c478bd9Sstevel@tonic-gate #define	IF_MEMORY	0x02	/* memory only */
3487c478bd9Sstevel@tonic-gate #define	IF_TYPE_MASK	0x03
3497c478bd9Sstevel@tonic-gate 
3507c478bd9Sstevel@tonic-gate #define	DREQ_MASK	0x0c
3517c478bd9Sstevel@tonic-gate #define	DREQ_NONE	0x00
3527c478bd9Sstevel@tonic-gate #define	DREQ_SPKR	0x04
3537c478bd9Sstevel@tonic-gate #define	DREQ_IOIS16	0x08
3547c478bd9Sstevel@tonic-gate #define	DREQ_INPACK	0x0c
3557c478bd9Sstevel@tonic-gate 
3567c478bd9Sstevel@tonic-gate #define	DMA_CHAN_MASK	0xf0
3577c478bd9Sstevel@tonic-gate #define	DMA_GET_CHAN(x) (((x) >> 4) & 0xF)
3587c478bd9Sstevel@tonic-gate #define	DMA_SET_CHAN(x, y) (((x) & 0xF) | ((y) & ~DMA_CHAN_MASK))
3597c478bd9Sstevel@tonic-gate 
3607c478bd9Sstevel@tonic-gate #define	IF_CB		0x04
3617c478bd9Sstevel@tonic-gate #define	IF_DMA		0x08
3627c478bd9Sstevel@tonic-gate #define	IF_VSKEY	0x10
3637c478bd9Sstevel@tonic-gate #define	IF_33VC		0x20
3647c478bd9Sstevel@tonic-gate #define	IF_XXVCC	0x40
3657c478bd9Sstevel@tonic-gate 
3667c478bd9Sstevel@tonic-gate 
3677c478bd9Sstevel@tonic-gate #define	PC_PAGESIZE	0x4000	/* 16K page size */
3687c478bd9Sstevel@tonic-gate 
3697c478bd9Sstevel@tonic-gate /* window capabilities */
3707c478bd9Sstevel@tonic-gate 				/* generic */
3717c478bd9Sstevel@tonic-gate #define	WC_IO		0x0004
3727c478bd9Sstevel@tonic-gate #define	WC_WAIT		0x0080
3737c478bd9Sstevel@tonic-gate #define	WC_COMMON	0x0001
3747c478bd9Sstevel@tonic-gate #define	WC_ATTRIBUTE	0x0002
3757c478bd9Sstevel@tonic-gate 				/* I/O and memory */
3767c478bd9Sstevel@tonic-gate #define	WC_BASE		0x0001
3777c478bd9Sstevel@tonic-gate #define	WC_SIZE		0x0002
3787c478bd9Sstevel@tonic-gate #define	WC_WENABLE	0x0004
3797c478bd9Sstevel@tonic-gate #define	WC_8BIT		0x0008
3807c478bd9Sstevel@tonic-gate #define	WC_16BIT	0x0010
3817c478bd9Sstevel@tonic-gate #define	WC_BALIGN	0x0020
3827c478bd9Sstevel@tonic-gate #define	WC_POW2		0x0040
3837c478bd9Sstevel@tonic-gate 				/* memory only */
3847c478bd9Sstevel@tonic-gate #define	WC_CALIGN	0x0080
3857c478bd9Sstevel@tonic-gate #define	WC_PAVAIL	0x0100
3867c478bd9Sstevel@tonic-gate #define	WC_PSHARED	0x0200
3877c478bd9Sstevel@tonic-gate #define	WC_PENABLE	0x0400
3887c478bd9Sstevel@tonic-gate #define	WC_WP		0x0800
3897c478bd9Sstevel@tonic-gate 				/* I/O only */
3907c478bd9Sstevel@tonic-gate #define	WC_INPACK	0x0080
3917c478bd9Sstevel@tonic-gate #define	WC_EISA		0x0100
3927c478bd9Sstevel@tonic-gate #define	WC_CENABLE	0x0200
3937c478bd9Sstevel@tonic-gate 				/* Solaris/SPARC */
3947c478bd9Sstevel@tonic-gate #define	WC_IO_RANGE_PER_WINDOW	0x8000 /* I/O range unique for each window */
3957c478bd9Sstevel@tonic-gate 
3967c478bd9Sstevel@tonic-gate /* SetPage(set_page_t *) */
3977c478bd9Sstevel@tonic-gate typedef struct set_page {
3987c478bd9Sstevel@tonic-gate 	unsigned	window;	/* window number */
3997c478bd9Sstevel@tonic-gate 	unsigned	page;	/* page number */
4007c478bd9Sstevel@tonic-gate 	unsigned	state;	/* page state */
4017c478bd9Sstevel@tonic-gate 	off_t		offset;	/* offset in PC card space */
4027c478bd9Sstevel@tonic-gate } set_page_t;
4037c478bd9Sstevel@tonic-gate 
4047c478bd9Sstevel@tonic-gate /* SetSocket(set_socket_t) */
4057c478bd9Sstevel@tonic-gate 
4067c478bd9Sstevel@tonic-gate typedef struct set_socket {
4077c478bd9Sstevel@tonic-gate 	unsigned	socket;	/* socket number */
4087c478bd9Sstevel@tonic-gate 	unsigned	SCIntMask; /* status change enables */
4097c478bd9Sstevel@tonic-gate 	unsigned	Vcontrol; /* power control flags */
4107c478bd9Sstevel@tonic-gate 	unsigned	VccLevel; /* Vcc power index level */
4117c478bd9Sstevel@tonic-gate 	unsigned	Vpp1Level; /* Vpp1 power index level */
4127c478bd9Sstevel@tonic-gate 	unsigned	Vpp2Level; /* Vpp2 power index level */
4137c478bd9Sstevel@tonic-gate 	unsigned	State;
4147c478bd9Sstevel@tonic-gate 	unsigned	CtlInd;	/* control and indicator bits */
4157c478bd9Sstevel@tonic-gate 	irq_t		IREQRouting; /* I/O IRQ routing */
4167c478bd9Sstevel@tonic-gate 	unsigned	IFType;	/* interface type (mem/IO) */
4177c478bd9Sstevel@tonic-gate } set_socket_t;
4187c478bd9Sstevel@tonic-gate 
4197c478bd9Sstevel@tonic-gate #define	VCTL_CISREAD	0x01	/* controlled by Vcc/Vpp sense pins */
4207c478bd9Sstevel@tonic-gate #define	VCTL_OVERRIDE	0x02	/* 16-bit cards, ignore the sense pins */
4217c478bd9Sstevel@tonic-gate 
4227c478bd9Sstevel@tonic-gate /* SetIRQHandler(set_irq_handler_t) */
4237c478bd9Sstevel@tonic-gate 
4247c478bd9Sstevel@tonic-gate typedef struct set_irq_handler {
4257c478bd9Sstevel@tonic-gate 	unsigned	socket;	/* associate with a socket for now */
4267c478bd9Sstevel@tonic-gate 	unsigned	irq;
4277c478bd9Sstevel@tonic-gate 	unsigned	handler_id;	/* ID of this client's handler */
4287c478bd9Sstevel@tonic-gate 	f_tt		*handler;	/* client IO IRQ handler entry point */
4297c478bd9Sstevel@tonic-gate 	void		*arg1;		/* arg to call client handler with */
4307c478bd9Sstevel@tonic-gate 	void		*arg2;		/* arg to call client handler with */
4317c478bd9Sstevel@tonic-gate 	ddi_iblock_cookie_t	*iblk_cookie;	/* iblk cookie pointer */
4327c478bd9Sstevel@tonic-gate 	ddi_idevice_cookie_t	*idev_cookie;	/* idev cookie pointer */
4337c478bd9Sstevel@tonic-gate } set_irq_handler_t;
4347c478bd9Sstevel@tonic-gate 
4357c478bd9Sstevel@tonic-gate #define	IRQ_ANY		0x0
4367c478bd9Sstevel@tonic-gate 
4377c478bd9Sstevel@tonic-gate /* interrupt priority levels */
4387c478bd9Sstevel@tonic-gate #define	PRIORITY_LOW	0x00
4397c478bd9Sstevel@tonic-gate #define	PRIORITY_HIGH	0x10
4407c478bd9Sstevel@tonic-gate 
4417c478bd9Sstevel@tonic-gate /* ClearIRQHandler(clear_irq_handler_t) */
4427c478bd9Sstevel@tonic-gate 
4437c478bd9Sstevel@tonic-gate typedef struct clear_irq_handler {
4447c478bd9Sstevel@tonic-gate 	unsigned	socket;
4457c478bd9Sstevel@tonic-gate 	unsigned	handler_id;	/* client handler ID to remove */
4467c478bd9Sstevel@tonic-gate 	f_tt		*handler;	/* client IO IRQ handler entry point */
4477c478bd9Sstevel@tonic-gate } clear_irq_handler_t;
4487c478bd9Sstevel@tonic-gate 
4497c478bd9Sstevel@tonic-gate /* SetWindow(set_window_t) */
4507c478bd9Sstevel@tonic-gate 
4517c478bd9Sstevel@tonic-gate typedef struct set_window {
4527c478bd9Sstevel@tonic-gate 	unsigned		window;		/* window number */
4537c478bd9Sstevel@tonic-gate 	unsigned		socket;		/* socket number */
4547c478bd9Sstevel@tonic-gate 	unsigned		WindowSize;	/* window size in bytes */
4557c478bd9Sstevel@tonic-gate 	unsigned		state;		/* window state */
4567c478bd9Sstevel@tonic-gate 	unsigned		speed;		/* window speed, nanoseconds */
4577c478bd9Sstevel@tonic-gate 	uint_t			base;
4587c478bd9Sstevel@tonic-gate 	ddi_acc_handle_t	handle;		/* base addr in host space */
4597c478bd9Sstevel@tonic-gate 	dev_info_t		*child;		/* child's dip */
4607c478bd9Sstevel@tonic-gate 	ddi_device_acc_attr_t	attr;
4617c478bd9Sstevel@tonic-gate } set_window_t;
4627c478bd9Sstevel@tonic-gate 
4637c478bd9Sstevel@tonic-gate /* CSInitDev */
4647c478bd9Sstevel@tonic-gate typedef
4657c478bd9Sstevel@tonic-gate struct ss_make_device_node {
4667c478bd9Sstevel@tonic-gate 	uint32_t		flags;		/* operation flags */
4677c478bd9Sstevel@tonic-gate 	dev_info_t	*dip;		/* dip for this client */
4687c478bd9Sstevel@tonic-gate 	char		*name;		/* device node path and name */
4697c478bd9Sstevel@tonic-gate 	char		*slot;		/* slot name string */
4707c478bd9Sstevel@tonic-gate 	char		*busaddr;	/* bus addr name string */
4717c478bd9Sstevel@tonic-gate 	int		spec_type;	/* dev special type (block/char) */
4727c478bd9Sstevel@tonic-gate 	int		minor_num;	/* device node minor number */
4737c478bd9Sstevel@tonic-gate 	char		*node_type;	/* device node type */
4747c478bd9Sstevel@tonic-gate } ss_make_device_node_t;
4757c478bd9Sstevel@tonic-gate 
4767c478bd9Sstevel@tonic-gate #define	SS_CSINITDEV_CREATE_DEVICE	0x01	/* create device node */
4777c478bd9Sstevel@tonic-gate #define	SS_CSINITDEV_REMOVE_DEVICE	0x02	/* remove device node */
4787c478bd9Sstevel@tonic-gate #define	SS_CSINITDEV_USE_SLOT		0x04	/* use slot name from caller */
4797c478bd9Sstevel@tonic-gate #define	SS_CSINITDEV_USE_BUSADDR	0x08	/* use bus addr from caller */
4807c478bd9Sstevel@tonic-gate #define	SS_CSINITDEV_MORE_DEVICES	0x10	/* send PCE_INIT_DEV */
4817c478bd9Sstevel@tonic-gate #define	SS_CSINITDEV_SEND_DEV_EVENT	0x10	/* send PCE_INIT_DEV */
4827c478bd9Sstevel@tonic-gate 
4837c478bd9Sstevel@tonic-gate /*
4847c478bd9Sstevel@tonic-gate  * csss_adapter_info_t - provides additional per-socket adapter info
4857c478bd9Sstevel@tonic-gate  */
4867c478bd9Sstevel@tonic-gate typedef struct csss_adapter_info_t {
4877c478bd9Sstevel@tonic-gate 	char	name[MODMAXNAMELEN];	/* adapter name */
4887c478bd9Sstevel@tonic-gate 	int	major;			/* adapter major number */
4897c478bd9Sstevel@tonic-gate 	int	minor;			/* adapter minor number */
4907c478bd9Sstevel@tonic-gate 	int	number;			/* canonical adapter number */
4917c478bd9Sstevel@tonic-gate 	int	num_sockets;		/* # sockets on this adapter */
4927c478bd9Sstevel@tonic-gate 	int	first_socket;		/* first socket # on this adapter */
4937c478bd9Sstevel@tonic-gate } csss_adapter_info_t;
4947c478bd9Sstevel@tonic-gate 
4957c478bd9Sstevel@tonic-gate /* CSGetCookiesAndDip */
4967c478bd9Sstevel@tonic-gate typedef struct get_cookies_and_dip_t {
4977c478bd9Sstevel@tonic-gate 	unsigned		socket;		/* socket number */
4987c478bd9Sstevel@tonic-gate 	dev_info_t		*dip;		/* adapter instance dip */
4997c478bd9Sstevel@tonic-gate 	ddi_iblock_cookie_t	*iblock;	/* for event handler */
5007c478bd9Sstevel@tonic-gate 	ddi_idevice_cookie_t	*idevice;	/* for event handler */
5017c478bd9Sstevel@tonic-gate 	csss_adapter_info_t	adapter_info;	/* adapter info for socket */
5027c478bd9Sstevel@tonic-gate } get_cookies_and_dip_t;
5037c478bd9Sstevel@tonic-gate 
5047c478bd9Sstevel@tonic-gate /* ResetSocket */
5057c478bd9Sstevel@tonic-gate #define	RESET_MODE_FULL		0 /* Reset to SocketServices Specification */
5067c478bd9Sstevel@tonic-gate #define	RESET_MODE_CARD_ONLY	1 /* only reset the card itself */
5077c478bd9Sstevel@tonic-gate 
5087c478bd9Sstevel@tonic-gate /* union of all exported functions functions */
5097c478bd9Sstevel@tonic-gate typedef
5107c478bd9Sstevel@tonic-gate union sservice {
5117c478bd9Sstevel@tonic-gate 	get_adapter_t	get_adapter;
5127c478bd9Sstevel@tonic-gate 	get_page_t	get_page;
5137c478bd9Sstevel@tonic-gate 	get_socket_t	get_socket;
5147c478bd9Sstevel@tonic-gate 	get_window_t	get_window;
5157c478bd9Sstevel@tonic-gate 	get_ss_status_t	get_ss_status;
5167c478bd9Sstevel@tonic-gate 	inquire_adapter_t	inquire_adapter;
5177c478bd9Sstevel@tonic-gate 	inquire_socket_t	inquire_socket;
5187c478bd9Sstevel@tonic-gate 	inquire_window_t	inquire_window;
5197c478bd9Sstevel@tonic-gate 	set_page_t	set_page;
5207c478bd9Sstevel@tonic-gate 	set_socket_t	set_socket;
5217c478bd9Sstevel@tonic-gate 	set_irq_handler_t	set_irq_handler;
5227c478bd9Sstevel@tonic-gate 	set_window_t	set_window;
5237c478bd9Sstevel@tonic-gate 	get_cookies_and_dip_t get_cookies;
5247c478bd9Sstevel@tonic-gate 	ss_make_device_node_t make_device;
5257c478bd9Sstevel@tonic-gate } sservice_t;
5267c478bd9Sstevel@tonic-gate 
5277c478bd9Sstevel@tonic-gate /* event manager structures */
5287c478bd9Sstevel@tonic-gate struct pcm_make_dev {
5297c478bd9Sstevel@tonic-gate 	int	socket;
5307c478bd9Sstevel@tonic-gate 	int	flags;
5317c478bd9Sstevel@tonic-gate 	int	op;
5327c478bd9Sstevel@tonic-gate 	dev_t	dev;
5337c478bd9Sstevel@tonic-gate 	int	type;
5347c478bd9Sstevel@tonic-gate 	char	driver[MODMAXNAMELEN];
5357c478bd9Sstevel@tonic-gate 	char	path[MAXPATHLEN];
5367c478bd9Sstevel@tonic-gate };
5377c478bd9Sstevel@tonic-gate 
5387c478bd9Sstevel@tonic-gate #define	PCM_EVENT_MORE		0x0001	/* more events of this type coming */
5397c478bd9Sstevel@tonic-gate 
5407c478bd9Sstevel@tonic-gate #ifdef	_KERNEL
5417c478bd9Sstevel@tonic-gate 
5427c478bd9Sstevel@tonic-gate #include <sys/sunndi.h>
5437c478bd9Sstevel@tonic-gate 
5447c478bd9Sstevel@tonic-gate /*
5457c478bd9Sstevel@tonic-gate  * prototypes for nexi
5467c478bd9Sstevel@tonic-gate  */
5477c478bd9Sstevel@tonic-gate 
5487c478bd9Sstevel@tonic-gate int pcmcia_attach(dev_info_t *, struct pcmcia_adapter_nexus_private *);
5497c478bd9Sstevel@tonic-gate int pcmcia_ctlops(dev_info_t *, dev_info_t *, ddi_ctl_enum_t, void *, void *);
5507c478bd9Sstevel@tonic-gate int pcmcia_prop_op(dev_t, dev_info_t *, dev_info_t *, ddi_prop_op_t,
5517c478bd9Sstevel@tonic-gate 			int, char *, caddr_t, int *);
5527c478bd9Sstevel@tonic-gate int pcmcia_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op,
5537c478bd9Sstevel@tonic-gate     ddi_intr_handle_impl_t *hdlp, void *result);
5547c478bd9Sstevel@tonic-gate 
5557c478bd9Sstevel@tonic-gate int pcmcia_open(dev_t *, int, int, cred_t *);
5567c478bd9Sstevel@tonic-gate int pcmcia_close(dev_t, int, int, cred_t *);
5577c478bd9Sstevel@tonic-gate int pcmcia_ioctl(dev_t, int, intptr_t, int, cred_t *, int *);
5587c478bd9Sstevel@tonic-gate int pcmcia_power(dev_info_t *, int, int);
5597c478bd9Sstevel@tonic-gate void pcmcia_begin_resume(dev_info_t *);
5607c478bd9Sstevel@tonic-gate void pcmcia_wait_insert(dev_info_t *);
5617c478bd9Sstevel@tonic-gate 
5627c478bd9Sstevel@tonic-gate 
5637c478bd9Sstevel@tonic-gate /* resource allocation functions and structure */
5647c478bd9Sstevel@tonic-gate typedef struct ra_return {
5657c478bd9Sstevel@tonic-gate 	uint_t	ra_addr_hi;
5667c478bd9Sstevel@tonic-gate 	uint_t	ra_addr_lo;
5677c478bd9Sstevel@tonic-gate 	uint_t	ra_len;
5687c478bd9Sstevel@tonic-gate } ra_return_t;
5697c478bd9Sstevel@tonic-gate 
570*8134ee03Srw int pcmcia_alloc_mem(dev_info_t *, ndi_ra_request_t *, ra_return_t *,
571*8134ee03Srw 		dev_info_t **);
572*8134ee03Srw int pcmcia_alloc_io(dev_info_t *, ndi_ra_request_t *, ra_return_t *,
573*8134ee03Srw 		dev_info_t **);
5747c478bd9Sstevel@tonic-gate int pcmcia_free_mem(dev_info_t *, ra_return_t *);
5757c478bd9Sstevel@tonic-gate int pcmcia_free_io(dev_info_t *, ra_return_t *);
5767c478bd9Sstevel@tonic-gate int pcmcia_map_reg(dev_info_t *, dev_info_t *, ra_return_t *,
5777c478bd9Sstevel@tonic-gate 			uint32_t, caddr_t *, ddi_acc_handle_t *,
5787c478bd9Sstevel@tonic-gate 			ddi_device_acc_attr_t *, uint32_t);
5797c478bd9Sstevel@tonic-gate int pcmcia_bus_map(dev_info_t *, dev_info_t *, ddi_map_req_t *,
5807c478bd9Sstevel@tonic-gate 	off_t, off_t, caddr_t *);
5817c478bd9Sstevel@tonic-gate 
5827c478bd9Sstevel@tonic-gate #endif /* _KERNEL */
5837c478bd9Sstevel@tonic-gate 
5847c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
5857c478bd9Sstevel@tonic-gate }
5867c478bd9Sstevel@tonic-gate #endif
5877c478bd9Sstevel@tonic-gate 
5887c478bd9Sstevel@tonic-gate #endif	/* _SSERVICE_H */
589