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 E88D4C433EF for ; Mon, 20 Jun 2022 12:10:03 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 85FE983A07; Mon, 20 Jun 2022 14:08:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="IetvaKQV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9FCF682140; Mon, 20 Jun 2022 14:08:18 +0200 (CEST) Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (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 5CAA8820E8 for ; Mon, 20 Jun 2022 14:08:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf33.google.com with SMTP id o43so15555529qvo.4 for ; Mon, 20 Jun 2022 05:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=+hynAgWI6NuPdVOly6w79Lw81dUiymX7YODledIjogM=; b=IetvaKQVR+SwzpwHBT3zsfEojODwm/gZAwb8JxJFc8xtDwJP3Mcu3ru/BvaKtubzIM i8W9MFjHgHnuelCvwcCeo1JdkYbyTh068oVtdSzOnkEY08nUVeNspHUjTS50UdRI+UA3 HRtQ/0dTEL0HCJ2MGF5S4eUE1BLHjjpEobxrc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+hynAgWI6NuPdVOly6w79Lw81dUiymX7YODledIjogM=; b=dCDJ1nNh9HV4Yfm9knl5ty98nQcsSa0CF6ojN9I3sW4n+CPdUZ2xZf8aYZOiJK1xf0 C+FRR7iTbQk6vN3I8/9B9vuWpVVuBnsauHNPadXYwj+SlMTkZX9VXopHKFvjZwkxdgEg k5SyVKzOssQbx1i6X458pYxDWiK/Rd1N/S4NwXIdCDqVTWWISFx6KkSQnhmrYlQeCDcP 1QEfP6xmIIm64g7Ogbl5kIa2pCKb64JiqAigjnpceoHobWuCcYp5zUyg7hFqDSpdpDM4 FIBEB+GChX08DebPKcUiwLkwRQLS8olkEmX9I4M7+L7YP5ZlHuie2zm1lRl88QTfxljH hBPg== X-Gm-Message-State: AJIora9akhUlw1d3/iD1oJlCWk8bzNAK+fehEGx+vSwrOfnBQpiuKOTG wtmQu32vCildtmnlnOTx8qQMVxz8kzBq+w== X-Google-Smtp-Source: AGRyM1vQQPQjWy16gvOQgYRK4zRgyk1s42vY/SbYoRIQMoYIjlCKRUFQMlNhvdWgQ/lHx4xBrNSiLQ== X-Received: by 2002:a05:622a:491:b0:305:1efa:4447 with SMTP id p17-20020a05622a049100b003051efa4447mr18938789qtx.501.1655726890690; Mon, 20 Jun 2022 05:08:10 -0700 (PDT) Received: from bill-the-cat.lan (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id x9-20020a05620a448900b006a6a904c0a5sm11763312qkp.107.2022.06.20.05.08.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 05:08:10 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 13/17] socrates: Rework CONFIG_PCI_CLK_FREQ Date: Mon, 20 Jun 2022 08:07:54 -0400 Message-Id: <20220620120758.765049-13-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620120758.765049-1-trini@konsulko.com> References: <20220620120758.765049-1-trini@konsulko.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 The symbol CONFIG_PCI_CLK_FREQ is local to this board. Provide equal clarity in the code by referencing the numeric value directly and move the explanatory comment to the code, just prior to use. Signed-off-by: Tom Rini --- board/socrates/socrates.c | 3 ++- include/configs/socrates.h | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index 3430a1ed0178..27aad4eaae3a 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -59,7 +59,8 @@ int checkboard (void) f = get_board_sys_clk(); } else { src = "PCI_CLK"; - f = CONFIG_PCI_CLK_FREQ; + /* PCI is clocked by the external source at 33 MHz */ + f = 33000000; } printf ("PCI1: 32 bit, %d MHz (%s)\n", f/1000000, src); #else diff --git a/include/configs/socrates.h b/include/configs/socrates.h index 14f7bb9f7132..6a78cb1f2648 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -123,8 +123,6 @@ * Memory space is mapped 1-1. */ -/* PCI is clocked by the external source at 33 MHz */ -#define CONFIG_PCI_CLK_FREQ 33000000 #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE #define CONFIG_SYS_PCI1_MEM_SIZE 0x20000000 /* 512M */ -- 2.25.1