From patchwork Sat Oct 22 23:40:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 13016079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06040C433FE for ; Sat, 22 Oct 2022 23:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NapQwjEWXTf9Lr91AMtzoHUW6rGkNtcBNbQBdLvnlqs=; b=xwRKupZsuT4UsK RU6xRLeFy2wDvDv/VNC4g9TH4emyYDADf5OQanX7uKvedtjQHJ3nsSi5S1E05R2A0Gl01//rkfSev QdPNlvhjD4LbClD5uL5JUp/MPF+WLvy7OSUmGG2PctcEUHM9YWqMSo54xvpIjYLOxJlY6TfG+uiwo qIWu/kKAbSBm/AeQYyayxSjWDxZmLO16K49AAOZZmABxNhS2WlkQnO9g+OuMY2X7wEVu4CUxFmQfX SG/zldTCkBnjJuOOTewyr9UXABBL0FoYUrcdUxBQ6f7QN+xG17bV9M6c8ptH38ULHWtGEn14N3l7E 77f0LNHJ/n5I5hLojw4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omO6Z-00E55W-Eu; Sat, 22 Oct 2022 23:40:39 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1omO6X-00E54W-Ck for linux-arm-kernel@lists.infradead.org; Sat, 22 Oct 2022 23:40:38 +0000 Received: by mail-lj1-x22d.google.com with SMTP id r22so8388189ljn.10 for ; Sat, 22 Oct 2022 16:40:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=C6At1H3szjViJnkV3q1VRKzRG4v2Bj/cByCEwQ1bgyM=; b=VQ7mbzj5hN8t52IfZwXU2t2B95RRp7vmkiDpjZTVDaEI1x0VBP/iysdDlLGUa6wPji U26MuG7nEDCxDQwr4XjJqN2lglZacSeRqq0UYk1GLdQiE8y1BqYHPFtR5DstYTRl6Zjh +thhymXHeveBJ8g4OBx7law2Q8osxes7zx8rA+3QoT4iY/4Ux44zYQgZTL7W443zyKjc LLxHO2qd4Zw84SYawq25Tc0tkXK+FwPfaqh36GjAT0tuNpnq9aK3APIr7L0fojratQIo iMpsILAzdk6v4zHxdclu/LFOTEJDXWydP7zQ7IsyTdt9g2m6OxUSFM8qh4pzevB2ThQV 82iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=C6At1H3szjViJnkV3q1VRKzRG4v2Bj/cByCEwQ1bgyM=; b=WhVOiF+jRh1z6DzaMKyRhvFNzCjUYrB6+tCZ2GDuymmMLaItN8QK4QOcmWnVJMs5od lBJLJCXTgBhZoV6X2pBZNlIKpStsynQKPY73U3Sd8weUi0SnMB4qI4XXg+tysDosMpAC Wlv7GGYMqfWc1yf2cj1cijTFZ+d4pJmq8PJF4xfMjmliuxrCbd7XsOXp4SU2slOOHO7v A6soOPu/nxGMhauqIR4iOU/FDKI3aZ8Lvvuy6Dj8RF/MscQVRlmDAzmL1HpOfltvFRP2 u7UZy/4dIttQ484fpPEfIgyZLdyzIc1lo3lG7MSvXUlSQyTB2/Wrhqqfcoo5yxQzjaM0 Um8Q== X-Gm-Message-State: ACrzQf1HQiR8GOU0p4IJTlDZXGwxh3yGwOIRh10ZBu/2RNJmwcb0W5vi t+atyfLBK2noEbYeSG+wmb5RnjkFFeEXhQ== X-Google-Smtp-Source: AMsMyM78SWXFcbPfgcCDhdUH4DnOOhgkkgPfPbbUHfJQo1Nu6MQXuSWEQUlwUTBljuFsGMu/BNn5dg== X-Received: by 2002:a2e:97d7:0:b0:277:4c7:c938 with SMTP id m23-20020a2e97d7000000b0027704c7c938mr571272ljj.294.1666482031813; Sat, 22 Oct 2022 16:40:31 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id e10-20020a05651236ca00b004949f7cbb6esm3752602lfs.79.2022.10.22.16.40.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Oct 2022 16:40:31 -0700 (PDT) From: Marcin Wojtas To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, hch@lst.de, kabel@kernel.org, jaz@semihalf.com, Marcin Wojtas Subject: [PATCH] ARM: dts: armada-38x: Mark devices as dma-coherent Date: Sun, 23 Oct 2022 01:40:24 +0200 Message-Id: <20221022234024.87475-1-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221022_164037_460476_36C63EDE X-CRM114-Status: GOOD ( 10.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Armada 38x platforms marks all devices as coherent via mvebu_hwcc_notifier(), whereas the standard way to determine this is by of_dma_is_coherent(). Reflect the hardware capabilities by adding 'dma-coherent' properties to the device tree. Signed-off-by: Marcin Wojtas --- arch/arm/boot/dts/armada-380.dtsi | 1 + arch/arm/boot/dts/armada-385.dtsi | 1 + arch/arm/boot/dts/armada-38x.dtsi | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/armada-380.dtsi b/arch/arm/boot/dts/armada-380.dtsi index ce1dddb2269b..25d17550e2fc 100644 --- a/arch/arm/boot/dts/armada-380.dtsi +++ b/arch/arm/boot/dts/armada-380.dtsi @@ -38,6 +38,7 @@ pcie { compatible = "marvell,armada-370-pcie"; status = "disabled"; device_type = "pci"; + dma-coherent; #address-cells = <3>; #size-cells = <2>; diff --git a/arch/arm/boot/dts/armada-385.dtsi b/arch/arm/boot/dts/armada-385.dtsi index 83392b92dae2..6fb8c254cbdc 100644 --- a/arch/arm/boot/dts/armada-385.dtsi +++ b/arch/arm/boot/dts/armada-385.dtsi @@ -37,6 +37,7 @@ pciec: pcie { compatible = "marvell,armada-370-pcie"; status = "disabled"; device_type = "pci"; + dma-coherent; #address-cells = <3>; #size-cells = <2>; diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi index 446861b6b17b..5801873dfcbe 100644 --- a/arch/arm/boot/dts/armada-38x.dtsi +++ b/arch/arm/boot/dts/armada-38x.dtsi @@ -102,6 +102,7 @@ internal-regs { #address-cells = <1>; #size-cells = <1>; ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>; + dma-coherent; sdramc: sdramc@1400 { compatible = "marvell,armada-xp-sdram-controller";