From patchwork Wed Mar 27 10:11:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_M=C3=BCllner?= X-Patchwork-Id: 1916666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ha5rEnMI; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=vrull.eu header.i=@vrull.eu header.a=rsa-sha256 header.s=google header.b=joaSZJhK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (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 4V4Msh6Rxwz1yXq for ; Wed, 27 Mar 2024 21:12:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ck17OMUPD/BQUEgIuy2DN7DnYZ4lS9NEKfCsnvhPqx0=; b=ha5rEnMI19Lmjl HHv4nab6bW+04bpsy7JX/YpJAOYRXj5ZfZLPQ6xFn4XDcKie388F6l0uaBJ78oC6vnRwtQFNliHxD mz6HgN1UpqyWymAwOusQrdBrXWFa+GPRjJ242WUqFDY7e0LNEu6QugPyLtNnpPSt6ZqE7e2cOsgC+ 7Us9mUL1+IctnEbFDdK8QjZ/jEWDiSXu8FG14b4FMpvfjZ9lAJE7MWwPEx73G8PVMyf5PNk6nPhhD lwXO4QmnVjG9+wWab9xi1p7jIAtbwtUlM4vMPxF7r5pg02oFJFgSs+LMfv+lEw3FATDV/X0zixBDr 1fVANXekP9NiJkXhKoIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpQGG-00000008MHY-2iUA; Wed, 27 Mar 2024 10:12:00 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpQG9-00000008MAp-24M7 for opensbi@lists.infradead.org; Wed, 27 Mar 2024 10:11:55 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-512bde3d197so4712235e87.0 for ; Wed, 27 Mar 2024 03:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1711534310; x=1712139110; darn=lists.infradead.org; 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=5UGfDYnwWheyskp5xuVjFpUhRNw+bSHKh1HOHUEWBPM=; b=joaSZJhKPwmfqZel0WlMAQbH1vM194HldMFH2dix7wpGyX760Lb+oIGVZi4I9QPs6A LHtEte+IC6Fh2XAU1XsUNoDf+xiWTZWq5vM/dDYnFCfjCS9ffiCJSQ3PP+INYhxSWw0d gSQt2jJv78/8PScnF5VeWPue3/9wL2Tv4zGzw/hnV76DhHwKc84KqGgaiI54JzdUkXYV DBvyHy/Wu0GmRFSnLVD0Vzs0/deQmDd60kJB+YeINC0rnW6i6Rf4DAc90fCVIdCV+YOE YrpAcpW0Prcy5whKDikyD2AsdBTDcpY2RXYWos5p6o6Ps2SPTcjNbaw0DY5fWPIzdtKs r87w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711534310; x=1712139110; 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=5UGfDYnwWheyskp5xuVjFpUhRNw+bSHKh1HOHUEWBPM=; b=Dkow0jCXcsLonn8preVtTTeKz7cfMlk88dBdKEUYr1ChlTbZ+wo6EanIFsASazgLAb 3dLl8QKGmEOyX+bN+QZk/zVunPt6JHgQZunjFxPYXYdQFB4GX+dBpqlAYe2mEkC/DtXC RMd+I1mUJJUHj9r238KVjUHtBHfSYR5SYJlR/g/mgWkKLOH6/Dnb9BErzkE7E7ynapBP MkXR6VmIjiqSI4KEdnKmxwy7FkrYrf09lpdj0B4YjMDVPHqcagmciiSQGIcUzaOfi8IL ffmxqjhT6RLFzExCYoNldnFRHGviXxTiw3yo20Nqc7XxLsWjIycv7V1eXFFNE64BaMyU RB/Q== X-Gm-Message-State: AOJu0YyRTWcYWtvm2MZc9FVzpqcIuUxOGEZ7QSn7jbTSPzFjoinoUHVI JcakqYjeGsAUnFoUaFBH4fP7yQOJ7fl24j6Wbfthw1aVde3TdMPquiKNJl7mPJY+UkHwF4y6T1/ SA6Q= X-Google-Smtp-Source: AGHT+IFx0wspulT2KOGK8hrz34H2RCepZFL/nrZzZsOFbaAQ1haWZivDnKmgVai4emOMbzcvlU1+hA== X-Received: by 2002:a19:7706:0:b0:513:df6:dcd3 with SMTP id s6-20020a197706000000b005130df6dcd3mr605665lfc.48.1711534309896; Wed, 27 Mar 2024 03:11:49 -0700 (PDT) Received: from antares.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id dh16-20020a0564021d3000b0056c1c4b870asm2451653edb.16.2024.03.27.03.11.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 03:11:49 -0700 (PDT) From: =?utf-8?q?Christoph_M=C3=BCllner?= To: opensbi@lists.infradead.org, Philipp Tomsich , Cooper Qu , Zhiwei Liu , Huang Tao , Alistair Francis Cc: =?utf-8?q?Christoph_M=C3=BCllner?= Subject: [PATCH 6/9] platform: thead: Rename thead-generic to thead-th1520 Date: Wed, 27 Mar 2024 11:11:34 +0100 Message-ID: <20240327101137.3644359-7-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240327101137.3644359-1-christoph.muellner@vrull.eu> References: <20240327101137.3644359-1-christoph.muellner@vrull.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240327_031153_684542_A6AEE12C X-CRM114-Status: GOOD ( 12.31 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The name generic is misleading since the compatible string list only has a single entry for the TH1520 ('thead,th1520'). Further, thead-generic is irrelevant for other platforms that include a T-Head [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:135 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The name generic is misleading since the compatible string list only has a single entry for the TH1520 ('thead,th1520'). Further, thead-generic is irrelevant for other platforms that include a T-Head CPU (e.g. the Allwinner D1). Therefore, let's rename thead-generic to thead-th1520. Signed-off-by: Christoph Müllner --- platform/generic/Kconfig | 4 ++-- platform/generic/configs/defconfig | 2 +- platform/generic/thead/objects.mk | 4 ++-- .../thead/{thead-generic.c => thead-th1520.c} | 20 +++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) rename platform/generic/thead/{thead-generic.c => thead-th1520.c} (61%) diff --git a/platform/generic/Kconfig b/platform/generic/Kconfig index 82024a5..6d85e51 100644 --- a/platform/generic/Kconfig +++ b/platform/generic/Kconfig @@ -63,8 +63,8 @@ config PLATFORM_STARFIVE_JH7110 bool "StarFive JH7110 support" default n -config PLATFORM_THEAD - bool "THEAD C9xx support" +config PLATFORM_THEAD_TH1520 + bool "T-HEAD TH1520 support" select THEAD_C9XX_CSR select THEAD_C9XX_ERRATA select THEAD_C9XX_PMU diff --git a/platform/generic/configs/defconfig b/platform/generic/configs/defconfig index 1ce6a12..52ec0f6 100644 --- a/platform/generic/configs/defconfig +++ b/platform/generic/configs/defconfig @@ -5,7 +5,7 @@ CONFIG_PLATFORM_SIFIVE_FU540=y CONFIG_PLATFORM_SIFIVE_FU740=y CONFIG_PLATFORM_SOPHGO_SG2042=y CONFIG_PLATFORM_STARFIVE_JH7110=y -CONFIG_PLATFORM_THEAD=y +CONFIG_PLATFORM_THEAD_TH1520=y CONFIG_FDT_GPIO=y CONFIG_FDT_GPIO_DESIGNWARE=y CONFIG_FDT_GPIO_SIFIVE=y diff --git a/platform/generic/thead/objects.mk b/platform/generic/thead/objects.mk index 5606d36..42f1f53 100644 --- a/platform/generic/thead/objects.mk +++ b/platform/generic/thead/objects.mk @@ -12,5 +12,5 @@ platform-objs-$(CONFIG_THEAD_C9XX_PMU) += thead/thead_c9xx_pmu.o platform-objs-$(CONFIG_THEAD_C9XX_ERRATA) += thead/thead_c9xx_tlb_trap_handler.o platform-objs-$(CONFIG_THEAD_C9XX_ERRATA) += thead/thead_c9xx_errata_tlb_flush.o -carray-platform_override_modules-$(CONFIG_PLATFORM_THEAD) += thead_generic -platform-objs-$(CONFIG_PLATFORM_THEAD) += thead/thead-generic.o +carray-platform_override_modules-$(CONFIG_PLATFORM_THEAD_TH1520) += thead_th1520 +platform-objs-$(CONFIG_PLATFORM_THEAD_TH1520) += thead/thead-th1520.o diff --git a/platform/generic/thead/thead-generic.c b/platform/generic/thead/thead-th1520.c similarity index 61% rename from platform/generic/thead/thead-generic.c rename to platform/generic/thead/thead-th1520.c index 5771642..86c265f 100644 --- a/platform/generic/thead/thead-generic.c +++ b/platform/generic/thead/thead-th1520.c @@ -16,14 +16,14 @@ #include #include -struct thead_generic_quirks { +struct thead_th1520_quirks { u64 errata; }; -static int thead_generic_early_init(bool cold_boot, +static int thead_th1520_early_init(bool cold_boot, const struct fdt_match *match) { - struct thead_generic_quirks *quirks = (void *)match->data; + struct thead_th1520_quirks *quirks = (void *)match->data; if (quirks->errata & THEAD_QUIRK_ERRATA_TLB_FLUSH) thead_register_tlb_flush_trap_handler(); @@ -31,25 +31,25 @@ static int thead_generic_early_init(bool cold_boot, return 0; } -static int thead_generic_extensions_init(const struct fdt_match *match, +static int thead_th1520_extensions_init(const struct fdt_match *match, struct sbi_hart_features *hfeatures) { thead_c9xx_register_pmu_device(); return 0; } -static struct thead_generic_quirks thead_th1520_quirks = { +static struct thead_th1520_quirks thead_th1520_quirks = { .errata = THEAD_QUIRK_ERRATA_TLB_FLUSH, }; -static const struct fdt_match thead_generic_match[] = { +static const struct fdt_match thead_th1520_match[] = { { .compatible = "thead,th1520", .data = &thead_th1520_quirks }, { }, }; -const struct platform_override thead_generic = { - .match_table = thead_generic_match, - .early_init = thead_generic_early_init, - .extensions_init = thead_generic_extensions_init, +const struct platform_override thead_th1520 = { + .match_table = thead_th1520_match, + .early_init = thead_th1520_early_init, + .extensions_init = thead_th1520_extensions_init, .read_csr = thead_c9xx_read_csr, };