Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d27f0ea authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 823a8ab5 9da9e4fc
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;
		}
+1 −1
Original line number Diff line number Diff line
@@ -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; })