From patchwork Tue Apr 20 16:52:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 12214773 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=-13.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_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 21A5BC433B4 for ; Tue, 20 Apr 2021 16:59:57 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 6C0DA613AE for ; Tue, 20 Apr 2021 16:59:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C0DA613AE 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=5WF7XMo5wUyfHzFKF0z8r1RxlS9eZiqWF7U5R23Wtqs=; b=DLK21+aT+TxyeiaFu8qAHjnhd pLP4M8L+Hk8w1iY/uR7W4FvReIrFkdT2k1GQwaL4yxwxqM5yaCgM0zt4CPYmrQaxJm3zxYlAwl/NK UtWW4TtpzIcA8KpXWLSeo9ODvx7tj98tJSQdWTPtrv1fKnaOqzQY/dKuQsX+++2alWFHsU6DTrkpu GuS4rpGmGblyHbJyVnYWKaOxVw5HKprAub3Jc8n6trSna8+33vbMJeijcJ0ZnUl40jm8Dk4JbzIQ4 wg0Z+pRFQ+hHBZ5eAO6dZJdvpf+9vWU7EGyA5b71PnXv4sbno/EUnO5saktfZF0nvehgYl4qWcywY 2QR5ziiDw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYtgb-00CduL-B6; Tue, 20 Apr 2021 16:57:18 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYtbh-00CcEe-SZ for linux-arm-kernel@desiato.infradead.org; Tue, 20 Apr 2021 16:52:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=UpVkBhnZ97epqNvGm3ag5v8x3tJ05LT3v9zIsMH5e+M=; b=1EGvjlmoPunqO/XN8Lm7Duj4LH yVUVxLIIKQ+hi+dOjbedbxjbSSY3BR3gx3gufsSduD0pTLssJ0JVJUwSYUxHlz5PfAL5BiiXLR0KY 5r2NicXzv8nzHeJ+2iLFddau+Wu3BM90xphNZIPhe9NbIDkAesNi4JnZ+3NKJ13WBVeV+IL6EZqlT bGbXTA3bwDWcrDIR3nSyalmUbcXxiJgmdVOew8/O83qBid95DsIfsK/pUDVtLI6w5+0rTb/CpM2AA K7ZD3gndfGPOmi4PvIMkCePaPg8qZe821twKAnGh2KwAtLrXyC8GVewZqYpByxFw7oFKzRhs1HFpi xc4oJXTw==; Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYtbf-00CHym-9J for linux-arm-kernel@lists.infradead.org; Tue, 20 Apr 2021 16:52:12 +0000 Received: by mail-ej1-x62b.google.com with SMTP id w23so43505003ejb.9 for ; Tue, 20 Apr 2021 09:52:10 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=UpVkBhnZ97epqNvGm3ag5v8x3tJ05LT3v9zIsMH5e+M=; b=phr5qNKE4wY4DsArJBEGVsogAyV2lc5yDRAUr+Wc5bw2phRO+6q1Hq/n6OwbS5aYLL 02839TKoIE/n7edEkKFDfV7a+hw/Mw65S6A+EQL3AkwMwu9KYAqe/IvWYxO4FsHK85Hq qYfamS4jSSw6NV7CdcNXQBZJhYy1qM3SSUTnRGpuUis7MpfaENeorwuKj2fzhmsevZzi gKY2gBNdbP3tQ9MZMfDUBSK2VqwFxsIIMj5q/PNszK8rwgVLtMPRcpO0+vrth6bkeH0R TjfGA6hi8DhMrIRcwdHWO6ydNECShAZw9VR67L0FOu4SuE0qwxSp+r3+0NPE75IOESM7 Vhbw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=UpVkBhnZ97epqNvGm3ag5v8x3tJ05LT3v9zIsMH5e+M=; b=r0iuYoNvXLgNtm7Lx7mI97MkOuNEdNxXUcCg7OTJHaJPXpLSnnwi8cH0DSxDTCzVQa qJpCNegnRu3xo+Oj4WswURfkHDBZorb11+F0d7wWJmc29rBJkFBkE2/Di7h3LFe1efC1 vrOV9xrt2FFw7LfuVeiV0Ts2FDU59kqYe7XUfxgkCTf/I8uWmlWwYjlYN13kj+1qpOOU U5GlZ9R7HhCYR01gpP6SJn43FpFW9Av74Sn4bD3ySj0OSBMVfGQSXoqOkIrhutb9Oxoy HsHS2I7ghMr0XBK4KZU53VJ0Jm8Jh0gacYqsShjCDocwbrSx/nkC6oAiK30wR7mDrPWJ XqcQ== X-Gm-Message-State: AOAM533uiV3+Ib2mIH5OryvO4JHi55/hw0hXAlBOISVvulMI/FIAQrzB +zI4lQb0VnfwK6RWezMVVpXtXehHjdc= X-Google-Smtp-Source: ABdhPJwFGNVRQU5dmmDJWLjar8c4VZ6nsTPuaMnEL7CgA/1ur8vfaaUhyZjRUXsy/L8URTEikAuYXw== X-Received: by 2002:a17:906:fad8:: with SMTP id lu24mr27578413ejb.159.1618937529562; Tue, 20 Apr 2021 09:52:09 -0700 (PDT) Received: from localhost ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id c13sm10545871edw.88.2021.04.20.09.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 09:52:08 -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 07/10] memory: tegra: Only initialize reset controller if available Date: Tue, 20 Apr 2021 18:52:35 +0200 Message-Id: <20210420165237.3523732-8-thierry.reding@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210420165237.3523732-1-thierry.reding@gmail.com> References: <20210420165237.3523732-1-thierry.reding@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210420_095211_344912_DBC0A6FF X-CRM114-Status: GOOD ( 14.47 ) 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 The memory controller hot resets are implemented in the BPMP on Tegra186 and later, so there's no need to provide an implementation via the memory controller driver. Conditionally register the reset controller only if needed. Signed-off-by: Thierry Reding --- drivers/memory/tegra/mc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c index 515ffd948a37..23b7728623cb 100644 --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c @@ -768,10 +768,11 @@ static int tegra_mc_probe(struct platform_device *pdev) } } - err = tegra_mc_reset_setup(mc); - if (err < 0) - dev_err(&pdev->dev, "failed to register reset controller: %d\n", - err); + if (mc->soc->reset_ops) { + err = tegra_mc_reset_setup(mc); + if (err < 0) + dev_err(&pdev->dev, "failed to register reset controller: %d\n", err); + } err = tegra_mc_interconnect_setup(mc); if (err < 0)