Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3795438imm; Mon, 11 Jun 2018 01:45:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKTmqOygBdE4KCB49JKdBF0MdSywVbfKsotjbqLs7ianhSbrXXJdNBxvqp2FERlDnlc6QBp X-Received: by 2002:a17:902:7484:: with SMTP id h4-v6mr17217870pll.154.1528706756623; Mon, 11 Jun 2018 01:45:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528706756; cv=none; d=google.com; s=arc-20160816; b=u0JrqXUFdXawt/hQmQD3RYS4vNWnzFLaIYpcDxsxhnRLMnnZNto3ssNq1PLA7sJW1N HwQsLrzYwcY2EaIy2ZPbkiPQSARwGMYo3XG334r8VnXHI2EcieUiy+3VaOiRIpqnAOx7 eWe48IwTGkkjz0IcdN2l7Jt230Pi863z74OVt5QQW2DvE/d3bNW6cXiFpD2Wohhrn7DJ kAft6lBNEyWvPvOttkD/z4slMRleZw1ph09uYf4gpojStzeU0jyRFeXCG5ONDd0FFrL5 f6kYIo6zizBWWktrX+tJA+ouX7Q/9cQvRZ5nrDEUbtZtYzKjayl+cAUwrm5kIdZHWO1G 5znQ== 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:arc-authentication-results; bh=fGqsB1SH/9ba7QQ2g7YuCpUymvJdx32dX4hGwH3RdMY=; b=O99VQBcBSVQf+vhmX1i6F8WkZ/0bmPNcJ74THLDPauUWbiqQboJ8I0IewUQck7NaSK dGmCxvEtoyHRRsGUVPrJzT/SGDN11zRoBALeCiX/hVGSTESZvQh1rFZGruRFXOUqAY5C rPEb4sGeoln9QchGcArs0sEzp/2xw/MjHHQ2Ti2B2piOOk7frVPfa1u0V1nBMv07e0IU ff+mqduflpe/9oKmx7hzSMTaCpfQWpEEQxAbA/6BKYq3AxHt2DEiXUGqPF9Pk+iARBQS rKvf32opttC7muF3353WQK/p0WYkRvipnflntgnrsBf65zGCFF7eRTPt0PufoYm+kUIC W5zw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6-v6si17320719pfb.204.2018.06.11.01.45.42; Mon, 11 Jun 2018 01:45:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754073AbeFKIoh (ORCPT + 99 others); Mon, 11 Jun 2018 04:44:37 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:46540 "EHLO laurent.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754108AbeFKIoc (ORCPT ); Mon, 11 Jun 2018 04:44:32 -0400 Received: from ayla.of.borg ([84.194.111.163]) by laurent.telenet-ops.be with bizsmtp id xLkS1x00T3XaVaC01LkSsu; Mon, 11 Jun 2018 10:44:31 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1fSIR8-0006xQ-Fo; Mon, 11 Jun 2018 10:44:26 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1fSIR8-0005OH-Ep; Mon, 11 Jun 2018 10:44:26 +0200 From: Geert Uytterhoeven To: Greg Ungerer , Ralf Baechle , James Hogan , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Corentin Labbe , "David S . Miller" Cc: Arnd Bergmann , linux-m68k@lists.linux-m68k.org, linux-mips@linux-mips.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 2/3] MIPS: AR7: Normalize clk API Date: Mon, 11 Jun 2018 10:44:22 +0200 Message-Id: <1528706663-20670-3-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528706663-20670-1-git-send-email-geert@linux-m68k.org> References: <1528706663-20670-1-git-send-email-geert@linux-m68k.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Coldfire still provides its own variant of the clk API rather than using the generic COMMON_CLK API. This generally works, but it causes some link errors with drivers using the clk_round_rate(), clk_set_rate(), clk_set_parent(), or clk_get_parent() functions when a platform lacks those interfaces. This adds empty stub implementations for each of them, and I don't even try to do something useful here but instead just print a WARN() message to make it obvious what is going on if they ever end up being called. The drivers that call these won't be used on these platforms (otherwise we'd get a link error today), so the added code is harmless bloat and will warn about accidental use. Based on commit bd7fefe1f06ca6cc ("ARM: w90x900: normalize clk API"). Signed-off-by: Geert Uytterhoeven --- arch/mips/ar7/clock.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/mips/ar7/clock.c b/arch/mips/ar7/clock.c index 0137656107a9c5b5..6b64fd96dba8fb26 100644 --- a/arch/mips/ar7/clock.c +++ b/arch/mips/ar7/clock.c @@ -476,3 +476,32 @@ void __init ar7_init_clocks(void) /* adjust vbus clock rate */ vbus_clk.rate = bus_clk.rate / 2; } + +/* dummy functions, should not be called */ +long clk_round_rate(struct clk *clk, unsigned long rate) +{ + WARN_ON(clk); + return 0; +} +EXPORT_SYMBOL(clk_round_rate); + +int clk_set_rate(struct clk *clk, unsigned long rate) +{ + WARN_ON(clk); + return 0; +} +EXPORT_SYMBOL(clk_set_rate); + +int clk_set_parent(struct clk *clk, struct clk *parent) +{ + WARN_ON(clk); + return 0; +} +EXPORT_SYMBOL(clk_set_parent); + +struct clk *clk_get_parent(struct clk *clk) +{ + WARN_ON(clk); + return NULL; +} +EXPORT_SYMBOL(clk_get_parent); -- 2.7.4