Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp775139pxb; Thu, 30 Sep 2021 17:33:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtUc/KHg4lzUqSJFNbqsZKVuTwfO3x5MUd8q36OsIQr+pMtkPn75cdLP2CvLPxzll/xJiy X-Received: by 2002:a17:906:c05a:: with SMTP id bm26mr2791714ejb.498.1633048383400; Thu, 30 Sep 2021 17:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633048383; cv=none; d=google.com; s=arc-20160816; b=H1kcHJaoIUqep0fPj2ZpIC/MQ4sfIWoGyivuLPN7ECycootwC+R6zsZFJgup9gSzbx kZvZmZ6aPMMzAvvb+JxaqyNeRhH/Og2EwTSxmYUD/tpM2RpCbTHihT/8Po/JRhcje6j8 vdE+sray8WxPj/aKH4AuJt6ZG+jz0YfKxCfnxuuf4/HEFIQv/v7LURa+A7M/FGZHfpwR IvE+COqPLWGJ+9ymtBsppnqJoeaKsd50RBHJClj6VSpTjUu0uujG1DD/aRmcWgeDihE0 2FhOgZR3cQoDOlKJnxQgPeGqSumXl6G5LSDbn+dZN2k8BY6qnM0gPAgwqrbUTdwhrW8s iHPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hyoOYXOanFGD6lCBoWe4H3Lim3Pdsf6OP9wkFYnc5Bw=; b=FN45QmTjJMKSHSjKCKCzVYplNDICFkBq8ubbFVmK2UByjYrjhJkuYl0fe6IL2TTFjJ AHD+SSB2l23qn8DawJahPBitpn9xcNKjlaqQkeK6sO8cwbMf9bBZdcgYxAe2aiY6VREf WA1MJ2SFmzTyRVQEcgeZ1fnJs77TpHGnMJ+96Gs+J9L03JS4KKeGlPOz3sQjqFW99bQ/ 7mB0AGIHQaS+vYas6TIeBnmVgWez8o9kE8IQV0Iv+UiJImu7ONjc0I5b22rxI9nkkbEa Gb2JlXDEo+T2bPqZFrO5cCpgx5o6BoqbdLAaZeXQ7yCa03T+Hhofc4CSWJN5NTWd1oHc paqg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u27si1064149ejg.412.2021.09.30.17.32.36; Thu, 30 Sep 2021 17:33: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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350675AbhJAALQ (ORCPT + 99 others); Thu, 30 Sep 2021 20:11:16 -0400 Received: from inva020.nxp.com ([92.121.34.13]:41424 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238100AbhJAALO (ORCPT ); Thu, 30 Sep 2021 20:11:14 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 963EE1A0D89; Fri, 1 Oct 2021 02:09:30 +0200 (CEST) Received: from smtp.na-rdc02.nxp.com (usphx01srsp001v.us-phx01.nxp.com [134.27.49.11]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 5A8F91A0D85; Fri, 1 Oct 2021 02:09:30 +0200 (CEST) Received: from right.am.freescale.net (right.am.freescale.net [10.81.116.142]) by usphx01srsp001v.us-phx01.nxp.com (Postfix) with ESMTP id 7DED840BCF; Thu, 30 Sep 2021 17:09:29 -0700 (MST) From: Li Yang To: Shawn Guo , Rob Herring , devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: Li Yang Subject: [PATCH 2/5] memory: fsl_ifc: populate child devices without relying on simple-bus Date: Thu, 30 Sep 2021 19:09:21 -0500 Message-Id: <20211001000924.15421-3-leoyang.li@nxp.com> X-Mailer: git-send-email 2.25.1.377.g2d2118b In-Reply-To: <20211001000924.15421-1-leoyang.li@nxp.com> References: <20211001000924.15421-1-leoyang.li@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); + if (ret) + goto err_nandirq; + } + return 0; err_nandirq: -- 2.25.1