diff options
author | Haiying Wang <Haiying.Wang@freescale.com> | 2013-10-15 15:57:01 (GMT) |
---|---|---|
committer | J. German Rivera <German.Rivera@freescale.com> | 2013-10-17 22:24:41 (GMT) |
commit | 2456de55ff645886c0c500183fa7023ff9f3f63d (patch) | |
tree | 88dbb57b13bb90f6d8003e85308281bbd3dcdc79 /drivers | |
parent | 0022230b7b6ce5f416f5c6fe08419b411fbb0d83 (diff) | |
download | linux-fsl-qoriq-2456de55ff645886c0c500183fa7023ff9f3f63d.tar.xz |
fsl_qman: confirm num_ceetms in qman_init
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Change-Id: Ieff662d29203e37813ba9553e750e2777fc25591
Reviewed-on: http://git.am.freescale.net:8181/5631
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Thorpe Geoff-R01361 <Geoff.Thorpe@freescale.com>
Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/fsl_qbman/qman_driver.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/staging/fsl_qbman/qman_driver.c b/drivers/staging/fsl_qbman/qman_driver.c index 43debcb..5033747 100644 --- a/drivers/staging/fsl_qbman/qman_driver.c +++ b/drivers/staging/fsl_qbman/qman_driver.c @@ -717,6 +717,15 @@ __init int qman_init(void) qm_channel_pme = QMAN_CHANNEL_PME_REV3; } + /* + * Parse the ceetm node to get how many ceetm instances are supported + * on the current silicon. num_ceetms must be confirmed before portals + * are intiailized. + */ + num_ceetms = 0; + for_each_compatible_node(dn, NULL, "fsl,qman-ceetm") + num_ceetms++; + /* Parse pool channels into the SDQCR mask. (Must happen before portals * are initialised.) */ for_each_compatible_node(dn, NULL, "fsl,pool-channel-range") { @@ -837,10 +846,8 @@ __init int qman_resource_init(void) } /* Parse CEETM */ - num_ceetms = 0; for_each_compatible_node(dn, NULL, "fsl,qman-ceetm") { ret = fsl_ceetm_init(dn); - num_ceetms++; if (ret) return ret; } |