xref: /OK3568_Linux_fs/kernel/drivers/char/mwave/mwavepub.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun *
3*4882a593Smuzhiyun * mwavepub.h -- PUBLIC declarations for the mwave driver
4*4882a593Smuzhiyun *               and applications using it
5*4882a593Smuzhiyun *
6*4882a593Smuzhiyun *
7*4882a593Smuzhiyun * Written By: Mike Sullivan IBM Corporation
8*4882a593Smuzhiyun *
9*4882a593Smuzhiyun * Copyright (C) 1999 IBM Corporation
10*4882a593Smuzhiyun *
11*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or modify
12*4882a593Smuzhiyun * it under the terms of the GNU General Public License as published by
13*4882a593Smuzhiyun * the Free Software Foundation; either version 2 of the License, or
14*4882a593Smuzhiyun * (at your option) any later version.
15*4882a593Smuzhiyun *
16*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful,
17*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of
18*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19*4882a593Smuzhiyun * GNU General Public License for more details.
20*4882a593Smuzhiyun *
21*4882a593Smuzhiyun * NO WARRANTY
22*4882a593Smuzhiyun * THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
23*4882a593Smuzhiyun * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
24*4882a593Smuzhiyun * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
25*4882a593Smuzhiyun * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
26*4882a593Smuzhiyun * solely responsible for determining the appropriateness of using and
27*4882a593Smuzhiyun * distributing the Program and assumes all risks associated with its
28*4882a593Smuzhiyun * exercise of rights under this Agreement, including but not limited to
29*4882a593Smuzhiyun * the risks and costs of program errors, damage to or loss of data,
30*4882a593Smuzhiyun * programs or equipment, and unavailability or interruption of operations.
31*4882a593Smuzhiyun *
32*4882a593Smuzhiyun * DISCLAIMER OF LIABILITY
33*4882a593Smuzhiyun * NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
34*4882a593Smuzhiyun * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35*4882a593Smuzhiyun * DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
36*4882a593Smuzhiyun * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
37*4882a593Smuzhiyun * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
38*4882a593Smuzhiyun * USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
39*4882a593Smuzhiyun * HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
40*4882a593Smuzhiyun *
41*4882a593Smuzhiyun * You should have received a copy of the GNU General Public License
42*4882a593Smuzhiyun * along with this program; if not, write to the Free Software
43*4882a593Smuzhiyun * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
44*4882a593Smuzhiyun *
45*4882a593Smuzhiyun *
46*4882a593Smuzhiyun * 10/23/2000 - Alpha Release
47*4882a593Smuzhiyun *	First release to the public
48*4882a593Smuzhiyun */
49*4882a593Smuzhiyun 
50*4882a593Smuzhiyun #ifndef _LINUX_MWAVEPUB_H
51*4882a593Smuzhiyun #define _LINUX_MWAVEPUB_H
52*4882a593Smuzhiyun 
53*4882a593Smuzhiyun #include <linux/miscdevice.h>
54*4882a593Smuzhiyun 
55*4882a593Smuzhiyun 
56*4882a593Smuzhiyun typedef struct _MW_ABILITIES {
57*4882a593Smuzhiyun 	unsigned long instr_per_sec;
58*4882a593Smuzhiyun 	unsigned long data_size;
59*4882a593Smuzhiyun 	unsigned long inst_size;
60*4882a593Smuzhiyun 	unsigned long bus_dma_bw;
61*4882a593Smuzhiyun 	unsigned short uart_enable;
62*4882a593Smuzhiyun 	short component_count;
63*4882a593Smuzhiyun 	unsigned long component_list[7];
64*4882a593Smuzhiyun 	char mwave_os_name[16];
65*4882a593Smuzhiyun 	char bios_task_name[16];
66*4882a593Smuzhiyun } MW_ABILITIES, *pMW_ABILITIES;
67*4882a593Smuzhiyun 
68*4882a593Smuzhiyun 
69*4882a593Smuzhiyun typedef struct _MW_READWRITE {
70*4882a593Smuzhiyun 	unsigned short usDspAddress;	/* The dsp address */
71*4882a593Smuzhiyun 	unsigned long ulDataLength;	/* The size in bytes of the data or user buffer */
72*4882a593Smuzhiyun 	void __user *pBuf;		/* Input:variable sized buffer */
73*4882a593Smuzhiyun } MW_READWRITE, *pMW_READWRITE;
74*4882a593Smuzhiyun 
75*4882a593Smuzhiyun #define IOCTL_MW_RESET           _IO(MWAVE_MINOR,1)
76*4882a593Smuzhiyun #define IOCTL_MW_RUN             _IO(MWAVE_MINOR,2)
77*4882a593Smuzhiyun #define IOCTL_MW_DSP_ABILITIES   _IOR(MWAVE_MINOR,3,MW_ABILITIES)
78*4882a593Smuzhiyun #define IOCTL_MW_READ_DATA       _IOR(MWAVE_MINOR,4,MW_READWRITE)
79*4882a593Smuzhiyun #define IOCTL_MW_READCLEAR_DATA  _IOR(MWAVE_MINOR,5,MW_READWRITE)
80*4882a593Smuzhiyun #define IOCTL_MW_READ_INST       _IOR(MWAVE_MINOR,6,MW_READWRITE)
81*4882a593Smuzhiyun #define IOCTL_MW_WRITE_DATA      _IOW(MWAVE_MINOR,7,MW_READWRITE)
82*4882a593Smuzhiyun #define IOCTL_MW_WRITE_INST      _IOW(MWAVE_MINOR,8,MW_READWRITE)
83*4882a593Smuzhiyun #define IOCTL_MW_REGISTER_IPC    _IOW(MWAVE_MINOR,9,int)
84*4882a593Smuzhiyun #define IOCTL_MW_UNREGISTER_IPC  _IOW(MWAVE_MINOR,10,int)
85*4882a593Smuzhiyun #define IOCTL_MW_GET_IPC         _IOW(MWAVE_MINOR,11,int)
86*4882a593Smuzhiyun #define IOCTL_MW_TRACE           _IOR(MWAVE_MINOR,12,MW_READWRITE)
87*4882a593Smuzhiyun 
88*4882a593Smuzhiyun 
89*4882a593Smuzhiyun #endif
90