Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ae783c6 authored by Roy Pledge's avatar Roy Pledge Committed by Li Yang
Browse files

soc/fsl/qbman: Use shared-dma-pool for BMan private memory allocations



Use the shared-memory-pool mechanism for free buffer proxy record
area allocation.

Signed-off-by: default avatarRoy Pledge <roy.pledge@nxp.com>
Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
parent 42d03497
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -201,6 +201,21 @@ static int fsl_bman_probe(struct platform_device *pdev)
		return -ENODEV;
	}

	/*
	 * If FBPR memory wasn't defined using the qbman compatible string
	 * try using the of_reserved_mem_device method
	 */
	if (!fbpr_a) {
		ret = qbman_init_private_mem(dev, 0, &fbpr_a, &fbpr_sz);
		if (ret) {
			dev_err(dev, "qbman_init_private_mem() failed 0x%x\n",
				ret);
			return -ENODEV;
		}
	}

	dev_dbg(dev, "Allocated FBPR 0x%llx 0x%zx\n", fbpr_a, fbpr_sz);

	bm_set_memory(fbpr_a, fbpr_sz);

	err_irq = platform_get_irq(pdev, 0);