Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2941782imm; Sun, 3 Jun 2018 15:40:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIZXFmc8YwcSswCDAe7FVk2LEVkDrATb9yf2QQjTXi4JTk/hJET//JBq6KuKXbbFUBw2COf X-Received: by 2002:a63:7145:: with SMTP id b5-v6mr15446114pgn.45.1528065635734; Sun, 03 Jun 2018 15:40:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528065635; cv=none; d=google.com; s=arc-20160816; b=fL6WVY+rtvXvDDQwHDBKn6IG9Er/FOlmoE603j0M7d1DKklppqDoGWTjIj7wKM9xQn j98WPtrYV0Ic/vDhbba59l+rfIj5FGxFYCggXNXFDSyJOD+TFMGkcRjUnsIjoIu+6KoX kySy8VVE/DoPAsxQKemo7nwkHKk7cruaRIqTArzHTaatY1edeKyzN6IRzGGiwYUdu1PT hXEEs4d1UysnYj+RMzk0VA2WUX94xqZzx8zC/0DfvPDOGvWIGOc8LEoo5yCICpjAFHqP bSb6Sc8f/53RyeNSYPD6Cq0G69ymuOccs+ckvgvBT3h6Q1y7Wyt93xOJfBts8S2tesfD Fs6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=eU/rsG4pDX8wbiVCAracXNniiUOp3+CU1jZHITwlxAQ=; b=Ox4bbpBv7zOvtIf7lcJxj/aqKxixDGrLLCnHWWEccN2CC+DUccbX9nHiuF10wr43lL 8uwIrPTssKHqBq7n4dojanmuNTP34ZWcnUgXIyw7ktro2tOyWl8EXSl8BdMYqcm8IxSx rZxGUH5pFDgXP13hXN/9pxE8FAKyUYbRbZnrLI81klyPVvp4zCQGEcuiubL3QfA9VqHb Nd2a4Dw8ha/72S6vOZa6rDsX1EtQk8hlEst2XL4alCAeTI/vvgGgzKRR3cfvIfxk7LVS lYq/16WvPcX6HbxM57CRBpLwJEutgyQatg+CpNtAO8xGEI8dCH+h05yg2x/yp1DktG3Q 3/qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iDoV2ng/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k17-v6si45138205pfj.310.2018.06.03.15.40.21; Sun, 03 Jun 2018 15:40:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iDoV2ng/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737AbeFCWiY (ORCPT + 99 others); Sun, 3 Jun 2018 18:38:24 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35729 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbeFCWiU (ORCPT ); Sun, 3 Jun 2018 18:38:20 -0400 Received: by mail-lf0-f67.google.com with SMTP id y72-v6so22247000lfd.2; Sun, 03 Jun 2018 15:38:19 -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; bh=eU/rsG4pDX8wbiVCAracXNniiUOp3+CU1jZHITwlxAQ=; b=iDoV2ng/PeaoPSpWA70rR3qtGhyg15Uda9HlyAAOAa8BcVn9VZBnGbYf7k1VxZBuQa 6pPiPLzXiau58AQDRFRDeFEJG3pd+IKDDq5WysQ9T5QKW+Khi8L5Sc/oAhJGrXXC7LWB qtf7SjfxblvpxNsPZtyrdwEfOPE4ffX+E55z9UdvqdJOl0pmMKYGlgyc6s3JKt1m3lzs D1Tjg2xIxfXf1HAQLFriKnrRrJdeX5zzACmJS4b3j7lhPRNCUU+IOLoXTIBZDdSVs4gy Di9THRDPrcQuU16+fnaeUivJyWPQPLFcDiMr97TdoBFxTVBQeFaF699mc3p17oYLLC5H K57A== 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=eU/rsG4pDX8wbiVCAracXNniiUOp3+CU1jZHITwlxAQ=; b=lHlWeZoWc3676b5gIv2hS9JT9mYQdvY0BCnpe4zQ7r780tJWGj4kRumt6K4jbMCq6Y rhQubS5WCbkPgtpPWmnZ3DK6mhgOimVoOW/Oc9fgZJJpISwVs/M5mFCJr0Pf0Qf4Uoqd JPrRdROmE/VPjiOXZDvLq/HEznaA4sDjJPaMx7aaj4fisE2cUHLjQC3e1QZK9LCV/0Bg UjhjSz5yxdOHX+OwRydhmKe5nDXghxnMGx4gTNO36DHKH1ziTyTV4p9E3rrU4koNElzW zDxiEasjVoNZfgwFGaWsq0K6JHvWqCz/mYhYJ88tagG3qt9V0XyotA0txGX/ldFZRc4W HlUw== X-Gm-Message-State: ALKqPwcwaUexYPMhNZpGxlp/pVz2eIgNTQ465xc9NS5JW3g9j5YlhJbc SyFlzyqF30fR73pWMU7HsTo= X-Received: by 2002:a2e:9b91:: with SMTP id z17-v6mr9849307lji.121.1528065498986; Sun, 03 Jun 2018 15:38:18 -0700 (PDT) Received: from localhost.localdomain (109-252-91-41.nat.spd-mgts.ru. [109.252.91.41]) by smtp.gmail.com with ESMTPSA id a2-v6sm9344121ljd.18.2018.06.03.15.38.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jun 2018 15:38:18 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Peter De Schrijver , Jonathan Hunter , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland Cc: linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/5] Tegra20 External Memory Controller driver Date: Mon, 4 Jun 2018 01:36:49 +0300 Message-Id: <20180603223654.23324-1-digetx@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Couple years ago the Tegra20 EMC driver was removed from the kernel due to incompatible changes in the Tegra's clock driver. This patchset introduces a modernized EMC driver. Currently the sole purpose of the driver is to initialize DRAM frequency to maximum rate during of the kernels boot-up. Later we may consider implementing dynamic memory frequency scaling, utilizing functionality provided by this driver. Changelog: v2: - Minor code cleanups like consistent use of writel_relaxed instead of non-relaxed version, reworded error messages, etc. - Factored out use_pllm_ud bit checking into a standalone patch for consistency. Dmitry Osipenko (5): dt: bindings: tegra20-emc: Document interrupt property ARM: dts: tegra20: Add interrupt to External Memory Controller clk: tegra20: Turn EMC clock gate into divider clk: tegra20: Check whether direct PLLM sourcing is turned off for EMC memory: tegra: Introduce Tegra20 EMC driver .../bindings/arm/tegra/nvidia,tegra20-emc.txt | 2 + arch/arm/boot/dts/tegra20.dtsi | 1 + drivers/clk/tegra/clk-tegra20.c | 46 +- drivers/memory/tegra/Kconfig | 10 + drivers/memory/tegra/Makefile | 1 + drivers/memory/tegra/tegra20-emc.c | 586 ++++++++++++++++++ 6 files changed, 636 insertions(+), 10 deletions(-) create mode 100644 drivers/memory/tegra/tegra20-emc.c -- 2.17.0