• Laurentiu Tudor's avatar
    soc: fsl: qbman_portals: add APIs to retrieve the probing status · 5d1d046e
    Laurentiu Tudor authored
    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: default avatarLaurentiu Tudor <laurentiu.tudor@nxp.com>
    Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
    5d1d046e
qman_portal.c 9.75 KB