Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751848AbdIRUnH (ORCPT ); Mon, 18 Sep 2017 16:43:07 -0400 Received: from mail-bl2nam02on0085.outbound.protection.outlook.com ([104.47.38.85]:61152 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750872AbdIRUjy (ORCPT ); Mon, 18 Sep 2017 16:39:54 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Roy Pledge To: , , , , CC: , , , , , , Roy Pledge Subject: [v5 02/12] soc/fsl/qbman: Use shared-dma-pool for BMan private memory allocations Date: Mon, 18 Sep 2017 16:39:37 -0400 Message-ID: <1505767187-4596-3-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505767187-4596-1-git-send-email-roy.pledge@nxp.com> References: <1505767187-4596-1-git-send-email-roy.pledge@nxp.com> Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131502407928956838;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7966004)(336005)(376002)(39860400002)(346002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(316002)(5003940100001)(104016004)(189998001)(7416002)(5660300001)(36756003)(16586007)(97736004)(356003)(3450700001)(6666003)(76176999)(50226002)(50986999)(54906002)(305945005)(498600001)(81156014)(81166006)(43066003)(2906002)(106466001)(8676002)(2201001)(8656003)(68736007)(230783001)(33646002)(2950100002)(8936002)(105606002)(85426001)(47776003)(4326008)(53936002)(77096006)(50466002)(48376002)(86362001)(110136005)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR03MB2692;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD016;1:uj7sUnTfOK8btsLjOXOhvplWiz/wlewWxLuP0t9um9zVgefwWC6meRULHZDmw1xQjO2IT0kkEV2Gze/u0VvVl/klCwoSIvbOn3BreuXTQ/IK70+xh91hUnZ34UuJZlMh MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8bf19c2b-5ebe-44ac-bc9e-08d4fed56a1a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BN6PR03MB2692; X-Microsoft-Exchange-Diagnostics: 1;BN6PR03MB2692;3:ta9VMAv+n97snqyMTjYglJ7mDAuJphgRmYLHe8QT7a/k364ZrxL3e2vLiidFUed2pUEf7T/zraxihYVi+Txb/Tn5VfEUt+R5TRHQdMmrEZNf1kZe0iU9FbQYWgDnFVpmPfcYp5TV9w6D7MhDGLhmIN9ApMan4TfHoSaamV7g80QsAzw7GIHx5ksRRCI9YXIB7unKYVtP9+B/1fa+rHUobcYH2Snnbgacyo2HRkkVcm3UbG4YHpsYfzNMt/VlcY0yy7hjdqmcaXniCCdvIHK7/f+P/qQUA+5ZnXjMvEiHxnLCqICpNo4tI7JHZ99VJV3lfFGNb1QCjXq5GmRlDtslcdPGMsYf8Hg4WxSe2GEqXf4=;25:vnpumDn3hbkCXJJV5EniVyR+GuuPOKt+Lw1GEyYro7k0ISF7LnopsJoKzY/9DN19QLPnil8GgXHGjfktsIQrlEXHvj++tVCmi3uateNRaCYdFkHIdIQTktdynhiR8HrwfEoAUZsP8OW44P2bpJxgNb6ct+dhgIzjFcRFOTkdJ5fHSz8Y64zPhz4PibI3s6k4VMVID4W1jJGXtqzUwWHwCq3N4UMmFndpC+od+2BvlyjLfd0qwj5od8zBz+R2ksTlpFpxrtghGR6mgduCFdgFacRUIIOqpIYeJf+uIKBmSHRjPVgWTrtb+QAqkknGP9FEbdx8wfvTjBzsDC2jUDepMg== X-MS-TrafficTypeDiagnostic: BN6PR03MB2692: X-Microsoft-Exchange-Diagnostics: 1;BN6PR03MB2692;31:7t9g2STwOGWXNMzu9HMiTdYbp7QS3SI2EjHN801zUApndvE7P0bHPpFb1lP+ZZbbJBNKh6ZccEgBd9QCTJRzOMzvARH4/0GFPBWnjuvBYsddWgDzvptGfO77FOO+lzWEC1T+aH8J6vyXGuKI6wwJ3C8/tSVPxXfJWFa0izCtHko7wSLsJYIHjMAEjhsRbtbqV1rsTZP3x+K4SUm+1wqlWJ9nEM/7hQq0dRE/8Cs5y90=;4:VDcdPwqgpZGjAnM+r+FfHGM6B3cooIu3JELPGVey3Rgv2LNwbHfFdaZEh7cS7MopQLNoeeEHNqKdEehx5pTuWHrV6bZN94Tlzy6kQn7YNDWcn4jr6EoVd3clro2rH7zh/87B9a/S/nOEAz91Lp/hUqNw67EKLKpgY4UHGfiMUkqC4LC7BK/1QcQa1QZs8MVLUyOpeLrYdso4fr3xkCLQrHcFxv3F41cfoULtTCRcv/gAFu/DRzK4tp77h+4sYJiJ1SjDUnNJr1QWy5Bw5fHXSWlqm39P9UWumMb0h5x+r/M= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123565025)(20161123559100)(20161123563025)(20161123561025)(20161123556025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN6PR03MB2692;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN6PR03MB2692; X-Forefront-PRVS: 04347F8039 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN6PR03MB2692;23:mmkgiG394YMZFCHZPU33PVnc5CCjtU/mONLH2GO0C?= =?us-ascii?Q?iXS6pii0FLySqKZfB8q5vezfhxP63mkwkMtpaQzk/L2BnCN5KwWy09jA4buu?= =?us-ascii?Q?iZqdn6xll6jxWMj8GajdoCDZJCQOJJWzburM5TITtMNFMPrxcTB5CSt6K8hD?= =?us-ascii?Q?tv7sRZqDZ5AL4SnTIv7HvKMwT5sSQp4YuRG0vtbx/pNKO8C9dKLTOD/6BcS1?= =?us-ascii?Q?t3WkADHXRLDELvmQpEsYpPNDXKPw7bCayqi72tFQReLgQIQd61XTpwyVCAUu?= =?us-ascii?Q?aXV22dJRfP35Aj6nUpl8zyxV5MSu6E8sKBXANSLHzy/aHVHEAxi/QpRKrVA3?= =?us-ascii?Q?FW1yLtbTkgaMCTMB3W8P/sVEG2tu1upe69EusQnQn1h0XOSEQTH9s3AVFuAN?= =?us-ascii?Q?xNwpdiLF/ABicnljP50+hMWEYAkZq/oWBen6ljGxjYUXx5xmpoKPjN2rQOyt?= =?us-ascii?Q?znJdmkbcP385t8vwHlAEcltJmYcGmLBWGFmhIZYVXg/19VULFASB/7q5hFLH?= =?us-ascii?Q?iBBaIS7yPD9av9nwLp661Kx3BMYTxDsr9qaHDRFW98ThGfLVZd6nqa1Gbriz?= =?us-ascii?Q?nlv8Bi+NVxUTMgGov2UHqxbNBrmCcN85olqhxfNmmIGeY9ClOHjNK3uHmnar?= =?us-ascii?Q?wpetO1lYmGpynEAtuDiz+Py5uIcSpJgiergKRqjOCVrLQeP82ZONJTDwvu7d?= =?us-ascii?Q?MPXMV7ttx6BRvtnnan62fGpA2DCcLtRxw8CqY9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FQjsz/W3m6cqUyaw==;5:DqdKlbhAB1pkV1OzzJfoqddxN59mht+arqzRlgfO8Cuw47H7D99E9OhnEyF2E5ExH7Kc0H+f3tLuCuneoGZ1XOMMMNgRj2qVLSouCNmEJlJ/N7L0UGuaxWdAXdI4fugohJ4vPiUKRBy+LdM0dVztWw==;24:gzbqhq/FHgi6PyJcPyJnXQEcRZqENFlnymm7WIBElk8gjm7/aH4G+oPBQ8eX8ilxE3+P+BIzhbPiJH06xFXW1JQDBHdcZde+kcgIB7X73gM=;7:dtpl/d6UOogLjaKicIUErKp+p3CWTXnEoTCQp2+0fJDSDfMsii92qFhkMuKRNUd+dW+Le3YG7+wMWxzWET7deugLTEIS1Ede4sG068B8f3cix0Bo/YA9rfxgRrh4m/ZOdXDz1Pg2+HTJJT77A/wO590c/idbZ+zfkDIuazXqfc5/YhjohHIoSwn6cvrHVV7oYIxArR/+fsWwLDKqhI1TVU8y8WRhf1tNowuBOFQAKdw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2017 20:39:52.6148 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2692 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 995 Lines: 36 Use the shared-memory-pool mechanism for free buffer proxy record area allocation. Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/bman_ccsr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/soc/fsl/qbman/bman_ccsr.c b/drivers/soc/fsl/qbman/bman_ccsr.c index eaa9585..05c4223 100644 --- a/drivers/soc/fsl/qbman/bman_ccsr.c +++ b/drivers/soc/fsl/qbman/bman_ccsr.c @@ -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); -- 2.7.4