soc: fsl: qbman_portals: add APIs to retrieve the probing status
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>
Sat, 27 Apr 2019 07:10:24 +0000 (10:10 +0300)
committerLi Yang <leoyang.li@nxp.com>
Mon, 20 May 2019 19:28:16 +0000 (14:28 -0500)
commit5d1d046e2868fc876a69231eb2f24f000b521f1c
tree0167f1d24f1bec27a959feb8d1da515c337c2814
parentd9ebd99d9a2ff7857b8dbfebd4604f80064d749c
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>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
drivers/soc/fsl/qbman/bman_portal.c
drivers/soc/fsl/qbman/qman_portal.c
include/soc/fsl/bman.h
include/soc/fsl/qman.h