alistair23-linux/drivers/staging/tidspbridge/include/dspbridge/chnlpriv.h
Rene Sapiens 085467b8f5 staging: tidspbridge: set8 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:                Replacement:
hbridge_context          bridge_context
hchnl_mgr                chnl_mgr
hcmm_mgr                 cmm_mgr
hdcd_mgr                 dcd_mgr
hdeh_mgr                 deh_mgr
hdev_obj                 dev_obj
hdrv_obj                 drv_obj
hmgr_obj                 mgr_obj
hmsg_mgr                 msg_mgr
hnode_mgr                node_mgr
psz_last_coff            last_coff
ul_resource              resource
ul_seg_id                seg_id
ul_size                  size
ul_sm_size               sm_size
ul_total_free_size       total_free_size
ul_total_in_use_cnt      total_in_use_cnt
ul_total_seg_size        total_seg_size
ul_trace_buffer_begin    trace_buffer_begin
ul_trace_buffer_current  trace_buffer_current
ul_trace_buffer_end      trace_buffer_end
ul_unit                  unit
ul_virt_size             virt_size
us_dsp_mau_size          dsp_mau_size
us_dsp_word_size         dsp_word_size

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:22 -06:00

86 lines
2.5 KiB
C

/*
* chnlpriv.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Private channel header shared between DSPSYS, DSPAPI and
* Bridge driver modules.
*
* Copyright (C) 2005-2006 Texas Instruments, Inc.
*
* This package is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef CHNLPRIV_
#define CHNLPRIV_
#include <dspbridge/chnldefs.h>
#include <dspbridge/devdefs.h>
#include <dspbridge/sync.h>
/* Channel manager limits: */
#define CHNL_MAXCHANNELS 32 /* Max channels available per transport */
/*
* Trans port channel Id definitions:(must match dsp-side).
*
* For CHNL_MAXCHANNELS = 16:
*
* ChnlIds:
* 0-15 (PCPY) - transport 0)
* 16-31 (DDMA) - transport 1)
* 32-47 (ZCPY) - transport 2)
*/
#define CHNL_PCPY 0 /* Proc-copy transport 0 */
/* Higher level channel states: */
#define CHNL_STATEREADY 0 /* Channel ready for I/O. */
#define CHNL_STATECANCEL 1 /* I/O was cancelled. */
#define CHNL_STATEEOS 2 /* End Of Stream reached. */
/* Macros for checking mode: */
#define CHNL_IS_INPUT(mode) (mode & CHNL_MODEFROMDSP)
#define CHNL_IS_OUTPUT(mode) (!CHNL_IS_INPUT(mode))
/* Types of channel class libraries: */
#define CHNL_TYPESM 1 /* Shared memory driver. */
/* Channel info. */
struct chnl_info {
struct chnl_mgr *chnl_mgr; /* Owning channel manager. */
u32 cnhl_id; /* Channel ID. */
void *event_obj; /* Channel I/O completion event. */
/*Abstraction of I/O completion event. */
struct sync_object *sync_event;
s8 mode; /* Channel mode. */
u8 state; /* Current channel state. */
u32 bytes_tx; /* Total bytes transferred. */
u32 cio_cs; /* Number of IOCs in queue. */
u32 cio_reqs; /* Number of IO Requests in queue. */
u32 process; /* Process owning this channel. */
};
/* Channel manager info: */
struct chnl_mgrinfo {
u8 type; /* Type of channel class library. */
/* Channel handle, given the channel id. */
struct chnl_object *chnl_obj;
u8 open_channels; /* Number of open channels. */
u8 max_channels; /* total # of chnls supported */
};
/* Channel Manager Attrs: */
struct chnl_mgrattrs {
/* Max number of channels this manager can use. */
u8 max_channels;
u32 word_size; /* DSP Word size. */
};
#endif /* CHNLPRIV_ */