Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp252880ybb; Fri, 27 Mar 2020 21:18:43 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvIO9f0LrCvUIttuzQHcY+atTfBCfsnosUFpB3MCoti0Y2DPerXUM1w0VSBB3IRtSjbeD0K X-Received: by 2002:aca:c1d6:: with SMTP id r205mr1477360oif.21.1585369123785; Fri, 27 Mar 2020 21:18:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585369123; cv=none; d=google.com; s=arc-20160816; b=N0g3DqF1HvsSwHZGzzs+A2OrEVOB1abiqrHDVl+hLKmqd1CLD4KHZfOiz6DX0S2bQo 8mPhAI/8QVeuYCgIKFMyJ3VWIASFJ4+zLtlaVMbkSpH/bKmTFgVqUq4P1MY8ExJmNnY8 ofW9nDsOWUMwxl136zrKEhpL/zeU9nRqCR0XDYTvmFp0Wg3IOBr7SpL8Dt0mDj/jLefG 4d5e8om+dtG7plJenH+x9zWS9qAEsrDPD9iqu4PS8IPQXHVzvh4AxMNbajiAWUpLr2IM 9cuZVOYYJaRuiYRgyJ7BRkitRYs02V7HBsNywRRsEzirX1WpZzAFGLks3Zq+pX3hexY6 hPWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sVWn43NqLR3tLEZh5Y98iaDMlPEIz/1h2UHcds3kBXg=; b=qytYOmzS3VL0R9Gl3kZN6AYDOSUYihJ4ClsqvWnnjTiCYVq2B0VVNL6fdyEnZJKTmr sm5rk/6djaDM3TPFQCFyBtZrCM+UEcVJ3OguN1v3f5vVy5AWGBk/ie1dSp+sgB+Eb/2X aw1NyOkS4jM69x+LChOdjdZYmzpc7cAWI/jig04oN/5xZ33tw84ytmul9x0u7k74OpfB hIa52Ei5RH0WAPn1F7QOHbQYm1y+/W0sL06Zw6HoRTpL1KBSer03MTVTr5MqCemqnXz/ i775ThZQWYnRY20ZBpEhAUh+8JM3Gq1dEhWGlCGSQEFcuGaHrAnG4TsSIVx97UBq76AY wumA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QGbyYMod; 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 x14si3237538otq.104.2020.03.27.21.18.21; Fri, 27 Mar 2020 21:18:43 -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=QGbyYMod; 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 S1726045AbgC1EQ1 (ORCPT + 99 others); Sat, 28 Mar 2020 00:16:27 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:41644 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbgC1EQ1 (ORCPT ); Sat, 28 Mar 2020 00:16:27 -0400 Received: by mail-pl1-f194.google.com with SMTP id d24so433817pll.8; Fri, 27 Mar 2020 21:16:26 -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:mime-version :content-transfer-encoding; bh=sVWn43NqLR3tLEZh5Y98iaDMlPEIz/1h2UHcds3kBXg=; b=QGbyYModlVyJIfWRsIVy3qc0JDBrMzhVfgj81f2hF+ehgXDrGVkeNWDUnZBgd37qVH S88oblXh+y+y19+93qDCbpwLtBT8Dehx2HKaBAcATYNq5Ow9x2lU7HNbvMSE3lVtD0xY ht0Q4DUfegGtQ14gGSSQSY2h5MdSStYnJG9q2WHZ9+nFgyBqQ0UoIo05I+LoZvxC/wUS CsT/cvY2oXTZLEvHUr1dExCgI2g4IxuIgeudQaNR/eRNO5ahWAhI85B2MuADh2eVaKNN D7UEM29ybfc7zv/wlan4FYnXo+18uRlYV6efq/ROk1rXsMJtjVhnm/DNtlGmmtlsz5tA IFSg== 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:mime-version :content-transfer-encoding; bh=sVWn43NqLR3tLEZh5Y98iaDMlPEIz/1h2UHcds3kBXg=; b=M12ZZJraYV0hZCTlV+m6MUE5IofK1aJ3wMfw/ckyeJwTpqFcgirwmru4TUGO3xOPNC p3h+FxyOWgnJIjgHHNG2kfRsb1Y8QABq8MIjtnsRX0ieH9CedOzowaNvM3FuKN6849u8 A6R+A0Vl0VokSEF/rGqD8ZllgVRwhKbDTOgTnaXzmsyfeSPLaw1l1L7CCgrp0XM1BLYY kURvKwc7tbQjkNbWMjsauZsg875XycLaMheSgH82SZFsZNC1DVoK8agmi+Xyazyr3SNG mZspXn4XCWP69oEDhuyBcM0O+W/JHAXjAmpP49Ld1TR2LbI/5pSSjKf5kht3RHNSm7kx UXxg== X-Gm-Message-State: ANhLgQ0tXp7Zdjj845Is3PZNVCcPkvimINNv7D2Mq05Jhiw0ihR+Sy9i HqSHJySpcmHzPPzufcHNFlEw//Qi7jM= X-Received: by 2002:a17:90a:db02:: with SMTP id g2mr2895113pjv.15.1585368985725; Fri, 27 Mar 2020 21:16:25 -0700 (PDT) Received: from guoguo-omen.lan ([240e:379:97d:e970:8934:6f24:2a5f:6e75]) by smtp.gmail.com with ESMTPSA id v123sm5174578pfb.85.2020.03.27.21.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 21:16:25 -0700 (PDT) From: Chuanhong Guo To: linux-mips@vger.kernel.org Cc: Chuanhong Guo , John Crispin , Thomas Bogendoerfer , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] MIPS: ralink: drop ralink_clk_init for mt7621 Date: Sat, 28 Mar 2020 12:14:57 +0800 Message-Id: <20200328041523.81229-1-gch981213@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ralink_clk_init is only called in arch/mips/ralink/clk.c which isn't compiled for mt7621. And it doesn't export a proper cpu clock. Drop this unused function. Signed-off-by: Chuanhong Guo --- arch/mips/ralink/mt7621.c | 43 --------------------------------------- 1 file changed, 43 deletions(-) diff --git a/arch/mips/ralink/mt7621.c b/arch/mips/ralink/mt7621.c index 905460aeeb1f..e309a79b18e4 100644 --- a/arch/mips/ralink/mt7621.c +++ b/arch/mips/ralink/mt7621.c @@ -20,11 +20,6 @@ #include "common.h" -#define SYSC_REG_SYSCFG 0x10 -#define SYSC_REG_CPLL_CLKCFG0 0x2c -#define SYSC_REG_CUR_CLK_STS 0x44 -#define CPU_CLK_SEL (BIT(30) | BIT(31)) - #define MT7621_GPIO_MODE_UART1 1 #define MT7621_GPIO_MODE_I2C 2 #define MT7621_GPIO_MODE_UART3_MASK 0x3 @@ -115,44 +110,6 @@ phys_addr_t mips_cpc_default_phys_base(void) panic("Cannot detect cpc address"); } -void __init ralink_clk_init(void) -{ - int cpu_fdiv = 0; - int cpu_ffrac = 0; - int fbdiv = 0; - u32 clk_sts, syscfg; - u8 clk_sel = 0, xtal_mode; - u32 cpu_clk; - - if ((rt_sysc_r32(SYSC_REG_CPLL_CLKCFG0) & CPU_CLK_SEL) != 0) - clk_sel = 1; - - switch (clk_sel) { - case 0: - clk_sts = rt_sysc_r32(SYSC_REG_CUR_CLK_STS); - cpu_fdiv = ((clk_sts >> 8) & 0x1F); - cpu_ffrac = (clk_sts & 0x1F); - cpu_clk = (500 * cpu_ffrac / cpu_fdiv) * 1000 * 1000; - break; - - case 1: - fbdiv = ((rt_sysc_r32(0x648) >> 4) & 0x7F) + 1; - syscfg = rt_sysc_r32(SYSC_REG_SYSCFG); - xtal_mode = (syscfg >> 6) & 0x7; - if (xtal_mode >= 6) { - /* 25Mhz Xtal */ - cpu_clk = 25 * fbdiv * 1000 * 1000; - } else if (xtal_mode >= 3) { - /* 40Mhz Xtal */ - cpu_clk = 40 * fbdiv * 1000 * 1000; - } else { - /* 20Mhz Xtal */ - cpu_clk = 20 * fbdiv * 1000 * 1000; - } - break; - } -} - void __init ralink_of_remap(void) { rt_sysc_membase = plat_of_remap_node("mtk,mt7621-sysc"); -- 2.25.1