From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5259C433EF for ; Mon, 4 Oct 2021 16:38:30 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5DFCD6126A for ; Mon, 4 Oct 2021 16:38:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5DFCD6126A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HNRH90S5Wz3hGJ for ; Tue, 5 Oct 2021 03:38:29 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::22b; helo=mail-oi1-x22b.google.com; envelope-from=robherring2@gmail.com; receiver=) Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HNRDN6D0Wz3drt for ; Tue, 5 Oct 2021 03:36:03 +1100 (AEDT) Received: by mail-oi1-x22b.google.com with SMTP id q16so22340672oiw.10 for ; Mon, 04 Oct 2021 09:36:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0dpw/V8bg0MxBudexnCNVse/yhrpLd1wrwigqMt/Mf4=; b=rdzRIlWKK5O7AJKtGMWJqNvLOoq0nIRVR5lU1J+KTVTvBT9Fh5ajR0Y60ZWSq5AuwL oZ+30MCFIEZZGWyMsGXjLlS3rpl3RW6F3jj70uX8qihdzIhi8GCGQUk/G1xRjOFSZwFm c9KyAk3VxeqHq1yjm0WgUZZhTMHCQByKG24B6M/pDWv3yoVoHAqfMAyju4isjSwGCH0z 0MdEZIxh/0KeBfKQwbsKxsDdKPfbHOGRlV3YVEIhXnMy5kwpsX+wqdpoQSwh+ZSvaPJo l3QsrtXvOWnvL24nWmwEPdfonZsK4p0FY3ZtkQM92nUyDIa3ZlnsXmrGp8GXThEyejg7 acnw== X-Gm-Message-State: AOAM531AfWHiT/1b9l91vkutrvjrzJjF7B2HXKcyxgejQxwMRyX6/uDB HfleGv4X3L1rOT7jIPMekZs88gfmcw== X-Google-Smtp-Source: ABdhPJyWs8jPtI7Az6impbOs6RYLWqtQA6g7t7PUwbGnr6ooHx6OyIrt5yr6QR8S2RGXjkrcVH6Pcw== X-Received: by 2002:aca:30c9:: with SMTP id w192mr13601001oiw.93.1633364836818; Mon, 04 Oct 2021 09:27:16 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id d21sm2868961ooh.43.2021.10.04.09.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 09:27:15 -0700 (PDT) Received: (nullmailer pid 1418805 invoked by uid 1000); Mon, 04 Oct 2021 16:27:14 -0000 Date: Mon, 4 Oct 2021 11:27:14 -0500 From: Rob Herring To: Li Yang Subject: Re: [PATCH 2/5] memory: fsl_ifc: populate child devices without relying on simple-bus Message-ID: References: <20211001000924.15421-1-leoyang.li@nxp.com> <20211001000924.15421-3-leoyang.li@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211001000924.15421-3-leoyang.li@nxp.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Shawn Guo , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Sep 30, 2021 at 07:09:21PM -0500, Li Yang wrote: > After we update the binding to not use simple-bus compatible for the > controller, we need the driver to populate the child devices explicitly. > > Signed-off-by: Li Yang > --- > drivers/memory/fsl_ifc.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/memory/fsl_ifc.c b/drivers/memory/fsl_ifc.c > index d062c2f8250f..251d713cd50b 100644 > --- a/drivers/memory/fsl_ifc.c > +++ b/drivers/memory/fsl_ifc.c > @@ -88,6 +88,7 @@ static int fsl_ifc_ctrl_remove(struct platform_device *dev) > { > struct fsl_ifc_ctrl *ctrl = dev_get_drvdata(&dev->dev); > > + of_platform_depopulate(&dev->dev); > free_irq(ctrl->nand_irq, ctrl); > free_irq(ctrl->irq, ctrl); > > @@ -285,6 +286,14 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev) > } > } > > + /* legacy dts may still use "simple-bus" compatible */ > + if (!of_device_is_compatible(dev->dev.of_node, "simple-bus")) { > + ret = of_platform_populate(dev->dev.of_node, NULL, NULL, > + &dev->dev); There's no need to make this conditional. of_platform_populate() is safe to call multiple times. If that doesn't work, it's a bug. Rob From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44C10C433EF for ; Mon, 4 Oct 2021 16:29:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1084D61184 for ; Mon, 4 Oct 2021 16:29:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1084D61184 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WXQnnJ1dwhZjorbd9Hs5U7I2Uyt3yJ8f5ZJtsTs66jA=; b=Sy7M3FmnO0jPui cKLZBI/biMXhMDgrWGqAR/CDIzdsLJmr3kU2RJLJGMKG8NTxKN5mpk6h8xYRpciFFNlT1VtITYi9J 5QUmBgTPJ0eobos/aIbvPwg8iCewQZa+bl7LEA2b32uHzzoESCQyyfysezPvzzT0GBxYD2l5e6Y/f GtWitrIdS7qNuZH6Juad2HHrANhtAZSXk5lbs3IUa/XxPyT51vksv7l5srqQPvyAOR3UzG0c5WzPR xY4aU93HqyfVPUhcnHb9Px0wZDMOTUNe4UchqbW5RpYPln5JSgLaqaPv8aozLhAi7b41G5S55rpA4 RAqKiCZdSexCEOB9VuyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXQoN-0075MV-Ca; Mon, 04 Oct 2021 16:27:31 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXQoK-0075Lz-U7 for linux-arm-kernel@bombadil.infradead.org; Mon, 04 Oct 2021 16:27:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0dpw/V8bg0MxBudexnCNVse/yhrpLd1wrwigqMt/Mf4=; b=PxevubJalb1n+C+GDTQRRxFV+6 yqU6f/dDNFZk/b1Ept4tJnGGX5ligXuULbuJF5e5hr1elWj/bwLvgevnBHcrqflz5aT7GU4beLQuj 3phZaLE8fXsuETJiqgMUozFq0USPN6mAgOKscWLm7qu6xAUJcXgnR+zbS1oXPw/LhRZFGBWKFfDWx GnKzqoHMpyR4v4gX15JV1G+ujvmKU2z74cyUyosmAAE2iA5uXyhXjVC/aQrk+k/xUltMXeY7K0QzL GgJlXMlyuP3yLYRTes3iMEhYDeZMz7fuCDNZ9NBc3b5iuNz+llRUgZautkzWmouMY+P8MLEm48NjX VKmdtvig==; Received: from mail-oi1-f176.google.com ([209.85.167.176]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXQoH-007s68-Ig for linux-arm-kernel@lists.infradead.org; Mon, 04 Oct 2021 16:27:27 +0000 Received: by mail-oi1-f176.google.com with SMTP id s69so22234741oie.13 for ; Mon, 04 Oct 2021 09:27:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0dpw/V8bg0MxBudexnCNVse/yhrpLd1wrwigqMt/Mf4=; b=KY78Qmm2I2oJnuiJDbLvhJzFIYKH8L01yxBpURsAiYcyFEiJx3lJyzUqseVKJg4SIc oTuCf1yQdJOSa6z9H0GkXfVpM2FKpkttrHdT8lVvFLVFd8PG/yOkeQBmiwQqsvFTPv6Z 0/egDVMfTKoG5s+1DrCIOKe8ZgYmXI69qHTS8vzp1+kpX+pFwkSHH7vSSNhuPtCQHPvE FCmwf043HjYd+WmZAtvWtDRpRTcHvrKDE9OlTgAxqDkWMXCJ6Ggk61nqzuc6EBT8Sl3Y fretIHPELFW5TZxtF6Mt8hjw+pls6zqZxpIkPOhIiHJ+tuz5aFFiL8d9dY2551XtR/v3 FHDA== X-Gm-Message-State: AOAM531GTsKUKBU7FFmqfEImY/0dWR7zX+h0HYuRs8XQbqQ0xozHnazf JKYDH7EaYTiPZwpQGrojDY3O9Izbyw== X-Google-Smtp-Source: ABdhPJyWs8jPtI7Az6impbOs6RYLWqtQA6g7t7PUwbGnr6ooHx6OyIrt5yr6QR8S2RGXjkrcVH6Pcw== X-Received: by 2002:aca:30c9:: with SMTP id w192mr13601001oiw.93.1633364836818; Mon, 04 Oct 2021 09:27:16 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id d21sm2868961ooh.43.2021.10.04.09.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 09:27:15 -0700 (PDT) Received: (nullmailer pid 1418805 invoked by uid 1000); Mon, 04 Oct 2021 16:27:14 -0000 Date: Mon, 4 Oct 2021 11:27:14 -0500 From: Rob Herring To: Li Yang Cc: Shawn Guo , devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] memory: fsl_ifc: populate child devices without relying on simple-bus Message-ID: References: <20211001000924.15421-1-leoyang.li@nxp.com> <20211001000924.15421-3-leoyang.li@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211001000924.15421-3-leoyang.li@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211004_172725_735995_D1C0F121 X-CRM114-Status: GOOD ( 19.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 30, 2021 at 07:09:21PM -0500, Li Yang wrote: > After we update the binding to not use simple-bus compatible for the > controller, we need the driver to populate the child devices explicitly. > > Signed-off-by: Li Yang > --- > drivers/memory/fsl_ifc.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/memory/fsl_ifc.c b/drivers/memory/fsl_ifc.c > index d062c2f8250f..251d713cd50b 100644 > --- a/drivers/memory/fsl_ifc.c > +++ b/drivers/memory/fsl_ifc.c > @@ -88,6 +88,7 @@ static int fsl_ifc_ctrl_remove(struct platform_device *dev) > { > struct fsl_ifc_ctrl *ctrl = dev_get_drvdata(&dev->dev); > > + of_platform_depopulate(&dev->dev); > free_irq(ctrl->nand_irq, ctrl); > free_irq(ctrl->irq, ctrl); > > @@ -285,6 +286,14 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev) > } > } > > + /* legacy dts may still use "simple-bus" compatible */ > + if (!of_device_is_compatible(dev->dev.of_node, "simple-bus")) { > + ret = of_platform_populate(dev->dev.of_node, NULL, NULL, > + &dev->dev); There's no need to make this conditional. of_platform_populate() is safe to call multiple times. If that doesn't work, it's a bug. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92B16C433F5 for ; Mon, 4 Oct 2021 16:34:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74F9E6126A for ; Mon, 4 Oct 2021 16:34:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235396AbhJDQgL (ORCPT ); Mon, 4 Oct 2021 12:36:11 -0400 Received: from mail-oi1-f173.google.com ([209.85.167.173]:42776 "EHLO mail-oi1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234828AbhJDQgL (ORCPT ); Mon, 4 Oct 2021 12:36:11 -0400 Received: by mail-oi1-f173.google.com with SMTP id x124so22286928oix.9; Mon, 04 Oct 2021 09:34:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0dpw/V8bg0MxBudexnCNVse/yhrpLd1wrwigqMt/Mf4=; b=0uLehH8cQydmMA/XcmmSH4EZonhIIs6d5++YMPzkju1tQY/FEy4mQnGI98gjjHgRhY Ubg5zsBlws/1R8pTT4HHGf4+zmkCO+yckOGUEhhoQw/bGY3fgklG3NIRWzTRl+JIR4/9 IvFUva5IisRWMa+7EmNVFLEMvE7OHztNm9xL5fQGWhcLaV+hbD+tFt3PCu87qdWbiz9n gJmXqujN/nNGkH9l5i8rujzmbvEgYtDt2q7G9DZk/64HjEQ3PJMGf9D587p1Pg1XWO1+ MJb3xUPXwgL3447iQUaJiZDpxnZ6XGuRPrKJvpBCsN3dkFUiIUzTrwk0dxGHPcrCE7R0 2+UQ== X-Gm-Message-State: AOAM533OhW4ki4H/6CXubXwdfmyJV+S/tx4LouksFf4DX0PuL0BYZTwg n+mnbTWMHaE5ffCPYu632VNFD5G81A== X-Google-Smtp-Source: ABdhPJyWs8jPtI7Az6impbOs6RYLWqtQA6g7t7PUwbGnr6ooHx6OyIrt5yr6QR8S2RGXjkrcVH6Pcw== X-Received: by 2002:aca:30c9:: with SMTP id w192mr13601001oiw.93.1633364836818; Mon, 04 Oct 2021 09:27:16 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id d21sm2868961ooh.43.2021.10.04.09.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 09:27:15 -0700 (PDT) Received: (nullmailer pid 1418805 invoked by uid 1000); Mon, 04 Oct 2021 16:27:14 -0000 Date: Mon, 4 Oct 2021 11:27:14 -0500 From: Rob Herring To: Li Yang Cc: Shawn Guo , devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] memory: fsl_ifc: populate child devices without relying on simple-bus Message-ID: References: <20211001000924.15421-1-leoyang.li@nxp.com> <20211001000924.15421-3-leoyang.li@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211001000924.15421-3-leoyang.li@nxp.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Sep 30, 2021 at 07:09:21PM -0500, Li Yang wrote: > After we update the binding to not use simple-bus compatible for the > controller, we need the driver to populate the child devices explicitly. > > Signed-off-by: Li Yang > --- > drivers/memory/fsl_ifc.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/memory/fsl_ifc.c b/drivers/memory/fsl_ifc.c > index d062c2f8250f..251d713cd50b 100644 > --- a/drivers/memory/fsl_ifc.c > +++ b/drivers/memory/fsl_ifc.c > @@ -88,6 +88,7 @@ static int fsl_ifc_ctrl_remove(struct platform_device *dev) > { > struct fsl_ifc_ctrl *ctrl = dev_get_drvdata(&dev->dev); > > + of_platform_depopulate(&dev->dev); > free_irq(ctrl->nand_irq, ctrl); > free_irq(ctrl->irq, ctrl); > > @@ -285,6 +286,14 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev) > } > } > > + /* legacy dts may still use "simple-bus" compatible */ > + if (!of_device_is_compatible(dev->dev.of_node, "simple-bus")) { > + ret = of_platform_populate(dev->dev.of_node, NULL, NULL, > + &dev->dev); There's no need to make this conditional. of_platform_populate() is safe to call multiple times. If that doesn't work, it's a bug. Rob