From patchwork Fri May 18 20:06:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10412047 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B5B756031B for ; Fri, 18 May 2018 20:08:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A52AD28ACA for ; Fri, 18 May 2018 20:08:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A03B28ACE; Fri, 18 May 2018 20:08:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B3B528ACA for ; Fri, 18 May 2018 20:08:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752375AbeERUIf (ORCPT ); Fri, 18 May 2018 16:08:35 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:34352 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752259AbeERUH3 (ORCPT ); Fri, 18 May 2018 16:07:29 -0400 Received: by mail-lf0-f68.google.com with SMTP id x145-v6so3656757lff.1; Fri, 18 May 2018 13:07:28 -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=XUOGODswHEeu01lcxwMYng2mz3cnybNc6Pi2wW4y2EE=; b=Qq7dHdHfWSqMvb9Bbg43CJtpEg55oZsuJWKZJrnY7WN1t2bFglCUEqS40M++/DIpvM Wn/fP5t1e3RxP21FBRrG31PWe907B5wez/wUIlkwdxRNCanp0lCqVfsU/cB5y/8goHXp FMl3pKN3amDgn986Kkm1WbkKC9JYA8DKLXVVNYRAF/EfNfb+gUYHCNKXNx5oP3OW6Kdr bhyFGNGZZm+priI25eTvMkM3nOVdMWrEh/4MSgdW5PhN7DgqfHpWQbt9Q+zVLWKVLVxX iXNNM35qMqx8Rp36v38d0Mp7NwXuA/zxVqiegTCKLzWXkDp05Ojvqo1+Tqb0e3hQAcal Vkbg== 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=XUOGODswHEeu01lcxwMYng2mz3cnybNc6Pi2wW4y2EE=; b=RSKnhUNUhdLM0aKC5r/XK7tnVk4OQQSfgm8gFv6i8HhOMW+EUVuucjvcp63YgEBkN0 amGd9eYMe5b3S449oU4o8K98cGOc9H1zv030RZmbNv+m2/1w/LD8Xl3I/PjmBxz3J1rx I2J3C4h5wgoxZBXNp+IPBpIxU6IV0kODVKzpfI6onCHrN3MBKdreI+ibd/Y5CLLQWUfK EOEx+KZDpJzTh4jGZWhYEF+JOXRARPMT3nqqwraJ8JojMIwGuZ8hiy/25wRpNdHpEJ5w FAZSBoDru+nnSQkR0nrXkHc5BsQ4DUg5ktOnwhnSfHS2OZst248nHZeHNj4r/3/+N8wQ W7RA== X-Gm-Message-State: ALKqPwf4ywAeB+nEhseWpc9fIigx7UFKXIE/iPb+UNr3MrDnA5Bqz6ee 2ONMdOi82jUoIClQvQCGULc= X-Google-Smtp-Source: AB8JxZojt8BbEQNiBZRPSVq4ZDp/l6qxK0van0X/OwMozbpCjgvHfvnLWQzTv9461J9BkfKKi63Urg== X-Received: by 2002:a2e:3e0c:: with SMTP id l12-v6mr6915267lja.23.1526674047969; Fri, 18 May 2018 13:07:27 -0700 (PDT) Received: from localhost.localdomain ([109.252.91.60]) by smtp.gmail.com with ESMTPSA id z132-v6sm2026987lfd.45.2018.05.18.13.07.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 13:07:27 -0700 (PDT) From: Dmitry Osipenko To: "Rafael J. Wysocki" , Viresh Kumar , Thierry Reding , Jonathan Hunter Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Geis Subject: [PATCH v2 09/11] cpufreq: tegra20: Check if this is Tegra20 machine Date: Fri, 18 May 2018 23:06:40 +0300 Message-Id: <20180518200642.24815-10-digetx@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180518200642.24815-1-digetx@gmail.com> References: <20180518200642.24815-1-digetx@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Don't even try to request the clocks during of module initialization on non-Tegra20 machines (this is the case for a multi-platform kernel) for consistency. Signed-off-by: Dmitry Osipenko Acked-by: Viresh Kumar Acked-by: Thierry Reding --- drivers/cpufreq/tegra20-cpufreq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/cpufreq/tegra20-cpufreq.c b/drivers/cpufreq/tegra20-cpufreq.c index 36075aee2ff2..7b425ebe81e7 100644 --- a/drivers/cpufreq/tegra20-cpufreq.c +++ b/drivers/cpufreq/tegra20-cpufreq.c @@ -21,6 +21,7 @@ #include #include #include +#include #include static struct cpufreq_frequency_table freq_table[] = { @@ -158,6 +159,9 @@ static int __init tegra_cpufreq_init(void) { int err; + if (!of_machine_is_compatible("nvidia,tegra20")) + return -ENODEV; + cpu_clk = clk_get_sys(NULL, "cclk"); if (IS_ERR(cpu_clk)) return PTR_ERR(cpu_clk);