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*19397407SSherry Moore * Common Development and Distribution License (the "License"). 6*19397407SSherry Moore * 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*19397407SSherry Moore * Copyright 2008 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 _SYS_1394_ADAPTERS_HCI1394_H 277c478bd9Sstevel@tonic-gate #define _SYS_1394_ADAPTERS_HCI1394_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate /* 317c478bd9Sstevel@tonic-gate * hci1394.h 327c478bd9Sstevel@tonic-gate * This file contains general defines and function prototypes for things 337c478bd9Sstevel@tonic-gate * that did not warrant separate header files. 347c478bd9Sstevel@tonic-gate */ 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate #ifdef __cplusplus 377c478bd9Sstevel@tonic-gate extern "C" { 387c478bd9Sstevel@tonic-gate #endif 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate #include <sys/types.h> 417c478bd9Sstevel@tonic-gate #include <sys/conf.h> 427c478bd9Sstevel@tonic-gate #include <sys/ddi.h> 437c478bd9Sstevel@tonic-gate #include <sys/sunddi.h> 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gate #include <sys/1394/ieee1394.h> 467c478bd9Sstevel@tonic-gate #include <sys/1394/h1394.h> 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_def.h> 497c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_tnf.h> 507c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_drvinfo.h> 517c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_tlist.h> 527c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_tlabel.h> 537c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_ioctl.h> 547c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_rio_regs.h> 557c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_ohci.h> 567c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_descriptors.h> 577c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_csr.h> 587c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_vendor.h> 597c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_buf.h> 607c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_q.h> 617c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_async.h> 627c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_ixl.h> 637c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_isoch.h> 647c478bd9Sstevel@tonic-gate #include <sys/1394/id1394.h> 657c478bd9Sstevel@tonic-gate #include <sys/1394/adapters/hci1394_state.h> 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate /* Number of initial states to setup. Used in call to ddi_soft_state_init() */ 697c478bd9Sstevel@tonic-gate #define HCI1394_INITIAL_STATES 3 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate /* 727c478bd9Sstevel@tonic-gate * Size of the Address Map Array passed to the Service Layer. There are 4 737c478bd9Sstevel@tonic-gate * sections in the OpenHCI address space. They are Physical, Posted Write, 747c478bd9Sstevel@tonic-gate * Normal, and CSR space. 757c478bd9Sstevel@tonic-gate */ 767c478bd9Sstevel@tonic-gate #define HCI1394_ADDR_MAP_SIZE 4 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate /* Macro to align address on a quadlet boundry */ 797c478bd9Sstevel@tonic-gate #define HCI1394_ALIGN_QUAD(addr) (((addr) + 3) & 0xFFFFFFFC) 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate /* These functions can be found in hci1394_attach.c */ 827c478bd9Sstevel@tonic-gate int hci1394_attach(dev_info_t *dip, ddi_attach_cmd_t cmd); 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate /* These functions can be found in hci1394_detach.c */ 857c478bd9Sstevel@tonic-gate int hci1394_detach(dev_info_t *dip, ddi_detach_cmd_t cmd); 867c478bd9Sstevel@tonic-gate void hci1394_detach_hardware(hci1394_state_t *soft_state); 877c478bd9Sstevel@tonic-gate void hci1394_pci_fini(hci1394_state_t *soft_state); 887c478bd9Sstevel@tonic-gate void hci1394_soft_state_fini(hci1394_state_t *soft_state); 89*19397407SSherry Moore int hci1394_quiesce(dev_info_t *dip); 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate /* These functions can be found in hci1394_misc.c */ 927c478bd9Sstevel@tonic-gate hci1394_statevar_t hci1394_state(hci1394_drvinfo_t *drvinfo); 937c478bd9Sstevel@tonic-gate int hci1394_state_set(hci1394_drvinfo_t *drvinfo, hci1394_statevar_t state); 947c478bd9Sstevel@tonic-gate int hci1394_open(dev_t *devp, int flag, int otyp, cred_t *credp); 957c478bd9Sstevel@tonic-gate int hci1394_close(dev_t dev, int flag, int otyp, cred_t *credp); 967c478bd9Sstevel@tonic-gate void hci1394_shutdown(dev_info_t *dip); 977c478bd9Sstevel@tonic-gate int hci1394_getinfo(dev_info_t *dip, ddi_info_cmd_t cmd, void *arg, 987c478bd9Sstevel@tonic-gate void **result); 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gate /* These functions can be found in hci1394_ioctl.c */ 1017c478bd9Sstevel@tonic-gate int hci1394_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, 1027c478bd9Sstevel@tonic-gate int *rvalp); 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gate /* These functions can be found in hci1394_isr.c */ 1057c478bd9Sstevel@tonic-gate int hci1394_isr_init(hci1394_state_t *soft_state); 1067c478bd9Sstevel@tonic-gate void hci1394_isr_fini(hci1394_state_t *soft_state); 1077c478bd9Sstevel@tonic-gate int hci1394_isr_handler_init(hci1394_state_t *soft_state); 1087c478bd9Sstevel@tonic-gate void hci1394_isr_handler_fini(hci1394_state_t *soft_state); 1097c478bd9Sstevel@tonic-gate void hci1394_isr_mask_setup(hci1394_state_t *soft_state); 1107c478bd9Sstevel@tonic-gate 1117c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1127c478bd9Sstevel@tonic-gate } 1137c478bd9Sstevel@tonic-gate #endif 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gate #endif /* _SYS_1394_ADAPTERS_HCI1394_H */ 116