msm: IPA: uC debug stats channel update

Update MAX channel on query for uC debug stats protocols.

Change-Id: I7a913f2cb60a1dccbacf2bbbfc25a2a823897992
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
tirimbino
Bojun Pan 6 years ago committed by Gerrit - the friendly Code Review server
parent 06c8d20c27
commit ca08bf77af
  1. 2
      drivers/platform/msm/ipa/ipa_clients/ipa_usb.c
  2. 2
      drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c
  3. 6
      drivers/platform/msm/ipa/ipa_v3/ipa_uc_offload_i.h
  4. 6
      drivers/platform/msm/ipa/ipa_v3/ipa_uc_wdi.c
  5. 6
      drivers/platform/msm/ipa/ipa_v3/ipa_wdi3_i.c

@ -3231,7 +3231,7 @@ int ipa3_get_usb_gsi_stats(struct ipa3_uc_dbg_ring_stats *stats)
return -EINVAL;
}
IPA_ACTIVE_CLIENTS_INC_SIMPLE();
for (i = 0; i < MAX_CH_STATS_SUPPORTED; i++) {
for (i = 0; i < MAX_USB_CHANNELS; i++) {
stats->ring[i].ringFull = ioread32(
ipa3_ctx->usb_ctx.dbg_stats.uc_dbg_stats_mmio
+ i * IPA3_UC_DEBUG_STATS_OFF +

@ -2802,7 +2802,7 @@ int ipa3_get_mhip_gsi_stats(struct ipa3_uc_dbg_ring_stats *stats)
return -EINVAL;
}
IPA_ACTIVE_CLIENTS_INC_SIMPLE();
for (i = 0; i < MAX_CH_STATS_SUPPORTED; i++) {
for (i = 0; i < MAX_MHIP_CHANNELS; i++) {
stats->ring[i].ringFull = ioread32(
ipa3_ctx->mhip_ctx.dbg_stats.uc_dbg_stats_mmio
+ i * IPA3_UC_DEBUG_STATS_OFF +

@ -30,6 +30,12 @@
#define DIR_CONSUMER 0
#define DIR_PRODUCER 1
#define MAX_AQC_CHANNELS 2
#define MAX_11AD_CHANNELS 5
#define MAX_WDI2_CHANNELS 2
#define MAX_WDI3_CHANNELS 2
#define MAX_MHIP_CHANNELS 4
#define MAX_USB_CHANNELS 2
/**
* @brief Enum value determined based on the feature it

@ -427,17 +427,15 @@ static void ipa3_uc_wdi_event_handler(struct IpaHwSharedMemCommonMapping_t
*/
int ipa3_get_wdi_gsi_stats(struct ipa3_uc_dbg_ring_stats *stats)
{
int i, num_chs;
int i;
if (!ipa3_ctx->wdi2_ctx.dbg_stats.uc_dbg_stats_mmio) {
IPAERR("bad NULL parms for wdi_gsi_stats\n");
return -EINVAL;
}
num_chs = ipa3_ctx->wdi2_ctx.dbg_stats.uc_dbg_stats_size
/ sizeof(struct IpaHwRingStats_t);
IPA_ACTIVE_CLIENTS_INC_SIMPLE();
for (i = 0; i < num_chs; i++) {
for (i = 0; i < MAX_WDI2_CHANNELS; i++) {
stats->ring[i].ringFull = ioread32(
ipa3_ctx->wdi2_ctx.dbg_stats.uc_dbg_stats_mmio
+ i * IPA3_UC_DEBUG_STATS_OFF +

@ -930,17 +930,15 @@ exit:
*/
int ipa3_get_wdi3_gsi_stats(struct ipa3_uc_dbg_ring_stats *stats)
{
int i, num_chs;
int i;
if (!ipa3_ctx->wdi3_ctx.dbg_stats.uc_dbg_stats_mmio) {
IPAERR("bad NULL parms for wdi3_gsi_stats\n");
return -EINVAL;
}
num_chs = ipa3_ctx->wdi3_ctx.dbg_stats.uc_dbg_stats_size
/ sizeof(struct IpaHwRingStats_t);
IPA_ACTIVE_CLIENTS_INC_SIMPLE();
for (i = 0; i < num_chs; i++) {
for (i = 0; i < MAX_WDI3_CHANNELS; i++) {
stats->ring[i].ringFull = ioread32(
ipa3_ctx->wdi3_ctx.dbg_stats.uc_dbg_stats_mmio
+ i * IPA3_UC_DEBUG_STATS_OFF +

Loading…
Cancel
Save