diff options
author | Roy Pledge <roy.pledge@nxp.com> | 2019-08-01 20:16:57 +0000 |
---|---|---|
committer | Li Yang <leoyang.li@nxp.com> | 2019-08-15 16:41:47 -0500 |
commit | c5501aa92a881e599e1dc80f387d27763d07f67c (patch) | |
tree | b63ad6e714f67ba0d1162c1c8907a526adce64d9 /drivers/soc/fsl/qbman/qman_ccsr.c | |
parent | 0505d00c8dbaf06cb71e7a16818313ce1959e6d7 (diff) |
soc/fsl/qbman: Cleanup QMan queues if device was already initialized
If the QMan device was previously initialized make sure all the
frame queues are out of service once all the portals are probed.
This handles the case where the kernel is restarted without the
SoC being reset (kexec for example)
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers/soc/fsl/qbman/qman_ccsr.c')
-rw-r--r-- | drivers/soc/fsl/qbman/qman_ccsr.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/soc/fsl/qbman/qman_ccsr.c b/drivers/soc/fsl/qbman/qman_ccsr.c index a3edefa792f8..709661b7b7a8 100644 --- a/drivers/soc/fsl/qbman/qman_ccsr.c +++ b/drivers/soc/fsl/qbman/qman_ccsr.c @@ -492,7 +492,7 @@ RESERVEDMEM_OF_DECLARE(qman_pfdr, "fsl,qman-pfdr", qman_pfdr); #endif -static unsigned int qm_get_fqid_maxcnt(void) +unsigned int qm_get_fqid_maxcnt(void) { return fqd_sz / 64; } @@ -737,6 +737,17 @@ int qman_is_probed(void) } EXPORT_SYMBOL_GPL(qman_is_probed); +int qman_requires_cleanup(void) +{ + return __qman_requires_cleanup; +} + +void qman_done_cleanup(void) +{ + __qman_requires_cleanup = 0; +} + + static int fsl_qman_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; |