1 /* 2 * Copyright (c) 2023-2024 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 host_device_definition.c 19 * \brief This file defines exports the structures based on the peripheral 20 * definitions from device_cfg.h. 21 */ 22 23 #include "host_base_address.h" 24 #include "host_device_definition.h" 25 #include "platform_base_address.h" 26 27 #include <stddef.h> 28 29 /* Message Handling Units (MHU) */ 30 #ifdef MHU_V3_AP_MONITOR_TO_RSE 31 struct mhu_v3_x_dev_t MHU_AP_MONITOR_TO_RSE_DEV = { 32 .base = MHU0_RECEIVER_BASE_S, 33 .frame = MHU_V3_X_MBX_FRAME, 34 .subversion = 0 35 }; 36 #endif 37 38 #ifdef MHU_V3_RSE_TO_AP_MONITOR 39 struct mhu_v3_x_dev_t MHU_RSE_TO_AP_MONITOR_DEV = { 40 .base = MHU0_SENDER_BASE_S, 41 .frame = MHU_V3_X_PBX_FRAME, 42 .subversion = 0 43 }; 44 #endif 45 46 #ifdef MHU_V3_SCP_TO_RSE 47 struct mhu_v3_x_dev_t MHU_V3_SCP_TO_RSE_DEV = { 48 .base = MHU4_RECEIVER_BASE_S, 49 .frame = MHU_V3_X_MBX_FRAME, 50 .subversion = 0 51 }; 52 #endif 53 54 #ifdef MHU_V3_RSE_TO_SCP 55 struct mhu_v3_x_dev_t MHU_V3_RSE_TO_SCP_DEV = { 56 .base = MHU4_SENDER_BASE_S, 57 .frame = MHU_V3_X_PBX_FRAME, 58 .subversion = 0 59 }; 60 #endif 61 62 #ifdef RD_SYSCTRL_NI_TOWER 63 /* System Control NI-Tower device */ 64 struct ni_tower_dev SYSCTRL_NI_TOWER_DEV = { 65 .periphbase = HOST_NI_TOWER_BASE, 66 .config_node_granularity = NI_TOWER_64KB_CONFIG_NODES, 67 .skip_discovery_list = NULL, 68 .chip_addr_offset = 0, /* Updated at boot time */ 69 }; 70 #endif 71 72 #ifdef RD_PERIPH_NI_TOWER 73 /* Peripheral NI-Tower device */ 74 struct ni_tower_dev PERIPH_NI_TOWER_DEV = { 75 .periphbase = HOST_NI_TOWER_BASE, 76 .config_node_granularity = NI_TOWER_64KB_CONFIG_NODES, 77 .skip_discovery_list = NULL, 78 .chip_addr_offset = 0, /* Updated at boot time */ 79 }; 80 #endif 81 82 #ifdef HOST_SCP 83 struct mscp_dev_t HOST_SCP_DEV = { 84 .init_ctrl_base = HOST_SCP_INIT_CTRL_BASE_S, 85 }; 86 #endif 87 88 #ifdef HOST_MCP 89 struct mscp_dev_t HOST_MCP_DEV = { 90 .init_ctrl_base = HOST_MCP_INIT_CTRL_BASE_S, 91 }; 92 #endif 93 94 #ifdef HOST_SMMU 95 #include "smmu_v3_drv.h" 96 struct smmu_dev_t HOST_SYSCTRL_SMMU_DEV = { 97 .smmu_base = HOST_SYSCTRL_SMMU_BASE, 98 .ack_timeout = SMMU_DEFAULT_ACK_TIMEOUT, 99 }; 100 #endif 101