From patchwork Wed Jun 2 16:32:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 12295269 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 122D1C4708F for ; Wed, 2 Jun 2021 16:33:08 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id CE4D461975 for ; Wed, 2 Jun 2021 16:33:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE4D461975 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=k2NtQcIpwm2tq0dv/s+MsVO7IZa9CRUt3Vx/2i/mjN8=; b=GWOYsnsSImsmFj VdFcVPVG/4IKkr+L717EuRgTqU0Z3dog9CgRDVMp7OT0Yt5ZZ6fbXfqK7rHCfE2qWtLJZpMBK3dmI g5bGIQGqInqmJCCiGHhW1oOHcog2XAjxKpF9C7UGKR9syGnkKXaeg60S4i/ndBrHCj1c0irDXQV4y e71EOMtHTRROKeIjQk4ygy+foMI3OJDITmPTKU0eIumBKwdaeQo8z39tas9E37nfi77eAed8lJm++ B3yAKnU0aC60daMVc+XrWpRNJEiZBI0d6qu8qzMR7W+dvkqlKb15zKF8XAtAyZavXpbpcqMIWIYqx jEbnR7P7W1DNQTC5LeBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loTmI-00590R-NN; Wed, 02 Jun 2021 16:31:34 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1loTmF-0058zY-1z for linux-arm-kernel@lists.infradead.org; Wed, 02 Jun 2021 16:31:32 +0000 Received: by mail-ed1-x52d.google.com with SMTP id s6so3641581edu.10 for ; Wed, 02 Jun 2021 09:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lMvkgT61BB1Do0cZc1nr6/swmO3QfR5Di1uAZP96r9U=; b=T3+J1HEkNbIf5Rs4frnoPky+Ayjh8kytezI+i2AKZnlpkdoXOOurUxOFkK1Ectn8+x fIXeCJtt56FyungkNyv34BcgP0hos9PPIwqyPTSBt/7yYHgH57ydJPzk61JiHXF+tIbv 9ive6iF1QOf8iAYyl6gjmyZGwxUHQbqEZdgOUW7IL57PYACb91jWrpRlyx+TM73iRte6 Gdg7G8F03n1LapgLO6vTheIbkIiSBBY+eJ+PMn4JnFT+Hgn8zjDsSOLUl/fbd5oaQo51 /sY8P7X0qR/h7hJXCiorDPrai3tLJLFcfr9/OTQJkZMWsxKbl+YugGKoU8WsF8WqHOTU 3EBA== 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:mime-version :content-transfer-encoding; bh=lMvkgT61BB1Do0cZc1nr6/swmO3QfR5Di1uAZP96r9U=; b=JoknLWAfTNYTlH+G6xtLYLLzlrUdimw7wxbRuCxa2z9oa6NlNCjXdzXrN4Kvw0EFy1 iuy04N6Qpe0fJ8t79gSrCdFAzZK656uU0qbuflrEYtTGHVct3qbpQDQHp8KgWNhgU/4L ZTwCYJq3hK7w04zluxguJeLvL7VSUgQ7J3/FdgAfBp1WbmzSm+eTkUdrzrLBNI72ow3O jcDBA04oTfgsAyDNNkB4O2nB+VfFSnMYQ0iPRh31a14+MZ9/KZJz61joBn2Ft7qmx34H K1+d6GkAunK37Oq3z7j5JkqnNwyeLaeCie6rtcy8nbsdjdtRth+NzytP4AFo2nIdG2gK MxAA== X-Gm-Message-State: AOAM530meeH84iIoXMhmKpv+sblEy8nrZwzqcPxCyif5esQIRnrm6l15 hS4TUO35a3QyhGRlLm8FHmM= X-Google-Smtp-Source: ABdhPJz7AiswGSIbLPA2IvpDWWaFMkUIedRPt9qCh043BfkTXnKvGDzOe+woDUOm4FrkwGfv/zyq3Q== X-Received: by 2002:a05:6402:4310:: with SMTP id m16mr39487302edc.279.1622651489317; Wed, 02 Jun 2021 09:31:29 -0700 (PDT) Received: from localhost ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id h23sm230032eds.73.2021.06.02.09.31.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 09:31:28 -0700 (PDT) From: Thierry Reding To: Thierry Reding , Krzysztof Kozlowski Cc: Jon Hunter , Dmitry Osipenko , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 00/12] memory: tegra: Driver unification Date: Wed, 2 Jun 2021 18:32:50 +0200 Message-Id: <20210602163302.120041-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210602_093131_127865_6163B810 X-CRM114-Status: GOOD ( 14.00 ) 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 From: Thierry Reding Hi, this set of patches converges the feature sets of the pre-Tegra186 and the post-Tegra186 memory controller drivers such that newer chips can take advantage of some features that were previously only implemented on earlier chips. Note that this looks a bit daunting from a diffstat point of view but the bulk of this is in the first two patches that basically shuffle around where some of the per-memory-client register definitions are located, hence the big number of changed lines. Changes in v3: - remove redundant #ifdef/#endif guards - make tegra30_mc_handle_irq() static Changes in v2: - split patches up a bit for smaller, logical changes - add better documentation for ->probe() callback - use SET_SYSTEM_SLEEP_OPS where appropriate - include Tegra194 separation patch - use prefix for global variables - drop commented-out code Thierry Thierry Reding (12): memory: tegra: Consolidate register fields memory: tegra: Unify struct tegra_mc across SoC generations memory: tegra: Introduce struct tegra_mc_ops memory: tegra: Push suspend/resume into SoC drivers memory: tegra: Make per-SoC setup more generic memory: tegra: Extract setup code into callback memory: tegra: Parameterize interrupt handler memory: tegra: Make IRQ support opitonal memory: tegra: Only initialize reset controller if available memory: tegra: Unify drivers memory: tegra: Add memory client IDs to tables memory: tegra: Split Tegra194 data into separate file drivers/iommu/tegra-smmu.c | 16 +- drivers/memory/tegra/Makefile | 6 +- drivers/memory/tegra/mc.c | 312 +++--- drivers/memory/tegra/mc.h | 25 + drivers/memory/tegra/tegra114.c | 1245 +++++++++++++----------- drivers/memory/tegra/tegra124.c | 1306 ++++++++++++++----------- drivers/memory/tegra/tegra186.c | 1609 ++++++++----------------------- drivers/memory/tegra/tegra194.c | 1351 ++++++++++++++++++++++++++ drivers/memory/tegra/tegra20.c | 110 ++- drivers/memory/tegra/tegra210.c | 1433 ++++++++++++++------------- drivers/memory/tegra/tegra30.c | 1292 ++++++++++++++----------- include/soc/tegra/mc.h | 62 +- 12 files changed, 4976 insertions(+), 3791 deletions(-) create mode 100644 drivers/memory/tegra/tegra194.c