summaryrefslogtreecommitdiff
path: root/include/soc
diff options
context:
space:
mode:
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>2018-08-02 16:14:12 +0300
committerDong Aisheng <aisheng.dong@nxp.com>2019-12-02 18:02:39 +0800
commit4100f962d857386f46f4317e881f58291d8d6cbd (patch)
tree9d540c72e973e1698b2db1b459617a58f16d2ceb /include/soc
parente6b50b37efc71d60c55545c47a8c5dc966625750 (diff)
soc/fsl/qbman_portals: add APIs to retrieve the probing status
Add a couple of new APIs to check the probing status of the required cpu bound qman and bman portals: 'int bman_portals_probed()' and 'int qman_portals_probed()'. They return the following values. * 1 if qman/bman portals were all probed correctly * 0 if qman/bman portals were not yet probed * -1 if probing of qman/bman portals failed Portals are considered successful probed if no error occurred during the probing of any of the portals and if enough portals were probed to have one available for each cpu. The error handling paths were slightly rearranged in order to fit this new functionality without being too intrusive. Drivers that use qman/bman portal driver services are required to use these APIs before calling any functions exported by these drivers or otherwise they will crash the kernel. First user will be the dpaa1 ethernet driver, coming in a subsequent patch. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
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 aa31c05a103a..ee72e370dd16 100644
--- a/include/soc/fsl/qman.h
+++ b/include/soc/fsl/qman.h
@@ -1235,4 +1235,13 @@ void qman_portal_get_iperiod(struct qman_portal *portal, u32 *iperiod);
*/
int qman_portal_set_iperiod(struct qman_portal *portal, u32 iperiod);
+/**
+ * qman_portals_probed - Check if all cpu bound qman portals are probed
+ *
+ * Returns 1 if all the required cpu bound qman portals successfully probed,
+ * -1 if probe errors appeared or 0 if the qman portals did not yet finished
+ * probing.
+ */
+int qman_portals_probed(void);
+
#endif /* __FSL_QMAN_H */