From patchwork Thu Dec 14 18:16:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1876345 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=c5Ap2Cjs; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SrgYT71T4z20H6 for ; Fri, 15 Dec 2023 05:17:17 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 35F4E87B65; Thu, 14 Dec 2023 19:17:08 +0100 (CET) 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="c5Ap2Cjs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E1C3A87B51; Thu, 14 Dec 2023 19:17:04 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) (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 A3BD387B51 for ; Thu, 14 Dec 2023 19:17:01 +0100 (CET) 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-yw1-x1135.google.com with SMTP id 00721157ae682-5e35e1dfb99so11079677b3.0 for ; Thu, 14 Dec 2023 10:17:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1702577820; x=1703182620; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lK4lLWbnXrEyVF8bp/1hWcm47Y/hj6qtwo1YCENOKNE=; b=c5Ap2CjsI6jel2IVfcQBz5WRvtOnfMX3AVDqqeVfBUe7GgI9vWHezDLn7nvYmiksNY CaSMlbt3pK6j4XVMXUhvqwVKeRf36be7lr5v8W2MciTk6Xjpuryh5IJiSf6oaVPlBNvI m0bz+IE6GBU7zXSQBEWiZZLrJPR2i4oQaLwGw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702577820; x=1703182620; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lK4lLWbnXrEyVF8bp/1hWcm47Y/hj6qtwo1YCENOKNE=; b=XBPDliqjEKEuCXh0LM7WsvaOcH/j4sg6mV9jJ2AoqwXmq9RhDgqEWiLJ2WZJcaM24b bsxQQknjYH0CZuk0LpfVEMJtZaUijWlOlv+IHYp/KUzDwlkEmDSYn1OHpfsKa3mfZO1t +8yqxMX5ElQByvASiqSd3XdxHU/eb5KoC8TNpNPOLhj1wdGBSKH7Ordl76aAFfDP5WZf ZFIuGQB/ZK5kA+YklFM/r2wI4rZpaaD00/8tFWPvszraP0p1tBEuzTtak1p/DbD7T1EV MCOStfbwSqLpbfMJOapj11XTWQ/v6i1Zr6SiWjQ53efDf6p7gDgYPR7ELjjJSz6htzB1 LfnA== X-Gm-Message-State: AOJu0YzsbkixtGeRJfeHq37UQgUItuMckRwxXB0wdDYBQmSyY5EwvbAv uVTEEk9+Rbbq3FY0GRq452P9ur51XAOKk4v20OA= X-Google-Smtp-Source: AGHT+IGXeXBTrATHSZITvVoPgWQ0Tnqmrb/ipAvM/hFZj9eb1THRUbsu6blaek1i8J7AhJ4ml7zC0A== X-Received: by 2002:a25:6942:0:b0:dbc:dce3:31db with SMTP id e63-20020a256942000000b00dbcdce331dbmr1917944ybc.7.1702577820249; Thu, 14 Dec 2023 10:17:00 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-ef43-b142-0a3d-20b7.res6.spectrum.com. [2603:6081:7b00:6400:ef43:b142:a3d:20b7]) by smtp.gmail.com with ESMTPSA id s129-20020a0dd087000000b005d361dd6454sm5665698ywd.87.2023.12.14.10.16.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 10:16:59 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [v2 02/16] arc: Cleanup and audit usage of Date: Thu, 14 Dec 2023 13:16:44 -0500 Message-Id: <20231214181658.3359902-2-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214181658.3359902-1-trini@konsulko.com> References: <20231214181658.3359902-1-trini@konsulko.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean We need to include directly when a file needs to have something such as CFG_SYS_SDRAM_SIZE referenced as this file is not automatically globally included and is most commonly indirectly included via common.h. Remove most cases of arc including config.h directly, but add it where needed. Further clean up the tb100 board config.h file so that we don't rely on config.h being included there for a value used in a single place. Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- arch/arc/include/asm/arc-bcr.h | 2 -- arch/arc/include/asm/arcregs.h | 1 - arch/arc/include/asm/cache.h | 2 -- arch/arc/lib/cpu.c | 1 + board/abilis/tb100/tb100.c | 4 ++++ include/configs/tb100.h | 21 --------------------- 6 files changed, 5 insertions(+), 26 deletions(-) diff --git a/arch/arc/include/asm/arc-bcr.h b/arch/arc/include/asm/arc-bcr.h index 823906d946e4..a6c972bf1e31 100644 --- a/arch/arc/include/asm/arc-bcr.h +++ b/arch/arc/include/asm/arc-bcr.h @@ -13,8 +13,6 @@ #define __ARC_BCR_H #ifndef __ASSEMBLY__ -#include - union bcr_di_cache { struct { #ifdef CONFIG_CPU_BIG_ENDIAN diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h index a9f54f61e0cc..273fb8eed859 100644 --- a/arch/arc/include/asm/arcregs.h +++ b/arch/arc/include/asm/arcregs.h @@ -7,7 +7,6 @@ #define _ASM_ARC_ARCREGS_H #include -#include /* * ARC architecture has additional address space - auxiliary registers. diff --git a/arch/arc/include/asm/cache.h b/arch/arc/include/asm/cache.h index 74cff716ef60..65dff4214830 100644 --- a/arch/arc/include/asm/cache.h +++ b/arch/arc/include/asm/cache.h @@ -6,8 +6,6 @@ #ifndef __ASM_ARC_CACHE_H #define __ASM_ARC_CACHE_H -#include - /* * As of today we may handle any L1 cache line length right in software. * For that essentially cache line length is a variable not constant. diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c index 803dfd425580..593950449f2e 100644 --- a/arch/arc/lib/cpu.c +++ b/arch/arc/lib/cpu.c @@ -3,6 +3,7 @@ * Copyright (C) 2013-2014, 2018 Synopsys, Inc. All rights reserved. */ +#include #include #include #include diff --git a/board/abilis/tb100/tb100.c b/board/abilis/tb100/tb100.c index 3dc9e14ef8c0..eb7d12908134 100644 --- a/board/abilis/tb100/tb100.c +++ b/board/abilis/tb100/tb100.c @@ -14,6 +14,10 @@ void reset_cpu(void) writel(0x1, (void *)CRM_SWRESET); } +/* + * Ethernet configuration + */ +#define ETH0_BASE_ADDRESS 0xFE100000 int board_eth_init(struct bd_info *bis) { if (designware_initialize(ETH0_BASE_ADDRESS, 0) >= 0) diff --git a/include/configs/tb100.h b/include/configs/tb100.h index 1318f5e5ee44..08b6f3219c33 100644 --- a/include/configs/tb100.h +++ b/include/configs/tb100.h @@ -21,25 +21,4 @@ */ #define CFG_SYS_NS16550_CLK 166666666 -/* - * Even though the board houses Realtek RTL8211E PHY - * corresponding PHY driver (drivers/net/phy/realtek.c) behaves unexpectedly. - * In particular "parse_status" reports link is down. - * - * Until Realtek PHY driver is fixed fall back to generic PHY driver - * which implements all required functionality and behaves much more stable. - * - * - */ - -/* - * Ethernet configuration - */ -#define ETH0_BASE_ADDRESS 0xFE100000 -#define ETH1_BASE_ADDRESS 0xFE110000 - -/* - * Console configuration - */ - #endif /* _CONFIG_TB100_H_ */