From patchwork Tue Feb 20 16:36:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 875623 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="o6LyEfpD"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zmDM95dm7z9rxx for ; Wed, 21 Feb 2018 08:31:17 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752618AbeBTQiJ (ORCPT ); Tue, 20 Feb 2018 11:38:09 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:37481 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752533AbeBTQgu (ORCPT ); Tue, 20 Feb 2018 11:36:50 -0500 Received: by mail-lf0-f65.google.com with SMTP id y19so5078055lfd.4; Tue, 20 Feb 2018 08:36:48 -0800 (PST) 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 :in-reply-to:references; bh=hC87TBpD5fhev2OVWZb/RvyPg+kfzW2hgfJbSk4zW3I=; b=o6LyEfpDTv0SJK6bhEkHhsmjQVV3yo9CE02icbCfavpkTRMJZzg5xV6bzFAlBNieNI BTjtWrvX7kBTl8VWNe8bGIWXl2gvnIWZ60uCxpni6Lz3ZXlUbQFGZUCzOJxE5xCjq8hY Z6/ag5q0ugGcOi61axRmVKqRrb5JufCNLpXvmMHX16LVb4bQnuJtLVUTKtlDbCd9ZAND jTyxrpiKx4skJM+gAhCtjbgyw26DQP39JsI9ZsgzjJHw73pARsNHfV7xXEry7hwz3jDw O9444heXFhwT/kDUWM909KlT53WF7Ie4PDVVmUJ02wjiSBcfis5YteJg3CtT6+LkppFE iHTA== 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:in-reply-to:references; bh=hC87TBpD5fhev2OVWZb/RvyPg+kfzW2hgfJbSk4zW3I=; b=qXW4athLvoH4HpX/o3CwfQhaEiTQ53XZmU7VPdZIPs7m6IcNYWf7pVksG/pPx9I7oi 8k9dQQlnQLOZuNPVETfUJM0tpe2AmTaM0kFb/W0RhlOv7eM9SovD+fUxJtMANZIwSxfK pNApr5O3Wx2xcYcIsa1Ex2lB9zCLVQsYyLlCQW0yFNZc9htl3ysLuQlet64vPzttgKuM G8tcEzxog20tTkaduvAsyZe7BbaiXquelS2Ie+74G6S2dLGNFvO+n0frS1zeYpJnANve Tf6dleMS/bsNW0h5npvajVRnfdGe3QK30WeaoS/bIE+lwgxx8Flhyb6rz5PHP0hH9m9f lRSg== X-Gm-Message-State: APf1xPC+ckWnzTYStFjrFy+cJE23w6b3aoeM/7tjHzQNiWo0NJRUFnBy Apkb4InUGN6LPhi59BOJl40= X-Google-Smtp-Source: AH8x224dkebNJDS3ijia737ueL2+hboe2mj8L0JZT3sw2IBmMcm+QPV/gkjaCaDW4rnc7zQSX7N4fA== X-Received: by 10.46.27.9 with SMTP id b9mr155983ljb.60.1519144608207; Tue, 20 Feb 2018 08:36:48 -0800 (PST) Received: from localhost.localdomain (ppp109-252-55-234.pppoe.spdop.ru. [109.252.55.234]) by smtp.gmail.com with ESMTPSA id z6sm1191311ljc.23.2018.02.20.08.36.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 08:36:47 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Rob Herring Cc: devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 12/15] memory: tegra: Add Tegra124 memory controller hot resets Date: Tue, 20 Feb 2018 19:36:29 +0300 Message-Id: <74072a57f9dd4c865f6e5f3494e160f91cf82671.1519141896.git.digetx@gmail.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Define the table of memory controller hot resets for Tegra124. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra124.c | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/drivers/memory/tegra/tegra124.c b/drivers/memory/tegra/tegra124.c index bd16555cca0f..cd2c99526de2 100644 --- a/drivers/memory/tegra/tegra124.c +++ b/drivers/memory/tegra/tegra124.c @@ -1012,6 +1012,42 @@ static const struct tegra_smmu_group_soc tegra124_groups[] = { }, }; +#define TEGRA124_MC_RESET(_name, _control, _status, _bit) \ + { \ + .name = #_name, \ + .id = TEGRA124_MC_RESET_##_name, \ + .control = _control, \ + .status = _status, \ + .bit = _bit, \ + } + +static const struct tegra_mc_reset tegra124_mc_resets[] = { + TEGRA124_MC_RESET(AFI, 0x200, 0x204, 0), + TEGRA124_MC_RESET(AVPC, 0x200, 0x204, 1), + TEGRA124_MC_RESET(DC, 0x200, 0x204, 2), + TEGRA124_MC_RESET(DCB, 0x200, 0x204, 3), + TEGRA124_MC_RESET(HC, 0x200, 0x204, 6), + TEGRA124_MC_RESET(HDA, 0x200, 0x204, 7), + TEGRA124_MC_RESET(ISP2, 0x200, 0x204, 8), + TEGRA124_MC_RESET(MPCORE, 0x200, 0x204, 9), + TEGRA124_MC_RESET(MPCORELP, 0x200, 0x204, 10), + TEGRA124_MC_RESET(MSENC, 0x200, 0x204, 11), + TEGRA124_MC_RESET(PPCS, 0x200, 0x204, 14), + TEGRA124_MC_RESET(SATA, 0x200, 0x204, 15), + TEGRA124_MC_RESET(VDE, 0x200, 0x204, 16), + TEGRA124_MC_RESET(VI, 0x200, 0x204, 17), + TEGRA124_MC_RESET(VIC, 0x200, 0x204, 18), + TEGRA124_MC_RESET(XUSB_HOST, 0x200, 0x204, 19), + TEGRA124_MC_RESET(XUSB_DEV, 0x200, 0x204, 20), + TEGRA124_MC_RESET(TSEC, 0x200, 0x204, 21), + TEGRA124_MC_RESET(SDMMC1, 0x200, 0x204, 22), + TEGRA124_MC_RESET(SDMMC2, 0x200, 0x204, 23), + TEGRA124_MC_RESET(SDMMC3, 0x200, 0x204, 25), + TEGRA124_MC_RESET(SDMMC4, 0x970, 0x974, 0), + TEGRA124_MC_RESET(ISP2B, 0x970, 0x974, 1), + TEGRA124_MC_RESET(GPU, 0x970, 0x974, 2), +}; + #ifdef CONFIG_ARCH_TEGRA_124_SOC static const struct tegra_smmu_soc tegra124_smmu_soc = { .clients = tegra124_mc_clients, @@ -1038,6 +1074,9 @@ const struct tegra_mc_soc tegra124_mc_soc = { .intmask = MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR | MC_INT_INVALID_APB_ASID_UPDATE | MC_INT_INVALID_SMMU_PAGE | MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM, + .resets_ops = &terga_mc_resets_ops_common, + .resets = tegra124_mc_resets, + .num_resets = ARRAY_SIZE(tegra124_mc_resets), }; #endif /* CONFIG_ARCH_TEGRA_124_SOC */ @@ -1065,5 +1104,8 @@ const struct tegra_mc_soc tegra132_mc_soc = { .intmask = MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR | MC_INT_INVALID_APB_ASID_UPDATE | MC_INT_INVALID_SMMU_PAGE | MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM, + .resets_ops = &terga_mc_resets_ops_common, + .resets = tegra124_mc_resets, + .num_resets = ARRAY_SIZE(tegra124_mc_resets), }; #endif /* CONFIG_ARCH_TEGRA_132_SOC */