Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp306404pxb; Mon, 13 Sep 2021 20:08:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5BcqwG8UuikH/q8R5v7XbGcI5af+RHGCBJa2Xec1IeyjdxFxv6HG6ntwrj+Rw3ps7YTkG X-Received: by 2002:a05:6402:1459:: with SMTP id d25mr3379748edx.78.1631588891453; Mon, 13 Sep 2021 20:08:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631588891; cv=none; d=google.com; s=arc-20160816; b=um62gO2EGOFd5Ra52Egh0UI2dnUpv1eSLVs25S/JGooBtUu+aD08LkdG2JmFfFxawo y67hJ/Qf2siU1ZIE3NjypDC98/Ikq0f/j0pS7CC3uf1uFkUarp5GJn9hqnOCdbAsiAP7 ++ZsrKzHqaaSjAgiaFSCbU2MxpCEscVhBIKPIWZsSu4vFSIMO8TIVV23u9zUiHnnMrc8 Hz3dKzbUXgTPaLIcgxWvathQ/JyE1IBcfTkw+27PF853/CtkWek8biVqSBjq+hOvHOES CLmm4qG6eqH+UOWnaOY9HQraewcaTbIVePqzoCyEzZFpxVg4V6TEwq7rczpHFODbmjaN kwYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=8nkXeECG5M/tyIlgDFmDlJzKb1YR8Ap0wu1zfwUK6pQ=; b=ZWwjG1SZ35eEJzeekoKInXX7xHrIHCtUvd33kd2ZupDn2e0RAcosKl/tRbbQeF+vsg xHlHlSQ9ueTS594kdoqrU9xRqoOyd11eurrfUT1iy8+s4RmyJi/Lyf/wCid3RAFY3Yuc K9cDmjPMPMGFMEMmAwWQ5H1hBx3FUBWMgDFu6CtAJxxctVfBq3hgEN5jgF602RYcLNpm qOGVn0E02B0IkZxX08C6E/96jGAhK43YPMjOF2qTp7u7GnrMQ62GL4c3qdYEa/vYk5fY Oh+WahVpkBhTUlxXj4+Rjgkl+Cm+WItA0eHQ1DhNqTxvvP+j//ln3sHpUewdFkE0op0V V+Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2fehlt06; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ml15si8670261ejb.747.2021.09.13.20.07.47; Mon, 13 Sep 2021 20:08:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2fehlt06; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238476AbhINDHp (ORCPT + 99 others); Mon, 13 Sep 2021 23:07:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238205AbhINDHn (ORCPT ); Mon, 13 Sep 2021 23:07:43 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57A0BC061574 for ; Mon, 13 Sep 2021 20:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=8nkXeECG5M/tyIlgDFmDlJzKb1YR8Ap0wu1zfwUK6pQ=; b=2fehlt06+EmkMZTxJ9V8DpTXuW 2166CLtj4X8B4AS/K+XorW0MkzYP3LZaxV1JnUUhOJD/TfHWSLT0T4HPMRTtDr8RfpNckVaZsOOvx WhjNK0JoBMDNNxwqtLV/PyTSpQXGjV7P/8reTuszQqSWVfXp/rmyD8fGSZNEH25J2OcyCu5bYfzDk Y/VlzbqI2Lpp3jaHsctPaiYvYdTYIy6iM14vmmlXsVEKlT+Wg4yR/upQmhm+QWQLyL5AnwPZAYCSq 7WhD6WTLN80cAIDSn9sMB83XrUpDoR1KK8kTMvXaQ/TlGzeBk2An1O5hcP1g/4XrnO+pXOA6nZwh3 AMn77H5A==; Received: from [2601:1c0:6280:3f0::aa0b] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mPym4-0041J1-Mz; Tue, 14 Sep 2021 03:06:20 +0000 Subject: Re: [RFC PATCH V4 6/6] riscv: soc: Add Allwinner SoC kconfig option To: Guo Ren , Arnd Bergmann Cc: Maxime Ripard , Anup Patel , Atish Patra , Palmer Dabbelt , =?UTF-8?Q?Christoph_M=c3=bcllner?= , philipp.tomsich@vrull.eu, Christoph Hellwig , liush , wefu@redhat.com, =?UTF-8?B?V2VpIFd1ICjlkLTkvJ8p?= , Drew Fustini , linux-riscv , Linux Kernel Mailing List , taiten.peng@canonical.com, aniket.ponkshe@canonical.com, heinrich.schuchardt@canonical.com, gordan.markus@canonical.com, Guo Ren , Chen-Yu Tsai References: <20210911092139.79607-1-guoren@kernel.org> <20210911092139.79607-7-guoren@kernel.org> <20210913084520.kkbsupogkzv226x3@gilmour> From: Randy Dunlap Message-ID: <357851d1-5311-6ee3-6998-b20f0d238100@infradead.org> Date: Mon, 13 Sep 2021 20:06:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/13/21 7:34 PM, Guo Ren wrote: > On Tue, Sep 14, 2021 at 2:49 AM Randy Dunlap wrote: >> >> On 9/13/21 2:20 AM, Guo Ren wrote: >>> On Mon, Sep 13, 2021 at 4:45 PM Maxime Ripard wrote: >>>> >>>> Hi, >>>> >>>> On Sat, Sep 11, 2021 at 05:21:39PM +0800, guoren@kernel.org wrote: >>>>> From: Liu Shaohua >>>>> >>>>> Add Allwinner kconfig option which selects SoC specific and common >>>>> drivers that is required for this SoC. >>>>> >>>>> Allwinner D1 uses custom PTE attributes to solve non-coherency SOC >>>>> interconnect issues for dma synchronization, so we set the default >>>>> value when SOC_SUNXI selected. >>>>> >>>>> Signed-off-by: Liu Shaohua >>>>> Signed-off-by: Guo Ren >>>>> Signed-off-by: Wei Fu >>>>> Cc: Anup Patel >>>>> Cc: Atish Patra >>>>> Cc: Christoph Hellwig >>>>> Cc: Chen-Yu Tsai >>>>> Cc: Drew Fustini >>>>> Cc: Maxime Ripard >>>>> Cc: Palmer Dabbelt >>>>> Cc: Wei Wu >>>>> --- >>>>> arch/riscv/Kconfig.socs | 15 +++++++++++++++ >>>>> arch/riscv/configs/defconfig | 1 + >>>>> 2 files changed, 16 insertions(+) >>>>> >>>>> diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs >>>>> index 30676ebb16eb..8721c000ef23 100644 >>>>> --- a/arch/riscv/Kconfig.socs >>>>> +++ b/arch/riscv/Kconfig.socs >>>>> @@ -70,4 +70,19 @@ config SOC_CANAAN_K210_DTB_SOURCE >>>>> >>>>> endif >>>>> >>>>> +config SOC_SUNXI >>>>> + bool "Allwinner SoCs" >>>>> + depends on MMU >>>>> + select DWMAC_GENERIC >>>>> + select ERRATA_THEAD >>>>> + select RISCV_DMA_NONCOHERENT >>>>> + select RISCV_ERRATA_ALTERNATIVE >>>>> + select SERIAL_8250 >>>>> + select SERIAL_8250_CONSOLE >>>>> + select SERIAL_8250_DW >>>>> + select SIFIVE_PLIC >>>>> + select STMMAC_ETH >>>>> + help >>>>> + This enables support for Allwinner SoC platforms like the D1. >>>>> + >>>> >>>> I'm not sure we should select the drivers there. We could very well >>>> imagine a board without UART, or even more so without ethernet. >>> We just want people could bring D1 up easier, 8250 is the basic component. >>> >>> >>>> >>>> These options should be in the defconfig. >> >> Agreed, using a defconfig is the right way to do this. > Put 8250 related configs into arch/riscv/configs/defconfig? > > @Palmer Dabbelt @Arnd Bergmann, How do you think about that? > (defconfig or Kconfig.soc) > My purpose is when people make the Image from riscv/defconfig, then > the Image could run on all platforms include D1. Hi, I certainly did not understand your purpose with the patch being able to build a kernel that would run on multiple platforms. Still, I would not expect to see one platform cause unnecessary drivers to be built for platforms that don't need them. Kconfig.socs in arch/riscv/ is a bit of an unusual Kconfig file IMO -- I suppose what you want to do fits into its style. AFAIK the suggestion to use a defconfig (at least my suggestion) was expecting to have a defconfig for each platform, but that would not give you a boot image that could run on all platforms. Anyway, it's Palmer's choice. thanks. -- ~Randy