xref: /onnv-gate/usr/src/uts/common/sys/1394/adapters/hci1394.h (revision 7656:2621e50fdf4a)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7656SSherry.Moore@Sun.COM  * Common Development and Distribution License (the "License").
6*7656SSherry.Moore@Sun.COM  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*7656SSherry.Moore@Sun.COM  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #ifndef	_SYS_1394_ADAPTERS_HCI1394_H
270Sstevel@tonic-gate #define	_SYS_1394_ADAPTERS_HCI1394_H
280Sstevel@tonic-gate 
290Sstevel@tonic-gate 
300Sstevel@tonic-gate /*
310Sstevel@tonic-gate  * hci1394.h
320Sstevel@tonic-gate  *    This file contains general defines and function prototypes for things
330Sstevel@tonic-gate  *    that did not warrant separate header files.
340Sstevel@tonic-gate  */
350Sstevel@tonic-gate 
360Sstevel@tonic-gate #ifdef __cplusplus
370Sstevel@tonic-gate extern "C" {
380Sstevel@tonic-gate #endif
390Sstevel@tonic-gate 
400Sstevel@tonic-gate #include <sys/types.h>
410Sstevel@tonic-gate #include <sys/conf.h>
420Sstevel@tonic-gate #include <sys/ddi.h>
430Sstevel@tonic-gate #include <sys/sunddi.h>
440Sstevel@tonic-gate 
450Sstevel@tonic-gate #include <sys/1394/ieee1394.h>
460Sstevel@tonic-gate #include <sys/1394/h1394.h>
470Sstevel@tonic-gate 
480Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_def.h>
490Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_tnf.h>
500Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_drvinfo.h>
510Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_tlist.h>
520Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_tlabel.h>
530Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_ioctl.h>
540Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_rio_regs.h>
550Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_ohci.h>
560Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_descriptors.h>
570Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_csr.h>
580Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_vendor.h>
590Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_buf.h>
600Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_q.h>
610Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_async.h>
620Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_ixl.h>
630Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_isoch.h>
640Sstevel@tonic-gate #include <sys/1394/id1394.h>
650Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_state.h>
660Sstevel@tonic-gate 
670Sstevel@tonic-gate 
680Sstevel@tonic-gate /* Number of initial states to setup. Used in call to ddi_soft_state_init() */
690Sstevel@tonic-gate #define	HCI1394_INITIAL_STATES		3
700Sstevel@tonic-gate 
710Sstevel@tonic-gate /*
720Sstevel@tonic-gate  * Size of the Address Map Array passed to the Service Layer. There are 4
730Sstevel@tonic-gate  * sections in the OpenHCI address space. They are Physical, Posted Write,
740Sstevel@tonic-gate  * Normal, and CSR space.
750Sstevel@tonic-gate  */
760Sstevel@tonic-gate #define	HCI1394_ADDR_MAP_SIZE		4
770Sstevel@tonic-gate 
780Sstevel@tonic-gate /* Macro to align address on a quadlet boundry */
790Sstevel@tonic-gate #define	HCI1394_ALIGN_QUAD(addr) (((addr) + 3) & 0xFFFFFFFC)
800Sstevel@tonic-gate 
810Sstevel@tonic-gate /* These functions can be found in hci1394_attach.c */
820Sstevel@tonic-gate int hci1394_attach(dev_info_t *dip, ddi_attach_cmd_t cmd);
830Sstevel@tonic-gate 
840Sstevel@tonic-gate /* These functions can be found in hci1394_detach.c */
850Sstevel@tonic-gate int hci1394_detach(dev_info_t *dip, ddi_detach_cmd_t cmd);
860Sstevel@tonic-gate void hci1394_detach_hardware(hci1394_state_t *soft_state);
870Sstevel@tonic-gate void hci1394_pci_fini(hci1394_state_t *soft_state);
880Sstevel@tonic-gate void hci1394_soft_state_fini(hci1394_state_t *soft_state);
89*7656SSherry.Moore@Sun.COM int hci1394_quiesce(dev_info_t *dip);
900Sstevel@tonic-gate 
910Sstevel@tonic-gate /* These functions can be found in hci1394_misc.c */
920Sstevel@tonic-gate hci1394_statevar_t hci1394_state(hci1394_drvinfo_t *drvinfo);
930Sstevel@tonic-gate int hci1394_state_set(hci1394_drvinfo_t *drvinfo, hci1394_statevar_t state);
940Sstevel@tonic-gate int hci1394_open(dev_t *devp, int flag, int otyp, cred_t *credp);
950Sstevel@tonic-gate int hci1394_close(dev_t dev, int flag, int otyp, cred_t *credp);
960Sstevel@tonic-gate void hci1394_shutdown(dev_info_t *dip);
970Sstevel@tonic-gate int hci1394_getinfo(dev_info_t *dip, ddi_info_cmd_t cmd, void *arg,
980Sstevel@tonic-gate     void **result);
990Sstevel@tonic-gate 
1000Sstevel@tonic-gate /* These functions can be found in hci1394_ioctl.c */
1010Sstevel@tonic-gate int hci1394_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp,
1020Sstevel@tonic-gate     int *rvalp);
1030Sstevel@tonic-gate 
1040Sstevel@tonic-gate /* These functions can be found in hci1394_isr.c */
1050Sstevel@tonic-gate int hci1394_isr_init(hci1394_state_t *soft_state);
1060Sstevel@tonic-gate void hci1394_isr_fini(hci1394_state_t *soft_state);
1070Sstevel@tonic-gate int hci1394_isr_handler_init(hci1394_state_t *soft_state);
1080Sstevel@tonic-gate void hci1394_isr_handler_fini(hci1394_state_t *soft_state);
1090Sstevel@tonic-gate void hci1394_isr_mask_setup(hci1394_state_t *soft_state);
1100Sstevel@tonic-gate 
1110Sstevel@tonic-gate #ifdef __cplusplus
1120Sstevel@tonic-gate }
1130Sstevel@tonic-gate #endif
1140Sstevel@tonic-gate 
1150Sstevel@tonic-gate #endif	/* _SYS_1394_ADAPTERS_HCI1394_H */
116