Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2708368rwj; Mon, 19 Dec 2022 07:57:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf5xj5y5KIx5EZ6MB9YtHt3gYQ/NwYySB96/I84M5JpLB8dkmhIreSWEW7FcAJgJFLUxjbdi X-Received: by 2002:a17:90a:ba0e:b0:210:ccdf:2952 with SMTP id s14-20020a17090aba0e00b00210ccdf2952mr44640988pjr.28.1671465473219; Mon, 19 Dec 2022 07:57:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671465473; cv=none; d=google.com; s=arc-20160816; b=nkA/K+CvTf0hoTNpxdr0zbbsxZ+JDmuRPD6jB4Y1wIm8eXVFRIKt5UtjfV0yz+ss40 F9gds6XHdaczxrxqV52ZtOmeQxmsgRSQSn0Uxs2J9FDQiO62unV8GL7rcG1FRQL1+tLv ccrWzvRl8s1gJCsTCYq3tiitxRwy2Olma0P2nRilXK0dBG6okmV+Z7K3X89sHasOKq+L 76cQLRs4wFBNYVSfdOjlhZDhLOGpZd38dJKAlIC9Xw0n3qbzuwzUo/oeQcNHxoo8obHr YfL+MxP5R1cFEA/qWNZHxKOJt6j0kfe1gE1LkEKtQ9YTNNmuNHWyvzUA5dEo7uLbdHzD DHEw== 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=YZ6d4NtwdSbbBHk2kM+tRXgtor/r5iWoM/M43mTkcFE=; b=gREKoDYq/B+dix0BR7zvrxlRJ0p74Pp7UqyfcCvwz7Y6QOABzlQJruG14Pburf9Xo6 cgH8hSi3hn+UvDSVcrC0GMpjPFK3+Hnr9WTmgFkn2A1aQ4Li/0wqLF72OA5BAjxbZH52 4DPfMCpAsYUQaDOnrQ60xZSdGZZndxFh4BQu2QQsvwzvV1e2kX0Plzk6aecoImlOmaoO A+7KYNKoxH78fmsr8+DdvxRY0G4sFK9MbyaSwhv0JohZ12OgRKgiUFIjgBCNCNYZi2xb HTNXo7dw+lxRE2QsuEn8I7agqy6bUnvr0bnd4oVaIOCH38LQQmvCOi+eqeJW0IIRqpPO /SNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=post header.b=TZN+7kHu; 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 h38-20020a631226000000b0045f7fc4b812si11109641pgl.295.2022.12.19.07.57.43; Mon, 19 Dec 2022 07:57:53 -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=TZN+7kHu; 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 S232288AbiLSOuI (ORCPT + 71 others); Mon, 19 Dec 2022 09:50:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232080AbiLSOr3 (ORCPT ); Mon, 19 Dec 2022 09:47:29 -0500 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5A869C50; Mon, 19 Dec 2022 06:47:20 -0800 (PST) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id F0572E0EB4; Mon, 19 Dec 2022 17:47:19 +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=YZ6d4NtwdSbbBHk2kM+tRXgtor/r5iWoM/M43mTkcFE=; b=TZN+7kHuBmPl ArIxiE+jHa1IRPC6nrCBhGEO8VGKg+oxQreIccoZnNyVUU0ModaKcyGgUHmdy1Am QZ3HfLnmVkCWpKfvlDIUolqKANaIx5MyKqTiY/8gADsAVlal+6hqbdOJjhr7BYO1 u76Q7PJaBoNjFjkoezWBR7EFoVHiQz0= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id E1B37E0E70; Mon, 19 Dec 2022 17:47:19 +0300 (MSK) Received: from localhost (10.8.30.14) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 19 Dec 2022 17:47:19 +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 v8 25/26] PCI: bt1: Set 64-bit DMA-mask Date: Mon, 19 Dec 2022 17:46:56 +0300 Message-ID: <20221219144658.26620-26-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221219144658.26620-1-Sergey.Semin@baikalelectronics.ru> References: <20221219144658.26620-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.8.30.14] 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 f6cdb35b4cde..3b95dadf5176 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