From patchwork Mon Feb 12 17:06: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: 872170 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="OGgKFBpx"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zgBt410Gvz9t34 for ; Tue, 13 Feb 2018 04:07:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752532AbeBLRHG (ORCPT ); Mon, 12 Feb 2018 12:07:06 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:42002 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751364AbeBLRHF (ORCPT ); Mon, 12 Feb 2018 12:07:05 -0500 Received: by mail-lf0-f68.google.com with SMTP id w10so8598723lfc.9; Mon, 12 Feb 2018 09:07:04 -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; bh=OINUwichTFH9M+2uJkl8gPon/6OMqe60Zhue66+74xg=; b=OGgKFBpxLHAtsfe5lV+mJsXTGvMduKUu9INbxxMZyIuWNpxVA9QBoIrqVuk8t+qwRu tGaP0Zttt9BjB0oD8hqmF0mK5CEKLsi5fU7/XAu3fzEpXOID+8ZpxnLKL8E8t+dHqgal +vNipj6EGKMh0zS/A8CBUkvRELiif+RgPEOxle8+jXFJ+XhAzOstJN46y4wFptpcYtdE ZmXX8qYYocwUMeThbky0PWlAorlSMF3BiwECovyRaMddPDTX1Tbiy/QbyyPXla3FXNOH muW2oC8kjrYhFkftOBW4DoHdUSYXvrP0C5MjXKjlc4O61+6UxyCfxWIANxbmBS7qntRT j7ew== 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; bh=OINUwichTFH9M+2uJkl8gPon/6OMqe60Zhue66+74xg=; b=AUrVnGEbteisBmZLT97PAk5OL1ifzLWlkkRMu+crxgf+LyD249s0iXefXma1LGFWic 6DNN0Uud5ROO31VmxvW/SvhVFKmecxjkY53YGA0EWOAOB3t3aLPxNDPg9HQLQFMVISNB w2EgYmvPm78S+UIhp5n2dP1+Im93lBRVJnWn78NKzUDZzUDm3DJp3IbKp1Wsc5hkb0Fl byaJ3PMkYOkNT4js/oyr1KAcbkPg2vw9v60Jn9ClxMlpvT7zB+bNHWS8XyPPEbjgDUEq shDx5Qxo3orXIpIB3c0KUt1DwKkdyJXUeGD4FvyNkmtIoJ486zdFMoSYnMotAIKXfZJ5 XFtQ== X-Gm-Message-State: APf1xPDqqKu+vbczSFVi3gyPErNM48mHpTOzrUS9I1uWwaWETunmwbbv ArwrRQc3zwsZF7LpzZltbGU= X-Google-Smtp-Source: AH8x226MEbp/R2tbOJDXVlcBZoFz2yR/2W0gBRTHxXTSSrXjxSAT0rD9pGx2NxzT+G8/bazYRHrKMg== X-Received: by 10.25.204.78 with SMTP id c75mr3085385lfg.39.1518455223314; Mon, 12 Feb 2018 09:07:03 -0800 (PST) Received: from localhost.localdomain (ppp109-252-55-234.pppoe.spdop.ru. [109.252.55.234]) by smtp.gmail.com with ESMTPSA id a197sm1768712lfe.88.2018.02.12.09.07.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 09:07:02 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter Cc: Philipp Zabel , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] Memory controller hot reset Date: Mon, 12 Feb 2018 20:06:29 +0300 Message-Id: X-Mailer: git-send-email 2.15.1 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Hello, Tegra's memory controller has a "memory hot reset" functionality that blocks all memory transactions for the memory client. During reset of HW, it could perform DMA and resetting HW during DMA could lead to a system hang or memory corruption, so here comes the memory hot reset that blocks all interactions of HW with memory so that it could be reset safely. Memory hot reset is urgently required for multimedia, like GPU or video decoder, as it is quite easy to get into trouble without a proper HW reset. The short series introduces a custom Tegra-specific memory hot reset API. Since first revision of this patchset haven't got any comment, I'm trying again with a V2 that has one minor correction compared to V1, I've added terga_mc_hotreset_assert()/deassert() functions as in V1 there was only tegra_mc_hot_reset() and turned out it is not enough. Please review, thanks. Dmitry Osipenko (2): memory: tegra: Squash tegra20-mc into common tegra-mc driver memory: tegra: Introduce memory client hot reset API drivers/memory/Kconfig | 10 - drivers/memory/Makefile | 1 - drivers/memory/tegra/Makefile | 1 + drivers/memory/tegra/mc.c | 433 ++++++++++++++++++++++++++++++++++------ drivers/memory/tegra/mc.h | 10 + drivers/memory/tegra/tegra114.c | 25 +++ drivers/memory/tegra/tegra124.c | 32 +++ drivers/memory/tegra/tegra20.c | 95 +++++++++ drivers/memory/tegra/tegra210.c | 27 +++ drivers/memory/tegra/tegra30.c | 25 +++ drivers/memory/tegra20-mc.c | 254 ----------------------- include/soc/tegra/mc.h | 81 +++++++- 12 files changed, 669 insertions(+), 325 deletions(-) create mode 100644 drivers/memory/tegra/tegra20.c delete mode 100644 drivers/memory/tegra20-mc.c