/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_1394_TARGETS_AV1394_ISOCH_H
#define _SYS_1394_TARGETS_AV1394_ISOCH_H
/*
* isoch module definitions
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* isoch DMA memory management: segments and pools
*
* isoch segment - a contiguous chunk of kernel memory
*/
typedef struct av1394_isoch_seg_s {
/* dma cookie */
/* # of cookies */
/*
* isoch pool - a set of one or more isoch segments
*/
typedef struct av1394_isoch_pool_s {
/*
* many members are protected because they are modified during channel
* single-threaded processes. after that these members remain read-only.
*/
/*
* IXL receive data block (one or more RECV_BUF commands will follow the label)
*/
typedef struct av1394_ir_ixl_data_s {
/*
* isoch receive structure
*/
typedef struct av1394_ir_s {
/* IXL */
/* xfer */
/* read() support */
} av1394_ir_t;
}))
/*
* IXL transmit begin block, used to get a starting point for timestamping
*/
typedef struct av1394_it_ixl_begin_s {
/*
* common part of transmit commands that are in a linked list
*/
typedef struct av1394_it_ixl_common_s {
/*
* IXL transmit data block
*/
typedef struct av1394_it_ixl_buf_s {
int tb_flags;
/* tb_flags */
enum {
};
/*
* empty CIP
*/
typedef struct av1394_it_ixl_empty_cip_s {
/*
* per-frame information
*/
typedef struct av1394_it_frame_info_s {
/*
* timestamp type
*/
typedef union av1394_it_ts {
/*
* isoch transmit structure
*/
typedef struct av1394_it_s {
/* IXL */
/* xfer */
/* underrun data */
/* write() support */
} av1394_it_t;
}))
/* misc channel parameters */
typedef struct av1394_ic_param_s {
/* channel state */
typedef enum {
/*
* isoch channel structure, common for both recv and xmit
*/
typedef struct av1394_ic_s {
} av1394_ic_t;
}))
/* xfer directions */
enum {
};
/* CIP type */
enum {
};
/* misc constants */
enum {
/* 57344 is ptob(btop(65535)) */
};
/* private ISOCH_INIT flag */
/*
* autoxmit (isoch xmit via write(2)) support
*/
typedef struct av1394_isoch_autoxmit_s {
/* autoxmit formats */
enum {
};
/*
* User processes calling mmap(2) pass the 'offset' and 'len' arguments,
* returned by IEC61883_ISOCH_INIT ioctl. These arguments uniquely identify
* the DMA buffer associated with a channel. For each isochronous channel
* a part of this "address space" should be allocated to prevent conflicts
* with other channels.
*/
typedef struct av1394_as_s {
} av1394_as_t;
/*
* CMP (Connection Management Procedures)
*
* PCR address map (Ref: IEC 61883-1 Fig 14)
*/
/* initial values and bus reset masks (Ref: IEC 61883-1 Fig 10-13) */
/*
* local plug control register
*/
typedef struct av1394_pcr_s {
} av1394_pcr_t;
enum {
};
/* plug handle manipulation */
enum {
};
/*
* per-instance CMP structure
*/
typedef struct av1394_cmp_s {
} av1394_cmp_t;
/*
* per-instance soft state structure
*/
typedef struct av1394_isoch_s {
}))
/* postponed request types */
enum {
};
/* TNF probes */
/* isoch channel */
int av1394_ic_open(struct av1394_inst_s *, int);
int av1394_ic_close(struct av1394_inst_s *, int);
av1394_ic_t **icpp);
int mincnt);
/* isoch receive */
/* isoch transmit */
/* address space for mmap(2) */
/* CMP */
int av1394_ioctl_plug_init(struct av1394_inst_s *, void *, int);
int av1394_ioctl_plug_fini(struct av1394_inst_s *, void *, int);
int av1394_ioctl_plug_reg_read(struct av1394_inst_s *, void *, int);
int av1394_ioctl_plug_reg_cas(struct av1394_inst_s *, void *, int);
/* isoch common */
int av1394_isoch_attach(struct av1394_inst_s *);
void av1394_isoch_detach(struct av1394_inst_s *);
int av1394_isoch_cpr_suspend(struct av1394_inst_s *);
int av1394_isoch_cpr_resume(struct av1394_inst_s *);
void av1394_isoch_bus_reset(struct av1394_inst_s *);
void av1394_isoch_disconnect(struct av1394_inst_s *);
void av1394_isoch_reconnect(struct av1394_inst_s *);
int av1394_isoch_open(struct av1394_inst_s *, int);
int av1394_isoch_close(struct av1394_inst_s *, int);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_1394_TARGETS_AV1394_ISOCH_H */