Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp746762lqs; Tue, 5 Mar 2024 15:39:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVWUlc0aUo2d0o+79A4SlxOT/6cAsDHXztJnbIDxJVZdxEnYmMrbcl72Ik4Tz4lMP2ySxvp88aoDYHuGSk5yhUEbH2aIyEsuzffCbb9hw== X-Google-Smtp-Source: AGHT+IGXu4PEmwgzsYSIWV9mWIo/74hFSETnbP2bPGeHQmtWSrj5FGv3RTEwyZNF/davYtFsSOjr X-Received: by 2002:a17:906:46ca:b0:a45:67e9:7607 with SMTP id k10-20020a17090646ca00b00a4567e97607mr3998726ejs.24.1709681955278; Tue, 05 Mar 2024 15:39:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709681955; cv=pass; d=google.com; s=arc-20160816; b=gPQ0IWlcw/FSKuoEHKy5vXsTmB+lIKcvjc4+lDyYMqIL1yNQn4m8AYuGJxV0ByAk0S 0o7qLIPl5Kpg29frSzulYKJdGNyAX00Urc9w7mnNo+i6kEgiERix3HqW89EZT8gmwqOm F7vBSOK7o9K6b10S7sBppeps6P0OKo7mx1tenqhU9QRYI/6M5D+yn2ncr4tUv6m0WHqs Is4yJe5V4dnSezZq2haLN7U0RvEtJtBlgyCHQJVZl6lM2Oe4BNmeTiQ6Mrrds7GXCWu9 o1e+cPI9RTAF9Iflzubf5+unz+lPZFb74QAtoD8A6watLE2NsKxKzsVrMeAyKr9duGjZ NLMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=MtmnZzmR3jtRTDrMRPoCZD7bvD+TPuHtd4AaT3oqxBc=; fh=SwUfvx/eWIvPomTY53+NK8AI6uZHNfhEq71EWaGph0o=; b=vUM+yfFVVnFK53dqDtbu7w9BIa+suj18WeGh7KPYMZULyVuw3t3chZrbKGKVVhkFRl uisp4BLWMHap5Qje6wVo4uO3MYwRPFtLDxuuwUr5yexA3I8xRZOgBHci97Hi9uyfwNAZ PwZnkIezM1nZ5mgsT3G0/yjzXHbXt/llHJv2yvadBnkXhcjeFTrKJvsenWnB1/SIJnNR qd4qD68GIAgX5VC218u/hw1Q6Oa9VIUNRb//vaZY4Dsn/pAJoahZ9/sou0UozryoQTyr Hlryt1LLB38IN+qYJHJ4f99All7wwDadUAVKVcLUKRQm9DsZeLsc8oMaYJVW8zZ0UnQX 2Y3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OH9VvmT6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-93115-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93115-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id hr20-20020a1709073f9400b00a4448562aa9si5367015ejc.712.2024.03.05.15.39.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 15:39:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93115-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OH9VvmT6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-93115-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93115-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 D437F1F22529 for ; Tue, 5 Mar 2024 23:39:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4CC412DD96; Tue, 5 Mar 2024 23:39:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OH9VvmT6" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D5E7679953; Tue, 5 Mar 2024 23:39:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709681945; cv=none; b=Qf6AncSdkXSObOaODSafjcKj0UideGUZu/JVAYxAQBIKmw1nwbHnzI4nLMXJ8f+2LPgiqhQspkXDxHJnfAXujlhr3wzBtfIflZvDmWn2GYFEtJEZ2LzR6SLiEpHRmSpCvrxmq3sBvynowv2srZPeKtP/xOXt8FOTi1PqigmsP/Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709681945; c=relaxed/simple; bh=eF6fEU4NsP+4MAw9M3fSpU7V560O2SKhvnGSecXMnuU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=nfOTV/tHNnGUg7ToevDdwZUvh7iMxeDzgM+rzAdzN/S1oZZQB1MjjArnYoIr2eVQOJjO4rQdvEd1YNIs4+t90HD2iF5g4IZ+txvwE9xW3GOgBzBZjjP2ygtgoq2FP+nLSsHjHZR2B2xx1KclOYWLrRk2y+FR2hvukSR5Wa5w8x0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OH9VvmT6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62632C43390; Tue, 5 Mar 2024 23:39:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709681945; bh=eF6fEU4NsP+4MAw9M3fSpU7V560O2SKhvnGSecXMnuU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=OH9VvmT66ki9cMYzzhwzkUmwlR3zTOBZDex5hAZj7d6jfQEeGMQ+2ez9DMY7DZcIl oNQS/InP7o2qHDblRo9602FBLdFTZ8J26VuP0Bz7AD7+s3xwS3//CCzhbxi0TnRs4i nHHAeMkhISa+2GtgY0lkTAsvJseEDZ4GZIipXP2Lq7NeUMdLLRBnegXeNyUQOdh9D1 0PwU3Gdxx38Ti9AiFgV/i9DFTYXJuVuIMPK4TkP8y0INqKREaL+RWhG947UWSbOs4m 9qnxlRtDYuw7hfi6hlUG3Ot4UyOytXPJwm5h5f0/W1Cqwwbkcifd013frP4Zt1SnQi 7Y9IuPHi1Wv4g== Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-566e869f631so423851a12.0; Tue, 05 Mar 2024 15:39:05 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXbPqfZWYSGZeNcuRP0m71gYWE5oGZFrJL4A5A5RNrBDr5g1Zht88a2fl0P2dM60rWGEt83Xe57gabtcwtWRnC3sRbbXy7ow3Jb6r3ufbiunaQuJKxmvrqW8FGxvFGx3WlwD+sumh6ufQ== X-Gm-Message-State: AOJu0YwnmLp9vwqBWx1p+Z04BEOfACyz94yQgakGHmhmjS1r7G5yFh9q q/fi4+GyxNkIqXWwWEwhIvsc6MM5//jjSnF2XKVNvIk9Vf0KAL9v+NHHq+EELHyvJPOF3LfUZ96 4UHnku/TsZ39Tu3bmTWwSakLJKz8= X-Received: by 2002:a05:6402:35d5:b0:566:ff31:7974 with SMTP id z21-20020a05640235d500b00566ff317974mr9185801edc.34.1709681943723; Tue, 05 Mar 2024 15:39:03 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Guo Ren Date: Wed, 6 Mar 2024 07:38:52 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 5/7] riscv: Kconfig.socs: Split ARCH_CANAAN and SOC_CANAAN_K210 To: Yangyu Chen Cc: linux-riscv@lists.infradead.org, Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This patch cross so many subsystems, I am not sure about it. If I were you, I would keep SOC_CANAAN and just add SOC_CANAAN_K230. On Wed, Mar 6, 2024 at 7:04=E2=80=AFAM Yangyu Chen wrote= : > > Since we have Canaan Kendryte K230 with MMU now. The use of SOC_CANAAN > is no longer only referred to K210. Split them and add _K210 suffix > to the name for old SOC_CANAAN. And allows ARCH_CANAAN to be selected > for other Canaan SoCs. > > 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 ++- > drivers/clk/Kconfig | 4 ++-- > drivers/pinctrl/Kconfig | 4 ++-- > drivers/reset/Kconfig | 4 ++-- > drivers/soc/Makefile | 2 +- > drivers/soc/canaan/Kconfig | 4 ++-- > 9 files changed, 19 insertions(+), 15 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 252d63942f34..fa6c389c3986 100644 > --- a/arch/riscv/Makefile > +++ b/arch/riscv/Makefile > @@ -154,7 +154,7 @@ vdso-install-y +=3D arch/riscv/k= ernel/vdso/vdso.so.dbg > vdso-install-$(CONFIG_COMPAT) +=3D 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 :=3D $(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=3Dy > CONFIG_SLUB=3Dy > CONFIG_SLUB_TINY=3Dy > # CONFIG_MMU is not set > -CONFIG_SOC_CANAAN=3Dy > +CONFIG_ARCH_CANAAN=3Dy > +CONFIG_SOC_CANAAN_K210=3Dy > CONFIG_NONPORTABLE=3Dy > CONFIG_SMP=3Dy > CONFIG_NR_CPUS=3D2 > 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=3Dy > CONFIG_SLUB=3Dy > CONFIG_SLUB_TINY=3Dy > # CONFIG_MMU is not set > -CONFIG_SOC_CANAAN=3Dy > +CONFIG_ARCH_CANAAN=3Dy > +CONFIG_SOC_CANAAN_K210=3Dy > CONFIG_NONPORTABLE=3Dy > CONFIG_SMP=3Dy > CONFIG_NR_CPUS=3D2 > diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig > index 50af5fc7f570..7517a0dfd15c 100644 > --- a/drivers/clk/Kconfig > +++ b/drivers/clk/Kconfig > @@ -451,8 +451,8 @@ config COMMON_CLK_FIXED_MMIO > > config COMMON_CLK_K210 > bool "Clock driver for the Canaan Kendryte K210 SoC" > - depends on OF && RISCV && SOC_CANAAN > - default SOC_CANAAN > + depends on OF && RISCV && SOC_CANAAN_K210 > + default SOC_CANAAN_K210 > help > Support for the Canaan Kendryte K210 RISC-V SoC clocks. > > diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig > index 8163a5983166..837b3bac8aac 100644 > --- a/drivers/pinctrl/Kconfig > +++ b/drivers/pinctrl/Kconfig > @@ -217,13 +217,13 @@ config PINCTRL_INGENIC > > config PINCTRL_K210 > bool "Pinctrl driver for the Canaan Kendryte K210 SoC" > - depends on RISCV && SOC_CANAAN && OF > + depends on RISCV && SOC_CANAAN_K210 && OF > select GENERIC_PINMUX_FUNCTIONS > select GENERIC_PINCONF > select GPIOLIB > select OF_GPIO > select REGMAP_MMIO > - default SOC_CANAAN > + default SOC_CANAAN_K210 > help > Add support for the Canaan Kendryte K210 RISC-V SOC Field > Programmable IO Array (FPIOA) controller. > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig > index ccd59ddd7610..6499da7ecc3b 100644 > --- a/drivers/reset/Kconfig > +++ b/drivers/reset/Kconfig > @@ -94,9 +94,9 @@ config RESET_INTEL_GW > > config RESET_K210 > bool "Reset controller driver for Canaan Kendryte K210 SoC" > - depends on (SOC_CANAAN || COMPILE_TEST) && OF > + depends on (SOC_CANAAN_K210 || COMPILE_TEST) && OF > select MFD_SYSCON > - default SOC_CANAAN > + default SOC_CANAAN_K210 > help > Support for the Canaan Kendryte K210 RISC-V SoC reset controlle= r. > Say Y if you want to control reset signals provided by this > diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile > index ba8f5b5460e1..fb2bd31387d0 100644 > --- a/drivers/soc/Makefile > +++ b/drivers/soc/Makefile > @@ -7,7 +7,7 @@ obj-y +=3D apple/ > obj-y +=3D aspeed/ > obj-$(CONFIG_ARCH_AT91) +=3D atmel/ > obj-y +=3D bcm/ > -obj-$(CONFIG_SOC_CANAAN) +=3D canaan/ > +obj-$(CONFIG_ARCH_CANAAN) +=3D canaan/ > obj-$(CONFIG_ARCH_DOVE) +=3D dove/ > obj-$(CONFIG_MACH_DOVE) +=3D dove/ > obj-y +=3D fsl/ > diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig > index 43ced2bf8444..3121d351fea6 100644 > --- a/drivers/soc/canaan/Kconfig > +++ b/drivers/soc/canaan/Kconfig > @@ -2,9 +2,9 @@ > > config SOC_K210_SYSCTL > bool "Canaan Kendryte K210 SoC system controller" > - depends on RISCV && SOC_CANAAN && OF > + depends on RISCV && SOC_CANAAN_K210 && OF > depends on COMMON_CLK_K210 > - default SOC_CANAAN > + default SOC_CANAAN_K210 > select PM > select MFD_SYSCON > help > -- > 2.43.0 > --=20 Best Regards Guo Ren