From patchwork Tue Feb 20 16:25:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 875598 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="B+yCUs0/"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zmDLQ1pVxz9s2S for ; Wed, 21 Feb 2018 08:30:38 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752824AbeBTQZs (ORCPT ); Tue, 20 Feb 2018 11:25:48 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36977 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752809AbeBTQZq (ORCPT ); Tue, 20 Feb 2018 11:25:46 -0500 Received: by mail-lf0-f67.google.com with SMTP id y19so5027581lfd.4; Tue, 20 Feb 2018 08:25:45 -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=tR5VMvcps/rigdKiYiUK1tEwwTFxPADe0wGu7Hamjf4=; b=B+yCUs0/uv7vrPBZ0wnXacGajhizco1qZohNECC6KUXzNEeuvDVPl8swJtAP0S6k18 9TzdXgD7/k0nHzNXomrCWbwvqOdZb00df3J1qSteaeYKqVNROIV9zZVcf5YnbUeEaf0f wfqcvxoOIsfnDyOG1nlUC4L40pPG/ciYGQi7OddTQA0BchY8dKxvKi5+dtpASyF03B2y q1xRurNAKJ5RFItcudmTYXSY/325Gw1rlpIEz1EalaCFNfeERy/7LwPLRRcxgcIuwD1r SHhSZf3CdbjUq6/QXq0F3cOLy37LVhXgmbEl3HZuSrhyXxSkbU8+v0PnIw31EpuFv6kh 8/rw== 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=tR5VMvcps/rigdKiYiUK1tEwwTFxPADe0wGu7Hamjf4=; b=HBGM8LvrF1pDPyirYLty5rXfzkq1Q2YUb+D7FIjt/DI6xWp5Znse3ryuzhh4sGAaHA YhIyNhvozIENPZczi00Taf7Y/LDXgK44R68L7sg1t/eNCgdnGemtNfLbXCwtPWq6QVX+ 9xtgHL5Hhi4fzdPfPAtxeoSMtcmMEdXpwRIgPnqlyXl6CvWbJ08Stgs/qSNmRAq/uCuC goSsNqHJZPvFplS76rcWsi/z77Q4p4LjMd/ShWgvIEVKwvCABPtBWy/fTpbzHNONI8nx gTqtwgpthy+76+k8evGNlYZJoKfPA1Ppu418Gu7+V0g50Q3Px8zr/CpdVrYGAXHtcVMf sXkg== X-Gm-Message-State: APf1xPDP3syFEJLIoLkyRo++LXrj5143630G9D0dVcnQfKPP0IepEGKv 8/9TzWvwLyjy+7ttHwnizy0= X-Google-Smtp-Source: AH8x2265JgW9olHHSilQtKeI2j72Vh6ATF29Oom8azIu9K/JEeYNYVkYGxE5BhVa8xFW6EGIgpj6sg== X-Received: by 10.46.92.7 with SMTP id q7mr121648ljb.21.1519143944279; Tue, 20 Feb 2018 08:25:44 -0800 (PST) Received: from localhost.localdomain (ppp109-252-55-234.pppoe.spdop.ru. [109.252.55.234]) by smtp.gmail.com with ESMTPSA id p16sm2951566lje.12.2018.02.20.08.25.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 08:25:42 -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 00/15] Memory controller hot reset Date: Tue, 20 Feb 2018 19:25:13 +0300 Message-Id: X-Mailer: git-send-email 2.16.1 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Tegra's memory controller has a "memory hot reset" functionality that blocks all memory transactions for the memory client, which is required for a proper HW resetting. HW could perform DMA while being reset and this 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 (on Tegra20 especially), like GPU or video decoder, as it is quite easy to get in a trouble without a proper HW reset. Changelog: V3: Addressed review comments to V2 from Thierry Reding. MC now uses generic reset controller API instead of a custom one, hence DT changes are now involved and so Rob Herring is CC'd for a review. Added couple minor cleanup/correction patches. V2: Basically a re-send of V1 with some minor changes. Dmitry Osipenko (14): dt-bindings: arm: tegra: Remove duplicated Tegra30+ MC binding dt-bindings: memory: tegra: Document #reset-cells property of the Tegra30 MC dt-bindings: arm: tegra: Document #reset-cells property of the Tegra20 MC dt-bindings: memory: tegra: Add hot resets definitions memory: tegra: Do not handle spurious interrupts memory: tegra: Setup interrupts mask before requesting IRQ memory: tegra: Apply interrupts mask per SoC memory: tegra: Remove unused headers inclusions memory: tegra: Squash tegra20-mc into common tegra-mc driver memory: tegra: Introduce memory client hot reset memory: tegra: Add Tegra124 memory controller hot resets memory: tegra: Add Tegra114 memory controller hot resets memory: tegra: Add Tegra30 memory controller hot resets memory: tegra: Add Tegra20 memory controller hot resets Thierry Reding (1): memory: tegra: Add Tegra210 memory controller hot resets .../bindings/arm/tegra/nvidia,tegra20-mc.txt | 12 +- .../bindings/arm/tegra/nvidia,tegra30-mc.txt | 18 -- .../memory-controllers/nvidia,tegra30-mc.txt | 5 + drivers/memory/Kconfig | 10 - drivers/memory/Makefile | 1 - drivers/memory/tegra/Makefile | 1 + drivers/memory/tegra/mc.c | 358 +++++++++++++++++++-- drivers/memory/tegra/mc.h | 22 ++ drivers/memory/tegra/tegra114.c | 35 ++ drivers/memory/tegra/tegra124.c | 48 +++ drivers/memory/tegra/tegra20.c | 296 +++++++++++++++++ drivers/memory/tegra/tegra210.c | 53 ++- drivers/memory/tegra/tegra30.c | 35 ++ drivers/memory/tegra20-mc.c | 254 --------------- include/dt-bindings/memory/tegra114-mc.h | 19 ++ include/dt-bindings/memory/tegra124-mc.h | 25 ++ include/dt-bindings/memory/tegra20-mc.h | 21 ++ include/dt-bindings/memory/tegra210-mc.h | 31 ++ include/dt-bindings/memory/tegra30-mc.h | 19 ++ include/soc/tegra/mc.h | 37 ++- 20 files changed, 978 insertions(+), 322 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-mc.txt create mode 100644 drivers/memory/tegra/tegra20.c delete mode 100644 drivers/memory/tegra20-mc.c create mode 100644 include/dt-bindings/memory/tegra20-mc.h