13b5fc1e88a98cad4699cb884c8bec03dbe48cb9
[openwrt.git] / target / linux / ubicom32 / files / arch / ubicom32 / include / asm / pcm_tio.h
1 /*
2  * arch/ubicom32/include/asm/pcm_tio.h
3  *   Ubicom32 architecture PCM TIO definitions.
4  *
5  * (C) Copyright 2009, Ubicom, Inc.
6  *
7  * This file is part of the Ubicom32 Linux Kernel Port.
8  *
9  * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10  * it and/or modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation, either version 2 of the
12  * License, or (at your option) any later version.
13  *
14  * The Ubicom32 Linux Kernel Port is distributed in the hope that it
15  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
16  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
17  * the GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with the Ubicom32 Linux Kernel Port.  If not,
21  * see <http://www.gnu.org/licenses/>.
22  */
23 #ifndef _ASM_UBICOM32_PCM_TIO_H
24 #define _ASM_UBICOM32_PCM_TIO_H
25
26 #include <asm/devtree.h>
27
28 #define PCM_TIO_REGS_VERSION    2
29 struct pcm_tio_regs {
30         /*
31          * set this value to 1 to reload the parameters and restart the HRT
32          */
33         u32_t           reload;
34
35         /*
36          * Pointers to the input and output buffers
37          */
38         void            *input_buf;
39         void            *output_buf;
40
41         /*
42          * Buffer size (see pcm_hrt.S for constraints)
43          */
44         u32_t           buffer_size;
45
46         /*
47          * Current cycle.  This variable increases every time half the buffer
48          * is consumed.
49          */
50         u32_t           cycle;
51
52         /*
53          * Fields below this line are not accessed by the HRT.  They are purely
54          * informational for the user of this TIO.
55          */
56
57         /*
58          * Version of this structure
59          */
60         u32_t           version;
61
62         /*
63          * Number of channels supported
64          */
65         u32_t           channels;
66
67         /*
68          * Maximum buffer size
69          */
70         u32_t           max_buffer_size;
71 };
72
73 /*
74  * Our device node
75  */
76 #define PCM_TIO_NODE_VERSION    1
77 struct pcm_tio_node {
78         struct devtree_node     dn;
79         u32_t                   version;
80         struct pcm_tio_regs     *regs;
81 };
82
83 #endif
84