]> git.baikalelectronics.ru Git - kernel.git/commit
soc: fsl: qbman: add APIs to retrieve the probing status
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>
Wed, 26 Sep 2018 13:22:30 +0000 (16:22 +0300)
committerLi Yang <leoyang.li@nxp.com>
Thu, 27 Sep 2018 20:43:35 +0000 (15:43 -0500)
commit97ebe2f4508b33de7dada6fe795261ebf8f830d5
tree0e0afdd4c45a3e096fc5b7c85380aaede6d6b8b6
parentbaff8dccca67c4522fc2129e229abed61c01a4c9
soc: fsl: qbman: add APIs to retrieve the probing status

Add a couple of new APIs to check the probing status of qman and bman:
 'int bman_is_probed()' and 'int qman_is_probed()'.
They return the following values.
 *  1 if qman/bman were probed correctly
 *  0 if qman/bman were not yet probed
 * -1 if probing of qman/bman failed
Drivers that use qman/bman driver services are required to use these
APIs before calling any functions exported by qman or bman drivers
or otherwise they will crash the kernel.
The APIs will be used in the following couple of qbman portal patches
and later in the series in the dpaa1 ethernet driver.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
drivers/soc/fsl/qbman/bman_ccsr.c
drivers/soc/fsl/qbman/qman_ccsr.c
include/soc/fsl/bman.h
include/soc/fsl/qman.h