summaryrefslogtreecommitdiff
path: root/include/soc
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2022-09-03 00:57:35 +0300
committerDavid S. Miller <davem@davemloft.net>2022-09-05 16:27:39 +0300
commit914f8b228ede709274b8c80514b352248ec9da00 (patch)
tree1a763d9af9aa32c11a68960ae1f6407c186965cd /include/soc
parentd0e17a4653cebc2c8a20251c837dd1fcec5014d9 (diff)
downloadlinux-914f8b228ede709274b8c80514b352248ec9da00.tar.xz
soc: fsl: qbman: Add CGR update function
This adds a function to update a CGR with new parameters. qman_create_cgr can almost be used for this (with flags=0), but it's not suitable because it also registers the callback function. The _safe variant was modeled off of qman_cgr_delete_safe. However, we handle multiple arguments and a return value. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/fsl/qman.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/soc/fsl/qman.h b/include/soc/fsl/qman.h
index 59eeba31c192..0d3d6beb7fdb 100644
--- a/include/soc/fsl/qman.h
+++ b/include/soc/fsl/qman.h
@@ -1172,6 +1172,15 @@ int qman_delete_cgr(struct qman_cgr *cgr);
void qman_delete_cgr_safe(struct qman_cgr *cgr);
/**
+ * qman_update_cgr_safe - Modifies a congestion group object from any CPU
+ * @cgr: the 'cgr' object to modify
+ * @opts: state of the CGR settings
+ *
+ * This will select the proper CPU and modify the CGR settings.
+ */
+int qman_update_cgr_safe(struct qman_cgr *cgr, struct qm_mcc_initcgr *opts);
+
+/**
* qman_query_cgr_congested - Queries CGR's congestion status
* @cgr: the 'cgr' object to query
* @result: returns 'cgr's congestion status, 1 (true) if congested