aboutsummaryrefslogtreecommitdiffstats
path: root/include/soc
diff options
context:
space:
mode:
authorMadalin Bucur <madalin.bucur@nxp.com>2019-10-31 16:37:58 +0200
committerDavid S. Miller <davem@davemloft.net>2019-10-31 12:13:34 -0700
commita2d00f3db73dc4f6f6afcc95c1db809ea9019306 (patch)
tree2eae9cd0d87616c359dfcc149f41344fa1921d6e /include/soc
parentdpaa_eth: extend delays in ndo_stop (diff)
downloadlinux-dev-a2d00f3db73dc4f6f6afcc95c1db809ea9019306.tar.xz
linux-dev-a2d00f3db73dc4f6f6afcc95c1db809ea9019306.zip
soc: fsl: qbman: allow registering a device link for the portal user
Introduce the API required to make sure that the devices that use the QMan portal are unbound when the portal is unbound. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/fsl/qman.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/soc/fsl/qman.h b/include/soc/fsl/qman.h
index aa31c05a103a..c499c5cfa7c9 100644
--- a/include/soc/fsl/qman.h
+++ b/include/soc/fsl/qman.h
@@ -32,6 +32,7 @@
#define __FSL_QMAN_H
#include <linux/bitops.h>
+#include <linux/device.h>
/* Hardware constants */
#define QM_CHANNEL_SWPORTAL0 0
@@ -915,6 +916,23 @@ u16 qman_affine_channel(int cpu);
struct qman_portal *qman_get_affine_portal(int cpu);
/**
+ * qman_start_using_portal - register a device link for the portal user
+ * @p: the portal that will be in use
+ * @dev: the device that will use the portal
+ *
+ * Makes sure that the devices that use the portal are unbound when the
+ * portal is unbound
+ */
+int qman_start_using_portal(struct qman_portal *p, struct device *dev);
+
+/**
+ * qman_stop_using_portal - deregister a device link for the portal user
+ * @p: the portal that will no longer be in use
+ * @dev: the device that uses the portal
+ */
+void qman_stop_using_portal(struct qman_portal *p, struct device *dev);
+
+/**
* qman_p_poll_dqrr - process DQRR (fast-path) entries
* @limit: the maximum number of DQRR entries to process
*