// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2019-2020 Linaro Ltd. */
+/* Copyright (C) 2019-2021 Linaro Ltd. */
#include <linux/log2.h>
#include "ipa_endpoint.h"
#include "ipa_mem.h"
+/* Resource groups used for the SC7180 SoC */
+enum ipa_rsrc_group_id {
+ /* Source resource group identifiers */
+ IPA_RSRC_GROUP_SRC_UL_DL = 0,
+
+ /* Destination resource group identifiers */
+ IPA_RSRC_GROUP_DST_UL_DL_DPL = 0,
+};
+
/* QSB configuration for the SC7180 SoC. */
static const struct ipa_qsb_data ipa_qsb_data[] = {
[IPA_QSB_MASTER_DDR] = {
},
.endpoint = {
.config = {
- .resource_group = 0,
+ .resource_group = IPA_RSRC_GROUP_SRC_UL_DL,
.dma_mode = true,
.dma_endpoint = IPA_ENDPOINT_AP_LAN_RX,
.tx = {
},
.endpoint = {
.config = {
- .resource_group = 0,
+ .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL,
.aggregation = true,
.status_enable = true,
.rx = {
.endpoint = {
.filter_support = true,
.config = {
- .resource_group = 0,
+ .resource_group = IPA_RSRC_GROUP_SRC_UL_DL,
.checksum = true,
.qmap = true,
.status_enable = true,
},
.endpoint = {
.config = {
- .resource_group = 0,
+ .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL,
.checksum = true,
.qmap = true,
.aggregation = true,
},
};
-/* For the SC7180, resource groups are allocated this way:
- * group 0: UL_DL
- */
+/* Source resource configuration data for the SC7180 SoC */
static const struct ipa_resource_src ipa_resource_src[] = {
{
.type = IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 3,
.max = 63,
},
},
{
.type = IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 3,
.max = 3,
},
},
{
.type = IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 10,
.max = 10,
},
},
{
.type = IPA_RESOURCE_TYPE_SRC_HPS_DMARS,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 1,
.max = 1,
},
},
{
.type = IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 5,
.max = 5,
},
},
};
+/* Destination resource configuration data for the SC7180 SoC */
static const struct ipa_resource_dst ipa_resource_dst[] = {
{
.type = IPA_RESOURCE_TYPE_DST_DATA_SECTORS,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_DST_UL_DL_DPL] = {
.min = 3,
.max = 3,
},
},
{
.type = IPA_RESOURCE_TYPE_DST_DPS_DMARS,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_DST_UL_DL_DPL] = {
.min = 1,
.max = 63,
},
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
- * Copyright (C) 2019-2020 Linaro Ltd.
+ * Copyright (C) 2019-2021 Linaro Ltd.
*/
#include <linux/log2.h>
#include "ipa_endpoint.h"
#include "ipa_mem.h"
+/* Resource groups used for the SDM845 SoC */
+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,
+
+ /* Destination resource group identifiers */
+ IPA_RSRC_GROUP_DST_LWA_DL = 0,
+ IPA_RSRC_GROUP_DST_UL_DL_DPL,
+ IPA_RSRC_GROUP_DST_UNUSED_2,
+};
+
/* QSB configuration for the SDM845 SoC. */
static const struct ipa_qsb_data ipa_qsb_data[] = {
[IPA_QSB_MASTER_DDR] = {
},
.endpoint = {
.config = {
- .resource_group = 1,
+ .resource_group = IPA_RSRC_GROUP_SRC_UL_DL,
.dma_mode = true,
.dma_endpoint = IPA_ENDPOINT_AP_LAN_RX,
.tx = {
},
.endpoint = {
.config = {
- .resource_group = 1,
+ .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL,
.aggregation = true,
.status_enable = true,
.rx = {
.endpoint = {
.filter_support = true,
.config = {
- .resource_group = 1,
+ .resource_group = IPA_RSRC_GROUP_SRC_UL_DL,
.checksum = true,
.qmap = true,
.status_enable = true,
},
.endpoint = {
.config = {
- .resource_group = 1,
+ .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL,
.checksum = true,
.qmap = true,
.aggregation = true,
},
};
-/* For the SDM845, resource groups are allocated this way:
- * group 0: LWA_DL
- * group 1: UL_DL
- */
+/* Source resource configuration data for the SDM845 SoC */
static const struct ipa_resource_src ipa_resource_src[] = {
{
.type = IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
.min = 1,
.max = 255,
},
- .limits[1] = {
+ .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 1,
.max = 255,
},
},
{
.type = IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
.min = 10,
.max = 10,
},
- .limits[1] = {
+ .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 10,
.max = 10,
},
},
{
.type = IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
.min = 12,
.max = 12,
},
- .limits[1] = {
+ .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 14,
.max = 14,
},
},
{
.type = IPA_RESOURCE_TYPE_SRC_HPS_DMARS,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
.min = 0,
.max = 63,
},
- .limits[1] = {
+ .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 0,
.max = 63,
},
},
{
.type = IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
.min = 14,
.max = 14,
},
- .limits[1] = {
+ .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 20,
.max = 20,
},
},
};
+/* Destination resource configuration data for the SDM845 SoC */
static const struct ipa_resource_dst ipa_resource_dst[] = {
{
.type = IPA_RESOURCE_TYPE_DST_DATA_SECTORS,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_DST_LWA_DL] = {
.min = 4,
.max = 4,
},
},
{
.type = IPA_RESOURCE_TYPE_DST_DPS_DMARS,
- .limits[0] = {
+ .limits[IPA_RSRC_GROUP_DST_LWA_DL] = {
.min = 2,
.max = 63,
},
- .limits[1] = {
+ .limits[IPA_RSRC_GROUP_DST_UL_DL_DPL] = {
.min = 1,
.max = 63,
},