From patchwork Wed Jul 15 07:06:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 11664339 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 04D6913B1 for ; Wed, 15 Jul 2020 07:08:45 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D1C892065E for ; Wed, 15 Jul 2020 07:08:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="erJrdd5b"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=semihalf-com.20150623.gappssmtp.com header.i=@semihalf-com.20150623.gappssmtp.com header.b="RuYIhyy6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1C892065E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=semihalf.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject: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=fJgusxB3RjVh9RLz1fYEIiVHZGyDH34zVCcohiHy9LQ=; b=erJrdd5bmSGjmSMPeexAEzvtuu 8VKjIDRdmbxXCMA/hIq9ufGTl6PkA2s+DckK2y54jyjWLYbeVb/z5/O4vQ5bRIneeEy3P8WPgwAWY C548G3hQoj+l3gUVsg2p9eDXAxZsQPmdPuODwHak9Cma0GA0HcuOvon6/bhmYUVjGvtq8aQaNQUEo /0UsuUZ4QoMiKSammWAK97viePE5No1BfMK/Lc5KOzuYCNIE9134H7AZr7ZPzcd5D0hykuRV5aG7h oRplamRgUVZji0nHu1RdH+OU/p0va2yQNw5lqhJEreipZ1MmcGjMKq80byZ1n+VebwkBsjCIkxkZ9 AItH7i7g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvbVP-0007J2-8R; Wed, 15 Jul 2020 07:07:03 +0000 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvbVM-0007II-PI for linux-arm-kernel@lists.infradead.org; Wed, 15 Jul 2020 07:07:01 +0000 Received: by mail-lj1-x243.google.com with SMTP id j11so1367559ljo.7 for ; Wed, 15 Jul 2020 00:07:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=f+OWOpfWyZI+F0HgW7n2hwhFXyMKZItWbfC1yFlsvCc=; b=RuYIhyy6Vun1cpT90eal+PKxa32bFtRJ4QJZsVJCnrgQX0fss6A3cp4kx135P7vbO5 xBGcSD0hKkXa7L5uL2fhiOWgEreLdOaGpLZts88rFUhOIEMdeYo270DHzNNKWnse8pET s/r8obiibS+e9uTzvXbGYQN/5/l7eIlyeEpH0UPYC5875GyJm9FveAe4HGs+mlat90kk cQ5hxa7Io2yvoTRdrfQ6HOknyLICzTIWPiRaYctpISOCsalAuuLuOJALPhgNrb+tt0yh i6B9Cw7bk3T9eURK3leVgsUKSD1xmMuodu6Cdzc9Wgh1IWK1T0s8SL86N1QNdtksWTlA hT/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=f+OWOpfWyZI+F0HgW7n2hwhFXyMKZItWbfC1yFlsvCc=; b=Gg6rQgp8hiz5EXL3mXHHjSWHFi5yh6rtBR7wI1hM8N/DUpOOV9NM1vFYbkbZZ2ayzO 7I1JiddsZwHQFiLaWAr8KKuZO8VielfKWCde9IIOWGgbVuu8ZEp5X4Phi7j4b9WlxCOS DgcsdTugDLvpWluMzAC9eHIQj08GmO2FcL2I9ETo40d36xudasS+XjRP7/kGS3E+mLTM oixwBPHOeRvPVCAkFkmu39TG/5D1+omVmbrTGWEX39yjMwjki8tm2aK3GoqUfcHFt2TK r0iGHJTIn6DTATxvVLr5f76Gm4wfZHIsBkda+0CvICycgYpjFweGgGQHCst3OxReIUtU S51A== X-Gm-Message-State: AOAM5322Eq7+BTr1YzwJtKuFraWfYSnhg57aO9iFVqKwuBt46Gls9aux cPUNlEBsJCmWEh+adYGO700TpQ== X-Google-Smtp-Source: ABdhPJySFX/Z8aMMJm+W1T7u3FGwHCXcNbKvVxMytXVqr0/sY0t9GCaz6iJJoGgIyrffm7iJaeHtDg== X-Received: by 2002:a2e:9dd6:: with SMTP id x22mr4201166ljj.199.1594796819526; Wed, 15 Jul 2020 00:06:59 -0700 (PDT) Received: from localhost.localdomain ([83.68.95.66]) by smtp.gmail.com with ESMTPSA id 83sm276040ljj.51.2020.07.15.00.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 00:06:58 -0700 (PDT) From: Tomasz Nowicki To: will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, gregory.clement@bootlin.com, robh+dt@kernel.org, hannah@marvell.com Subject: [PATCH v4 0/4] Add system mmu support for Armada-806 Date: Wed, 15 Jul 2020 09:06:45 +0200 Message-Id: <20200715070649.18733-1-tn@semihalf.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200715_030700_989485_D8F71D68 X-CRM114-Status: GOOD ( 10.94 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:243 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, nadavh@marvell.com, iommu@lists.linux-foundation.org, Tomasz Nowicki , mw@semihalf.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The series is meant to support SMMU for AP806 and a workaround for accessing ARM SMMU 64bit registers is the gist of it. For the record, AP-806 can't access SMMU registers with 64bit width. This patches split the readq/writeq into two 32bit accesses instead and update DT bindings. The series was successfully tested on a vanilla v5.8-rc3 kernel and Intel e1000e PCIe NIC. The same for platform devices like SATA and USB. For reference, previous versions are listed below: V1: https://lkml.org/lkml/2018/10/15/373 V2: https://lkml.org/lkml/2019/7/11/426 V3: https://lkml.org/lkml/2020/7/2/1114 v3 -> v4 - call cfg_probe() impl hook a bit earlier which simplifies errata handling - use hi_lo_readq_relaxed() and hi_lo_writeq_relaxed() for register accessors - keep SMMU status disabled by default and enable where possible (DTS changes) - commit logs improvements and other minor fixes Hanna Hawa (1): iommu/arm-smmu: Workaround for Marvell Armada-AP806 SoC erratum #582743 Marcin Wojtas (1): arm64: dts: marvell: add SMMU support Tomasz Nowicki (2): iommu/arm-smmu: Call configuration impl hook before consuming features dt-bindings: arm-smmu: add compatible string for Marvell Armada-AP806 SMMU-500 Documentation/arm64/silicon-errata.rst | 3 ++ .../devicetree/bindings/iommu/arm,smmu.yaml | 4 ++ arch/arm64/boot/dts/marvell/armada-7040.dtsi | 28 ++++++++++++ arch/arm64/boot/dts/marvell/armada-8040.dtsi | 40 +++++++++++++++++ arch/arm64/boot/dts/marvell/armada-ap80x.dtsi | 18 ++++++++ drivers/iommu/arm-smmu-impl.c | 45 +++++++++++++++++++ drivers/iommu/arm-smmu.c | 11 +++-- 7 files changed, 145 insertions(+), 4 deletions(-)