Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4354FC05027 for ; Mon, 20 Feb 2023 06:13:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3FC4E8585F; Mon, 20 Feb 2023 07:13:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.b="V2ujg5+/"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="tIDoeSgJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E98DD81421; Mon, 20 Feb 2023 07:13:15 +0100 (CET) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4AA6C857FC for ; Mon, 20 Feb 2023 07:13:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=samuel@sholland.org Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id B31C03200CC8; Mon, 20 Feb 2023 01:13:10 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 20 Feb 2023 01:13:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1676873590; x=1676959990; bh=KD LDRAnKNNDuT1b90UpNOtHZpvtnzoVWTe9up76KdPo=; b=V2ujg5+/sp0iQpUFq1 RqDKh6Cls7dlcIqHzKw3JBB+4K7cnTtL3DK/A4Wit8Zq058jvAksmoAsRS3Zc69c vRs5letrEuvV+MTW4EJ8K6I0fplsCqextWMMsz7r9aYfXFJB8pPSebwaDrMArlXd juXdkRChf/pCrDujMK5EtOlRtfkf6stYYOZVFAU4a647Psv4O8ZsW+SL7P3OolKS Fy3e810hMnkjkf8+1C3t+6hhfrEbXFHiuxQ8hYu6LIDtYltozW06Wnusyoipl9Eu SYMj1VBDkuXsNm6kQBIW99DCGYFT6jI3FqBTojUvPMI+3mOUx5aap80+92+3t4z2 8iOA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1676873590; x=1676959990; bh=KDLDRAnKNNDuT 1b90UpNOtHZpvtnzoVWTe9up76KdPo=; b=tIDoeSgJe7/sySybc3C+ZQaplwegX xqwmN2cl4Mq8HRb1SaNEXgXnc4b63E7h9s/Chmvs6dXxOP6yW2MGtTiE2n7PTuvN GbNHOB22fl9Ko5iZN5QyFLxn1UhyxDy+UKdlrqO69q3LjK3HyVphJH5dZ/VXhBw+ ZC12Ah8FxKtI7uRITyzcjYDz35ko6GNJYJf2c179IjL1t1uCq4R0NdJelnUy/ffW rIhiLt55VrJR4+nTUi3700mDtWVqbLnSdTJ60kjpx+eZIpvLGqN/R/BqoH4yl6U7 o6r5Xnkaak253nBhPI2JaF4WHo7YJ8V6ZW1rUH5EWu/Mbp7hmCCQMqFMg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudejgedgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefurghmuhgvlhcujfholhhlrghnugcuoehsrghmuhgvlhes shhhohhllhgrnhgurdhorhhgqeenucggtffrrghtthgvrhhnpedukeetueduhedtleetve fguddvvdejhfefudelgfduveeggeehgfdufeeitdevteenucevlhhushhtvghrufhiiigv pedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgrnhgurd horhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Feb 2023 01:13:09 -0500 (EST) From: Samuel Holland To: u-boot@lists.denx.de Cc: Samuel Holland Subject: [PATCH 3/3] remoteproc: Remove legacy probing method Date: Mon, 20 Feb 2023 00:13:03 -0600 Message-Id: <20230220061304.43198-4-samuel@sholland.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230220061304.43198-1-samuel@sholland.org> References: <20230220061304.43198-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This removes code that abused the device's platform data, interpreting the driver platform data as if it was the uclass platform data. Signed-off-by: Samuel Holland --- .../driver-model/remoteproc-framework.rst | 29 ------------------- drivers/remoteproc/rproc-uclass.c | 18 +----------- drivers/remoteproc/sandbox_testproc.c | 10 ------- include/remoteproc.h | 2 -- 4 files changed, 1 insertion(+), 58 deletions(-) diff --git a/doc/develop/driver-model/remoteproc-framework.rst b/doc/develop/driver-model/remoteproc-framework.rst index bdbbb8ab7be..ce76e5ea495 100644 --- a/doc/develop/driver-model/remoteproc-framework.rst +++ b/doc/develop/driver-model/remoteproc-framework.rst @@ -106,35 +106,6 @@ provide a load and start function. We assume here that the device needs to be loaded and started, else, there is no real purpose of using the remoteproc framework. -Describing the device using platform data ------------------------------------------ - -*IMPORTANT* NOTE: THIS SUPPORT IS NOT MEANT FOR USE WITH NEWER PLATFORM -SUPPORT. THIS IS ONLY FOR LEGACY DEVICES. THIS MODE OF INITIALIZATION -*WILL* BE EVENTUALLY REMOVED ONCE ALL NECESSARY PLATFORMS HAVE MOVED -TO DM/FDT. - -Considering that many platforms are yet to move to device-tree model, -a simplified definition of a device is as follows: - -.. code-block:: c - - struct dm_rproc_uclass_pdata proc_3_test = { - .name = "proc_3_legacy", - .driver_plat_data = &mydriver_data; - }; - - U_BOOT_DRVINFO(proc_3_demo) = { - .name = "sandbox_test_proc", - .plat = &proc_3_test, - }; - -There can be additional data that may be desired depending on the -remoteproc driver specific needs (for example: SoC integration -details such as clock handle or something similar). See appropriate -documentation for specific remoteproc driver for further details. -These are passed via driver_plat_data. - Describing the device using device tree --------------------------------------- diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c index 3eacd4a8d9b..def43a8cf32 100644 --- a/drivers/remoteproc/rproc-uclass.c +++ b/drivers/remoteproc/rproc-uclass.c @@ -131,24 +131,8 @@ static int rproc_pre_probe(struct udevice *dev) /* See if we need to populate via fdt */ - if (!dev_get_plat(dev)) { -#if CONFIG_IS_ENABLED(OF_CONTROL) - bool tmp; - debug("'%s': using fdt\n", dev->name); + if (dev_has_ofnode(dev)) uc_pdata->name = dev_read_string(dev, "remoteproc-name"); -#else - /* Nothing much we can do about this, can we? */ - return -EINVAL; -#endif - - } else { - struct dm_rproc_uclass_pdata *pdata = dev_get_plat(dev); - - debug("'%s': using legacy data\n", dev->name); - if (pdata->name) - uc_pdata->name = pdata->name; - uc_pdata->driver_plat_data = pdata->driver_plat_data; - } /* Else try using device Name */ if (!uc_pdata->name) diff --git a/drivers/remoteproc/sandbox_testproc.c b/drivers/remoteproc/sandbox_testproc.c index 4cb784ce32e..b19477daa7f 100644 --- a/drivers/remoteproc/sandbox_testproc.c +++ b/drivers/remoteproc/sandbox_testproc.c @@ -345,13 +345,3 @@ U_BOOT_DRIVER(sandbox_testproc) = { .probe = sandbox_testproc_probe, .priv_auto = sizeof(struct sandbox_test_devdata), }; - -/* TODO(nm@ti.com): Remove this along with non-DT support */ -static struct dm_rproc_uclass_pdata proc_3_test = { - .name = "proc_3_legacy", -}; - -U_BOOT_DRVINFO(proc_3_demo) = { - .name = "sandbox_test_proc", - .plat = &proc_3_test, -}; diff --git a/include/remoteproc.h b/include/remoteproc.h index 0c4d64706d9..e0fccb0177f 100644 --- a/include/remoteproc.h +++ b/include/remoteproc.h @@ -386,7 +386,6 @@ struct rproc { /** * struct dm_rproc_uclass_pdata - platform data for a CPU * @name: Platform-specific way of naming the Remote proc - * @driver_plat_data: driver specific platform data that may be needed. * * This can be accessed with dev_get_uclass_plat() for any UCLASS_REMOTEPROC * device. @@ -394,7 +393,6 @@ struct rproc { */ struct dm_rproc_uclass_pdata { const char *name; - void *driver_plat_data; }; /** -- 2.39.2