/*
* 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.
*/
/*
* av1394 isochronous module
*/
/* configuration routines */
static int av1394_isoch_create_minor_node(av1394_inst_t *);
static void av1394_isoch_remove_minor_node(av1394_inst_t *);
static void av1394_isoch_cleanup(av1394_inst_t *, int);
struct uio *);
/* ioctls */
static int av1394_ioctl_isoch_init(av1394_inst_t *, void *, int);
static int av1394_ioctl_isoch_fini(av1394_inst_t *, void *, int);
static int av1394_ioctl_start(av1394_inst_t *, void *, int);
static int av1394_ioctl_stop(av1394_inst_t *, void *, int);
static int av1394_ioctl_recv(av1394_inst_t *, void *, int);
static int av1394_ioctl_xmit(av1394_inst_t *, void *, int);
DEVMAP_OPS_REV, /* rev */
NULL, /* map */
NULL, /* access */
NULL, /* dup */
NULL, /* unmap */
};
/* tunables */
int
{
return (DDI_FAILURE);
}
return (DDI_FAILURE);
}
return (DDI_FAILURE);
}
return (DDI_SUCCESS);
}
void
{
}
int
{
int i;
/*
* suspend only if there are no active channels
*/
if (icp) {
ret = DDI_FAILURE;
}
}
}
return (ret);
}
/*ARGSUSED*/
int
{
int ret;
return (ret);
}
int
{
int ret;
/* use broadcast channel */
return (ret);
}
/* channel already used for xmit */
return (EBUSY);
}
}
return (ret);
}
int
{
int ret;
/* use broadcast channel */
return (ret);
}
/* channel already used for recv */
return (EBUSY);
}
return (ret);
}
/*ARGSUSED*/
int
int *rvalp)
{
switch (cmd) {
case IEC61883_ISOCH_INIT:
break;
case IEC61883_ISOCH_FINI:
break;
case IEC61883_START:
break;
case IEC61883_STOP:
break;
case IEC61883_RECV:
break;
case IEC61883_XMIT:
break;
case IEC61883_PLUG_INIT:
break;
case IEC61883_PLUG_FINI:
break;
case IEC61883_PLUG_REG_READ:
break;
case IEC61883_PLUG_REG_CAS:
break;
}
return (ret);
}
/*ARGSUSED*/
int
{
*maplen = 0;
/* find segment */
return (EINVAL);
}
/* map segment */
AV1394_TNF_ISOCH_ERROR, "");
return (EINVAL);
}
return (0);
}
/*
*
* --- configuration routines
*
* av1394_isoch_create_minor_node()
* Create isoch minor node
*/
static int
{
int ret;
if (ret != DDI_SUCCESS) {
AV1394_TNF_ISOCH_ERROR, "");
}
return (ret);
}
/*
* av1394_isoch_remove_minor_node()
* Remove isoch minor node
*/
static void
{
}
/*
* av1394_isoch_cleanup()
* Cleanup after attach
*/
static void
{
switch (level) {
default:
/* FALLTHRU */
case 3:
/* FALLTHRU */
case 2:
/* FALLTHRU */
case 1:
}
}
/*
* av1394_isoch_find_seg()
* Given an offset and size, find a matching av1394_isoch_seg_t structure.
*/
{
int i;
/* find channel from within this range */
continue;
}
break;
}
}
AV1394_TNF_ISOCH_ERROR, "");
return (NULL);
}
/* find a segment */
break;
}
}
AV1394_TNF_ISOCH_ERROR, "");
return (NULL);
}
/* only whole segments can be mapped */
AV1394_TNF_ISOCH_ERROR, "");
return (NULL);
}
return (isp);
}
/*
* initialize default channel for data receipt
*/
static int
{
int ret = 0;
return (ret);
}
/*
* initialize default channel for data xmit
*/
static int
{
int ret = 0;
/* copyin the first CIP header */
AV1394_TNF_ISOCH_ERROR, "");
return (EINVAL);
}
if (ret != 0) {
return (ret);
}
/* parse CIP header */
/* fill out the init structure */
/* either DV-NTSC or DV-PAL */
if (f5060 == 0) {
} else {
}
} else {
/* raw stream */
}
return (ret);
}
/*
*
* --- ioctls
* and passing control to the actual implementation.
*
*/
static int
{
#ifdef _MULTI_DATAMODEL
#endif
int ret;
return (EFAULT);
}
if (ret != 0) {
#ifdef _MULTI_DATAMODEL
} else
#endif
return (ret);
}
#ifdef _MULTI_DATAMODEL
/* fixup 32-bit deviations */
} else
#endif
if (ret != 0) {
return (ENOMEM);
}
return (ret);
}
static av1394_ic_t *
{
AV1394_TNF_ISOCH_ERROR, "");
return (NULL);
}
AV1394_TNF_ISOCH_ERROR, "");
}
}
/*ARGSUSED*/
static int
{
}
return (0);
}
/*ARGSUSED*/
static int
{
}
return (ret);
}
/*ARGSUSED*/
static int
{
}
return (ret);
}
static int
{
int num;
/* copyin the structure and get channel pointer */
return (EFAULT);
}
AV1394_TNF_ISOCH_ERROR, "");
return (EINVAL);
}
AV1394_TNF_ISOCH_ERROR, "");
}
/* now call the actual handler */
} else {
}
/* copyout the result */
if (ret == 0) {
return (EFAULT);
}
}
return (ret);
}
static int
{
int num;
/* copyin the structure and get channel pointer */
return (EFAULT);
}
AV1394_TNF_ISOCH_ERROR, "");
return (EINVAL);
}
AV1394_TNF_ISOCH_ERROR, "");
}
/* now call the actual handler */
} else {
}
/* copyout the result */
if (ret == 0) {
return (EFAULT);
}
}
return (ret);
}
static uint_t
{
int i;
do {
(i > 0) && (ip->i_softintr_ch != 0);
i--, ch >>= 1) {
continue;
}
continue;
}
}
}
}
} while (ip->i_softintr_ch != 0);
return (DDI_INTR_CLAIMED);
}