Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2941109imm; Sun, 3 Jun 2018 15:39:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIsuOOh/aBuJiZ2qgr2XzP3fcq9cB5Sq6SfUVfOAmj7RAhWcGwQtz8V6uQAW3l9ZCNqtv3d X-Received: by 2002:a62:7db:: with SMTP id 88-v6mr8277340pfh.178.1528065578124; Sun, 03 Jun 2018 15:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528065578; cv=none; d=google.com; s=arc-20160816; b=Mur7dy3e0CHPyzeF0GJpzRYd8Ly9iIypdgdKHM15aN26Ljw+g4i/6b+72kqSnU2SBq GKOIzDJZ+wV7gLotUHIOWQMIbi6UQThOt8R/lsyYKWFYfYroeTI2DIz6WAXy+Ti2bmam foLarFb57x+BaOAb2X9WGDHSfzb0TBioX0DFZgE8QSBalAiIuHwNnBUTv/cOjViOL68U DTSB7nHzNlgGJVQZcEpZKc5f976lA0Qn+ORHmfNhB+SYS/N9iukKoIHBFy+8bqoOWh8S 8W8InljDp7x60/ooWOSRbfY/s37ohEqsQAyAdHGCmEljEDqQYH4p7A13YkLWg1mObYBI LmKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Bn/BaRRwf7f2HheNRENexxmHbDkA9fPqT34nhoj0u3Q=; b=FJ7XcT+5MX1uJUHCx00mvWnrCY70qM/cyBOsIDi7Y17u1mz0QlX6+AcVLU5f3FB65s oSYcWc9GnGZBEgb72gYxkdSJ5+6mZmUybm5Xll6fPePMcYq/vOG3x1xq9OtNW/Yr74EN cOCNHsx5Bt5NXz7uXwozOBEr/ENTTklSnzWRPPRGm8k6u4X3YDzt07RspEtUGmyifOkP KSBFEXVcSzidBu6ZCDgPFIQC2JoGadNmmI4uUr/XnNNMrlufYYwWU1VZW96kTshM5b7N ePVvRRFhnnCwxkFhvNUkoxjD0D8r7KYuazoEcV3jDZ/og08VTMfb9r+DvhlZUxmyDCo5 6dRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fBqYYU49; 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 g86-v6si16585540pfj.283.2018.06.03.15.39.23; Sun, 03 Jun 2018 15:39:38 -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=fBqYYU49; 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 S1751812AbeFCWia (ORCPT + 99 others); Sun, 3 Jun 2018 18:38:30 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:33888 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727AbeFCWiZ (ORCPT ); Sun, 3 Jun 2018 18:38:25 -0400 Received: by mail-lf0-f67.google.com with SMTP id o9-v6so22254344lfk.1; Sun, 03 Jun 2018 15:38:23 -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; bh=Bn/BaRRwf7f2HheNRENexxmHbDkA9fPqT34nhoj0u3Q=; b=fBqYYU49bANk/tMAdAgWcgYl8CZIclNX31oJMXXGr6T55UzeImj8ujLzp/KglNM1nr 7q4en5md9PKuQTvd18553gERn1Fsq9bCiqvgT8/8QYE9V3UhzUaqcAhHMXfQOBNz2Vbd hr6QU4HRbRKXdcPg5bEHkQXUUaSKrGJLwLJwvb/nF3gYMxmtM0Uwqu97sQEMFpqtvMhZ J+lHZTuNI8xn/zGlh8m8vhkQsq788rvrmuVPl1TacA0JxD3oMJ3oyA9rSh5X/if3h1KL Fu7NQDoTkJRfPnyT972Sn52e3/6gxnF2pVx/VcDmRq24V0GXvNU0HKyX8Fx/YyTKG+Qm u9iA== 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; bh=Bn/BaRRwf7f2HheNRENexxmHbDkA9fPqT34nhoj0u3Q=; b=qEiiU7SYTHgbIQIzYXit/K6C+EzJLXbfC0WQMR1w3Lh8tW/TkSDrq1AYaoYgNXJwtM ipfhCwIyw7ZGHCCIBgCBoD8nb8mTGC+iJspzgKrpH1tcLklLL1r+K5gFrx8kBPauQ8cp L16iZzUhuZvNSFI7WhJ03xJ/wpUGrRmz61yfZr0hRod5ODPv5IKOKmtPRwtuZ/TxEcE0 oxKLYPxixeSC3DnqmtCwk6IWeJ57OWFdPEyRPf/bqaMKeFlV5ViK00yLspJMPPxCp8qQ 3iM0XVktR3B9lwvpcWL2LfJp2eqrc3qhhaddo4Ny+6T4cRLBntnpPZK9DLiSLYoOq7pz 3LJw== X-Gm-Message-State: ALKqPwdYVXsoomm1+pIpudsQI7DjF+LNyaClR4MJ5SDg7OphXxZZWZEk wmSF9y3iBH8J9ukjKvQvYCU= X-Received: by 2002:a2e:28b:: with SMTP id y11-v6mr13104134lje.27.1528065503165; Sun, 03 Jun 2018 15:38:23 -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.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jun 2018 15:38:22 -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 4/5] clk: tegra20: Check whether direct PLLM sourcing is turned off for EMC Date: Mon, 4 Jun 2018 01:36:53 +0300 Message-Id: <20180603223654.23324-5-digetx@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180603223654.23324-1-digetx@gmail.com> References: <20180603223654.23324-1-digetx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ensure that direct PLLM sourcing is turned off for EMC as we don't support that configuration in the clk driver. Signed-off-by: Dmitry Osipenko --- drivers/clk/tegra/clk-tegra20.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c index 2bd35418716a..ca4eadb9520e 100644 --- a/drivers/clk/tegra/clk-tegra20.c +++ b/drivers/clk/tegra/clk-tegra20.c @@ -800,7 +800,9 @@ static struct tegra_periph_init_data tegra_periph_nodiv_clk_list[] = { static void __init tegra20_emc_clk_init(void) { + const u32 use_pllm_ud = BIT(29); struct clk *clk; + u32 emc_reg; clk = clk_register_mux(NULL, "emc_mux", mux_pllmcp_clkm, ARRAY_SIZE(mux_pllmcp_clkm), @@ -812,6 +814,14 @@ static void __init tegra20_emc_clk_init(void) &emc_lock); clks[TEGRA20_CLK_MC] = clk; + /* un-divided pll_m_out0 is currently unsupported */ + emc_reg = readl_relaxed(clk_base + CLK_SOURCE_EMC); + if (emc_reg & use_pllm_ud) { + pr_err("%s: un-divided PllM_out0 used as clock source\n", + __func__); + return; + } + /* * Note that 'emc_mux' source and 'emc' rate shouldn't be changed at * the same time due to a HW bug, this won't happen because we're -- 2.17.0