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: 916579 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; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Qq7dHdHf"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40nfQy0VVqz9s2k for ; Sat, 19 May 2018 06:09:45 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752524AbeERUIf (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-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org 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);