From patchwork Thu Oct 13 02:29:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Chien Peter Lin X-Patchwork-Id: 1689346 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) 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=FNWDOLLW; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Mntmn5k17z23jn for ; Thu, 13 Oct 2022 13:31:05 +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=UfGLDEVcxeeMIeyFiaDrmDwO3vC23HNt3rX9PIg2bm4=; b=FNWDOLLW8h6vSw csk98dc7UVG8/hzK2BX5du3wa6em6h9fTDj5dN78peq7JXBnh/uUCPD7ZtsT+i7hYjLO1u5P/tWb6 gN4pt4jVDXnod0F8CThRHc0cFE+g0Gp4UmjeOmbGSqyW2tigW9QCWoHeE6chLyqGSUqzf5G4EHcK2 cMGOeWw6bNC4x04ApEB+2vueZWf27YrKasBPwuQvaUirJkdHODMP+tAgGNLgXtYf/x3J2GBT/9F0q BdFCryg1+Tn14E9xgBViRdCi5g/PrI5yfqpgRgrKmZhD8bEbtX65HKZ/c+Hp9FA9qz9qKfvUCFP0q SxaEsRB5SZu4LWd9cl5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oinzo-00ALLW-CD; Thu, 13 Oct 2022 02:30:52 +0000 Received: from 60-248-80-70.hinet-ip.hinet.net ([60.248.80.70] helo=Atcsqr.andestech.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oinzj-00ALHy-10 for opensbi@lists.infradead.org; Thu, 13 Oct 2022 02:30:50 +0000 Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by Atcsqr.andestech.com with ESMTP id 29D2UW5G043718; Thu, 13 Oct 2022 10:30:32 +0800 (+08) (envelope-from peterlin@andestech.com) Received: from atcfdc88.andestech.com (10.0.15.120) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Thu, 13 Oct 2022 10:30:28 +0800 From: Yu Chien Peter Lin To: CC: , , , Yu Chien Peter Lin , Anup Patel Subject: [PATCH v3 05/13] platform: andes/ae350: Use kconfig to set platform version and default name Date: Thu, 13 Oct 2022 10:29:43 +0800 Message-ID: <20221013022951.5206-6-peterlin@andestech.com> X-Mailer: git-send-email 2.38.GIT In-Reply-To: <20221013022951.5206-1-peterlin@andestech.com> References: <20221013022951.5206-1-peterlin@andestech.com> MIME-Version: 1.0 X-Originating-IP: [10.0.15.120] X-DNSRBL: X-MAIL: Atcsqr.andestech.com 29D2UW5G043718 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221012_193047_380074_A8ECC31E X-CRM114-Status: UNSURE ( 7.67 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.4 (/) 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: This patch makes andes platform name and version can be set in menuconfig interface. Signed-off-by: Yu Chien Peter Lin Reviewed-by: Leo Yu-Chi Liang Reviewed-by: Anup Patel --- Changes v2 -> v3 - No change since v2 [...] Content analysis details: (0.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 TVD_RCVD_IP Message was received from an IP address -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 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 This patch makes andes platform name and version can be set in menuconfig interface. Signed-off-by: Yu Chien Peter Lin Reviewed-by: Leo Yu-Chi Liang Reviewed-by: Anup Patel --- Changes v2 -> v3 - No change since v2 --- platform/andes/ae350/Kconfig | 18 ++++++++++++++++++ platform/andes/ae350/platform.c | 6 ++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/platform/andes/ae350/Kconfig b/platform/andes/ae350/Kconfig index d57f19f..3abad04 100644 --- a/platform/andes/ae350/Kconfig +++ b/platform/andes/ae350/Kconfig @@ -6,3 +6,21 @@ config PLATFORM_ANDES_AE350 select IRQCHIP_PLIC select SERIAL_UART8250 default y + +if PLATFORM_ANDES_AE350 + +config PLATFORM_ANDES_AE350_NAME + string "Platform default name" + default "Andes AE350" + +config PLATFORM_ANDES_AE350_MAJOR_VER + int "Platform major version" + range 0 65535 + default 0 + +config PLATFORM_ANDES_AE350_MINOR_VER + int "Platform minor version" + range 0 65535 + default 1 + +endif diff --git a/platform/andes/ae350/platform.c b/platform/andes/ae350/platform.c index 33f9c4c..c07f6be 100644 --- a/platform/andes/ae350/platform.c +++ b/platform/andes/ae350/platform.c @@ -168,8 +168,10 @@ const struct sbi_platform_operations platform_ops = { const struct sbi_platform platform = { .opensbi_version = OPENSBI_VERSION, - .platform_version = SBI_PLATFORM_VERSION(0x0, 0x01), - .name = "Andes AE350", + .platform_version = + SBI_PLATFORM_VERSION(CONFIG_PLATFORM_ANDES_AE350_MAJOR_VER, + CONFIG_PLATFORM_ANDES_AE350_MINOR_VER), + .name = CONFIG_PLATFORM_ANDES_AE350_NAME, .features = SBI_PLATFORM_DEFAULT_FEATURES, .hart_count = AE350_HART_COUNT, .hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,