From patchwork Thu Sep 17 10:07:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 11782121 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 9488E139A for ; Thu, 17 Sep 2020 10:10:18 +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 5BD44208DB for ; Thu, 17 Sep 2020 10:10:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="exHMFNvz"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="n7BWZ1Dn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BD44208DB 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+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:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=FoiYU5FX29TQ6vY+eKSJDs+hwE9Uo9ipAmoa2kzC+CE=; b=exHMFNvzYieGUc/5qGVQi0wSz xrNlkRp6STsGAHGr056jAuvoPBg5lNUeDknG/SRw+qX9ahXJJ8Ue6+lISwhrEfrnL034hb3px5aSR t6O70WFvb/V38STXUlYdCpR0flMY4EaKNGIyBToxZZZa3BZZQb7WU47C1yOVZEcjVZkBgwvVHOFHL OHYk044Zlx48qx7Ojp3AdGdn5pjOXbFGLSwZv6iBSLVZr6MrrHwI5+bzo8VZf80X1laQ4Th1GOzkT M5Vm+0mohFTvOP1gbnWG0GNzVYLcjh5Rdr4lmcWK2JTDL6H2iq3BTwPs/w53zZ8Z2wIqGvWySoTu4 iF33VK68A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIqrW-0000f2-Ob; Thu, 17 Sep 2020 10:09:58 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIqq4-0008PA-RZ for linux-arm-kernel@lists.infradead.org; Thu, 17 Sep 2020 10:08:30 +0000 Received: by mail-wm1-x343.google.com with SMTP id l9so1431347wme.3 for ; Thu, 17 Sep 2020 03:08:28 -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=4mD53Yx+O1ZK3RaUnDozb4D2flLg9Q0zHUEzwcICI6A=; b=n7BWZ1DnO/LmGFW0QUKGCmot3Qtl0SKFlW5KcSVodPdfFbGKgCTmFxG5ZVqmlk/lTo z8y6U7LKcB4dbbg7WxUfzp+inaSoPaAQ9L5xIhGY6E5IEUKzZUkLsn/gQ2V4xncg7EKD Fzud7AexCh+Smc2z3CFbWs9fOmE5pP8oVHbuW34Y0KO22v9CZA8BAJiAEtKMNBp/T7+x YiQAkWOyYdTHfNAOfWxtYUD2jl6nGjIalTrcBlVSb2oJmuc/zkYcs9wAj8lq6F/c/1IM enoT+Ss2JULd8/p11aYmSvSiCGPuZj45lZlwSO3npZ0YP3/VEEVqFB3XLAabuuHl6rU/ gbiw== 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=4mD53Yx+O1ZK3RaUnDozb4D2flLg9Q0zHUEzwcICI6A=; b=AxjHT44yqY/O/0sRdUZJX4REayuyfgRrWVhjzi5UFk5LAY/y3IMNZkjxZWASXlqUFB eE82vRW2VGuhtxBVEVSLnCm+S9mPqOqemNGXgnV+RbMMblu7dJTA7uc3YBcWW0pJ018P ugKWZkrxEoc4MWqs/gutvaYaUS8PihhbNmCWgM8DcyI5vjr9qiHyxYi6FQzis0jPbcxh rYESr7vYXxs0i+VfGyV8GeV/tMw1qR8o/aW2LBxe8GJh9TknPp2KHOk07ed9znTFq7st T57VGpDiXksamY8p8vjkwYXVF5PR0k/+rSwEIDfKK1xqxyupwYhqT0NWo/iam9moKzFm uBFw== X-Gm-Message-State: AOAM531w87S/b7e4INk/Ass3dDMrIclYb1PYkz2r9UlsL+zEzPkzRgCu sp5edEQNVMp9irPbL18Wa0o+pnin5ORhbA== X-Google-Smtp-Source: ABdhPJy2i+oP2zSYg7uTpj2CtaVehUUt7SJu9rUpPlYujddunm4ps76/R0iGygi02ZoMu2ogSxLvHg== X-Received: by 2002:a1c:6607:: with SMTP id a7mr9062430wmc.142.1600337307454; Thu, 17 Sep 2020 03:08:27 -0700 (PDT) Received: from localhost ([217.111.27.204]) by smtp.gmail.com with ESMTPSA id u186sm9985236wmu.34.2020.09.17.03.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 03:08:26 -0700 (PDT) From: Thierry Reding To: Thierry Reding Subject: [PATCH v2 11/14] soc/tegra: pmc: Reorder reset sources/levels definitions Date: Thu, 17 Sep 2020 12:07:49 +0200 Message-Id: <20200917100752.3516153-12-thierry.reding@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200917100752.3516153-1-thierry.reding@gmail.com> References: <20200917100752.3516153-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-20200917_060828_923757_D5597647 X-CRM114-Status: GOOD ( 13.28 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 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:343 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [thierry.reding[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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: linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jon Hunter Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Thierry Reding Move the definitions of reset sources and levels into a more natural location. Signed-off-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 78 ++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index d332e5d9abac..4071181a4a42 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -336,45 +336,6 @@ struct tegra_pmc_soc { bool has_blink_output; }; -static const char * const tegra186_reset_sources[] = { - "SYS_RESET", - "AOWDT", - "MCCPLEXWDT", - "BPMPWDT", - "SCEWDT", - "SPEWDT", - "APEWDT", - "BCCPLEXWDT", - "SENSOR", - "AOTAG", - "VFSENSOR", - "SWREST", - "SC7", - "HSM", - "CORESIGHT" -}; - -static const char * const tegra186_reset_levels[] = { - "L0", "L1", "L2", "WARM" -}; - -static const char * const tegra30_reset_sources[] = { - "POWER_ON_RESET", - "WATCHDOG", - "SENSOR", - "SW_MAIN", - "LP0" -}; - -static const char * const tegra210_reset_sources[] = { - "POWER_ON_RESET", - "WATCHDOG", - "SENSOR", - "SW_MAIN", - "LP0", - "AOTAG" -}; - /** * struct tegra_pmc - NVIDIA Tegra PMC * @dev: pointer to PMC device structure @@ -2784,6 +2745,14 @@ static const u8 tegra30_cpu_powergates[] = { TEGRA_POWERGATE_CPU3, }; +static const char * const tegra30_reset_sources[] = { + "POWER_ON_RESET", + "WATCHDOG", + "SENSOR", + "SW_MAIN", + "LP0" +}; + static const struct tegra_pmc_soc tegra30_pmc_soc = { .num_powergates = ARRAY_SIZE(tegra30_powergates), .powergates = tegra30_powergates, @@ -3061,6 +3030,15 @@ static const struct pinctrl_pin_desc tegra210_pin_descs[] = { TEGRA210_IO_PAD_TABLE(TEGRA_IO_PIN_DESC) }; +static const char * const tegra210_reset_sources[] = { + "POWER_ON_RESET", + "WATCHDOG", + "SENSOR", + "SW_MAIN", + "LP0", + "AOTAG" +}; + static const struct tegra_wake_event tegra210_wake_events[] = { TEGRA_WAKE_IRQ("rtc", 16, 2), TEGRA_WAKE_IRQ("pmu", 51, 86), @@ -3193,6 +3171,28 @@ static void tegra186_pmc_setup_irq_polarity(struct tegra_pmc *pmc, iounmap(wake); } +static const char * const tegra186_reset_sources[] = { + "SYS_RESET", + "AOWDT", + "MCCPLEXWDT", + "BPMPWDT", + "SCEWDT", + "SPEWDT", + "APEWDT", + "BCCPLEXWDT", + "SENSOR", + "AOTAG", + "VFSENSOR", + "SWREST", + "SC7", + "HSM", + "CORESIGHT" +}; + +static const char * const tegra186_reset_levels[] = { + "L0", "L1", "L2", "WARM" +}; + static const struct tegra_wake_event tegra186_wake_events[] = { TEGRA_WAKE_IRQ("pmu", 24, 209), TEGRA_WAKE_GPIO("power", 29, 1, TEGRA186_AON_GPIO(FF, 0)),