xref: /titanic_51/usr/src/uts/common/sys/1394/h1394.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef	_SYS_1394_H1394_H
28*7c478bd9Sstevel@tonic-gate #define	_SYS_1394_H1394_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*7c478bd9Sstevel@tonic-gate 
32*7c478bd9Sstevel@tonic-gate /*
33*7c478bd9Sstevel@tonic-gate  * h1394.h
34*7c478bd9Sstevel@tonic-gate  *    Contains the structure and error codes used to communicate
35*7c478bd9Sstevel@tonic-gate  *    between the HAL and the rest of the 1394 Software Framework
36*7c478bd9Sstevel@tonic-gate  */
37*7c478bd9Sstevel@tonic-gate 
38*7c478bd9Sstevel@tonic-gate #include <sys/types.h>
39*7c478bd9Sstevel@tonic-gate #include <sys/modctl.h>
40*7c478bd9Sstevel@tonic-gate #include <sys/ddi.h>
41*7c478bd9Sstevel@tonic-gate #include <sys/sunddi.h>
42*7c478bd9Sstevel@tonic-gate #include <sys/note.h>
43*7c478bd9Sstevel@tonic-gate 
44*7c478bd9Sstevel@tonic-gate #include <sys/1394/cmd1394.h>
45*7c478bd9Sstevel@tonic-gate #include <sys/1394/id1394.h>
46*7c478bd9Sstevel@tonic-gate 
47*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
48*7c478bd9Sstevel@tonic-gate extern "C" {
49*7c478bd9Sstevel@tonic-gate #endif
50*7c478bd9Sstevel@tonic-gate 
51*7c478bd9Sstevel@tonic-gate #define	H1394_CLEANUP_LEVEL7	7
52*7c478bd9Sstevel@tonic-gate #define	H1394_CLEANUP_LEVEL6	6
53*7c478bd9Sstevel@tonic-gate #define	H1394_CLEANUP_LEVEL5	5
54*7c478bd9Sstevel@tonic-gate #define	H1394_CLEANUP_LEVEL4	4
55*7c478bd9Sstevel@tonic-gate #define	H1394_CLEANUP_LEVEL3	3
56*7c478bd9Sstevel@tonic-gate #define	H1394_CLEANUP_LEVEL2	2
57*7c478bd9Sstevel@tonic-gate #define	H1394_CLEANUP_LEVEL1	1
58*7c478bd9Sstevel@tonic-gate #define	H1394_CLEANUP_LEVEL0	0
59*7c478bd9Sstevel@tonic-gate 
60*7c478bd9Sstevel@tonic-gate /* h1394_phy_t */
61*7c478bd9Sstevel@tonic-gate typedef enum {
62*7c478bd9Sstevel@tonic-gate 	H1394_PHY_1995	= 0,
63*7c478bd9Sstevel@tonic-gate 	H1394_PHY_1394A	= 1
64*7c478bd9Sstevel@tonic-gate } h1394_phy_t;
65*7c478bd9Sstevel@tonic-gate 
66*7c478bd9Sstevel@tonic-gate /* h1394_error_t */
67*7c478bd9Sstevel@tonic-gate typedef enum {
68*7c478bd9Sstevel@tonic-gate 	H1394_LOCK_RESP_ERR		= 1,
69*7c478bd9Sstevel@tonic-gate 	H1394_POSTED_WR_ERR		= 2,
70*7c478bd9Sstevel@tonic-gate 	H1394_SELF_INITIATED_SHUTDOWN	= 3,
71*7c478bd9Sstevel@tonic-gate 	H1394_CYCLE_TOO_LONG		= 4
72*7c478bd9Sstevel@tonic-gate } h1394_error_t;
73*7c478bd9Sstevel@tonic-gate 
74*7c478bd9Sstevel@tonic-gate /*
75*7c478bd9Sstevel@tonic-gate  * h1394_posted_wr_err_t
76*7c478bd9Sstevel@tonic-gate  *    The upper 16 bits contain the source id (bus/node) of the source node,
77*7c478bd9Sstevel@tonic-gate  *    the lower 48 bits contain the address that the error occured at.
78*7c478bd9Sstevel@tonic-gate  */
79*7c478bd9Sstevel@tonic-gate typedef struct h1394_posted_wr_err_s {
80*7c478bd9Sstevel@tonic-gate 	uint64_t	addr;
81*7c478bd9Sstevel@tonic-gate } h1394_posted_wr_err_t;
82*7c478bd9Sstevel@tonic-gate 
83*7c478bd9Sstevel@tonic-gate /*
84*7c478bd9Sstevel@tonic-gate  * h1394_node_pwr_flags_t
85*7c478bd9Sstevel@tonic-gate  *    Node power flags info
86*7c478bd9Sstevel@tonic-gate  */
87*7c478bd9Sstevel@tonic-gate typedef enum {
88*7c478bd9Sstevel@tonic-gate 	H1394_NODE_PWR_FLAGS_NONE	= (1 << 1),
89*7c478bd9Sstevel@tonic-gate 	H1394_BUS_PWRD_NODES_ONE_MORE	= (1 << 2),
90*7c478bd9Sstevel@tonic-gate 	H1394_BUS_PWRD_NODES_ONE_LESS	= (1 << 3),
91*7c478bd9Sstevel@tonic-gate 	H1394_ACTIVE_NODES_ONE_MORE	= (1 << 4),
92*7c478bd9Sstevel@tonic-gate 	H1394_ACTIVE_NODES_ONE_LESS	= (1 << 5)
93*7c478bd9Sstevel@tonic-gate } h1394_node_pwr_flags_t;
94*7c478bd9Sstevel@tonic-gate 
95*7c478bd9Sstevel@tonic-gate /*
96*7c478bd9Sstevel@tonic-gate  * h1394_addr_type_t
97*7c478bd9Sstevel@tonic-gate  *    h1394_addr_map.addr_type
98*7c478bd9Sstevel@tonic-gate  */
99*7c478bd9Sstevel@tonic-gate typedef enum {
100*7c478bd9Sstevel@tonic-gate 	H1394_ADDR_POSTED_WRITE	= 0,
101*7c478bd9Sstevel@tonic-gate 	H1394_ADDR_NORMAL	= 1,
102*7c478bd9Sstevel@tonic-gate 	H1394_ADDR_CSR		= 2,
103*7c478bd9Sstevel@tonic-gate 	H1394_ADDR_PHYSICAL	= 3,
104*7c478bd9Sstevel@tonic-gate 	H1394_ADDR_RESERVED	= 4
105*7c478bd9Sstevel@tonic-gate } h1394_addr_type_t;
106*7c478bd9Sstevel@tonic-gate 
107*7c478bd9Sstevel@tonic-gate /* h1394_mblk_t */
108*7c478bd9Sstevel@tonic-gate typedef struct h1394_mblk_s {
109*7c478bd9Sstevel@tonic-gate 	mblk_t		*curr_mblk;
110*7c478bd9Sstevel@tonic-gate 	unsigned char	*curr_offset;
111*7c478bd9Sstevel@tonic-gate 	uint_t		length;
112*7c478bd9Sstevel@tonic-gate 	mblk_t		*next_mblk;
113*7c478bd9Sstevel@tonic-gate 	unsigned char	*next_offset;
114*7c478bd9Sstevel@tonic-gate } h1394_mblk_t;
115*7c478bd9Sstevel@tonic-gate 
116*7c478bd9Sstevel@tonic-gate /* h1394_cmd_priv_t */
117*7c478bd9Sstevel@tonic-gate typedef struct h1394_cmd_priv_s {
118*7c478bd9Sstevel@tonic-gate 	uint_t		speed;
119*7c478bd9Sstevel@tonic-gate 	uint_t		ack_tstamp;
120*7c478bd9Sstevel@tonic-gate 	uint_t		recv_tstamp;
121*7c478bd9Sstevel@tonic-gate 	uint_t		bus_generation;
122*7c478bd9Sstevel@tonic-gate 	h1394_mblk_t	mblk;
123*7c478bd9Sstevel@tonic-gate 	void		*hal_overhead;
124*7c478bd9Sstevel@tonic-gate } h1394_cmd_priv_t;
125*7c478bd9Sstevel@tonic-gate 
126*7c478bd9Sstevel@tonic-gate _NOTE(SCHEME_PROTECTS_DATA("Used by a single thread", h1394_cmd_priv_s \
127*7c478bd9Sstevel@tonic-gate 	h1394_mblk_s::next_mblk h1394_mblk_s::next_offset))
128*7c478bd9Sstevel@tonic-gate 
129*7c478bd9Sstevel@tonic-gate /* h1394_evts_t */
130*7c478bd9Sstevel@tonic-gate typedef struct h1394_evts_s {
131*7c478bd9Sstevel@tonic-gate 	uint_t	hal_version;
132*7c478bd9Sstevel@tonic-gate 	uint_t	reserved;
133*7c478bd9Sstevel@tonic-gate 	void	(*shutdown)(void *hal_private);
134*7c478bd9Sstevel@tonic-gate 	int	(*send_phy_configuration_packet)(void *hal_private,
135*7c478bd9Sstevel@tonic-gate 		    cmd1394_cmd_t *phy_pkt, h1394_cmd_priv_t *cmd_private,
136*7c478bd9Sstevel@tonic-gate 		    int *result);
137*7c478bd9Sstevel@tonic-gate 	int	(*read)(void *hal_private, cmd1394_cmd_t *req,
138*7c478bd9Sstevel@tonic-gate 		    h1394_cmd_priv_t *cmd_private, int *result);
139*7c478bd9Sstevel@tonic-gate 	int	(*read_response)(void *hal_private, cmd1394_cmd_t *resp,
140*7c478bd9Sstevel@tonic-gate 		    h1394_cmd_priv_t *cmd_private, int *result);
141*7c478bd9Sstevel@tonic-gate 	int	(*write)(void *hal_private, cmd1394_cmd_t *req,
142*7c478bd9Sstevel@tonic-gate 		    h1394_cmd_priv_t *cmd_private, int *result);
143*7c478bd9Sstevel@tonic-gate 	int	(*write_response)(void *hal_private, cmd1394_cmd_t *resp,
144*7c478bd9Sstevel@tonic-gate 		    h1394_cmd_priv_t *cmd_private, int *result);
145*7c478bd9Sstevel@tonic-gate 	void	(*response_complete)(void *hal_private, cmd1394_cmd_t *resp,
146*7c478bd9Sstevel@tonic-gate 		    h1394_cmd_priv_t *cmd_private);
147*7c478bd9Sstevel@tonic-gate 	int	(*lock)(void *hal_private, cmd1394_cmd_t *req,
148*7c478bd9Sstevel@tonic-gate 		    h1394_cmd_priv_t *cmd_private, int *result);
149*7c478bd9Sstevel@tonic-gate 	int	(*lock_response)(void *hal_private, cmd1394_cmd_t *resp,
150*7c478bd9Sstevel@tonic-gate 		    h1394_cmd_priv_t *cmd_private, int *result);
151*7c478bd9Sstevel@tonic-gate 	int	(*alloc_isoch_dma)(void *hal_private,
152*7c478bd9Sstevel@tonic-gate 		    id1394_isoch_dmainfo_t *idi, void **hal_idma_handle,
153*7c478bd9Sstevel@tonic-gate 		    int *result);
154*7c478bd9Sstevel@tonic-gate 	void	(*free_isoch_dma)(void *hal_private,
155*7c478bd9Sstevel@tonic-gate 		    void *hal_isoch_dma_handle);
156*7c478bd9Sstevel@tonic-gate 	int	(*start_isoch_dma)(void *hal_private,
157*7c478bd9Sstevel@tonic-gate 		    void *hal_isoch_dma_handle,
158*7c478bd9Sstevel@tonic-gate 		    id1394_isoch_dma_ctrlinfo_t *idma_ctrlinfo, uint_t flags,
159*7c478bd9Sstevel@tonic-gate 		    int *result);
160*7c478bd9Sstevel@tonic-gate 	void	(*stop_isoch_dma)(void *hal_private, void *hal_isoch_dma_handle,
161*7c478bd9Sstevel@tonic-gate 		    int *result);
162*7c478bd9Sstevel@tonic-gate 	int	(*update_isoch_dma)(void *hal_private,
163*7c478bd9Sstevel@tonic-gate 		    void *hal_isoch_dma_handle,
164*7c478bd9Sstevel@tonic-gate 		    id1394_isoch_dma_updateinfo_t *idma_updateinfo,
165*7c478bd9Sstevel@tonic-gate 		    uint_t flags, int *result);
166*7c478bd9Sstevel@tonic-gate 	int	(*update_config_rom)(void *hal_private, void *local_buf,
167*7c478bd9Sstevel@tonic-gate 		    uint_t quadlet_count);
168*7c478bd9Sstevel@tonic-gate 	int	(*bus_reset)(void *hal_private);
169*7c478bd9Sstevel@tonic-gate 	int	(*short_bus_reset)(void *hal_private);
170*7c478bd9Sstevel@tonic-gate 	int	(*set_contender_bit)(void *hal_private);
171*7c478bd9Sstevel@tonic-gate 	int	(*set_root_holdoff_bit)(void *hal_private);
172*7c478bd9Sstevel@tonic-gate 	int	(*set_gap_count)(void *hal_private, uint_t gap_count);
173*7c478bd9Sstevel@tonic-gate 	int	(*csr_read)(void *hal_private, uint_t offset, uint32_t *data);
174*7c478bd9Sstevel@tonic-gate 	int	(*csr_write)(void *hal_private, uint_t offset, uint32_t data);
175*7c478bd9Sstevel@tonic-gate 	int	(*csr_cswap32)(void *hal_private, uint_t generation,
176*7c478bd9Sstevel@tonic-gate 		    uint_t offset, uint32_t compare, uint32_t swap,
177*7c478bd9Sstevel@tonic-gate 		    uint32_t *old);
178*7c478bd9Sstevel@tonic-gate 	int	(*physical_arreq_enable_set)(void *hal_private, uint64_t mask,
179*7c478bd9Sstevel@tonic-gate 		    uint_t generation);
180*7c478bd9Sstevel@tonic-gate 	int	(*physical_arreq_enable_clr)(void *hal_private, uint64_t mask,
181*7c478bd9Sstevel@tonic-gate 		    uint_t generation);
182*7c478bd9Sstevel@tonic-gate 	void	(*node_power_state_change)(void *hal_private,
183*7c478bd9Sstevel@tonic-gate 		    h1394_node_pwr_flags_t nodeflags);
184*7c478bd9Sstevel@tonic-gate } h1394_evts_t;
185*7c478bd9Sstevel@tonic-gate /* Version value for h1394_evts_t */
186*7c478bd9Sstevel@tonic-gate #define	H1394_EVTS_V1			1
187*7c478bd9Sstevel@tonic-gate 
188*7c478bd9Sstevel@tonic-gate #define	HAL_CALL(hal)			(hal)->halinfo.hal_events
189*7c478bd9Sstevel@tonic-gate 
190*7c478bd9Sstevel@tonic-gate /* Result field returned by read/write/lock requests */
191*7c478bd9Sstevel@tonic-gate #define	H1394_STATUS_NO_ERROR		0
192*7c478bd9Sstevel@tonic-gate #define	H1394_STATUS_INVALID_BUSGEN	1
193*7c478bd9Sstevel@tonic-gate #define	H1394_STATUS_EMPTY_TLABEL	2
194*7c478bd9Sstevel@tonic-gate #define	H1394_STATUS_NOMORE_SPACE	3
195*7c478bd9Sstevel@tonic-gate #define	H1394_STATUS_INTERNAL_ERROR	4
196*7c478bd9Sstevel@tonic-gate 
197*7c478bd9Sstevel@tonic-gate /* h1394_addr_map_t */
198*7c478bd9Sstevel@tonic-gate typedef struct h1394_addr_map_s {
199*7c478bd9Sstevel@tonic-gate 	uint64_t		address;
200*7c478bd9Sstevel@tonic-gate 	uint64_t		length;
201*7c478bd9Sstevel@tonic-gate 	h1394_addr_type_t	addr_type;
202*7c478bd9Sstevel@tonic-gate } h1394_addr_map_t;
203*7c478bd9Sstevel@tonic-gate 
204*7c478bd9Sstevel@tonic-gate /* h1394_halinfo_t */
205*7c478bd9Sstevel@tonic-gate typedef struct h1394_halinfo_s {
206*7c478bd9Sstevel@tonic-gate 	void			*hal_private;
207*7c478bd9Sstevel@tonic-gate 	dev_info_t		*dip;
208*7c478bd9Sstevel@tonic-gate 	h1394_evts_t		hal_events;
209*7c478bd9Sstevel@tonic-gate 	ddi_iblock_cookie_t	hw_interrupt;
210*7c478bd9Sstevel@tonic-gate 
211*7c478bd9Sstevel@tonic-gate 	/* Buffer attributes */
212*7c478bd9Sstevel@tonic-gate 	ddi_device_acc_attr_t	acc_attr;
213*7c478bd9Sstevel@tonic-gate 	ddi_dma_attr_t		dma_attr;
214*7c478bd9Sstevel@tonic-gate 
215*7c478bd9Sstevel@tonic-gate 	/* Type of PHY on HAL */
216*7c478bd9Sstevel@tonic-gate 	h1394_phy_t		phy;
217*7c478bd9Sstevel@tonic-gate 
218*7c478bd9Sstevel@tonic-gate 	uint_t			hal_overhead; /* in bytes */
219*7c478bd9Sstevel@tonic-gate 	uint32_t   		bus_capabilities;
220*7c478bd9Sstevel@tonic-gate 	uint64_t		guid;
221*7c478bd9Sstevel@tonic-gate 	uint32_t		node_capabilities;
222*7c478bd9Sstevel@tonic-gate 
223*7c478bd9Sstevel@tonic-gate 	/*
224*7c478bd9Sstevel@tonic-gate 	 * The maximum value generation can have before
225*7c478bd9Sstevel@tonic-gate 	 * it rolls over (inclusive)
226*7c478bd9Sstevel@tonic-gate 	 */
227*7c478bd9Sstevel@tonic-gate 	uint_t			max_generation;
228*7c478bd9Sstevel@tonic-gate 
229*7c478bd9Sstevel@tonic-gate 	/* Description of the 1394 Address Space */
230*7c478bd9Sstevel@tonic-gate 	h1394_addr_map_t	*addr_map;
231*7c478bd9Sstevel@tonic-gate 	uint_t			addr_map_num_entries;
232*7c478bd9Sstevel@tonic-gate 
233*7c478bd9Sstevel@tonic-gate 	/* Description of the reserved spaces */
234*7c478bd9Sstevel@tonic-gate 	h1394_addr_map_t	*resv_map;
235*7c478bd9Sstevel@tonic-gate 	uint_t			resv_map_num_entries;
236*7c478bd9Sstevel@tonic-gate } h1394_halinfo_t;
237*7c478bd9Sstevel@tonic-gate 
238*7c478bd9Sstevel@tonic-gate 
239*7c478bd9Sstevel@tonic-gate /* Calls to Services layer during HAL driver _init() and _fini() */
240*7c478bd9Sstevel@tonic-gate int h1394_init(struct modlinkage  *modlp);
241*7c478bd9Sstevel@tonic-gate void h1394_fini(struct modlinkage  *modlp);
242*7c478bd9Sstevel@tonic-gate 
243*7c478bd9Sstevel@tonic-gate 
244*7c478bd9Sstevel@tonic-gate /* Calls to Services layer during HAL driver attach/detach */
245*7c478bd9Sstevel@tonic-gate int h1394_attach(h1394_halinfo_t *halinfo, ddi_attach_cmd_t cmd,
246*7c478bd9Sstevel@tonic-gate     void **sl_private);
247*7c478bd9Sstevel@tonic-gate 
248*7c478bd9Sstevel@tonic-gate int h1394_detach(void **sl_private, ddi_detach_cmd_t cmd);
249*7c478bd9Sstevel@tonic-gate 
250*7c478bd9Sstevel@tonic-gate 
251*7c478bd9Sstevel@tonic-gate /* Calls to Services layer during HW interrupt processing */
252*7c478bd9Sstevel@tonic-gate void h1394_cmd_is_complete(void *sl_private, cmd1394_cmd_t *command_id,
253*7c478bd9Sstevel@tonic-gate     uint32_t cmd_type, int status);
254*7c478bd9Sstevel@tonic-gate /* Command types (passed to h1394_command_is_complete) */
255*7c478bd9Sstevel@tonic-gate #define	H1394_AT_REQ		0
256*7c478bd9Sstevel@tonic-gate #define	H1394_AT_RESP		1
257*7c478bd9Sstevel@tonic-gate /* Command statuses (passed to h1394_command_is_complete) */
258*7c478bd9Sstevel@tonic-gate #define	H1394_CMD_SUCCESS		0x00	/* ack_complete */
259*7c478bd9Sstevel@tonic-gate #define	H1394_CMD_ETIMEOUT		0x01	/* evt_missing_ack */
260*7c478bd9Sstevel@tonic-gate #define	H1394_CMD_EBUSRESET		0x02	/* evt_flushed */
261*7c478bd9Sstevel@tonic-gate #define	H1394_CMD_EDEVICE_BUSY		0x03	/* ack_busy_? */
262*7c478bd9Sstevel@tonic-gate #define	H1394_CMD_EDATA_ERROR		0x04	/* ack_data_error */
263*7c478bd9Sstevel@tonic-gate #define	H1394_CMD_ETYPE_ERROR		0x05	/* ack_type_error */
264*7c478bd9Sstevel@tonic-gate #define	H1394_CMD_EADDR_ERROR		0x06	/* resp_address_error */
265*7c478bd9Sstevel@tonic-gate #define	H1394_CMD_ERSRC_CONFLICT	0x07	/* resp_conflict_error */
266*7c478bd9Sstevel@tonic-gate #define	H1394_CMD_EDEVICE_POWERUP	0x08	/* ack_tardy */
267*7c478bd9Sstevel@tonic-gate #define	H1394_CMD_EDEVICE_ERROR		0x09	/* device error */
268*7c478bd9Sstevel@tonic-gate #define	H1394_CMD_EUNKNOWN_ERROR	0x0A	/* unknown error type */
269*7c478bd9Sstevel@tonic-gate 
270*7c478bd9Sstevel@tonic-gate void h1394_bus_reset(void *sl_private, void **selfid_buf_addr);
271*7c478bd9Sstevel@tonic-gate 
272*7c478bd9Sstevel@tonic-gate void h1394_self_ids(void *sl_private, void *selfid_buf_addr,
273*7c478bd9Sstevel@tonic-gate     uint32_t selfid_size, uint32_t node_id, uint32_t generation_count);
274*7c478bd9Sstevel@tonic-gate 
275*7c478bd9Sstevel@tonic-gate void h1394_write_request(void *sl_private, cmd1394_cmd_t *req);
276*7c478bd9Sstevel@tonic-gate 
277*7c478bd9Sstevel@tonic-gate void h1394_read_request(void *sl_private, cmd1394_cmd_t *req);
278*7c478bd9Sstevel@tonic-gate 
279*7c478bd9Sstevel@tonic-gate void h1394_lock_request(void *sl_private, cmd1394_cmd_t *req);
280*7c478bd9Sstevel@tonic-gate 
281*7c478bd9Sstevel@tonic-gate int h1394_alloc_cmd(void *sl_private, uint_t flags, cmd1394_cmd_t **cmdp,
282*7c478bd9Sstevel@tonic-gate     h1394_cmd_priv_t **hal_priv_ptr);
283*7c478bd9Sstevel@tonic-gate /* Flags for h1394_alloc_cmd() */
284*7c478bd9Sstevel@tonic-gate #define	H1394_ALLOC_CMD_SLEEP		0x00000000 /* can sleep allocating */
285*7c478bd9Sstevel@tonic-gate #define	H1394_ALLOC_CMD_NOSLEEP		0x00000001 /* don't sleep allocating */
286*7c478bd9Sstevel@tonic-gate 
287*7c478bd9Sstevel@tonic-gate int h1394_free_cmd(void *sl_private, cmd1394_cmd_t **cmdp);
288*7c478bd9Sstevel@tonic-gate int h1394_ioctl(void *sl_private, int cmd, intptr_t arg, int mode,
289*7c478bd9Sstevel@tonic-gate     cred_t *cred_p, int *rval_p);
290*7c478bd9Sstevel@tonic-gate 
291*7c478bd9Sstevel@tonic-gate void h1394_phy_packet(void *sl_private, uint32_t *packet_data,
292*7c478bd9Sstevel@tonic-gate     uint_t quadlet_count, uint_t timestamp);
293*7c478bd9Sstevel@tonic-gate 
294*7c478bd9Sstevel@tonic-gate void h1394_error_detected(void *sl_private, h1394_error_t type, void *arg);
295*7c478bd9Sstevel@tonic-gate 
296*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
297*7c478bd9Sstevel@tonic-gate }
298*7c478bd9Sstevel@tonic-gate #endif
299*7c478bd9Sstevel@tonic-gate 
300*7c478bd9Sstevel@tonic-gate #endif	/* _SYS_1394_H1394_H */
301