From patchwork Mon Sep 18 20:39:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Pledge X-Patchwork-Id: 9957669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4FEE460568 for ; Mon, 18 Sep 2017 20:46:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4096B28C30 for ; Mon, 18 Sep 2017 20:46:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3516428C64; Mon, 18 Sep 2017 20:46:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B532D28C6E for ; Mon, 18 Sep 2017 20:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4AP02YiKo6RsM0yfJaicmZkdyNtLUv1eKiTW5YsoJzI=; b=jS+9mhr8dwLDiq kCnhc0HDKA6bnsCaLLhDVTZqq4LeG1PvWFTx45bDvlgt4tq/3DFKxou26QSl9o58rHcPuFrHE5l9c EPTjQHFWN9i3nlFzr86ISLBUN++CAeBtLLnOr2EQWDJpk49XB/89j0g7dtX5QUFMna8P7MHRvR34p 3S/LaSrUKvYBfPWgdHUKW8Newo6/gGZzSB7bZKqViTVftyDh30G5p6tfCIG8m25TuaVXTreaVM5b8 buRdahr8ARot/X/m/m28LAM79Q12HfQOVuf471vHAnJAgo7RTeLsqoxRgVwZrmfPS9TylGe8b6eq1 Eq1QMFnR/4hxMkCTHPiQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1du2vP-0007o7-8l; Mon, 18 Sep 2017 20:45:51 +0000 Received: from mail-by2nam01on0067.outbound.protection.outlook.com ([104.47.34.67] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1du2pz-0001Rm-Lb for linux-arm-kernel@lists.infradead.org; Mon, 18 Sep 2017 20:40:21 +0000 Received: from BLUPR0301CA0009.namprd03.prod.outlook.com (10.162.113.147) by MWHPR03MB2702.namprd03.prod.outlook.com (10.168.207.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Mon, 18 Sep 2017 20:39:54 +0000 Received: from BN1AFFO11FD039.protection.gbl (2a01:111:f400:7c10::115) by BLUPR0301CA0009.outlook.office365.com (2a01:111:e400:5259::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9 via Frontend Transport; Mon, 18 Sep 2017 20:39:54 +0000 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; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD039.mail.protection.outlook.com (10.58.52.243) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.35.14 via Frontend Transport; Mon, 18 Sep 2017 20:39:53 +0000 Received: from otc-sw1.am.freescale.net (otc-sw1.am.freescale.net [10.29.200.182]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8IKdn2o025841; Mon, 18 Sep 2017 13:39:52 -0700 From: Roy Pledge To: , , , , Subject: [v5 03/12] soc/fsl/qbman: Use shared-dma-pool for QMan private memory allocations Date: Mon, 18 Sep 2017 16:39:38 -0400 Message-ID: <1505767187-4596-4-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> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131502407940223129; (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)(39380400002)(39860400002)(376002)(346002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(50986999)(3450700001)(189998001)(5003940100001)(48376002)(50466002)(33646002)(2950100002)(105606002)(6666003)(106466001)(54906002)(53936002)(104016004)(2906002)(76176999)(43066003)(305945005)(36756003)(50226002)(85426001)(230783001)(8936002)(356003)(97736004)(498600001)(8656003)(47776003)(81166006)(4326008)(5660300001)(81156014)(77096006)(2201001)(8676002)(86362001)(316002)(7416002)(68736007)(110136005)(16586007)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2702; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD039; 1:z5Y/W1Bels9i+qeuHn8hJPwfUyLs6rYhXsTOTqyTLBpiwARkw0aMubfzed/Q6v7+P64h1L+FnfzW4X/S+R9Lmf+jN6qj3BEOUdzYtfZtS8Kz4bhNEUAAJHBRlwvXgkye MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 344648fd-038a-417a-b099-08d4fed56ad9 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:MWHPR03MB2702; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2702; 3:ce6oIERqMjkVb2CVt7du4r69JcmhjL+geUT8kYgQKowvNksYiLWIvWndhd1ZxUv0K4/H7z9t+tAhuCWt1mGUS+rwLQOWLhJe50qwYVgKRLFGQ35mDrrd9nfNRzDUY2FzWxHdeUHZ/TjODIk5McmfBEJBVC6Pl85R5St3xbkG3rq1mfO3zYKJsslYpSZH4QHpzJ2C7T1YZqTT1WjPlA446SKRM7jsSrU0xxHHirpKAk1KNyuQ9Amak5jkkAS9vK25UgeJLz6jytuKuYmv0SZRiRG236BilvxDyiYm4lH3OByhjkAOfXSkCbBnNZwnCd6RvNZoQVQUYZY1yWIfdiWC0cypyKH0rDs0awbbMAbAJQ8=; 25:A49Vadxe6aEpmLU80h7Bd8KoK7aBlLKRbEWv7aF4aN+XNbFFZE4BRnPC5ftow64oA5ZPobKrsfe1THdRNlCPdW2O5lG1n5L+F5Z9pI2QdO0KY0gCFhehvwMdz1XvW02LY1Q9cjg+MWEaVhynutC4sprHlBlVWEK7aYwp/e++xJ02stwGFQZ36JBldP4Jie4UO7CRFOc7RwQvZOvDBJIUTvtCpU9NZV9nrCbkR+I7fD320ZGcBNiHJpE/KZLtOQF4T4FlXfzj/ZutrqBF+7rOuTWzIkCr92u1nHtsu9HbhJnoQchlu7lmbeWAe+yjfAmdY57UrnL9kArLUqGHisnPAg== X-MS-TrafficTypeDiagnostic: MWHPR03MB2702: X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2702; 31:TAxbZZdR9uMBoQHPw+Do/ezdE4en6Xe3hnQTgrso+U7Q0GkNaA97gwZd4lmOfM1d6Z8aU4xbBC63EGSIVW/WMFncjZ/+ZaaNrXnHnbgMfkublr4Zx2Jndbokl8fwgB8ri6jCqk7I3R15MtP/qu0t+wcIHfOXgsiujG4ErMz7VqrrL3JQKw6XsSyn4fWWYPBEcacKqeaUqQw21l4juQJXQwsW9lb57WJBRpFWUxFX2so=; 4:G0PAtnXK6S0xch4XNSBVrfgFKMvggO6bCp+zY/as/TD4d+QOIdiQVr/E0OmfcFqlx9BtNftF/SY8pE0iHeXl81YXUekhref2oEeYS/wJeByHgLlF3PO+uijbNcsbMHLJtRN7vbzBa8hKNjXMyNNgz+YnzqWSz1g6vx26zNPkRowlVWpfQa3cJJxOHCBNRKgKxNzECTKbY7ZU4YovZy3JiiUfZcbpcZeOk+dESKj8Wyet8HPO/lxw4y89K9b48R9cwhDozxym0xdAmF7wG0lYqIbWv/b7CYB48CWEVjU8lg4= 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)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123563025)(20161123559100)(20161123565025)(20161123556025)(20161123561025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR03MB2702; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR03MB2702; X-Forefront-PRVS: 04347F8039 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2702; 23:hW2N19zzJ911RW/gHDX4C2229ohEcYfipXbiQdHJf?= =?us-ascii?Q?NUj/xdyVI9W2d7TuapV5nf05yx+mroKWmJ7SmXhfFiS3iKl/7d7mp6o0nqjs?= =?us-ascii?Q?fc5Sm4mzcp6FhHzhdWR03XverCTXs1tdizGfU5c0tzBPp86XiHw2YYTyF4sN?= =?us-ascii?Q?u76HF3LA4vqKgqoDS7dmrXK9l+0/Xnuiz9mzkRqdLUXBxhTbjvEqOnzblSUe?= =?us-ascii?Q?ylcRGph6QLivAx8oELu2eKg/79NmQHWdEmGlMrb0Kx6d3byyEfQr07jQcTqb?= =?us-ascii?Q?RQvupHbj18pthNf6oaC5DXBIM3VXHkncFxwFvJ7S+RXtevlNIOXIazsdiUXM?= =?us-ascii?Q?J6TLqQEOyvGLe8H6MLGL+bKFkveXGFnNI/6aP1HAHJTuHk0U16kgB5lol7H4?= =?us-ascii?Q?vOPXB4sulTK697XxReQfvu55dguC1URWCpkmgRn+QwcwQDiZwWS4VAfSwnie?= =?us-ascii?Q?uZmgOOQr1nN7uqremq9MwC5lK1zBiZ8Vz3ntBXE0Why2eSyGALmGJYnPQ19s?= =?us-ascii?Q?cnj30s0N5Y9N1Z/UkJKGxeMyLAeyr55LaEw1X1Yx/hrpSLToV6O3TvrV1Iuo?= =?us-ascii?Q?5kBWPfDnLzm0KzXYPjANVBR30v7x0s0yC7TIO7JlI3hndAirU/2Nic6eQUD6?= =?us-ascii?Q?r/79AP/lODF0lDtTy4xkx4G7WtMLNpQK0ON1DvZOwD9SJlbvwFeKdV2s/zsd?= =?us-ascii?Q?NW8TgQzz5PmC4AOnn+7MzDy76XVXWxqfewD2ouF7Kr4QwGz0ivkaxNK94gjr?= =?us-ascii?Q?RXfbNkiWiah9o+TRVI88VD6p9stynOJTS+/XddTms0UBVVot3KHIGWx8c/VZ?= =?us-ascii?Q?Y2W6xL2hRxFbKsziA0L6e8q+0zgDNfE9wMCcElxD5jJ6zoX82sISp8X1D4II?= =?us-ascii?Q?YV5LnEu5hmropRT+TWncTNx12gWf3lnfNIzGai2cBPM9Jn0Jx11nmKAXHWaM?= =?us-ascii?Q?NaN/TMEXA4lrIRk3uoOA6KmTxCqKVG0KF6GSnsFKFGaLQIdAQU2W9G2T3yag?= =?us-ascii?Q?k9ksZ7QnRQX4CCpzz76GC6BWCFB+UFdrWgiJ2L5D0XGuHtKtL7n2cBgdkG3q?= =?us-ascii?Q?EvHvY5lLdb+W/Z6Y7Eicb9gWMYA2E9pM6sxqO2No5qMcM1lHL/uyrKTj2L+S?= =?us-ascii?Q?G5JlGwyNYOGEezzICZdjSEgAf6EpxfpTsSQRz0Hyjp1DjweRVOPjx1aDoCDJ?= =?us-ascii?Q?WwnmcpZwszrkQCor4KEj7e04TNkF8XXIOw5YDiaAsG7pp/ngDm729lrl0Msk?= =?us-ascii?Q?aNxhoLxeBot8iEYY7abSaIuX1yxcUbXajs8maq7+JmrJ26UvqnCk5t+LuuyK?= =?us-ascii?B?UT09?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2702; 6:aFDa0RBBRf0dvy7LUhJCE9zhYnAavay8/Kmf5D4yeVvGIJCst5lr78SWUAOrLipjfFyg6+R97AWV2gUZB3e20jOI50e318fEyK2YJ3n7PaQ5WMO8sroPM2s+JTj4R+jgPXo6YL2Egb5+oaLp/iBru4AjfGIb48BbI2iO/2W4WDSFQNON2Rd5Ry5c3eNaG/pHeqgZp3KAQrJ5ji3ywHqpTmSyRLtnUskKXF71koOLgQ+kb+6EdOGrqH6yZ5Rak+h9Xd8GxsaDwqYQOhvpQDbwRAx2qcHIN1eTKceczOnqEeeg09YnMNCcrhjQAzWQT1jVrW1txKtVMqxQv7Lr8RiRIQ==; 5:VSNerCgS6X8cfz9l9biYFJ0c+bGy8NDXyfOYUD/Z9wLx59P5CACB3ffFB5zcxJ7B4sKSHjMRQiNcpwQ6wXA6DNBIWMRw/sn7hXCgrbRET0lgyRqNL9exZ7YbmXj08VZh96mioeyt6aSEyJ0uhDdNdQ==; 24:uHKBc22kX1vWoGR3qkODFeFUdy2XEqv87CTGo65xtUCrRLaDlWasaKPYgqQfGOBmi+qvQ90WcBvkS+eBo9xmk01f8RZz1O41jPAmrukrhhw=; 7:66Kk2N6qsIPdbQPcKEdI5+8wYtx114d3sbzrzxmPWrWLp9171DB1CrvkB6MU33G6jrTHSqut4imAybrnfcJDk8XYvoVBVuk4oGHYlqba36ExblGXatlMoIecPRGiLXRw9fYnPlo8m/6slmBgMFTzWlSIejXTEiyRJgAwypmqtOWqHFtXt7u+FxA5qpCJt7J34JAvwyJsvn/yKJtP2/PvoThRb2iLjAEvqsMT0mmwBlk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2017 20:39:53.8507 (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: MWHPR03MB2702 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170918_134015_922235_FB123F59 X-CRM114-Status: GOOD ( 19.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: roy.pledge@nxp.com Cc: mark.rutland@arm.com, arnd@arndb.de, madalin.bucur@nxp.com, catalin.marinas@arm.com, Roy Pledge , linux@armlinux.org.uk, oss@buserror.net Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use the shared-memory-pool mechanism for frame queue descriptor and packed frame descriptor record area allocations. Signed-off-by: Roy Pledge Reviewed-by: Catalin Marinas --- drivers/soc/fsl/qbman/qman_ccsr.c | 93 ++++++++++++++++++++++++++------------- drivers/soc/fsl/qbman/qman_priv.h | 2 - drivers/soc/fsl/qbman/qman_test.h | 2 - 3 files changed, 63 insertions(+), 34 deletions(-) diff --git a/drivers/soc/fsl/qbman/qman_ccsr.c b/drivers/soc/fsl/qbman/qman_ccsr.c index 835ce94..607355b9 100644 --- a/drivers/soc/fsl/qbman/qman_ccsr.c +++ b/drivers/soc/fsl/qbman/qman_ccsr.c @@ -401,21 +401,42 @@ static int qm_init_pfdr(struct device *dev, u32 pfdr_start, u32 num) } /* - * Ideally we would use the DMA API to turn rmem->base into a DMA address - * (especially if iommu translations ever get involved). Unfortunately, the - * DMA API currently does not allow mapping anything that is not backed with - * a struct page. + * QMan needs two global memory areas initialized at boot time: + * 1) FQD: Frame Queue Descriptors used to manage frame queues + * 2) PFDR: Packed Frame Queue Descriptor Records used to store frames + * Both areas are reserved using the device tree reserved memory framework + * and the addresses and sizes are initialized when the QMan device is probed */ static dma_addr_t fqd_a, pfdr_a; static size_t fqd_sz, pfdr_sz; +#ifdef CONFIG_PPC +/* + * Support for PPC Device Tree backward compatibility when compatible + * string is set to fsl-qman-fqd and fsl-qman-pfdr + */ +static int zero_priv_mem(phys_addr_t addr, size_t sz) +{ + /* map as cacheable, non-guarded */ + void __iomem *tmpp = ioremap_prot(addr, sz, 0); + + if (!tmpp) + return -ENOMEM; + + memset_io(tmpp, 0, sz); + flush_dcache_range((unsigned long)tmpp, + (unsigned long)tmpp + sz); + iounmap(tmpp); + + return 0; +} + static int qman_fqd(struct reserved_mem *rmem) { fqd_a = rmem->base; fqd_sz = rmem->size; WARN_ON(!(fqd_a && fqd_sz)); - return 0; } RESERVEDMEM_OF_DECLARE(qman_fqd, "fsl,qman-fqd", qman_fqd); @@ -431,32 +452,13 @@ static int qman_pfdr(struct reserved_mem *rmem) } RESERVEDMEM_OF_DECLARE(qman_pfdr, "fsl,qman-pfdr", qman_pfdr); +#endif + static unsigned int qm_get_fqid_maxcnt(void) { return fqd_sz / 64; } -/* - * Flush this memory range from data cache so that QMAN originated - * transactions for this memory region could be marked non-coherent. - */ -static int zero_priv_mem(struct device *dev, struct device_node *node, - phys_addr_t addr, size_t sz) -{ - /* map as cacheable, non-guarded */ - void __iomem *tmpp = ioremap_prot(addr, sz, 0); - - if (!tmpp) - return -ENOMEM; - - memset_io(tmpp, 0, sz); - flush_dcache_range((unsigned long)tmpp, - (unsigned long)tmpp + sz); - iounmap(tmpp); - - return 0; -} - static void log_edata_bits(struct device *dev, u32 bit_count) { u32 i, j, mask = 0xffffffff; @@ -727,10 +729,41 @@ static int fsl_qman_probe(struct platform_device *pdev) qm_channel_caam = QMAN_CHANNEL_CAAM_REV3; } - ret = zero_priv_mem(dev, node, fqd_a, fqd_sz); - WARN_ON(ret); - if (ret) - return -ENODEV; + if (fqd_a) { +#ifdef CONFIG_PPC + /* + * For PPC backward DT compatibility + * FQD memory MUST be zero'd by software + */ + zero_priv_mem(fqd_a, fqd_sz); +#else + WARN(1, "Unexpected architecture using non shared-dma-mem reservations"); +#endif + } else { + /* + * Order of memory regions is assumed as FQD followed by PFDR + * in order to ensure allocations from the correct regions the + * driver initializes then allocates each piece in order + */ + ret = qbman_init_private_mem(dev, 0, &fqd_a, &fqd_sz); + if (ret) { + dev_err(dev, "qbman_init_private_mem() for FQD failed 0x%x\n", + ret); + return -ENODEV; + } + } + dev_dbg(dev, "Allocated FQD 0x%llx 0x%zx\n", fqd_a, fqd_sz); + + if (!pfdr_a) { + /* Setup PFDR memory */ + ret = qbman_init_private_mem(dev, 1, &pfdr_a, &pfdr_sz); + if (ret) { + dev_err(dev, "qbman_init_private_mem() for PFDR failed 0x%x\n", + ret); + return -ENODEV; + } + } + dev_dbg(dev, "Allocated PFDR 0x%llx 0x%zx\n", pfdr_a, pfdr_sz); ret = qman_init_ccsr(dev); if (ret) { diff --git a/drivers/soc/fsl/qbman/qman_priv.h b/drivers/soc/fsl/qbman/qman_priv.h index 5fe9faf..b1e2cbf 100644 --- a/drivers/soc/fsl/qbman/qman_priv.h +++ b/drivers/soc/fsl/qbman/qman_priv.h @@ -28,8 +28,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - #include "dpaa_sys.h" #include diff --git a/drivers/soc/fsl/qbman/qman_test.h b/drivers/soc/fsl/qbman/qman_test.h index d5f8cb2..41bdbc48 100644 --- a/drivers/soc/fsl/qbman/qman_test.h +++ b/drivers/soc/fsl/qbman/qman_test.h @@ -30,7 +30,5 @@ #include "qman_priv.h" -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - int qman_test_stash(void); int qman_test_api(void);