Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1691941lqp; Sat, 23 Mar 2024 05:13:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXGocA1LsXcZal0JEEbf5vMmSCUNe4vmQ+izKkvIBz9lyv5kSvxiPi1AjPr8vqi5I2FjHcnY9rjbxHFA/MF+53CjiVcpfsPN+1AmrUkNA== X-Google-Smtp-Source: AGHT+IE2v504OMZfHVNzzd3R98QycBIKrBM12Lv5MQ1Lq20UxK/Jngyu1qaUfv5rVmpo2NHcUNFI X-Received: by 2002:a50:ab49:0:b0:56b:986b:b4e7 with SMTP id t9-20020a50ab49000000b0056b986bb4e7mr1728045edc.27.1711196013525; Sat, 23 Mar 2024 05:13:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711196013; cv=pass; d=google.com; s=arc-20160816; b=tV7d25+o6OIN3axr3b+tZUJYiCfhydEIfW12kgUw0Z6C0pX1CTjwHMdWdLrlg+Y2B4 NqLJ7dnPZ0509g9TR5++AlRC29JWmc2rCu5HUzmUBgrstcjgnIxmcTytQzhOBxmAl7Ue cIPSbN9dEvoNE+G5ainUt5wHLXeeX8k5wqg9zig2F/gpxz2ZcbHHLr/oDp/1SG6xDoRu P0nKaOMcytyNux+nRRRSz8OcTQoCmwU+9HIZ7HCpQT9HbxGIYaESRPNx1bz3xtY+vzBp C/9yYr6EzpFmzEC/b6pa3a6am5zsnqS16d8xqfi7vhPLNTc8Uh9FYmHwyPFeJIpyD5Hs 2J0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:date :subject:cc:to:from:message-id:dkim-signature; bh=5MpYpfT0eNaGtEdlbvizvrZCBY0mWQjBXe0Ac37Um0A=; fh=oSdostKlGxHKBKHgFLC1MqYz5dhItCU+5XOUhEJ44TQ=; b=XjYVz5rQradnaeNfrW9Hp0bPgybFT9x8m5tCASXDJnwskFpdGVMoV7O+E62zj7CacQ MVjTSZQlctQilEL1gFvWKQbyy7koW0agZQMMSChYbIGrSPWxsKfu+yTDEVbhvxwtzN7w D/+8T3X46WCGW+hz/GGwPZehE5h9RivR3UdLei9sgxHgZXT09NnQshbeIDkIskbcCvnD 4MSWnlD6ytfSI3TcFW2TTcpR2LrPIPKut5sAO3qi3SleYQ/dudh0aVMZsvSMP5A6h6to 6suwhhwOTX4b7Px/GCCm2Pc7iBTZx6G/3+iovdJC6n3ro2wvpu7h7h1VnhWwaMT2q3J0 3tdg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=ekilKsN1; arc=pass (i=1 dkim=pass dkdomain=qq.com); spf=pass (google.com: domain of linux-kernel+bounces-112325-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112325-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q18-20020a056402519200b0056baa28de6csi807069edd.38.2024.03.23.05.13.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 05:13:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112325-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=ekilKsN1; arc=pass (i=1 dkim=pass dkdomain=qq.com); spf=pass (google.com: domain of linux-kernel+bounces-112325-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112325-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0E8F71F2218F for ; Sat, 23 Mar 2024 12:13:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A52C43A1DD; Sat, 23 Mar 2024 12:13:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b="ekilKsN1" Received: from out203-205-251-66.mail.qq.com (out203-205-251-66.mail.qq.com [203.205.251.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D049C1759D; Sat, 23 Mar 2024 12:12:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.205.251.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711195982; cv=none; b=ZG6bgjAKXDHctplL4kttgfkoEFUBhk4PaI2KmSyAvFxrVT+KDFImqPRCBkloY4YDOROuiNxK4Ol0vuhiVISSTVxr5t9ebDsjq9YD318a0c92GMUeEz7rnAJgMGvn+883A5U2FAu5ENL6iJqKpmQDxNTCY7lTAABCfBe7E+n5MH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711195982; c=relaxed/simple; bh=zLRe0rs7rrOcg1pnUIlyS0xL50RZTV31X8+yyh8qXE0=; h=Message-ID:From:To:Cc:Subject:Date:In-Reply-To:References: MIME-Version; b=NgGsIB8cfrfM0SsLSaHvdbBPRiOQFYfB+ZdPwD9Cn25QlnbUyI0zfrbpvvlxfu9urBLD8Qct+RS0T0YzbmL/TZ2g9yVV48cdcqq5VFgvbN9ITHr/lrrymtuFBiYCB1negovfObrjM77exvB9NWY8qZrtjF79WCZ8kqDhXUQ4YcE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cyyself.name; spf=none smtp.mailfrom=cyyself.name; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b=ekilKsN1; arc=none smtp.client-ip=203.205.251.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cyyself.name Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=cyyself.name DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195972; bh=5MpYpfT0eNaGtEdlbvizvrZCBY0mWQjBXe0Ac37Um0A=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ekilKsN1Kmwni40C5x3g5mWmfqzTx2z/QyJ8cCGowm4lj+5cXXD6I8iyJsBdGC/XH UMYlWZSgDvaTSfSJm6rmbJ95PV1l1sOnSNfFbaiack0hixbM9qwc3lWat3F7fAoN30 RBUFbxZUoRWj9G+dOp/6kDGL1f/EVTUhUP4842WY= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195969tpfdvk5ux Message-ID: X-QQ-XMAILINFO: MyIXMys/8kCtun29cR78Yys0AwmqeM/v0G+9hjwKHKZ+XZCcWoA7laQgQFc7Hy BA1slHKuzjwLNC3wTl3ktEYZYOb3H762Ci8JDR63DKdGBqKcH0IbYfGT4ihZdl4ETu2UdqFpEjYR wS++nVOK/7CRT2O8Y89nQ3MiPCUjp0ZU9Eqa4MERanDXWCFAyhzMZ820RMD5eWio5w9baVeJMRwS yUN3ItLKXkeWXpdANmBoTySpZTVPAaUuAnekb9P2HQLKLzcjIJ68n6RBVnIJcsawmwPzGsBl7FIh 3SC1nhsacLPq+UUAquvjTJUzX+JhHDde5h0VmFFf9CrdgiNt+XpoiFkx1JOFy7HQigl1VSwl/JXE DpHsQx9oCddbAqLoEsUme5d1nMMwwj1oRkApwQBuKB/4INOlANAyjK1KU/iKllTUaGSG1rqxqRjf azpgMzWS9eGckijsNwMwPfmA8C1vSjSld7muix5V20ww/ptnBGqt0jAfmBaZv6ACTqMNOk8r79L4 KkP73aqCSNKsvDXV4VEtbEUYnyHciHRhFgYJzqdgDvcaGPNYwVX5esaAlLG/9MPYEMdvEktCYCWj lL48cmSqcYGicA24LHSSV5Q+YWfPOxNiOYGWdtfVzMB9kUskeJgPg5ZJuklcmMcvuKvhgfZ1KzNr WnhDu5SRUMrqw5MWQhkFba02RHDI4G9u3u41XxBwLyHvARJos/WLU2x6lPwVWNFe1ee4q9RfngJr p/nbZkCaIV/p3NAHS8qO5b8IM+zFqrQ7+p59pMNmAquUPc8RIiEYq2UZTop5F58cX7X/ZQH25ZSw hmHjFxk9tFIuEOyvMxpDFdIGgLHk1XTK8i9Gslqmi10LsIIj+S8p1H338lFOpXPK+Pk7aG3SqOMx HxYaHbjWTcWmJ78iUlsShJ/QHYKbBnLP7GkwJxdpFCQcJOGsf+YepPP39DbmWsLYf3SARzRQbL8Q z27u7NB6ipGnDYK7xqb2rVDjRLUQ6KCJyO8peSaiuBzodVpzORnPkFMnLWu9LZDfnRmkbB9PcWWe 5Z4VvfjgMM6vxv2YcpJw8gAY1XuC8pF1lBRL2nIA== X-QQ-XMRINFO: Nq+8W0+stu50PRdwbJxPCL0= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen Subject: [PATCH v6 05/11] riscv: Kconfig.socs: Split ARCH_CANAAN and SOC_CANAAN_K210 Date: Sat, 23 Mar 2024 20:12:17 +0800 X-OQ-MSGID: <20240323121223.1729328-5-cyy@cyyself.name> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Since SOC_FOO should be deprecated from patch [1], and cleanup for other SoCs is already on the mailing list [2,3,4], we remove the use of SOC_CANAAN and use ARCH_CANAAN for SoCs vendored by Canaan instead from now on. And allows ARCH_CANAAN to be selected for other Canaan SoCs. Then, since we have Canaan Kendryte K230 with MMU now, the use of SOC_CANAAN is no longer only referred to K210. Thus, we introduce a new symbol SOC_CANAAN_K210 for any conditional code or driver selection specific to the K210, so users will not try to build some K210-specific things when MMU is enabled and see it fails to boot on K210. [1] https://lore.kernel.org/linux-riscv/20221121221414.109965-1-conor@kernel.org/ [2] https://lore.kernel.org/linux-riscv/20240305-praying-clad-c4fbcaa7ed0a@spud/ [3] https://lore.kernel.org/linux-riscv/20240305-fled-undrilled-41dc0c46bb29@spud/ [4] https://lore.kernel.org/linux-riscv/20240305-stress-earflap-d7ddb8655a4d@spud/ Signed-off-by: Yangyu Chen --- arch/riscv/Kconfig.socs | 8 +++++--- arch/riscv/Makefile | 2 +- arch/riscv/configs/nommu_k210_defconfig | 3 ++- arch/riscv/configs/nommu_k210_sdcard_defconfig | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs index 623de5f8a208..5710aee456ac 100644 --- a/arch/riscv/Kconfig.socs +++ b/arch/riscv/Kconfig.socs @@ -72,11 +72,13 @@ config SOC_VIRT This enables support for QEMU Virt Machine. config ARCH_CANAAN - def_bool SOC_CANAAN + bool "Canaan Kendryte SoC" + help + This enables support for Canaan Kendryte SoC platform hardware. -config SOC_CANAAN +config SOC_CANAAN_K210 bool "Canaan Kendryte K210 SoC" - depends on !MMU + depends on !MMU && ARCH_CANAAN select CLINT_TIMER if RISCV_M_MODE select ARCH_HAS_RESET_CONTROLLER select PINCTRL diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 0b7d109258e7..294b2b3e8e6a 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -149,7 +149,7 @@ vdso-install-y += arch/riscv/kernel/vdso/vdso.so.dbg vdso-install-$(CONFIG_COMPAT) += arch/riscv/kernel/compat_vdso/compat_vdso.so.dbg:../compat_vdso/compat_vdso.so ifneq ($(CONFIG_XIP_KERNEL),y) -ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_ARCH_CANAAN),yy) +ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN_K210),yy) KBUILD_IMAGE := $(boot)/loader.bin else ifeq ($(CONFIG_EFI_ZBOOT),) diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig index 7e75200543f4..2552e78074a3 100644 --- a/arch/riscv/configs/nommu_k210_defconfig +++ b/arch/riscv/configs/nommu_k210_defconfig @@ -27,7 +27,8 @@ CONFIG_EXPERT=y CONFIG_SLUB=y CONFIG_SLUB_TINY=y # CONFIG_MMU is not set -CONFIG_SOC_CANAAN=y +CONFIG_ARCH_CANAAN=y +CONFIG_SOC_CANAAN_K210=y CONFIG_NONPORTABLE=y CONFIG_SMP=y CONFIG_NR_CPUS=2 diff --git a/arch/riscv/configs/nommu_k210_sdcard_defconfig b/arch/riscv/configs/nommu_k210_sdcard_defconfig index 0ba353e9ca71..8f67fb830585 100644 --- a/arch/riscv/configs/nommu_k210_sdcard_defconfig +++ b/arch/riscv/configs/nommu_k210_sdcard_defconfig @@ -19,7 +19,8 @@ CONFIG_EXPERT=y CONFIG_SLUB=y CONFIG_SLUB_TINY=y # CONFIG_MMU is not set -CONFIG_SOC_CANAAN=y +CONFIG_ARCH_CANAAN=y +CONFIG_SOC_CANAAN_K210=y CONFIG_NONPORTABLE=y CONFIG_SMP=y CONFIG_NR_CPUS=2 -- 2.43.0