Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp371765pxb; Mon, 13 Sep 2021 22:21:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmkqcKhawi/nhZWC87ZKR3WlGvmlH2THzvwc+yQMY1sdpyzxb1MLG0RxNExhYQYtpbCQQX X-Received: by 2002:a17:907:20cb:: with SMTP id qq11mr16326435ejb.488.1631596863764; Mon, 13 Sep 2021 22:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631596863; cv=none; d=google.com; s=arc-20160816; b=YLAzDnlOHQ0Wk3ghqU3IpxFiO5SBZl5YKwA7Gjb838jk5/nb1n6XkTQfoo45HepDr5 SoEDVNbmvqInzAYU7k9CiISijAq7rrQgEwsDotBaYQvm62HsFnRWEyA0917uZRfrSG1d SE4VrOGCtO2UHOXSHNx5hP1IHJsHXM4jB1Gpb7VgxiL0tVx37wZ5NpmlrbiMki+7QLmU NHPgYGYHTYtmfiG+p8JUulMCX8zUdWMkaWkeYPB/tOlOot/ngCOSOsXvJ7LQaNBv375U BKIhxbsGqM9PEiYxwCGrWFTmwCLT4yF8TEeb5B+cvdmWzlv8gY7J19m7AisTE3DI0/Xu XuGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=oOM9/HSr10rms/kTZtRBXXYbkulobkA+KsRsDSab8hI=; b=XeBySoWQXZDIlzr4H771sxIUlRAhaiMRvS3O5mbHapsFU7MR1qOLguS1zejjzs5aYL 1+fQpoZ47iVCnx9aMramkOb32RiyiRQZF+ZFzFqrgTwz1PLbSEOSXl5n4LOvMlP7jakb NYp3680YQgqDGPUvjlSTNnExj5crzwRKGevHO1d6IGtJq/kUgzowE/zpuYzLQU2AT0w2 6693vg2T7XywI1PtDkrcDfFN/f/+iDo0S72HZ7ldqyHjcC73wk29HSbGEV8lJqwq0q5/ omRO1mQWdyAOzhL2AgKwPbvKTh+FXQyD+oyr8hC8hcgdgfr901rD9pJSpRD0Y5sMlUPo z3zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=NZuqZkPP; 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 c19si10198906ejj.206.2021.09.13.22.20.39; Mon, 13 Sep 2021 22:21:03 -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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=NZuqZkPP; 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 S239462AbhINFS3 (ORCPT + 99 others); Tue, 14 Sep 2021 01:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239433AbhINFS2 (ORCPT ); Tue, 14 Sep 2021 01:18:28 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12A44C061574 for ; Mon, 13 Sep 2021 22:17:10 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id m9so18120829wrb.1 for ; Mon, 13 Sep 2021 22:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oOM9/HSr10rms/kTZtRBXXYbkulobkA+KsRsDSab8hI=; b=NZuqZkPP5EOAbtuipffIoRtYtf54WNs8r1D2Xx2W41gn1DAyzOP6/UkFtAxcRakq41 4+aYDoE1yZS7WHAXGhEMC0gNTwyNQhzRUF448U1kY4KLqcJinjwhuRl30+ODFXH9D0EB x6sQTY2r+pF7c7dfkVK74Xi7/C8lQchVYQkxW9EVEUmzc53tzrpl4TXuSTEkX2dqICun QLRXb0tTCV/ZncV9o4gG7tZlyRVRwlIDIiltmVLWm25HzX10CpGOc1VCyh+bECG6ZuYB 5XjutcfXE0JBe1jFmOx+6vBB+21Iu9NHZZP10u/06TijTMOicEoxTPjYU6a9qqfqPTCa lBHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oOM9/HSr10rms/kTZtRBXXYbkulobkA+KsRsDSab8hI=; b=ts8E935zzKCYTJi9bn/6tHC69Me4T/UI1b8ojoV0SB2B7jhlGL2PD6objhxC1hBZ3d dauFKcyoqN3mPfgN7CGYnZM3QE5TTaBm2V7AW729HRUD4m/7veVrLHJ/4wLq4yniDXeH F3FR1Kag52jH0pZATEQGilUExSY6+BBoWFKGnhH01lZCa5btb79GESu6GxhKo2/uz2U/ uBE7Fge3PdEsINiV/VN8ulV2TWuzZ/FFP+n1adq6XWrLaEmrhXrcoo2NN8i7JHA74+9Q 5zGKJZeRWhq4IhlsZcISpvvvZ4tXLuGEGOVK+hYiXoeQvLII7LScoB8pNm4KtWfrK5eO ehSA== X-Gm-Message-State: AOAM533x7jm4c5H7JzwCge5hKeWCAaexGLqW4J9mg6oO+h1bkW/0lLN3 Skw2recHAYT+SIVwrp9kvWlG91ZLZpUAqMXnG5mj1Q== X-Received: by 2002:adf:e387:: with SMTP id e7mr16835445wrm.199.1631596628583; Mon, 13 Sep 2021 22:17:08 -0700 (PDT) MIME-Version: 1.0 References: <20210911092139.79607-1-guoren@kernel.org> <20210911092139.79607-7-guoren@kernel.org> <20210913084520.kkbsupogkzv226x3@gilmour> <357851d1-5311-6ee3-6998-b20f0d238100@infradead.org> In-Reply-To: <357851d1-5311-6ee3-6998-b20f0d238100@infradead.org> From: Anup Patel Date: Tue, 14 Sep 2021 10:46:57 +0530 Message-ID: Subject: Re: [RFC PATCH V4 6/6] riscv: soc: Add Allwinner SoC kconfig option To: Randy Dunlap Cc: Guo Ren , Arnd Bergmann , 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 , gordan.markus@canonical.com, Guo Ren , Chen-Yu Tsai Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 8:36 AM Randy Dunlap wrote: > > 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. AFAIK, having a separate defconfig for each platform is not going to fly with distros (AFAIK). We can't expect dirstros to release separate RISC-V kernel image for each platform. In fact, ARM64 kernel has just one defconfig whereas ARM32 kernel has consolidated and minimized number of defconfigs. The long term goal for Linux RISC-V is to support single kernel image booting on multiple-platforms. Of course, users can always strip down the kernel using their custom defconfigs. Regards, Anup > > Anyway, it's Palmer's choice. > > thanks. > -- > ~Randy >