Hardware Libraries  20.1
Stratix 10 SoC Hardware Manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
alt_dma.h
1 /***********************************************************************************
2 * *
3 * Copyright 2013-2015 Altera Corporation. All Rights Reserved. *
4 * *
5 * Redistribution and use in source and binary forms, with or without *
6 * modification, are permitted provided that the following conditions are met: *
7 * *
8 * 1. Redistributions of source code must retain the above copyright notice, *
9 * this list of conditions and the following disclaimer. *
10 * *
11 * 2. Redistributions in binary form must reproduce the above copyright notice, *
12 * this list of conditions and the following disclaimer in the documentation *
13 * and/or other materials provided with the distribution. *
14 * *
15 * 3. Neither the name of the copyright holder nor the names of its contributors *
16 * may be used to endorse or promote products derived from this software without *
17 * specific prior written permission. *
18 * *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" *
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE *
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE *
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF *
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN *
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) *
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
29 * POSSIBILITY OF SUCH DAMAGE. *
30 * *
31 ***********************************************************************************/
32 
33 /* Altera - ALT_DMA */
34 
35 #ifndef __ALT_SOCAL_DMA_H__
36 #define __ALT_SOCAL_DMA_H__
37 
38 #ifndef __ASSEMBLY__
39 #ifdef __cplusplus
40 #include <cstdint>
41 extern "C"
42 {
43 #else /* __cplusplus */
44 #include <stdint.h>
45 #endif /* __cplusplus */
46 #endif /* __ASSEMBLY__ */
47 
48 /*
49  * Component : DMA
50  * Address space allocated to the secure DMA. For detailed information about the
51  * use of this address space,
52  * http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0424b/index.html
53  * to access the ARM documentation for the DMA-330.
54  *
55  */
56 /*
57  * Register : Data
58  *
59  * Placeholder
60  *
61  * Register Layout
62  *
63  * Bits | Access | Reset | Description
64  * :-------|:-------|:--------|:-------------------
65  * [31:0] | RW | Unknown | ALT_DMA_DATA_FIELD
66  *
67  */
68 /*
69  * Field : Field
70  *
71  * Empty
72  *
73  * Field Access Macros:
74  *
75  */
76 /* The Least Significant Bit (LSB) position of the ALT_DMA_DATA_FIELD register field. */
77 #define ALT_DMA_DATA_FIELD_LSB 0
78 /* The Most Significant Bit (MSB) position of the ALT_DMA_DATA_FIELD register field. */
79 #define ALT_DMA_DATA_FIELD_MSB 31
80 /* The width in bits of the ALT_DMA_DATA_FIELD register field. */
81 #define ALT_DMA_DATA_FIELD_WIDTH 32
82 /* The mask used to set the ALT_DMA_DATA_FIELD register field value. */
83 #define ALT_DMA_DATA_FIELD_SET_MSK 0xffffffff
84 /* The mask used to clear the ALT_DMA_DATA_FIELD register field value. */
85 #define ALT_DMA_DATA_FIELD_CLR_MSK 0x00000000
86 /* The reset value of the ALT_DMA_DATA_FIELD register field is UNKNOWN. */
87 #define ALT_DMA_DATA_FIELD_RESET 0x0
88 /* Extracts the ALT_DMA_DATA_FIELD field value from a register. */
89 #define ALT_DMA_DATA_FIELD_GET(value) (((value) & 0xffffffff) >> 0)
90 /* Produces a ALT_DMA_DATA_FIELD register field value suitable for setting the register. */
91 #define ALT_DMA_DATA_FIELD_SET(value) (((value) << 0) & 0xffffffff)
92 
93 #ifndef __ASSEMBLY__
94 /*
95  * WARNING: The C register and register group struct declarations are provided for
96  * convenience and illustrative purposes. They should, however, be used with
97  * caution as the C language standard provides no guarantees about the alignment or
98  * atomicity of device memory accesses. The recommended practice for coding device
99  * drivers is to use the SoCAL access macros in conjunction with alt_read_word()
100  * and alt_write_word() functions for 32 bit registers and alt_read_dword() and
101  * alt_write_dword() functions for 64 bit registers.
102  *
103  * The struct declaration for register ALT_DMA_DATA.
104  */
105 struct ALT_DMA_DATA_s
106 {
107  volatile uint32_t Field : 32; /* ALT_DMA_DATA_FIELD */
108 };
109 
110 /* The typedef declaration for register ALT_DMA_DATA. */
111 typedef struct ALT_DMA_DATA_s ALT_DMA_DATA_t;
112 #endif /* __ASSEMBLY__ */
113 
114 /* The reset value of the ALT_DMA_DATA register. */
115 #define ALT_DMA_DATA_RESET 0x00000000
116 /* The byte offset of the ALT_DMA_DATA register from the beginning of the component. */
117 #define ALT_DMA_DATA_OFST 0x0
118 /* The address of the ALT_DMA_DATA register. */
119 #define ALT_DMA_DATA_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_DMA_DATA_OFST))
120 
121 #ifndef __ASSEMBLY__
122 /*
123  * WARNING: The C register and register group struct declarations are provided for
124  * convenience and illustrative purposes. They should, however, be used with
125  * caution as the C language standard provides no guarantees about the alignment or
126  * atomicity of device memory accesses. The recommended practice for coding device
127  * drivers is to use the SoCAL access macros in conjunction with alt_read_word()
128  * and alt_write_word() functions for 32 bit registers and alt_read_dword() and
129  * alt_write_dword() functions for 64 bit registers.
130  *
131  * The struct declaration for register group ALT_DMA.
132  */
133 struct ALT_DMA_s
134 {
135  volatile ALT_DMA_DATA_t Data; /* ALT_DMA_DATA */
136  volatile uint32_t _pad_0x4_0x1000[1023]; /* *UNDEFINED* */
137 };
138 
139 /* The typedef declaration for register group ALT_DMA. */
140 typedef struct ALT_DMA_s ALT_DMA_t;
141 /* The struct declaration for the raw register contents of register group ALT_DMA. */
142 struct ALT_DMA_raw_s
143 {
144  volatile uint32_t Data; /* ALT_DMA_DATA */
145  volatile uint32_t _pad_0x4_0x1000[1023]; /* *UNDEFINED* */
146 };
147 
148 /* The typedef declaration for the raw register contents of register group ALT_DMA. */
149 typedef struct ALT_DMA_raw_s ALT_DMA_raw_t;
150 #endif /* __ASSEMBLY__ */
151 
152 
153 #ifdef __cplusplus
154 }
155 #endif /* __cplusplus */
156 #endif /* __ALT_SOCAL_DMA_H__ */
157