Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp932686rwe; Thu, 25 Aug 2022 11:49:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR6lh7lg09++eOH1HHSvvAJw4RYFM8H6tQ1Hfnb1uMIMZZlH3EDHXJL/eLCuSc0BKMvV72wR X-Received: by 2002:a05:6402:240a:b0:446:39d9:95d7 with SMTP id t10-20020a056402240a00b0044639d995d7mr4304345eda.253.1661453379538; Thu, 25 Aug 2022 11:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661453379; cv=none; d=google.com; s=arc-20160816; b=QC7XCH2gmuUAodMt4LB3CW1FzebSBxF4Gtk+k8KAZySa0uTNZvt6d24kfDzMH8kesp PXfwQVrx7YyNnUcWJjzAO3hroijPijWhg0vlZ/1Pp/2eeYxMhVy5qiOFIUWCsvJWU2fY fpQl6Jv5Qrk8MsUV/lzmTBpf/JgQcU/7rrvssn/af7KkMiSdwzeGTKSl7pXy419kwRC0 8IbBy1GAdfhrYhPPoGVAr1HmIc1ace7DL10lzoA6PQa1yxuClMEL9lDQ1WAUwEbWvS04 w1G9wPv9RgJqbl7aTKXJz9/lo+3CO4wVK42GN3FendZQSokFjEmA9EydyhS2/9syAjYP pvBw== 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=B+6GHANqVGrhre1yIICjUKUVABFJYsXY9KlsXWrq0g0=; b=LBszJ4mvfeRyZFfHtrzeX8iNVaWQZDCrYnm5SQHB+TLFVZALBPdrw42LEr4xlfxM6e jWaMdOCE+UKivmE7BZFQuCXjx96MvQ6x7osgrEOEvGm//VyvxFpufffUaP0e64UDMeVW rBpdvF5OJemkt1IHQu+7fAiaHz3EPYrpI9HF8YeKtR8ELQpbXfwf7+DaoylTMECqq9i3 G+v3w2/jTF2VomznvrBGiaW7GDYB+euG0O0cHshFdeYOC1W6VNkoZVVZuPu56sxGmIGY JzjS8DTqCnA5kIb0CcMBRjlNN/75z0LMrH/hMeI0usz7c6tIIyxpDaMP4DQEBnRJizo+ Fv8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=B85LgmnE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt19-20020a170906f21300b0073866c0672asi2148ejb.73.2022.08.25.11.49.13; Thu, 25 Aug 2022 11:49:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=B85LgmnE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243443AbiHYSjH (ORCPT + 99 others); Thu, 25 Aug 2022 14:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235857AbiHYSjF (ORCPT ); Thu, 25 Aug 2022 14:39:05 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D46FF97514 for ; Thu, 25 Aug 2022 11:39:04 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-334dc616f86so563980287b3.8 for ; Thu, 25 Aug 2022 11:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=B+6GHANqVGrhre1yIICjUKUVABFJYsXY9KlsXWrq0g0=; b=B85LgmnE6J6rXg7BVngfQTw4IEjIKrGKdqIeDIjR3AWtFqojLHLJcIFpUb/kio7nLp Q+Ui7InM8EeA6fFs7Ovf0/ZosbdTVjCy7D8cMlV6fDhzod2KJN/4nk9mVhQ0FZQbE+Ky QstKO/uftXpVDD4tBNkWiPAMtu3ZT8/ej/ZSvGUcLEWZFY0lt12Otkn4bzRlVnhh1rx6 v1MWHoVRbsz20H7ZjCC6iSK7MQfC7xupNt5YGgKQ0K9Dy210qTIgMkNTvPpIjL3nfH+N uZ86ViMYJrB57R5lrqCVZJvZgKRj3BRPaPN1gFz3nUQyy9V9YzX1BsykChMTGDUfqP+t jUKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=B+6GHANqVGrhre1yIICjUKUVABFJYsXY9KlsXWrq0g0=; b=IrMQptJFYQnF+DrpME/4H+KfOVFWb7/R4cvVutpNLYPUvKof1OrBXcj64ASlxCsCN1 svKH06/O2B7cR9Xi99JyLEvaRDwbbFtQJnU1iRHRias84i5fzy5H6E5X3Ok/E5JPh8Vr /Elk8CxNoeh9HdkrjZ0VMa8eM5BySvQoKszCJahy+rt3kpPW/5PV7RoE+zyFQ/OrpEK1 k5OGaR2BYy5zyE0OguEFkCm5Htdtm13TT0aOiQpRNaABaqnQi/DToqr7a2ahejWFzXmT Dh7XGZP+y77wJSnRVfkjaRB/7nhCWaXMQrBc2Xi953sJ5jabG1lpyBjgqdofjjfCNxMU i9og== X-Gm-Message-State: ACgBeo0NeU62eNZ+HnX73nTmvHtDcWRUKKuqm6figQhLrxVLQl3pktOt NTSQhPvhyeQh6BVP2snew6l3mr67PeSnZmuVLLnXFQ== X-Received: by 2002:a25:94b:0:b0:68f:4e05:e8f0 with SMTP id u11-20020a25094b000000b0068f4e05e8f0mr4506829ybm.115.1661452743474; Thu, 25 Aug 2022 11:39:03 -0700 (PDT) MIME-Version: 1.0 References: <20220803122655.100254-1-nipun.gupta@amd.com> <20220817150542.483291-1-nipun.gupta@amd.com> <20220817150542.483291-3-nipun.gupta@amd.com> <20220824233122.GA4068@nvidia.com> In-Reply-To: <20220824233122.GA4068@nvidia.com> From: Saravana Kannan Date: Thu, 25 Aug 2022 11:38:27 -0700 Message-ID: Subject: Re: [RFC PATCH v2 2/6] bus/cdx: add the cdx bus driver To: Jason Gunthorpe Cc: Greg KH , "Gupta, Nipun" , Robin Murphy , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "rafael@kernel.org" , "eric.auger@redhat.com" , "alex.williamson@redhat.com" , "cohuck@redhat.com" , "Gupta, Puneet (DCG-ENG)" , "song.bao.hua@hisilicon.com" , "mchehab+huawei@kernel.org" , "maz@kernel.org" , "f.fainelli@gmail.com" , "jeffrey.l.hugo@gmail.com" , "Michael.Srba@seznam.cz" , "mani@kernel.org" , "yishaih@nvidia.com" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "kvm@vger.kernel.org" , "okaya@kernel.org" , "Anand, Harpreet" , "Agarwal, Nikhil" , "Simek, Michal" , "git (AMD-Xilinx)" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 24, 2022 at 4:31 PM Jason Gunthorpe wrote: > > On Wed, Aug 24, 2022 at 02:11:48PM +0200, Greg KH wrote: > > > We can share the RFC in case you are interested in looking at code flow > > > using the of_dynamic approach. > > > > Please no more abuse of the platform device. > > Last time this came up there was some disagreement from the ARM folks, > they were not keen on having xx_drivers added all over the place to > support the same OF/DT devices just discovered in a different way. It is > why ACPI is mapped to platform_device even in some cases. > > I think if you push them down this path they will get resistance to > get the needed additional xx_drivers into the needed places. > > > If your device can be discovered by scanning a bus, it is not a platform > > device. > > A DT fragment loaded during boot binds a driver using a > platform_driver, why should a DT fragment loaded post-boot bind using > an XX_driver and further why should the CDX way of getting the DT > raise to such importantance that it gets its own cdx_driver ? > > In the end the driver does not care about how the DT was loaded. > None of these things are on a discoverable bus in any sense like PCI > or otherwise. They are devices described by a DT fragement and they > take all their parameters from that chunk of DT. > > How the DT was loaded into the system is not a useful distinction that > raises the level of needing an entire new set of xx_driver structs all > over the tree, IMHO. Jason, I see your point or rather the point the ARM folks might have made. But in this case, why not use DT overlays to add these devices? IIRC there's an in kernel API to add DT overlays. If so, should this be more of a FPGA driver that reads FPGA stuff and adds DT overlays? That'd at least make a stronger case for why this isn't a separate bus. -Saravana