Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8993490ybi; Tue, 23 Jul 2019 19:38:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWownczR57E8v54RTotMELZtPVGyf6KaOeC6me9IJXh0yeMHxOnrcqV/6YycVo7MQrkaib X-Received: by 2002:a62:78c2:: with SMTP id t185mr9115103pfc.142.1563935932432; Tue, 23 Jul 2019 19:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563935932; cv=none; d=google.com; s=arc-20160816; b=V9D2SFLYopCAZHJjVmxy1beMZtvmijPS+5UtBEHjsbwjG485XikQFqypXu08jv21vE tzEe8dWOrTEQFcCaK3fyZ/llhAPoIyPp0f3EA2C+ROaiEtrryrvz/McS5L9GdgiVuXzv 5s6yokxGg6Izr33IAboefgYsqLxSJy+N4NtXil/qdKPqeBCykamOyHZCwOqQXeuqs8tM hifFXotGDI90BpThvKcl+IGXLuYoIGlwOcjyaU2D8rt2hPPd4N6ZsWU0UxdaL1XCRrOE UGb6MQIKDXJVZ60td8cV1l8m6h3m27tWGX8qG9tQSy95LVNQ3OC3lsao7ZdiwxhYzp/e rBow== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DHFA8suWUP3tpWesHwhM+PuI3SVJDTd+EXpBK0dcsfw=; b=CdywYhISSqziL2buCzhjDl1bLb6XIi5q02M4M74FbCYYiuMYI8U9gnXf/X/QkRgyDJ /shVWhTytchmoUkV/8iCMosoEv6A/GIjLkRyMulyQZ4+4M6HAf3jlsEINXL8aA3oJkvq e4ua6rF0MittqvHJH+8ZrclJkt+DAPg8b+6vTSD79Xg72tptg9F15l4voGmYKTfpWEkS EkFD4/LslTOH/a71XkxbaE04ezorXwQJZEL3do3alWFzK+4EEWYhq37BToR+YiA5hnGN MYV6tmt/VMNUwu0CtWAiu4eRQab/rcGl2v9sl4JjTzny99m4MMPzV+3QBZlmFDAJSKgT mapA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kdnkeIs9; 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 9si13276915pgo.283.2019.07.23.19.38.38; Tue, 23 Jul 2019 19:38:52 -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=kdnkeIs9; 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 S1728887AbfGXCYY (ORCPT + 99 others); Tue, 23 Jul 2019 22:24:24 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:44053 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728052AbfGXCYY (ORCPT ); Tue, 23 Jul 2019 22:24:24 -0400 Received: by mail-pf1-f194.google.com with SMTP id t16so20066926pfe.11; Tue, 23 Jul 2019 19:24:23 -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 :mime-version:content-transfer-encoding; bh=DHFA8suWUP3tpWesHwhM+PuI3SVJDTd+EXpBK0dcsfw=; b=kdnkeIs9UnlW7io2ltC+Jx434Sp7jd23QovrRYNLKrNrCFZDyr8Lar08/olaNCKxYw n+hb+OW1t8Y+ZfxdTGyMOSRZ5ys3tY4//A5ZPvCg5ep4Sd1zMTNKNtjzD3xJKwEQq2g5 Hfte9ICcF5AQXLfcBpNOQijig8veInit8HsZGklfWLEkSIkCPtLy65Y7Qr3uv5H3IzX9 tSCEA2C5aMqzMrVOwtakcjKYn96SmPkM1hg2pdjBMkdPs+sjOxc1z6kWhdMMq4xrvcfw qnDLXAqMnqg4S5W49cY+r4FhYevM5YlHAOxH2pdwV/wTiCbBN92zvpzKyiUUgatjBVYC BKdQ== 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:mime-version:content-transfer-encoding; bh=DHFA8suWUP3tpWesHwhM+PuI3SVJDTd+EXpBK0dcsfw=; b=mDLev0FGCVukMDRpeNQ+M4WoOuoB3vsTtPl6RpXLUZtjEkNnaUZWH67I+KqOqyOKgv et6FX9c5R7sB67hhY+9APRL86A/RlZT/v+JCTC7vXzdj7QAI5S0RdobUjoRBriOE46rT 65n9GOR77C4wGvOKmTM6GuFtouh/ehY76uXOLj5VVjNEYkKz971BSaaXU18YLUwKzRVQ 2BfUE9JooXrBnbj9CPHzNWM5rjSmVTSrzf9p92NJpVrdIvLfrQZ3WJS/zeTrTOYBKdGf RbAImXiS/Hjx9+beyL1keAVA4S8rBBFSGVAHmTRUwxeCPAsivFMNfM1z+iNFf9aeBwFL zGhQ== X-Gm-Message-State: APjAAAUDUySzfSD9E+i1JmLT0W9E8pzy3DKJdwC4AamKX1HJj+zaj99J nQlPIpipgtvJZdg5Jq9vLzCOEI9/my4= X-Received: by 2002:a65:5a44:: with SMTP id z4mr79338446pgs.41.1563935063367; Tue, 23 Jul 2019 19:24:23 -0700 (PDT) Received: from guoguo-omen-lan.lan ([107.151.139.128]) by smtp.gmail.com with ESMTPSA id s185sm63468029pgs.67.2019.07.23.19.24.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 19:24:22 -0700 (PDT) From: Chuanhong Guo To: linux-clk@vger.kernel.org (open list:COMMON CLK FRAMEWORK), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list), linux-mips@vger.kernel.org (open list:MIPS), devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM) Cc: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Ralf Baechle , Paul Burton , James Hogan , John Crispin , Greg Kroah-Hartman , Weijie Gao , NeilBrown , Chuanhong Guo Subject: [PATCH v2 2/6] MIPS: ralink: drop ralink_clk_init for mt7621 Date: Wed, 24 Jul 2019 10:23:06 +0800 Message-Id: <20190724022310.28010-3-gch981213@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190724022310.28010-1-gch981213@gmail.com> References: <20190724022310.28010-1-gch981213@gmail.com> 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 This function isn't called anywhere. just drop it. Signed-off-by: Chuanhong Guo --- Change since v1: New patch. Split from: "MIPS: ralink: fix cpu clock of mt7621 and add dt clk devices" 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 9415be0d57b8..ba39f3f3a7c7 100644 --- a/arch/mips/ralink/mt7621.c +++ b/arch/mips/ralink/mt7621.c @@ -18,11 +18,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 @@ -113,44 +108,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.21.0