Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp261525rwb; Wed, 14 Dec 2022 17:05:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf4FLuoB5UdEn9/W0xXGFIGT+xP84El3TZOvQaHZlOUNu9/BjLIX2oNjO2lXymVtADs0BUem X-Received: by 2002:a17:906:86d9:b0:7c1:2a0f:55b1 with SMTP id j25-20020a17090686d900b007c12a0f55b1mr21319812ejy.14.1671066309934; Wed, 14 Dec 2022 17:05:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671066309; cv=none; d=google.com; s=arc-20160816; b=CQzDVNClH35+mO+txI8VU0dRYsbGh0gTJFDPlcRcLxKTTcHPbNJ9MwqQ7IvpDgmmwP KeNNRt95+TdcQj5hdyPgYj5nACJPeQE8g8x36vy4B1fUKa7MGWmzjIJWQg8BBYGR4D4B Q+NaHvQBT/4YN+6WUxObT54rlx/yxVxrAkPJCZOFgmnnGZliNJLNG97HmxbPjNAXlZ1A 7J8wyHf6nh1yB3r8FJWyusOE5BnOq/nRiBycW/Q8gNXeWBtSZurYZrmJMk6Ch7eWHKip IrRd5B9MnmnFgLNYQAOxeGL3nm/wdua2rJ/5iIRt5PkH9esI9Lt7n/bo5Bn81YZf3Ogl lfVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IcCiVHGul99faiGjQgUzb9tzv99VGke0njfWLi73raU=; b=XSIXjyWNliKBFj4JTM2BqgmTxytTW+bSN2C9VUfa07RxRGSal9oIaycXT8KV2AxU5E T1d4E9az7Efk/J/U2J65CIPUgyOutIN6kzcSUcMe2toRNHFa1gHO/XDncHfXQqMSFNNP GIcmGTW9CyqNC5NfGXWEyZ+59XVmlb2ah0XyZP3W9KwMLWH/vbifR7oH09FihNnmgX9f po42m5VXUt5/ZnJ+D7qmHKNn0nUKKckf9JiRzZ75IaZL/OMaTjKWbKZWZIjdf+ucZxB6 O39/ICqC7z9pKN/WoDtlntkd5eT0skStv1ZyxWkl/X7iEHC4gK0XEiJ+NR+9RTXCIabp 1SnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=post header.b="cbgYy/0N"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xg2-20020a170907320200b007c0be5e871dsi11022614ejb.663.2022.12.14.17.04.51; Wed, 14 Dec 2022 17:05:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=post header.b="cbgYy/0N"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230155AbiLNXzY (ORCPT + 69 others); Wed, 14 Dec 2022 18:55:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbiLNXx1 (ORCPT ); Wed, 14 Dec 2022 18:53:27 -0500 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E683548754; Wed, 14 Dec 2022 15:53:25 -0800 (PST) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 88378E0ED6; Thu, 15 Dec 2022 02:53:25 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=IcCiVHGul99faiGjQgUzb9tzv99VGke0njfWLi73raU=; b=cbgYy/0NnWw+ jCkFUn3HKwoMtorX3zKaTldSvoPY0Qmhvu3jg2sINnBIny96iPXRF+EplyGnV/qD 5ISUMIZYH2hLs6Vahfnz66mmmHwMxvHqxixUn/whL0dXXLo+85jobqlhamHHKubd 4xXlNqN86crqFBkwQH10/z2tHTsTE4U= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 6AF63E0E6B; Thu, 15 Dec 2022 02:53:25 +0300 (MSK) Received: from localhost (10.8.30.6) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 15 Dec 2022 02:53:25 +0300 From: Serge Semin To: Gustavo Pimentel , Vinod Koul , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Cai Huoqing , Robin Murphy , Jingoo Han , Frank Li , Manivannan Sadhasivam , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , caihuoqing , Yoshihiro Shimoda , , , Subject: [PATCH v7 24/25] PCI: bt1: Set 64-bit DMA-mask Date: Thu, 15 Dec 2022 02:53:04 +0300 Message-ID: <20221214235305.31744-25-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221214235305.31744-1-Sergey.Semin@baikalelectronics.ru> References: <20221214235305.31744-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.8.30.6] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DW PCIe RC IP-core is synthesized with the 64-bits AXI address bus. Since the device is also equipped with the eDMA engine we need to explicitly set the device DMA-mask so the DMA-engine clients would be able to allocate the data buffers from the DMA-able memory space. Signed-off-by: Serge Semin --- Changelog v7: - This is a new patch added on v7 stage of the series. (@Robin) --- drivers/pci/controller/dwc/pcie-bt1.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-bt1.c b/drivers/pci/controller/dwc/pcie-bt1.c index 8b6c7d544d9a..04aa58348aa5 100644 --- a/drivers/pci/controller/dwc/pcie-bt1.c +++ b/drivers/pci/controller/dwc/pcie-bt1.c @@ -583,6 +583,10 @@ static int bt1_pcie_add_port(struct bt1_pcie *btpci) struct device *dev = &btpci->pdev->dev; int ret; + ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)); + if (ret) + return ret; + btpci->dw.version = DW_PCIE_VER_460A; btpci->dw.dev = dev; btpci->dw.ops = &bt1_pcie_ops; -- 2.38.1