1 /* 2 * Copyright (c) 2019-2021 Arm Limited. All rights reserved. 3 * 4 * Licensed under the Apache License Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing software 11 * distributed under the License is distributed on an "AS IS" BASIS 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** 18 * \file device_definition.h 19 * \brief The structure definitions in this file are exported based on the 20 * peripheral definitions from device_cfg.h. 21 * This file is meant to be used as a helper for baremetal 22 * applications and/or as an example of how to configure the generic 23 * driver structures. 24 */ 25 26 #ifndef __DEVICE_DEFINITION_H__ 27 #define __DEVICE_DEFINITION_H__ 28 29 #include "device_cfg.h" 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 /* ======= Defines peripheral configuration structures ======= */ 36 /* UART CMSDK driver structures */ 37 #ifdef UART0_CMSDK_S 38 #include "uart_cmsdk_drv.h" 39 extern struct uart_cmsdk_dev_t UART0_CMSDK_DEV_S; 40 #endif 41 #ifdef UART0_CMSDK_NS 42 #include "uart_cmsdk_drv.h" 43 extern struct uart_cmsdk_dev_t UART0_CMSDK_DEV_NS; 44 #endif 45 46 #ifdef UART1_CMSDK_S 47 #include "uart_cmsdk_drv.h" 48 extern struct uart_cmsdk_dev_t UART1_CMSDK_DEV_S; 49 #endif 50 #ifdef UART1_CMSDK_NS 51 #include "uart_cmsdk_drv.h" 52 extern struct uart_cmsdk_dev_t UART1_CMSDK_DEV_NS; 53 #endif 54 55 #ifdef UART2_CMSDK_S 56 #include "uart_cmsdk_drv.h" 57 extern struct uart_cmsdk_dev_t UART2_CMSDK_DEV_S; 58 #endif 59 #ifdef UART2_CMSDK_NS 60 #include "uart_cmsdk_drv.h" 61 extern struct uart_cmsdk_dev_t UART2_CMSDK_DEV_NS; 62 #endif 63 64 #ifdef UART3_CMSDK_S 65 #include "uart_cmsdk_drv.h" 66 extern struct uart_cmsdk_dev_t UART3_CMSDK_DEV_S; 67 #endif 68 #ifdef UART3_CMSDK_NS 69 #include "uart_cmsdk_drv.h" 70 extern struct uart_cmsdk_dev_t UART3_CMSDK_DEV_NS; 71 #endif 72 73 #ifdef UART4_CMSDK_S 74 #include "uart_cmsdk_drv.h" 75 extern struct uart_cmsdk_dev_t UART4_CMSDK_DEV_S; 76 #endif 77 #ifdef UART4_CMSDK_NS 78 #include "uart_cmsdk_drv.h" 79 extern struct uart_cmsdk_dev_t UART4_CMSDK_DEV_NS; 80 #endif 81 82 #ifdef UART5_CMSDK_S 83 #include "uart_cmsdk_drv.h" 84 extern struct uart_cmsdk_dev_t UART5_CMSDK_DEV_S; 85 #endif 86 #ifdef UART5_CMSDK_NS 87 #include "uart_cmsdk_drv.h" 88 extern struct uart_cmsdk_dev_t UART5_CMSDK_DEV_NS; 89 #endif 90 91 /* ARM PPC driver structures */ 92 #ifdef PPC_SSE300_MAIN0_S 93 #include "ppc_sse300_drv.h" 94 extern struct ppc_sse300_dev_t PPC_SSE300_MAIN0_DEV_S; 95 #endif 96 97 #ifdef PPC_SSE300_MAIN_EXP0_S 98 #include "ppc_sse300_drv.h" 99 extern struct ppc_sse300_dev_t PPC_SSE300_MAIN_EXP0_DEV_S; 100 #endif 101 102 #ifdef PPC_SSE300_MAIN_EXP1_S 103 #include "ppc_sse300_drv.h" 104 extern struct ppc_sse300_dev_t PPC_SSE300_MAIN_EXP1_DEV_S; 105 #endif 106 107 #ifdef PPC_SSE300_MAIN_EXP2_S 108 #include "ppc_sse300_drv.h" 109 extern struct ppc_sse300_dev_t PPC_SSE300_MAIN_EXP2_DEV_S; 110 #endif 111 112 #ifdef PPC_SSE300_MAIN_EXP3_S 113 #include "ppc_sse300_drv.h" 114 extern struct ppc_sse300_dev_t PPC_SSE300_MAIN_EXP3_DEV_S; 115 #endif 116 117 #ifdef PPC_SSE300_PERIPH0_S 118 #include "ppc_sse300_drv.h" 119 extern struct ppc_sse300_dev_t PPC_SSE300_PERIPH0_DEV_S; 120 #endif 121 122 #ifdef PPC_SSE300_PERIPH1_S 123 #include "ppc_sse300_drv.h" 124 extern struct ppc_sse300_dev_t PPC_SSE300_PERIPH1_DEV_S; 125 #endif 126 127 #ifdef PPC_SSE300_PERIPH_EXP0_S 128 #include "ppc_sse300_drv.h" 129 extern struct ppc_sse300_dev_t PPC_SSE300_PERIPH_EXP0_DEV_S; 130 #endif 131 132 #ifdef PPC_SSE300_PERIPH_EXP1_S 133 #include "ppc_sse300_drv.h" 134 extern struct ppc_sse300_dev_t PPC_SSE300_PERIPH_EXP1_DEV_S; 135 #endif 136 137 #ifdef PPC_SSE300_PERIPH_EXP2_S 138 #include "ppc_sse300_drv.h" 139 extern struct ppc_sse300_dev_t PPC_SSE300_PERIPH_EXP2_DEV_S; 140 #endif 141 142 #ifdef PPC_SSE300_PERIPH_EXP3_S 143 #include "ppc_sse300_drv.h" 144 extern struct ppc_sse300_dev_t PPC_SSE300_PERIPH_EXP3_DEV_S; 145 #endif 146 147 /* System counters */ 148 #ifdef SYSCOUNTER_CNTRL_ARMV8_M_S 149 #include "syscounter_armv8-m_cntrl_drv.h" 150 extern struct syscounter_armv8_m_cntrl_dev_t SYSCOUNTER_CNTRL_ARMV8_M_DEV_S; 151 #endif 152 153 #ifdef SYSCOUNTER_READ_ARMV8_M_S 154 #include "syscounter_armv8-m_read_drv.h" 155 extern struct syscounter_armv8_m_read_dev_t SYSCOUNTER_READ_ARMV8_M_DEV_S; 156 #endif 157 #ifdef SYSCOUNTER_READ_ARMV8_M_NS 158 #include "syscounter_armv8-m_read_drv.h" 159 extern struct syscounter_armv8_m_read_dev_t SYSCOUNTER_READ_ARMV8_M_DEV_NS; 160 #endif 161 162 /* System timers */ 163 #ifdef SYSTIMER0_ARMV8_M_S 164 #include "systimer_armv8-m_drv.h" 165 extern struct systimer_armv8_m_dev_t SYSTIMER0_ARMV8_M_DEV_S; 166 #endif 167 #ifdef SYSTIMER0_ARMV8_M_NS 168 #include "systimer_armv8-m_drv.h" 169 extern struct systimer_armv8_m_dev_t SYSTIMER0_ARMV8_M_DEV_NS; 170 #endif 171 172 #ifdef SYSTIMER1_ARMV8_M_S 173 #include "systimer_armv8-m_drv.h" 174 extern struct systimer_armv8_m_dev_t SYSTIMER1_ARMV8_M_DEV_S; 175 #endif 176 #ifdef SYSTIMER1_ARMV8_M_NS 177 #include "systimer_armv8-m_drv.h" 178 extern struct systimer_armv8_m_dev_t SYSTIMER1_ARMV8_M_DEV_NS; 179 #endif 180 181 #ifdef SYSTIMER2_ARMV8_M_S 182 #include "systimer_armv8-m_drv.h" 183 extern struct systimer_armv8_m_dev_t SYSTIMER2_ARMV8_M_DEV_S; 184 #endif 185 #ifdef SYSTIMER2_ARMV8_M_NS 186 #include "systimer_armv8-m_drv.h" 187 extern struct systimer_armv8_m_dev_t SYSTIMER2_ARMV8_M_DEV_NS; 188 #endif 189 190 #ifdef SYSTIMER3_ARMV8_M_S 191 #include "systimer_armv8-m_drv.h" 192 extern struct systimer_armv8_m_dev_t SYSTIMER3_ARMV8_M_DEV_S; 193 #endif 194 #ifdef SYSTIMER3_ARMV8_M_NS 195 #include "systimer_armv8-m_drv.h" 196 extern struct systimer_armv8_m_dev_t SYSTIMER3_ARMV8_M_DEV_NS; 197 #endif 198 199 /* System Watchdogs */ 200 #ifdef SYSWDOG_ARMV8_M_S 201 #include "syswdog_armv8-m_drv.h" 202 extern struct syswdog_armv8_m_dev_t SYSWDOG_ARMV8_M_DEV_S; 203 #endif 204 #ifdef SYSWDOG_ARMV8_M_NS 205 #include "syswdog_armv8-m_drv.h" 206 extern struct syswdog_armv8_m_dev_t SYSWDOG_ARMV8_M_DEV_NS; 207 #endif 208 209 /* ARM MPC SIE 300 driver structures */ 210 #ifdef MPC_SRAM_S 211 #include "mpc_sie_drv.h" 212 extern struct mpc_sie_dev_t MPC_SRAM_DEV_S; 213 #endif 214 215 #ifdef MPC_QSPI_S 216 #include "mpc_sie_drv.h" 217 extern struct mpc_sie_dev_t MPC_QSPI_DEV_S; 218 #endif 219 220 #ifdef MPC_DDR4_S 221 #include "mpc_sie_drv.h" 222 extern struct mpc_sie_dev_t MPC_DDR4_DEV_S; 223 #endif 224 225 #ifdef MPC_ISRAM0_S 226 #include "mpc_sie_drv.h" 227 extern struct mpc_sie_dev_t MPC_ISRAM0_DEV_S; 228 #endif 229 230 #ifdef MPC_ISRAM1_S 231 #include "mpc_sie_drv.h" 232 extern struct mpc_sie_dev_t MPC_ISRAM1_DEV_S; 233 #endif 234 235 #ifdef MPS3_IO_S 236 #include "arm_mps3_io_drv.h" 237 extern struct arm_mps3_io_dev_t MPS3_IO_DEV_S; 238 #endif 239 240 #ifdef MPS3_IO_NS 241 #include "arm_mps3_io_drv.h" 242 extern struct arm_mps3_io_dev_t MPS3_IO_DEV_NS; 243 #endif 244 245 #ifdef __cplusplus 246 } 247 #endif 248 249 #endif /* __DEVICE_DEFINITION_H__ */ 250