From patchwork Mon Jan 23 22:04:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Murray X-Patchwork-Id: 9533601 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 525186042D for ; Mon, 23 Jan 2017 22:06:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D2E2283EB for ; Mon, 23 Jan 2017 22:06:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E5F02841F; Mon, 23 Jan 2017 22:06:02 +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=-1.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 72BC6283EB for ; Mon, 23 Jan 2017 22:06:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cVmkN-0005dN-Kr; Mon, 23 Jan 2017 22:05:55 +0000 Received: from mail-wm0-f48.google.com ([74.125.82.48]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cVmjy-0005bB-I9 for linux-arm-kernel@lists.infradead.org; Mon, 23 Jan 2017 22:05:32 +0000 Received: by mail-wm0-f48.google.com with SMTP id c206so179165780wme.0 for ; Mon, 23 Jan 2017 14:05:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded-bits.co.uk; s=google; h=from:to:cc:subject:date:message-id; bh=WRCdfEMvPE3/TMjfLAg5frCwiI4JFKIauVsoEqySWpA=; b=RopS/EcqQf4YIcnbFkAEN9Cz1VyHZ59YrJs7zuwkbESsJi0xyXZ+t424cpAKsMzj0+ uDu2ZTi9fdI6W3B+3qChDijaUsb7mGZ+KlYsH5jA7xOOec4wSDQSJO6Dl0ftdYmmfyH7 Cn4UMh6eS9ALVWmGmkFx2UgJ6LHPocjTLVop4= 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=WRCdfEMvPE3/TMjfLAg5frCwiI4JFKIauVsoEqySWpA=; b=BNUCSg4i4Qmaygs7E5miRdUvdQ+ZMNtn28COOU/510eG79mBJhEfppPDWhMLoq6RhF UjbfDOYpIzf6/6O4EpPG2vKeSJISG88XtFNNj8vxXED/imlKprtq5FImNzK52GS+KyOg n+2kTNMVzQKSEd13A6++geKfPffBmojRpaeTx5Snt+PvE5M1a6tTrgFfyohff/sNpOva nYAi1ysGfkv4LTI0xAEq/QJGZxj9g8sZ8IK1JwKx+p8nSlghtoOvMaoBMzxF11SYBUck GFTIVTD4DObM79QB0JgE7PQ4QJFARoxyhva8003MJLKqmxQWw8/8DJi2mYRRVqHoXqsj EXWg== X-Gm-Message-State: AIkVDXJ3ulq8IrthN1e6F2hbW75ophsdcwoppoNhGZ3z+Ark1z0/Y+IfAdlFu9iN5aKCsA== X-Received: by 10.223.141.229 with SMTP id o92mr28984719wrb.22.1485209046346; Mon, 23 Jan 2017 14:04:06 -0800 (PST) Received: from beets.home (host86-188-72-58.range86-188.btcentralplus.com. [86.188.72.58]) by smtp.gmail.com with ESMTPSA id o81sm13741365wmb.14.2017.01.23.14.04.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Jan 2017 14:04:05 -0800 (PST) From: Andrew Murray To: linux-omap@vger.kernel.org Subject: [PATCH v3] ARM: OMAP1/2: clock: Remove unused mpurate cmdline option Date: Mon, 23 Jan 2017 22:04:03 +0000 Message-Id: <1485209043-26463-1-git-send-email-amurray@embedded-bits.co.uk> X-Mailer: git-send-email 2.5.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170123_140530_762124_9268A6FF X-CRM114-Status: GOOD ( 15.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Walmsley , Aaro Koskinen , Tony Lindgren , Andrew Murray , Tero Kristo , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The 'mpurate' option, historically used for specifying an initial MPU rate at boot, no longer has any effect due to the supporting code being removed as it was 'wrong and dangerous' [1]. This patch removes the remaining dead code associated with the __setup macros to avoid confusion and reduce bloat. [1] https://patchwork.kernel.org/patch/5954631/ Signed-off-by: Andrew Murray --- Changes since v1: * Remove related omap2_clk_print_new_rates function which is also unused (this was previously used to print clock rates after use of mpurate) Changes since v2: * Add missing Signed-off-by --- arch/arm/mach-omap1/clock.c | 20 --------------- arch/arm/mach-omap1/clock.h | 2 -- arch/arm/mach-omap2/clock.c | 61 --------------------------------------------- arch/arm/mach-omap2/clock.h | 4 --- 4 files changed, 87 deletions(-) diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 4f5fd4a..43e3e18 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -720,26 +720,6 @@ EXPORT_SYMBOL(clk_get_parent); * OMAP specific clock functions shared between omap1 and omap2 */ -int __initdata mpurate; - -/* - * By default we use the rate set by the bootloader. - * You can override this with mpurate= cmdline option. - */ -static int __init omap_clk_setup(char *str) -{ - get_option(&str, &mpurate); - - if (!mpurate) - return 1; - - if (mpurate < 1000) - mpurate *= 1000000; - - return 1; -} -__setup("mpurate=", omap_clk_setup); - /* Used for clocks that always have same value as the parent clock */ unsigned long followparent_recalc(struct clk *clk) { diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h index 1e4918a..f2d1be2 100644 --- a/arch/arm/mach-omap1/clock.h +++ b/arch/arm/mach-omap1/clock.h @@ -173,8 +173,6 @@ struct clk_functions { void (*clk_disable_unused)(struct clk *clk); }; -extern int mpurate; - extern int clk_init(struct clk_functions *custom_clocks); extern void clk_preinit(struct clk *clk); extern int clk_register(struct clk *clk); diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index d058125..1270afd 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -78,8 +78,6 @@ int __init omap2_clk_setup_ll_ops(void) * OMAP2+ specific clock functions */ -/* Private functions */ - /* Public functions */ /** @@ -112,65 +110,6 @@ void omap2_init_clk_clkdm(struct clk_hw *hw) } } -static int __initdata mpurate; - -/* - * By default we use the rate set by the bootloader. - * You can override this with mpurate= cmdline option. - */ -static int __init omap_clk_setup(char *str) -{ - get_option(&str, &mpurate); - - if (!mpurate) - return 1; - - if (mpurate < 1000) - mpurate *= 1000000; - - return 1; -} -__setup("mpurate=", omap_clk_setup); - -/** - * omap2_clk_print_new_rates - print summary of current clock tree rates - * @hfclkin_ck_name: clk name for the off-chip HF oscillator - * @core_ck_name: clk name for the on-chip CORE_CLK - * @mpu_ck_name: clk name for the ARM MPU clock - * - * Prints a short message to the console with the HFCLKIN oscillator - * rate, the rate of the CORE clock, and the rate of the ARM MPU clock. - * Called by the boot-time MPU rate switching code. XXX This is intended - * to be handled by the OPP layer code in the near future and should be - * removed from the clock code. No return value. - */ -void __init omap2_clk_print_new_rates(const char *hfclkin_ck_name, - const char *core_ck_name, - const char *mpu_ck_name) -{ - struct clk *hfclkin_ck, *core_ck, *mpu_ck; - unsigned long hfclkin_rate; - - mpu_ck = clk_get(NULL, mpu_ck_name); - if (WARN(IS_ERR(mpu_ck), "clock: failed to get %s.\n", mpu_ck_name)) - return; - - core_ck = clk_get(NULL, core_ck_name); - if (WARN(IS_ERR(core_ck), "clock: failed to get %s.\n", core_ck_name)) - return; - - hfclkin_ck = clk_get(NULL, hfclkin_ck_name); - if (WARN(IS_ERR(hfclkin_ck), "Failed to get %s.\n", hfclkin_ck_name)) - return; - - hfclkin_rate = clk_get_rate(hfclkin_ck); - - pr_info("Switched to new clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n", - (hfclkin_rate / 1000000), ((hfclkin_rate / 100000) % 10), - (clk_get_rate(core_ck) / 1000000), - (clk_get_rate(mpu_ck) / 1000000)); -} - /** * ti_clk_init_features - init clock features struct for the SoC * diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 67da640..4e66295 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -64,10 +64,6 @@ #define OMAP4XXX_EN_DPLL_FRBYPASS 0x6 #define OMAP4XXX_EN_DPLL_LOCKED 0x7 -void omap2_clk_print_new_rates(const char *hfclkin_ck_name, - const char *core_ck_name, - const char *mpu_ck_name); - extern u16 cpu_mask; extern const struct clkops clkops_omap2_dflt_wait;