RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
arm
tms570
include
bsp
ti_herc
reg_iomm.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
10
11
/* The header file is generated by make_header.py from IOMM.json */
12
/* Current script's version can be found at: */
13
/* https://github.com/AoLaD/rtems-tms570-utils/tree/headers/headers/python */
14
15
/*
16
* Copyright (c) 2014-2015, Premysl Houdek <kom541000@gmail.com>
17
*
18
* Czech Technical University in Prague
19
* Zikova 1903/4
20
* 166 36 Praha 6
21
* Czech Republic
22
*
23
* All rights reserved.
24
*
25
* Redistribution and use in source and binary forms, with or without
26
* modification, are permitted provided that the following conditions are met:
27
*
28
* 1. Redistributions of source code must retain the above copyright notice, this
29
* list of conditions and the following disclaimer.
30
* 2. Redistributions in binary form must reproduce the above copyright notice,
31
* this list of conditions and the following disclaimer in the documentation
32
* and/or other materials provided with the distribution.
33
*
34
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
35
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
36
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
38
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
40
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
41
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
43
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44
*
45
* The views and conclusions contained in the software and documentation are those
46
* of the authors and should not be interpreted as representing official policies,
47
* either expressed or implied, of the FreeBSD Project.
48
*/
49
#ifndef LIBBSP_ARM_TMS570_IOMM
50
#define LIBBSP_ARM_TMS570_IOMM
51
52
#include <
bsp/utility.h
>
53
#include <bspopts.h>
54
55
typedef
struct
{
56
uint32_t REVISION_REG;
/*Revision Register*/
57
uint8_t reserved1 [28];
58
uint32_t ENDIAN_REG;
/*Device Endianness Register*/
59
uint8_t reserved2 [20];
60
uint32_t KICK_REG0;
/*Kicker Register 0*/
61
uint32_t KICK_REG1;
/*Kicker Register 1*/
62
uint8_t reserved3 [160];
63
uint32_t ERR_RAW_STATUS_REG;
/*Error Raw Status / Set Register*/
64
uint32_t ERR_ENABLED_STATUS_REG;
/*Error Enabled Status / Clear Register*/
65
uint32_t ERR_ENABLE_REG;
/*Error Signaling Enable Register*/
66
uint32_t ERR_ENABLE_CLR_REG;
/*Error Signaling Enable Clear Register*/
67
uint8_t reserved4 [4];
68
uint32_t FAULT_ADDRESS_REG;
/*Fault Address Register*/
69
uint32_t FAULT_STATUS_REG;
/*Fault Status Register*/
70
uint32_t FAULT_CLEAR_REG;
/*Fault Clear Register*/
71
uint8_t reserved5 [16];
72
#if TMS570_VARIANT == 4357
73
uint32_t PINMMR[180];
/* 0x110 - 1A4 : Output Pin Multiplexing Control
74
Registers (38 registers); 0x250 - 0x29C : Input Pin
75
Multiplexing Control Registers (20); 0X390 - 3DC :
76
Special Functionality Control Registers (20) */
77
#else
78
uint32_t PINMMR[30];
/*Pin Multiplexing Control Register 0-30*/
79
#endif
80
}
tms570_iomm_t
;
81
82
83
/*--------------------TMS570_IOMM_PINMMRx--------------------*/
84
/* field: PINMMRx24To31 - Each of these byte-fields control the functionality on a given ball/pin. */
85
#define TMS570_IOMM_PINMMRx_PINMMRx24To31(val) BSP_FLD32(val,24, 31)
86
#define TMS570_IOMM_PINMMRx_PINMMRx24To31_GET(reg) BSP_FLD32GET(reg,24, 31)
87
#define TMS570_IOMM_PINMMRx_PINMMRx24To31_SET(reg,val) BSP_FLD32SET(reg, val,24, 31)
88
89
/* field: PINMMRx16To23 - Each of these byte-fields control the functionality on a given ball/pin. */
90
#define TMS570_IOMM_PINMMRx_PINMMRx16To23(val) BSP_FLD32(val,16, 23)
91
#define TMS570_IOMM_PINMMRx_PINMMRx16To23_GET(reg) BSP_FLD32GET(reg,16, 23)
92
#define TMS570_IOMM_PINMMRx_PINMMRx16To23_SET(reg,val) BSP_FLD32SET(reg, val,16, 23)
93
94
/* field: PINMMRx8To16 - Each of these byte-fields control the functionality on a given ball/pin. */
95
#define TMS570_IOMM_PINMMRx_PINMMRx8To16(val) BSP_FLD32(val,8, 15)
96
#define TMS570_IOMM_PINMMRx_PINMMRx8To16_GET(reg) BSP_FLD32GET(reg,8, 15)
97
#define TMS570_IOMM_PINMMRx_PINMMRx8To16_SET(reg,val) BSP_FLD32SET(reg, val,8, 15)
98
99
/* field: PINMMRx0To7 - Each of these byte-fields control the functionality on a given ball/pin. */
100
#define TMS570_IOMM_PINMMRx_PINMMRx0To7(val) BSP_FLD32(val,0, 7)
101
#define TMS570_IOMM_PINMMRx_PINMMRx0To7_GET(reg) BSP_FLD32GET(reg,0, 7)
102
#define TMS570_IOMM_PINMMRx_PINMMRx0To7_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
103
104
105
/*------------------TMS570_IOMM_REVISION_REG------------------*/
106
/* field: REV_SCHEME - Revision Scheme */
107
#define TMS570_IOMM_REVISION_REG_REV_SCHEME(val) BSP_FLD32(val,30, 31)
108
#define TMS570_IOMM_REVISION_REG_REV_SCHEME_GET(reg) BSP_FLD32GET(reg,30, 31)
109
#define TMS570_IOMM_REVISION_REG_REV_SCHEME_SET(reg,val) BSP_FLD32SET(reg, val,30, 31)
110
111
/* field: REV_MODULE - Module Id */
112
#define TMS570_IOMM_REVISION_REG_REV_MODULE(val) BSP_FLD32(val,16, 27)
113
#define TMS570_IOMM_REVISION_REG_REV_MODULE_GET(reg) BSP_FLD32GET(reg,16, 27)
114
#define TMS570_IOMM_REVISION_REG_REV_MODULE_SET(reg,val) BSP_FLD32SET(reg, val,16, 27)
115
116
/* field: REV_RTL - RTL Revision */
117
#define TMS570_IOMM_REVISION_REG_REV_RTL(val) BSP_FLD32(val,11, 15)
118
#define TMS570_IOMM_REVISION_REG_REV_RTL_GET(reg) BSP_FLD32GET(reg,11, 15)
119
#define TMS570_IOMM_REVISION_REG_REV_RTL_SET(reg,val) BSP_FLD32SET(reg, val,11, 15)
120
121
/* field: REV_MAJOR - Major Revision */
122
#define TMS570_IOMM_REVISION_REG_REV_MAJOR(val) BSP_FLD32(val,8, 10)
123
#define TMS570_IOMM_REVISION_REG_REV_MAJOR_GET(reg) BSP_FLD32GET(reg,8, 10)
124
#define TMS570_IOMM_REVISION_REG_REV_MAJOR_SET(reg,val) BSP_FLD32SET(reg, val,8, 10)
125
126
/* field: REV_CUSTOM - REV CUSTOM 0 Custom Revision */
127
#define TMS570_IOMM_REVISION_REG_REV_CUSTOM(val) BSP_FLD32(val,6, 7)
128
#define TMS570_IOMM_REVISION_REG_REV_CUSTOM_GET(reg) BSP_FLD32GET(reg,6, 7)
129
#define TMS570_IOMM_REVISION_REG_REV_CUSTOM_SET(reg,val) BSP_FLD32SET(reg, val,6, 7)
130
131
/* field: REV_MINOR - Minor Revision */
132
#define TMS570_IOMM_REVISION_REG_REV_MINOR(val) BSP_FLD32(val,0, 5)
133
#define TMS570_IOMM_REVISION_REG_REV_MINOR_GET(reg) BSP_FLD32GET(reg,0, 5)
134
#define TMS570_IOMM_REVISION_REG_REV_MINOR_SET(reg,val) BSP_FLD32SET(reg, val,0, 5)
135
136
137
/*-------------------TMS570_IOMM_ENDIAN_REG-------------------*/
138
/* field: ENDIAN - Device endianness */
139
#define TMS570_IOMM_ENDIAN_REG_ENDIAN BSP_BIT32(0)
140
141
142
/*-------------------TMS570_IOMM_KICK_REG0-------------------*/
143
/* field: KICK0 - Kicker 0 Register. */
144
/* Whole 32 bits */
145
146
/*-------------------TMS570_IOMM_KICK_REG1-------------------*/
147
/* field: KICK1 - Kicker 1 Register. */
148
/* Whole 32 bits */
149
150
/*---------------TMS570_IOMM_ERR_RAW_STATUS_REG---------------*/
151
/* field: ADDR_ERR - Addressing Error Status and Error Signaling Enable. */
152
#define TMS570_IOMM_ERR_RAW_STATUS_REG_ADDR_ERR BSP_BIT32(1)
153
154
/* field: PROT_ERR - register inside the IOMM is written in the CPU's user mode of operation. */
155
#define TMS570_IOMM_ERR_RAW_STATUS_REG_PROT_ERR BSP_BIT32(0)
156
157
158
/*-------------TMS570_IOMM_ERR_ENABLED_STATUS_REG-------------*/
159
/* field: ENABLED_ADDR_ERR - Addressing Error Signaling Enable Status and Status Clear */
160
#define TMS570_IOMM_ERR_ENABLED_STATUS_REG_ENABLED_ADDR_ERR BSP_BIT32(1)
161
162
/* field: ENABLED_PROT_ERR - Protection Error Signaling Enable Status and Status Clear */
163
#define TMS570_IOMM_ERR_ENABLED_STATUS_REG_ENABLED_PROT_ERR BSP_BIT32(0)
164
165
166
/*-----------------TMS570_IOMM_ERR_ENABLE_REG-----------------*/
167
/* field: ADDR_ERR_EN - Addressing Error Signaling Enable */
168
#define TMS570_IOMM_ERR_ENABLE_REG_ADDR_ERR_EN BSP_BIT32(1)
169
170
/* field: PROT_ERR_EN - Protection ErrorSignaling Enable */
171
#define TMS570_IOMM_ERR_ENABLE_REG_PROT_ERR_EN BSP_BIT32(0)
172
173
174
/*---------------TMS570_IOMM_ERR_ENABLE_CLR_REG---------------*/
175
/* field: ADDR_ERR_EN_CLR - Addressing Error Signaling Enable Clear */
176
#define TMS570_IOMM_ERR_ENABLE_CLR_REG_ADDR_ERR_EN_CLR BSP_BIT32(1)
177
178
/* field: PROT_ERR_EN_CLR - Protection Error Signaling Enable Clear */
179
#define TMS570_IOMM_ERR_ENABLE_CLR_REG_PROT_ERR_EN_CLR BSP_BIT32(0)
180
181
182
/*---------------TMS570_IOMM_FAULT_ADDRESS_REG---------------*/
183
/* field: FAULT_ADDR - Fault Address. */
184
/* Whole 32 bits */
185
186
/*----------------TMS570_IOMM_FAULT_STATUS_REG----------------*/
187
/* field: FAULT_ID - Faulting Transaction ID */
188
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_ID(val) BSP_FLD32(val,24, 27)
189
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_ID_GET(reg) BSP_FLD32GET(reg,24, 27)
190
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_ID_SET(reg,val) BSP_FLD32SET(reg, val,24, 27)
191
192
/* field: FAULT_MSTID - ID of Master that initiated the faulting transaction */
193
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_MSTID(val) BSP_FLD32(val,16, 23)
194
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_MSTID_GET(reg) BSP_FLD32GET(reg,16, 23)
195
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_MSTID_SET(reg,val) BSP_FLD32SET(reg, val,16, 23)
196
197
/* field: FAULT_PRIVID - Faulting Privilege ID */
198
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_PRIVID(val) BSP_FLD32(val,9, 12)
199
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_PRIVID_GET(reg) BSP_FLD32GET(reg,9, 12)
200
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_PRIVID_SET(reg,val) BSP_FLD32SET(reg, val,9, 12)
201
202
/* field: FAULT_TYPE - Type of fault detected */
203
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_TYPE(val) BSP_FLD32(val,0, 5)
204
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_TYPE_GET(reg) BSP_FLD32GET(reg,0, 5)
205
#define TMS570_IOMM_FAULT_STATUS_REG_FAULT_TYPE_SET(reg,val) BSP_FLD32SET(reg, val,0, 5)
206
207
208
/*----------------TMS570_IOMM_FAULT_CLEAR_REG----------------*/
209
/* field: FAULT_CLEAR - Fault Clear */
210
#define TMS570_IOMM_FAULT_CLEAR_REG_FAULT_CLEAR BSP_BIT32(0)
211
212
213
/*---------------------TMS570_IOMM_PINMUX---------------------*/
214
/* field: FAULT_CLEAR - Fault Clear */
215
#define TMS570_IOMM_PINMUX_FAULT_CLEAR BSP_BIT32(0)
216
217
218
219
#endif
/* LIBBSP_ARM_TMS570_IOMM */
utility.h
This header file provides utility macros for BSPs.
tms570_iomm_t
Definition
reg_iomm.h:55
Generated by
1.18.0