From patchwork Fri Apr 13 11:33:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 897914 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; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hSs1/4k0"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40Mwjy0WCRz9s2R for ; Fri, 13 Apr 2018 21:37:26 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754164AbeDMLg4 (ORCPT ); Fri, 13 Apr 2018 07:36:56 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:41891 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754433AbeDMLgL (ORCPT ); Fri, 13 Apr 2018 07:36:11 -0400 Received: by mail-lf0-f66.google.com with SMTP id o102-v6so12112845lfg.8; Fri, 13 Apr 2018 04:36: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 :in-reply-to:references; bh=FlkQMBOEgIensbNe/WSaBvH8Hw7Ee98e43zlXWKiFYk=; b=hSs1/4k0pvWRO6EfsYXLnc36ZbdarqEgrgBFNA02dy4OqjpQYYwBRBoHwzDlaEqE+Y HJbJ2moGKF+nZ8d/arFO+kUfpYfrAi0poDg++IA0F0bQTZ7VxEDwPcSsYaLHBJbFNds8 TEcodyO83BIHgKy6BGqgTlHHFhO0eihd17gQlEN7/a7ReG4aMcHG9A7uBEqONhwvxwKv gGCrCI3fnggKK4TO5Vg1aHl92kp3h8RmI9YlCVh/IvcXaCr1tKW/o+wQtUDPu3cFMQ89 B/ym0mmYsFTeGQONBVXFZiHjnEpmhqgy90z0sLT1WPNAqZsP971SGPv/qhKE5qM12Aao Jzyw== 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=FlkQMBOEgIensbNe/WSaBvH8Hw7Ee98e43zlXWKiFYk=; b=akfsHF3qc7XEtSwipYcYJAftlLRmyqPj2q3KZQAl9hN3PQP69SvL0KcjLPB4rfnOdy XM3WnU3bAItnQ4zDGq3hq8dROG54Ai/fYLWqwzE7Tn1t7K+Uqzyll8A+Dj+eeePYSlba SF8x7Yzh7UYOnvNCbR7JaLjRjutKD72/yd5tFUjH4j/sNt+YQCSU4XxU1Z1f4DJnEXhw Cgqj6wgFRg+Iv6uJcQOimMDrigtSc9OCe/1AfwSNpK/bDqTu30QQn95PbJM69J5Ch94s Pj9Tcg1QdLcNw4LFdsmCXoa5+rEtKEGghhZc8/ZKXuCXIjTVSBr6OyKyOEBIFrjGe0/q lDHw== X-Gm-Message-State: ALQs6tCdryfbcdqsodX6mFyfZ52zQAh43sPKir3E32Yznl0JJ5LJS7fa fKq3ncTDNv1qU+FZrfpFV/U= X-Google-Smtp-Source: AIpwx4/iGcifhGPPDBdFoDU1QnkclxGJcinYsviZ0hteiIgTwTvgj31VF9avmAc2bNc7kZzGvCt4bg== X-Received: by 2002:a19:4c56:: with SMTP id z83-v6mr7822573lfa.141.1523619369792; Fri, 13 Apr 2018 04:36:09 -0700 (PDT) Received: from localhost.localdomain (ppp109-252-91-201.pppoe.spdop.ru. [109.252.91.201]) by smtp.gmail.com with ESMTPSA id y22sm949152ljy.70.2018.04.13.04.36.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Apr 2018 04:36:09 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter Cc: Rob Herring , devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 13/15] memory: tegra: Add Tegra114 memory controller hot resets Date: Fri, 13 Apr 2018 14:33:52 +0300 Message-Id: <57ac9eca965eaddc04ab8f885b11cc37a6c0c8e6.1523301400.git.digetx@gmail.com> X-Mailer: git-send-email 2.17.0 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 Tegra114. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra114.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/drivers/memory/tegra/tegra114.c b/drivers/memory/tegra/tegra114.c index 7560b2f558a7..12528aa3062b 100644 --- a/drivers/memory/tegra/tegra114.c +++ b/drivers/memory/tegra/tegra114.c @@ -938,6 +938,36 @@ static const struct tegra_smmu_soc tegra114_smmu_soc = { .num_asids = 4, }; +#define TEGRA114_MC_RESET(_name, _control, _status, _bit) \ + { \ + .name = #_name, \ + .id = TEGRA114_MC_RESET_##_name, \ + .control = _control, \ + .status = _status, \ + .bit = _bit, \ + } + +static const struct tegra_mc_reset tegra114_mc_resets[] = { + TEGRA114_MC_RESET(AFI, 0x200, 0x204, 0), + TEGRA114_MC_RESET(AVPC, 0x200, 0x204, 1), + TEGRA114_MC_RESET(DC, 0x200, 0x204, 2), + TEGRA114_MC_RESET(DCB, 0x200, 0x204, 3), + TEGRA114_MC_RESET(EPP, 0x200, 0x204, 4), + TEGRA114_MC_RESET(2D, 0x200, 0x204, 5), + TEGRA114_MC_RESET(HC, 0x200, 0x204, 6), + TEGRA114_MC_RESET(HDA, 0x200, 0x204, 7), + TEGRA114_MC_RESET(ISP, 0x200, 0x204, 8), + TEGRA114_MC_RESET(MPCORE, 0x200, 0x204, 9), + TEGRA114_MC_RESET(MPCORELP, 0x200, 0x204, 10), + TEGRA114_MC_RESET(MPE, 0x200, 0x204, 11), + TEGRA114_MC_RESET(3D, 0x200, 0x204, 12), + TEGRA114_MC_RESET(3D2, 0x200, 0x204, 13), + TEGRA114_MC_RESET(PPCS, 0x200, 0x204, 14), + TEGRA114_MC_RESET(SATA, 0x200, 0x204, 15), + TEGRA114_MC_RESET(VDE, 0x200, 0x204, 16), + TEGRA114_MC_RESET(VI, 0x200, 0x204, 17), +}; + const struct tegra_mc_soc tegra114_mc_soc = { .clients = tegra114_mc_clients, .num_clients = ARRAY_SIZE(tegra114_mc_clients), @@ -947,4 +977,7 @@ const struct tegra_mc_soc tegra114_mc_soc = { .smmu = &tegra114_smmu_soc, .intmask = MC_INT_INVALID_SMMU_PAGE | MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM, + .reset_ops = &terga_mc_reset_ops_common, + .resets = tegra114_mc_resets, + .num_resets = ARRAY_SIZE(tegra114_mc_resets), };