2020-03-06 12:28:18 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
|
2021-03-26 23:11:13 +08:00
|
|
|
* Copyright (C) 2019-2021 Linaro Ltd.
|
2020-03-06 12:28:18 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/log2.h>
|
|
|
|
|
|
|
|
#include "gsi.h"
|
|
|
|
#include "ipa_data.h"
|
|
|
|
#include "ipa_endpoint.h"
|
|
|
|
#include "ipa_mem.h"
|
|
|
|
|
2021-03-29 01:31:08 +08:00
|
|
|
/** enum ipa_resource_type - IPA resource types for an SoC having IPA v3.5.1 */
|
2021-03-26 23:11:17 +08:00
|
|
|
enum ipa_resource_type {
|
|
|
|
/* Source resource types; first must have value 0 */
|
|
|
|
IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS = 0,
|
|
|
|
IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS,
|
|
|
|
IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF,
|
|
|
|
IPA_RESOURCE_TYPE_SRC_HPS_DMARS,
|
|
|
|
IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES,
|
|
|
|
|
|
|
|
/* Destination resource types; first must have value 0 */
|
|
|
|
IPA_RESOURCE_TYPE_DST_DATA_SECTORS = 0,
|
|
|
|
IPA_RESOURCE_TYPE_DST_DPS_DMARS,
|
|
|
|
};
|
|
|
|
|
2021-03-29 01:31:08 +08:00
|
|
|
/* Resource groups used for an SoC having IPA v3.5.1 */
|
2021-03-26 23:11:13 +08:00
|
|
|
enum ipa_rsrc_group_id {
|
|
|
|
/* Source resource group identifiers */
|
|
|
|
IPA_RSRC_GROUP_SRC_LWA_DL = 0,
|
|
|
|
IPA_RSRC_GROUP_SRC_UL_DL,
|
|
|
|
IPA_RSRC_GROUP_SRC_MHI_DMA,
|
|
|
|
IPA_RSRC_GROUP_SRC_UC_RX_Q,
|
2021-03-26 23:11:21 +08:00
|
|
|
IPA_RSRC_GROUP_SRC_COUNT, /* Last in set; not a source group */
|
2021-03-26 23:11:13 +08:00
|
|
|
|
|
|
|
/* Destination resource group identifiers */
|
|
|
|
IPA_RSRC_GROUP_DST_LWA_DL = 0,
|
|
|
|
IPA_RSRC_GROUP_DST_UL_DL_DPL,
|
|
|
|
IPA_RSRC_GROUP_DST_UNUSED_2,
|
2021-03-26 23:11:21 +08:00
|
|
|
IPA_RSRC_GROUP_DST_COUNT, /* Last; not a destination group */
|
2021-03-26 23:11:13 +08:00
|
|
|
};
|
|
|
|
|
2021-03-29 01:31:08 +08:00
|
|
|
/* QSB configuration data for an SoC having IPA v3.5.1 */
|
2021-03-19 23:24:22 +08:00
|
|
|
static const struct ipa_qsb_data ipa_qsb_data[] = {
|
|
|
|
[IPA_QSB_MASTER_DDR] = {
|
|
|
|
.max_writes = 8,
|
|
|
|
.max_reads = 8,
|
|
|
|
},
|
|
|
|
[IPA_QSB_MASTER_PCIE] = {
|
|
|
|
.max_writes = 4,
|
|
|
|
.max_reads = 12,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-03-29 01:31:08 +08:00
|
|
|
/* Endpoint datdata for an SoC having IPA v3.5.1 */
|
2020-03-06 12:28:18 +08:00
|
|
|
static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = {
|
|
|
|
[IPA_ENDPOINT_AP_COMMAND_TX] = {
|
|
|
|
.ee_id = GSI_EE_AP,
|
|
|
|
.channel_id = 4,
|
|
|
|
.endpoint_id = 5,
|
|
|
|
.toward_ipa = true,
|
|
|
|
.channel = {
|
|
|
|
.tre_count = 512,
|
|
|
|
.event_count = 256,
|
|
|
|
.tlv_count = 20,
|
|
|
|
},
|
|
|
|
.endpoint = {
|
|
|
|
.config = {
|
2021-03-26 23:11:13 +08:00
|
|
|
.resource_group = IPA_RSRC_GROUP_SRC_UL_DL,
|
2020-03-06 12:28:18 +08:00
|
|
|
.dma_mode = true,
|
|
|
|
.dma_endpoint = IPA_ENDPOINT_AP_LAN_RX,
|
2021-03-20 23:57:06 +08:00
|
|
|
.tx = {
|
|
|
|
.seq_type = IPA_SEQ_DMA,
|
|
|
|
},
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[IPA_ENDPOINT_AP_LAN_RX] = {
|
|
|
|
.ee_id = GSI_EE_AP,
|
|
|
|
.channel_id = 5,
|
|
|
|
.endpoint_id = 9,
|
|
|
|
.toward_ipa = false,
|
|
|
|
.channel = {
|
|
|
|
.tre_count = 256,
|
|
|
|
.event_count = 256,
|
|
|
|
.tlv_count = 8,
|
|
|
|
},
|
|
|
|
.endpoint = {
|
|
|
|
.config = {
|
2021-03-26 23:11:13 +08:00
|
|
|
.resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL,
|
2020-03-06 12:28:18 +08:00
|
|
|
.aggregation = true,
|
|
|
|
.status_enable = true,
|
|
|
|
.rx = {
|
|
|
|
.pad_align = ilog2(sizeof(u32)),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[IPA_ENDPOINT_AP_MODEM_TX] = {
|
|
|
|
.ee_id = GSI_EE_AP,
|
|
|
|
.channel_id = 3,
|
|
|
|
.endpoint_id = 2,
|
|
|
|
.toward_ipa = true,
|
|
|
|
.channel = {
|
|
|
|
.tre_count = 512,
|
|
|
|
.event_count = 512,
|
|
|
|
.tlv_count = 16,
|
|
|
|
},
|
|
|
|
.endpoint = {
|
|
|
|
.filter_support = true,
|
|
|
|
.config = {
|
2021-03-26 23:11:13 +08:00
|
|
|
.resource_group = IPA_RSRC_GROUP_SRC_UL_DL,
|
2020-03-06 12:28:18 +08:00
|
|
|
.checksum = true,
|
|
|
|
.qmap = true,
|
|
|
|
.status_enable = true,
|
|
|
|
.tx = {
|
2021-03-20 23:57:06 +08:00
|
|
|
.seq_type = IPA_SEQ_2_PASS_SKIP_LAST_UC,
|
2021-04-10 02:07:17 +08:00
|
|
|
.seq_rep_type = IPA_SEQ_REP_DMA_PARSER,
|
2020-03-06 12:28:18 +08:00
|
|
|
.status_endpoint =
|
|
|
|
IPA_ENDPOINT_MODEM_AP_RX,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[IPA_ENDPOINT_AP_MODEM_RX] = {
|
|
|
|
.ee_id = GSI_EE_AP,
|
|
|
|
.channel_id = 6,
|
|
|
|
.endpoint_id = 10,
|
|
|
|
.toward_ipa = false,
|
|
|
|
.channel = {
|
|
|
|
.tre_count = 256,
|
|
|
|
.event_count = 256,
|
|
|
|
.tlv_count = 8,
|
|
|
|
},
|
|
|
|
.endpoint = {
|
|
|
|
.config = {
|
2021-03-26 23:11:13 +08:00
|
|
|
.resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL,
|
2020-03-06 12:28:18 +08:00
|
|
|
.checksum = true,
|
|
|
|
.qmap = true,
|
|
|
|
.aggregation = true,
|
|
|
|
.rx = {
|
|
|
|
.aggr_close_eof = true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[IPA_ENDPOINT_MODEM_LAN_TX] = {
|
|
|
|
.ee_id = GSI_EE_MODEM,
|
|
|
|
.channel_id = 0,
|
|
|
|
.endpoint_id = 3,
|
|
|
|
.toward_ipa = true,
|
|
|
|
.endpoint = {
|
|
|
|
.filter_support = true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[IPA_ENDPOINT_MODEM_AP_TX] = {
|
|
|
|
.ee_id = GSI_EE_MODEM,
|
|
|
|
.channel_id = 4,
|
|
|
|
.endpoint_id = 6,
|
|
|
|
.toward_ipa = true,
|
|
|
|
.endpoint = {
|
|
|
|
.filter_support = true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[IPA_ENDPOINT_MODEM_AP_RX] = {
|
|
|
|
.ee_id = GSI_EE_MODEM,
|
|
|
|
.channel_id = 2,
|
|
|
|
.endpoint_id = 12,
|
|
|
|
.toward_ipa = false,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-03-29 01:31:08 +08:00
|
|
|
/* Source resource configuration data for an SoC having IPA v3.5.1 */
|
2021-03-26 23:11:19 +08:00
|
|
|
static const struct ipa_resource ipa_resource_src[] = {
|
2021-03-26 23:11:16 +08:00
|
|
|
[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 1, .max = 255,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 1, .max = 255,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:14 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 1, .max = 63,
|
2021-03-26 23:11:14 +08:00
|
|
|
},
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:16 +08:00
|
|
|
[IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS] = {
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 10, .max = 10,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 10, .max = 10,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:14 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 8, .max = 8,
|
2021-03-26 23:11:14 +08:00
|
|
|
},
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:16 +08:00
|
|
|
[IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF] = {
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 12, .max = 12,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 14, .max = 14,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:14 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 8, .max = 8,
|
2021-03-26 23:11:14 +08:00
|
|
|
},
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:16 +08:00
|
|
|
[IPA_RESOURCE_TYPE_SRC_HPS_DMARS] = {
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 0, .max = 63,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 0, .max = 63,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:14 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_MHI_DMA] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 0, .max = 63,
|
2021-03-26 23:11:14 +08:00
|
|
|
},
|
|
|
|
.limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 0, .max = 63,
|
2021-03-26 23:11:14 +08:00
|
|
|
},
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:16 +08:00
|
|
|
[IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES] = {
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 14, .max = 14,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 20, .max = 20,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:14 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 14, .max = 14,
|
2021-03-26 23:11:14 +08:00
|
|
|
},
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-03-29 01:31:08 +08:00
|
|
|
/* Destination resource configuration data for an SoC having IPA v3.5.1 */
|
2021-03-26 23:11:19 +08:00
|
|
|
static const struct ipa_resource ipa_resource_dst[] = {
|
2021-03-26 23:11:16 +08:00
|
|
|
[IPA_RESOURCE_TYPE_DST_DATA_SECTORS] = {
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_DST_LWA_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 4, .max = 4,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
|
|
|
.limits[1] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 4, .max = 4,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:14 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_DST_UNUSED_2] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 3, .max = 3,
|
2021-03-26 23:11:14 +08:00
|
|
|
}
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:16 +08:00
|
|
|
[IPA_RESOURCE_TYPE_DST_DPS_DMARS] = {
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_DST_LWA_DL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 2, .max = 63,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:13 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_DST_UL_DL_DPL] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 1, .max = 63,
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
2021-03-26 23:11:14 +08:00
|
|
|
.limits[IPA_RSRC_GROUP_DST_UNUSED_2] = {
|
2021-03-26 23:11:17 +08:00
|
|
|
.min = 1, .max = 2,
|
2021-03-26 23:11:14 +08:00
|
|
|
}
|
2020-03-06 12:28:18 +08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-03-29 01:31:08 +08:00
|
|
|
/* Resource configuration data for an SoC having IPA v3.5.1 */
|
2020-03-06 12:28:18 +08:00
|
|
|
static const struct ipa_resource_data ipa_resource_data = {
|
2021-03-26 23:11:21 +08:00
|
|
|
.rsrc_group_src_count = IPA_RSRC_GROUP_SRC_COUNT,
|
|
|
|
.rsrc_group_dst_count = IPA_RSRC_GROUP_DST_COUNT,
|
2020-03-06 12:28:18 +08:00
|
|
|
.resource_src_count = ARRAY_SIZE(ipa_resource_src),
|
|
|
|
.resource_src = ipa_resource_src,
|
|
|
|
.resource_dst_count = ARRAY_SIZE(ipa_resource_dst),
|
|
|
|
.resource_dst = ipa_resource_dst,
|
|
|
|
};
|
|
|
|
|
2021-03-29 01:31:08 +08:00
|
|
|
/* IPA-resident memory region data for an SoC having IPA v3.5.1 */
|
2020-05-05 01:58:57 +08:00
|
|
|
static const struct ipa_mem ipa_mem_local_data[] = {
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_UC_SHARED,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0000,
|
|
|
|
.size = 0x0080,
|
|
|
|
.canary_count = 0,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_UC_INFO,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0080,
|
|
|
|
.size = 0x0200,
|
|
|
|
.canary_count = 0,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_V4_FILTER_HASHED,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0288,
|
|
|
|
.size = 0x0078,
|
|
|
|
.canary_count = 2,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_V4_FILTER,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0308,
|
|
|
|
.size = 0x0078,
|
|
|
|
.canary_count = 2,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_V6_FILTER_HASHED,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0388,
|
|
|
|
.size = 0x0078,
|
|
|
|
.canary_count = 2,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_V6_FILTER,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0408,
|
|
|
|
.size = 0x0078,
|
|
|
|
.canary_count = 2,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_V4_ROUTE_HASHED,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0488,
|
|
|
|
.size = 0x0078,
|
|
|
|
.canary_count = 2,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_V4_ROUTE,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0508,
|
|
|
|
.size = 0x0078,
|
|
|
|
.canary_count = 2,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_V6_ROUTE_HASHED,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0588,
|
|
|
|
.size = 0x0078,
|
|
|
|
.canary_count = 2,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_V6_ROUTE,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0608,
|
|
|
|
.size = 0x0078,
|
|
|
|
.canary_count = 2,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_MODEM_HEADER,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0688,
|
|
|
|
.size = 0x0140,
|
|
|
|
.canary_count = 2,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_MODEM_PROC_CTX,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x07d0,
|
|
|
|
.size = 0x0200,
|
|
|
|
.canary_count = 2,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_AP_PROC_CTX,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x09d0,
|
|
|
|
.size = 0x0200,
|
|
|
|
.canary_count = 0,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_MODEM,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x0bd8,
|
|
|
|
.size = 0x1024,
|
|
|
|
.canary_count = 0,
|
|
|
|
},
|
2021-06-11 03:23:08 +08:00
|
|
|
{
|
2021-06-10 06:34:54 +08:00
|
|
|
.id = IPA_MEM_UC_EVENT_RING,
|
2020-03-06 12:28:18 +08:00
|
|
|
.offset = 0x1c00,
|
|
|
|
.size = 0x0400,
|
|
|
|
.canary_count = 1,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-03-29 01:31:08 +08:00
|
|
|
/* Memory configuration data for an SoC having IPA v3.5.1 */
|
2021-03-19 23:24:18 +08:00
|
|
|
static const struct ipa_mem_data ipa_mem_data = {
|
2020-05-05 01:58:57 +08:00
|
|
|
.local_count = ARRAY_SIZE(ipa_mem_local_data),
|
|
|
|
.local = ipa_mem_local_data,
|
2020-05-05 01:58:58 +08:00
|
|
|
.imem_addr = 0x146bd000,
|
|
|
|
.imem_size = 0x00002000,
|
2020-05-05 01:58:59 +08:00
|
|
|
.smem_id = 497,
|
|
|
|
.smem_size = 0x00002000,
|
2020-05-05 01:58:57 +08:00
|
|
|
};
|
|
|
|
|
2021-01-15 20:50:50 +08:00
|
|
|
/* Interconnect bandwidths are in 1000 byte/second units */
|
2021-03-19 23:24:18 +08:00
|
|
|
static const struct ipa_interconnect_data ipa_interconnect_data[] = {
|
2021-01-15 20:50:50 +08:00
|
|
|
{
|
|
|
|
.name = "memory",
|
|
|
|
.peak_bandwidth = 600000, /* 600 MBps */
|
|
|
|
.average_bandwidth = 80000, /* 80 MBps */
|
|
|
|
},
|
|
|
|
/* Average bandwidth is unused for the next two interconnects */
|
|
|
|
{
|
|
|
|
.name = "imem",
|
|
|
|
.peak_bandwidth = 350000, /* 350 MBps */
|
|
|
|
.average_bandwidth = 0, /* unused */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.name = "config",
|
|
|
|
.peak_bandwidth = 40000, /* 40 MBps */
|
|
|
|
.average_bandwidth = 0, /* unused */
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-03-29 01:31:08 +08:00
|
|
|
/* Clock and interconnect configuration data for an SoC having IPA v3.5.1 */
|
2021-03-19 23:24:18 +08:00
|
|
|
static const struct ipa_clock_data ipa_clock_data = {
|
2020-11-20 06:40:40 +08:00
|
|
|
.core_clock_rate = 75 * 1000 * 1000, /* Hz */
|
2021-01-15 20:50:50 +08:00
|
|
|
.interconnect_count = ARRAY_SIZE(ipa_interconnect_data),
|
|
|
|
.interconnect_data = ipa_interconnect_data,
|
2020-11-20 06:40:40 +08:00
|
|
|
};
|
|
|
|
|
2021-03-29 01:31:08 +08:00
|
|
|
/* Configuration data for an SoC having IPA v3.5.1 */
|
|
|
|
const struct ipa_data ipa_data_v3_5_1 = {
|
2020-03-06 12:28:18 +08:00
|
|
|
.version = IPA_VERSION_3_5_1,
|
2021-03-29 01:31:06 +08:00
|
|
|
.backward_compat = BCR_CMDQ_L_LACK_ONE_ENTRY_FMASK |
|
|
|
|
BCR_TX_NOT_USING_BRESP_FMASK |
|
|
|
|
BCR_SUSPEND_L2_IRQ_FMASK |
|
|
|
|
BCR_HOLB_DROP_L2_IRQ_FMASK |
|
|
|
|
BCR_DUAL_TX_FMASK,
|
2021-03-19 23:24:22 +08:00
|
|
|
.qsb_count = ARRAY_SIZE(ipa_qsb_data),
|
|
|
|
.qsb_data = ipa_qsb_data,
|
2020-03-06 12:28:18 +08:00
|
|
|
.endpoint_count = ARRAY_SIZE(ipa_gsi_endpoint_data),
|
|
|
|
.endpoint_data = ipa_gsi_endpoint_data,
|
|
|
|
.resource_data = &ipa_resource_data,
|
2020-05-05 01:58:57 +08:00
|
|
|
.mem_data = &ipa_mem_data,
|
2020-11-20 06:40:40 +08:00
|
|
|
.clock_data = &ipa_clock_data,
|
2020-03-06 12:28:18 +08:00
|
|
|
};
|