Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 134CDC433EF for ; Sun, 10 Jul 2022 15:16:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 64D01845EB; Sun, 10 Jul 2022 17:15:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Mu3qX302"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2B09C8454E; Sun, 10 Jul 2022 17:15:43 +0200 (CEST) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2FC3784606 for ; Sun, 10 Jul 2022 17:15:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=daniel.schwierzeck@gmail.com Received: by mail-ed1-x529.google.com with SMTP id t3so3410417edd.0 for ; Sun, 10 Jul 2022 08:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yfgLDYUK/CsuDOXj/4Dr7AI6ONI1WJhtDn/2fxySkgE=; b=Mu3qX302+sLZ1UOWycsgqQH4sYUHL/3XngIBvqp68pMgIgycRKwLcWk53DpfnHp1at IDlPTwTMakR+7U1A0+eQxh4HREf3ehlnIg6yZq3TlMRSpLwe2B9Jr19JAA+FSgQ+gH1N 0KfP1Rt14hgACtGj4Po131qBWvoqDdORmBiaLhTaQaOkjmdpCtmksnfiJ+hV73/p9K59 6FJAcAkTdCJU+dcRK7jycfXZEkcMjVrErdZRQaeE6RgSHc1S+pPMSH+eNJjhQZCbnGC0 BM+D0kZ9aiaXzwCftOkM24ZZ6k86tLcF6IL/1Txnpic/Fp/oCdYYkrhjaY9peVy8E1Y8 +3lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yfgLDYUK/CsuDOXj/4Dr7AI6ONI1WJhtDn/2fxySkgE=; b=VIu1XYnFJXMnVAHLjbyjWJvLkEIHEg0fIWygQBePFp7OlrqC37uNrZbTOh87T616CC nD+tNQmKgH5ChBcEjSEXdncIz/FrsRoskT90q7qhDp5IBU6WtE3hOH89ZKg68HTUfdZE uCmvPeOY9FuAqWmPFbkYI9ZukW0EFQDlaNvjRipSuXJ0FlERXG2sBbRNysHylIlps3+N mR5NID22f1Y6kZX90ygeCHy0Y+iuHugH6DpTycAB8eCVBHHLUAeDSodmPywlNBdOkee8 xm/7uSY/L18btVpmZzvYnb9uvUKuv2zZI/PUOLEixr/V3enLsVj2vlaC63X2J7HYTiQ4 g5xw== X-Gm-Message-State: AJIora+QLYy/WlD1wRdt9tPdZdeWuTNVBgFwJGirNNkcTu1aXMGXNW5j HaQfPBEwjBu7R0yNyELH4u/NZgJGlyCvFQ== X-Google-Smtp-Source: AGRyM1voEG/dK8uAmC1XVuurkmDzrGSLVHmYtA/u85nP+9cC/T3W0fYzQf/kZxPNEMAWGy5qvFez5w== X-Received: by 2002:a05:6402:388b:b0:42b:5f20:c616 with SMTP id fd11-20020a056402388b00b0042b5f20c616mr18564826edb.50.1657466136756; Sun, 10 Jul 2022 08:15:36 -0700 (PDT) Received: from workstation.lan.schwierd.dedyn.io (i5E8605B8.versanet.de. [94.134.5.184]) by smtp.gmail.com with ESMTPSA id be5-20020a0564021a2500b0043a2338ca10sm2832871edb.92.2022.07.10.08.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jul 2022 08:15:36 -0700 (PDT) From: Daniel Schwierzeck To: u-boot@lists.denx.de Cc: Horatiu Vultur , Ezequiel Garcia , Stefan Roese , Weijie Gao , Lars Povlsen , Tom Rini , =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= , Daniel Schwierzeck Subject: [PATCH 2/4] MIPS: remove CONFIG_SYS_MHZ Date: Sun, 10 Jul 2022 17:15:12 +0200 Message-Id: <20220710151514.27207-3-daniel.schwierzeck@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220710151514.27207-1-daniel.schwierzeck@gmail.com> References: <20220710151514.27207-1-daniel.schwierzeck@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Resolve all uses of CONFIG_SYS_MHZ with the currently defined value. Remove code which depends on CONFIG_SYS_MHZ but where no board configs actually use that code. Signed-off-by: Daniel Schwierzeck --- arch/mips/mach-jz47xx/include/mach/jz4780.h | 2 +- arch/mips/mach-jz47xx/jz4780/pll.c | 6 +----- board/imgtec/ci20/ci20.c | 4 ---- include/configs/ap121.h | 3 +-- include/configs/ap143.h | 3 +-- include/configs/ap152.h | 3 +-- include/configs/ci20.h | 3 +-- include/configs/malta.h | 3 +-- include/configs/tplink_wdr4300.h | 3 +-- scripts/config_whitelist.txt | 1 - 10 files changed, 8 insertions(+), 23 deletions(-) diff --git a/arch/mips/mach-jz47xx/include/mach/jz4780.h b/arch/mips/mach-jz47xx/include/mach/jz4780.h index 4422e503ed..880445dac3 100644 --- a/arch/mips/mach-jz47xx/include/mach/jz4780.h +++ b/arch/mips/mach-jz47xx/include/mach/jz4780.h @@ -60,7 +60,7 @@ /* PLL setup */ #define JZ4780_SYS_EXTAL 48000000 -#define JZ4780_SYS_MEM_SPEED (CONFIG_SYS_MHZ * 1000000) +#define JZ4780_SYS_MEM_SPEED (1200 * 1000000) #define JZ4780_SYS_MEM_DIV 3 #define JZ4780_SYS_AUDIO_SPEED (768 * 1000000) diff --git a/arch/mips/mach-jz47xx/jz4780/pll.c b/arch/mips/mach-jz47xx/jz4780/pll.c index 323c634fb3..4519b478cc 100644 --- a/arch/mips/mach-jz47xx/jz4780/pll.c +++ b/arch/mips/mach-jz47xx/jz4780/pll.c @@ -399,11 +399,7 @@ static void cpu_mux_select(int pll) ((2 - 1) << CPM_CPCCR_L2DIV_BIT) | ((1 - 1) << CPM_CPCCR_CDIV_BIT); - if (CONFIG_SYS_MHZ >= 1000) - clk_ctrl |= (12 - 1) << CPM_CPCCR_PDIV_BIT; - else - clk_ctrl |= (6 - 1) << CPM_CPCCR_PDIV_BIT; - + clk_ctrl |= (12 - 1) << CPM_CPCCR_PDIV_BIT; clrsetbits_le32(cpm_regs + CPM_CPCCR, 0x00ffffff, clk_ctrl); while (readl(cpm_regs + CPM_CPCSR) & (CPM_CPCSR_CDIV_BUSY | diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c index 7cbe49abd9..89f5e7ad79 100644 --- a/board/imgtec/ci20/ci20.c +++ b/board/imgtec/ci20/ci20.c @@ -350,10 +350,6 @@ static const struct jz4780_ddr_config H5TQ2G83CFR_48_config = { .pulldn = 0x0e, }; -#if (CONFIG_SYS_MHZ != 1200) -#error No DDR configuration for CPU speed -#endif - const struct jz4780_ddr_config *jz4780_get_ddr_config(void) { const int board_revision = ci20_revision(); diff --git a/include/configs/ap121.h b/include/configs/ap121.h index 099aac5421..61cc073a8a 100644 --- a/include/configs/ap121.h +++ b/include/configs/ap121.h @@ -6,8 +6,7 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define CONFIG_SYS_MHZ 200 -#define CONFIG_SYS_MIPS_TIMER_FREQ (CONFIG_SYS_MHZ * 1000000) +#define CONFIG_SYS_MIPS_TIMER_FREQ 200000000 #define CONFIG_SYS_SDRAM_BASE 0x80000000 diff --git a/include/configs/ap143.h b/include/configs/ap143.h index 60b9e779fa..579b9b4f2c 100644 --- a/include/configs/ap143.h +++ b/include/configs/ap143.h @@ -6,8 +6,7 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define CONFIG_SYS_MHZ 325 -#define CONFIG_SYS_MIPS_TIMER_FREQ (CONFIG_SYS_MHZ * 1000000) +#define CONFIG_SYS_MIPS_TIMER_FREQ 325000000 #define CONFIG_SYS_SDRAM_BASE 0x80000000 diff --git a/include/configs/ap152.h b/include/configs/ap152.h index d165ead7bb..283762fd22 100644 --- a/include/configs/ap152.h +++ b/include/configs/ap152.h @@ -6,8 +6,7 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define CONFIG_SYS_MHZ 375 -#define CONFIG_SYS_MIPS_TIMER_FREQ (CONFIG_SYS_MHZ * 1000000) +#define CONFIG_SYS_MIPS_TIMER_FREQ 375000000 #define CONFIG_SYS_SDRAM_BASE 0x80000000 diff --git a/include/configs/ci20.h b/include/configs/ci20.h index 192da015e1..7e8a9fcb80 100644 --- a/include/configs/ci20.h +++ b/include/configs/ci20.h @@ -10,8 +10,7 @@ #define __CONFIG_CI20_H__ /* Ingenic JZ4780 clock configuration. */ -#define CONFIG_SYS_MHZ 1200 -#define CONFIG_SYS_MIPS_TIMER_FREQ (CONFIG_SYS_MHZ * 1000000) +#define CONFIG_SYS_MIPS_TIMER_FREQ 1200000000 /* Memory configuration */ #define CONFIG_SYS_MONITOR_LEN (512 * 1024) diff --git a/include/configs/malta.h b/include/configs/malta.h index c8b230ab21..717867d12a 100644 --- a/include/configs/malta.h +++ b/include/configs/malta.h @@ -18,8 +18,7 @@ /* * CPU Configuration */ -#define CONFIG_SYS_MHZ 250 /* arbitrary value */ -#define CONFIG_SYS_MIPS_TIMER_FREQ (CONFIG_SYS_MHZ * 1000000) +#define CONFIG_SYS_MIPS_TIMER_FREQ 250000000 /* * Memory map diff --git a/include/configs/tplink_wdr4300.h b/include/configs/tplink_wdr4300.h index f5466fd509..1400a211e3 100644 --- a/include/configs/tplink_wdr4300.h +++ b/include/configs/tplink_wdr4300.h @@ -6,8 +6,7 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define CONFIG_SYS_MHZ 280 -#define CONFIG_SYS_MIPS_TIMER_FREQ (CONFIG_SYS_MHZ * 1000000) +#define CONFIG_SYS_MIPS_TIMER_FREQ 280000000 #define CONFIG_SYS_SDRAM_BASE 0xa0000000 diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index f4ae48d265..5f4972ab95 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1024,7 +1024,6 @@ CONFIG_SYS_MEMORY_SIZE CONFIG_SYS_MEM_RESERVE_SECURE CONFIG_SYS_MEM_SIZE CONFIG_SYS_MFD -CONFIG_SYS_MHZ CONFIG_SYS_MIPS_TIMER_FREQ CONFIG_SYS_MMC_CD_PIN CONFIG_SYS_MMC_CLK_OD -- 2.37.0