msm: gsi: Update GSI driver to support 24 event ring channels

GSI 2.5 supports 24 event ring channels as opposed to 22
at previous versions. Update driver to support it.

CRs-Fixed: 2264249
Change-Id: I4b80a5b24c3dad8950ccc2b0a6839fb86879399d
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
tirimbino
Ghanim Fodi 7 years ago
parent 6401e390b3
commit 9da9e4fcd2
  1. 7
      drivers/platform/msm/gsi/gsi.c
  2. 2
      drivers/platform/msm/gsi/gsi.h

@ -905,6 +905,11 @@ int gsi_register_device(struct gsi_per_props *props, unsigned long *dev_hdl)
return -GSI_STATUS_ERROR;
}
if (gsi_ctx->max_ev > GSI_EVT_RING_MAX) {
GSIERR("max event rings are beyond absolute maximum\n");
return -GSI_STATUS_ERROR;
}
if (props->mhi_er_id_limits_valid &&
props->mhi_er_id_limits[0] > (gsi_ctx->max_ev - 1)) {
devm_iounmap(gsi_ctx->dev, gsi_ctx->base);
@ -1847,7 +1852,7 @@ int gsi_alloc_channel(struct gsi_chan_props *props, unsigned long dev_hdl,
}
if (props->evt_ring_hdl != ~0) {
if (props->evt_ring_hdl >= GSI_EVT_RING_MAX) {
if (props->evt_ring_hdl >= gsi_ctx->max_ev) {
GSIERR("invalid evt ring=%lu\n", props->evt_ring_hdl);
return -GSI_STATUS_INVALID_PARAMS;
}

@ -21,7 +21,7 @@
#include <linux/ipc_logging.h>
#define GSI_CHAN_MAX 31
#define GSI_EVT_RING_MAX 23
#define GSI_EVT_RING_MAX 24
#define GSI_NO_EVT_ERINDEX 31
#define gsi_readl(c) ({ u32 __v = readl_relaxed(c); __iormb(); __v; })

Loading…
Cancel
Save