Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp558922rwb; Tue, 4 Oct 2022 07:41:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5taF2EPdHTAhNZmQ6ReaA8JjWO9crsYaGk4O1KymPrufFqQ/yoDg69BIS03UdROwde7ItZ X-Received: by 2002:a17:902:6907:b0:179:c9bc:dd73 with SMTP id j7-20020a170902690700b00179c9bcdd73mr27207580plk.159.1664894508075; Tue, 04 Oct 2022 07:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664894508; cv=none; d=google.com; s=arc-20160816; b=fOgcdcvkobFm0WMnkeRCRQZ1kMvft6tB0VdG2lLbxTIlydJ0YkeunYvEpkuWhAskHE PZFYJ6axD1Y6Rep0UIS9U90wK5PtH9HtgwO+xIwJcVpD+G0iQJaucVI9xDWNsDevzqxR kUKx0v80bZQ9gjWtdxRq0ViXkCrnuWHNVVW0jZd5b1opwNV4bDFFn6HzJkG3/3RHtsOy I0xCO5/5S2QCIrqXZooU1WfztjKStAsGJC18HAvqM5R7zj2GGgNyrBNGbU6+D5Ck1nAf qJ3J/n6tjbh5h6H99560NXiafpt/uW5ylIX9qg84T6ymka+TQGpbvXprDxmV3lvvFqjS iRAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=C9mbynAWhlZLPcnxIkEkUheYSWevkrIWO3ImSHgFO3g=; b=IJHMfO+C5JpKgVV5IynBjnGrLQ0o8H0HlqACl6Lk4kt08DZbv9HZaa7u5HzXY27euk cfMDLaSlV7ZoZ0fVysbcHKddqEhyX5UBj6oxQgX/VnGqCi9ICOedoygr4Z+tsA5faDhC 0WEowNmGhf/IcegPQA7PWZA6u8rvk9jWbUe9pzqX5W80b3YKTJqpvd2zZ93h7l2+76cK GuE7KGCIPkhn9TK/z4EURf1pfL6XiaHeMFaSm8mceHoryd1Rqt3nHjtqSVA49bCgS9yp QGEQFtdzH3TA7DmB6c9xGCRXcL2HRJIwy9CQu4YHyrLQ+lm8KWgLE61F5Zt9N88/8lvI NLWg== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id om5-20020a17090b3a8500b0020a7560a2f2si2867294pjb.83.2022.10.04.07.41.36; Tue, 04 Oct 2022 07:41:48 -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; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229592AbiJDOkD (ORCPT + 99 others); Tue, 4 Oct 2022 10:40:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229876AbiJDOj4 (ORCPT ); Tue, 4 Oct 2022 10:39:56 -0400 Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40122BC06; Tue, 4 Oct 2022 07:39:55 -0700 (PDT) Received: by mail-oi1-f182.google.com with SMTP id m81so14621082oia.1; Tue, 04 Oct 2022 07:39:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=C9mbynAWhlZLPcnxIkEkUheYSWevkrIWO3ImSHgFO3g=; b=aPWmumn63KfCi4DzqKxKDgUKewcEQJUhF5VuL+VWDaVTrgLIQeF99zC1sQzSdI2vVF zRNUC+MzjlfqWAgKGkQ7oH9+xhXzph9B82JMaq/HQvwF1kPW9PCJ+l+odz1JNYVMVab9 BZ2fjBtxMX/qQ3d3vnXKN19OSPhKDomkrnsIMTMo/He08spWpmKeh75LS9gytIqcGBzV F5jQWMWji11GfqK3t5NH8EEdAiuERUtCOGaveyqTNKnZam5HlNvaIgf+PsRj1L+mf8lD WSIa3JecVgl9wJ0WIK9X/kUYUjO5a/BSUwIP1SvFOBiWpcxJ17zXpjJz0vo+fDGHEefW DdKw== X-Gm-Message-State: ACrzQf3hduLZ5CK81c8J177SN9KPqYUXEt3FOQQtVK1trOAJkC1yt8dH GSTIk/bIFZ/mtb+PmEDvTA== X-Received: by 2002:a05:6808:23c5:b0:34f:bba7:2949 with SMTP id bq5-20020a05680823c500b0034fbba72949mr34434oib.101.1664894394472; Tue, 04 Oct 2022 07:39:54 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id s37-20020a0568302aa500b00636a8dafdc9sm3059486otu.2.2022.10.04.07.39.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 07:39:54 -0700 (PDT) Received: (nullmailer pid 1480570 invoked by uid 1000); Tue, 04 Oct 2022 14:39:54 -0000 Date: Tue, 4 Oct 2022 09:39:54 -0500 From: Rob Herring To: Arnaud Pouliquen Cc: Bjorn Andersson , Mathieu Poirier , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Christoph Hellwig , Stefano Stabellini , Bruce Ashfield Subject: Re: [PATCH v9 4/4] remoteproc: virtio: Create platform device for the remoteproc_virtio Message-ID: <20221004143954.GA1479221-robh@kernel.org> References: <20220921135044.917140-1-arnaud.pouliquen@foss.st.com> <20220921135044.917140-5-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220921135044.917140-5-arnaud.pouliquen@foss.st.com> X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no 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, Sep 21, 2022 at 03:50:44PM +0200, Arnaud Pouliquen wrote: > Define a platform driver to manage the remoteproc virtio device as > a platform devices. > > The platform device allows to pass rproc_vdev_data platform data to > specify properties that are stored in the rproc_vdev structure. > > Such approach will allow to preserve legacy remoteproc virtio device > creation but also to probe the device using device tree mechanism. > > remoteproc_virtio.c update: > - Add rproc_virtio_driver platform driver. The probe ops replaces > the rproc_rvdev_add_device function. > - All reference to the rvdev->dev has been updated to rvdev-pdev->dev. > - rproc_rvdev_release is removed as associated to the rvdev device. > - The use of rvdev->kref counter is replaced by get/put_device on the > remoteproc virtio platform device. > - The vdev device no longer increments rproc device counter. > increment/decrement is done in rproc_virtio_probe/rproc_virtio_remove > function in charge of the vrings allocation/free. > > remoteproc_core.c update: > Migrate from the rvdev device to the rvdev platform device. > From this patch, when a vdev resource is found in the resource table > the remoteproc core register a platform device. > > Signed-off-by: Arnaud Pouliquen > Reviewed-by: Mathieu Poirier > --- > drivers/remoteproc/remoteproc_core.c | 12 +- > drivers/remoteproc/remoteproc_internal.h | 2 - > drivers/remoteproc/remoteproc_virtio.c | 143 ++++++++++++----------- > include/linux/remoteproc.h | 6 +- > 4 files changed, 82 insertions(+), 81 deletions(-) [...] > +/* Platform driver */ > +static const struct of_device_id rproc_virtio_match[] = { > + { .compatible = "virtio,rproc" }, This is not documented. Add a binding schema if you need DT support. > + {}, > +}; > + > +static struct platform_driver rproc_virtio_driver = { > + .probe = rproc_virtio_probe, > + .remove = rproc_virtio_remove, > + .driver = { > + .name = "rproc-virtio", > + .of_match_table = rproc_virtio_match, > + }, > +};