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 X-Spam-Level: X-Spam-Status: No, score=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFA95C433E6 for ; Tue, 16 Feb 2021 18:27:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B38E964E28 for ; Tue, 16 Feb 2021 18:27:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230331AbhBPS1Y (ORCPT ); Tue, 16 Feb 2021 13:27:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhBPS1W (ORCPT ); Tue, 16 Feb 2021 13:27:22 -0500 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3AC9C061756 for ; Tue, 16 Feb 2021 10:26:35 -0800 (PST) Received: by mail-yb1-xb2f.google.com with SMTP id c131so6551219ybf.7 for ; Tue, 16 Feb 2021 10:26:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=86ZOTfo2pRLUjt+3X3QjxmKkX8aHJubkBHJvWhxkHZg=; b=jplIDjDGKUUBlrkHKo/8ABuCOHTog1UcXNNzGLP/87K7e4DMHib05919ZF/TTX7W56 gksGp+fBfgYV+wRWsJOiz49XBqYw8badhUpVwJ18+IpoBwL952ghsJbcFLQYK0zlvAeK u3wGJRA7XC5wM2qVL8egr/TZLGgN6BtChopZGxZc1Z57bW9Ad6lrhz2LnzZA7UWAD5aS 6bZkf4sTUJl2Kbb9BMeje1rvCS/pmNGoH4CLObA70++6wh8WaxlN/NasICuqSF4sXCub zVHKmj68JZUnwKt/ikuoKYdLAxiw+/lw/FPhzU4LARv6YIviQbZlAQWDjbNsQb2Wbx9Q NzJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=86ZOTfo2pRLUjt+3X3QjxmKkX8aHJubkBHJvWhxkHZg=; b=G5JDNOBLNuZ+GKvnNQ/6RICod3YqdNV9pn9DHv0IhSoAj3SaQHZKN++rGC0q1dse+5 Zke/nz+QKLLGheKIRardj8g2Q7PbQaTSmouxASqKeRq9r4HBz9dv10LIOce7h53ItQJA 16MWPXQsaEAPyE1JETWjegDKRfyqJC0cZE+EE3R8l2Er8V6HwWL/jYYcLCbLTnwc5Own fFAA9VXoYn1S6s9uKWABCrqEQ/dL9rPHxujTF6Z6VMnXRqj9O3A9vSiYBm4dVfaqfcAE lbOyQcAZH5FXlIY6j/AQu1TAwPPVqo01R3EWq0HC743RrHPKOBJ5t9bc06QFakoy07ge L5sg== X-Gm-Message-State: AOAM532XcNThUxFnZTjdjiKgMZcRX+p2o3KnDDoe/sPBkOGsNdgr9/6Y YGs71uqc8VySx+x6uOJ/wdb5LPtA2u9fbv6R54G0VA== X-Google-Smtp-Source: ABdhPJyZspXVqzarSXof+RAxF+6vufj39CfyT7WwHzYfMgr/xSoC2BqtLkJKBPt11/r+1as7k8cT/4rUscOBlCdaR9M= X-Received: by 2002:a25:b74c:: with SMTP id e12mr34402113ybm.20.1613499994962; Tue, 16 Feb 2021 10:26:34 -0800 (PST) MIME-Version: 1.0 References: <20210216123958.3180014-1-geert+renesas@glider.be> In-Reply-To: <20210216123958.3180014-1-geert+renesas@glider.be> From: Saravana Kannan Date: Tue, 16 Feb 2021 10:25:59 -0800 Message-ID: Subject: Re: [PATCH v2] soc: renesas: rmobile-sysc: Mark fwnode when PM domain is added To: Geert Uytterhoeven Cc: Magnus Damm , Sebastian Reichel , Linux-Renesas , linux-arm-kernel , Linux PM , LKML , Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 4:40 AM Geert Uytterhoeven wrote: > > Currently, there are two drivers binding to the R-Mobile System > Controller (SYSC): > - The rmobile-sysc driver registers PM domains from a core_initcall(), > and does not use a platform driver, > - The optional rmobile-reset driver registers a reset handler, and > does use a platform driver. > > As fw_devlink only considers devices, commit bab2d712eeaf9d60 ("PM: > domains: Mark fwnodes when their powerdomain is added/removed") works > only for PM Domain drivers where the DT node is a real device node, and > not for PM Domain drivers using a hierarchical representation inside a > subnode. Hence if fw_devlink is enabled, probing of on-chip devices > that are part of the SYSC PM domain is deferred until the optional > rmobile-reset driver has been bound. If the rmobile-reset driver is > not available, this will never happen, and thus lead to complete system > boot failures. > > Fix this by explicitly marking the fwnode initialized. > > Suggested-by: Saravana Kannan > Signed-off-by: Geert Uytterhoeven > --- > This is v2 of "soc: renesas: rmobile-sysc: Set OF_POPULATED and absorb > reset handling". > To be queued in renesas-devel as a fix for v5.12 if v5.12-rc1 will have > fw_devlink enabled. > > v2: > - Call fwnode_dev_initialized() instead of setting OF_POPULATED, > - Drop reset handling move, as fwnode_dev_initialized() does not > prevent the rmobile-reset driver from binding against the same > device. > --- > drivers/soc/renesas/rmobile-sysc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/soc/renesas/rmobile-sysc.c b/drivers/soc/renesas/rmobile-sysc.c > index bf64d052f9245db5..204e6135180b919c 100644 > --- a/drivers/soc/renesas/rmobile-sysc.c > +++ b/drivers/soc/renesas/rmobile-sysc.c > @@ -342,6 +342,8 @@ static int __init rmobile_init_pm_domains(void) > of_node_put(np); > break; > } > + > + fwnode_dev_initialized(&np->fwnode, true); > } > > put_special_pds(); Acked-by: Saravana Kannan Keep in mind that this might have to land in driver-core-next since that API is currently only in driver-core-next. -Saravana 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 X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72F3CC433DB for ; Tue, 16 Feb 2021 18:28:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 EF9E764E10 for ; Tue, 16 Feb 2021 18:28:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF9E764E10 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lxUc5CCpctzKsy4s/Y6puR5oqO/oy8SBMqTVHQkTlBg=; b=Zc7opzQIfUPBtHSoHNBp2JA3w jKbLLRIsaSxfaeXCbwCSHFPE9cdm7cbcsfuJJFqlB49qPy11tzUogQagBT8HYR+fmX7V7v/jlfBhK fYUsAt08ruC5vqSBJMAf/izeJf/PigOiSuWb3edkdkpuUHnWYLVwoxVR66fLRujdHVg/m7dY8cGkY aE9z0POID3aSX9q2W9mhJMn+QKhgiGGjhr+gLg/3orL9EepmnZ/OmQYHZdYU+WQXrccXBSc/kA0l9 panHWbKoOk/bLWh1KFw8wtZdpGKCz/aXLj3SbqgZ/77FNPYKXkpgCGAnS2Bc20eviyoU5ZZpEU3mA LfCus953w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lC53b-00084H-0C; Tue, 16 Feb 2021 18:26:43 +0000 Received: from mail-yb1-xb2d.google.com ([2607:f8b0:4864:20::b2d]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lC53X-00081s-AT for linux-arm-kernel@lists.infradead.org; Tue, 16 Feb 2021 18:26:41 +0000 Received: by mail-yb1-xb2d.google.com with SMTP id m9so9279901ybk.8 for ; Tue, 16 Feb 2021 10:26:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=86ZOTfo2pRLUjt+3X3QjxmKkX8aHJubkBHJvWhxkHZg=; b=jplIDjDGKUUBlrkHKo/8ABuCOHTog1UcXNNzGLP/87K7e4DMHib05919ZF/TTX7W56 gksGp+fBfgYV+wRWsJOiz49XBqYw8badhUpVwJ18+IpoBwL952ghsJbcFLQYK0zlvAeK u3wGJRA7XC5wM2qVL8egr/TZLGgN6BtChopZGxZc1Z57bW9Ad6lrhz2LnzZA7UWAD5aS 6bZkf4sTUJl2Kbb9BMeje1rvCS/pmNGoH4CLObA70++6wh8WaxlN/NasICuqSF4sXCub zVHKmj68JZUnwKt/ikuoKYdLAxiw+/lw/FPhzU4LARv6YIviQbZlAQWDjbNsQb2Wbx9Q NzJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=86ZOTfo2pRLUjt+3X3QjxmKkX8aHJubkBHJvWhxkHZg=; b=REXQXPg3ef7BPcmhsP/Y2jpi4rKNPZXPBuJtLmOotXX4XX3dxb1EJv169+6nLaINfh vLrA+PoTFZlA7d9m07FHqOKi/XwBpaIxfP5sxes2cZjmuegKHnHUmDMQn/fswaeHhZ54 cKpSXcs/fuZ8vQp3ztdA5ynDMESFbiYTkzMBgkQ2zraNE/wSFm3a584JdAw6rUVnDKh3 xNDNbZhAJUQ20oTPkuRbioGEdbKKOBvTJSU+2Tj70hxsivzWBD1/V1uLkMVFwNLQVb/v LmnGE+l23yEZN4bcgTaIeUlhLMnw/7TvegMYWgpUOhUvOJpxXL7K/2A9tID8nHG2F8v3 o+Aw== X-Gm-Message-State: AOAM533BH7pNaUN1xiS77U87Y3+1OkMaWGMj18Qp9RuWlgcm3WN64Lye yqf/0eA/fBsssZDd0O147vPfN4yUMghovNJrcyHDDl9dq8U= X-Google-Smtp-Source: ABdhPJyZspXVqzarSXof+RAxF+6vufj39CfyT7WwHzYfMgr/xSoC2BqtLkJKBPt11/r+1as7k8cT/4rUscOBlCdaR9M= X-Received: by 2002:a25:b74c:: with SMTP id e12mr34402113ybm.20.1613499994962; Tue, 16 Feb 2021 10:26:34 -0800 (PST) MIME-Version: 1.0 References: <20210216123958.3180014-1-geert+renesas@glider.be> In-Reply-To: <20210216123958.3180014-1-geert+renesas@glider.be> From: Saravana Kannan Date: Tue, 16 Feb 2021 10:25:59 -0800 Message-ID: Subject: Re: [PATCH v2] soc: renesas: rmobile-sysc: Mark fwnode when PM domain is added To: Geert Uytterhoeven X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210216_132639_433784_AEAC6916 X-CRM114-Status: GOOD ( 23.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux PM , Greg Kroah-Hartman , Magnus Damm , LKML , Sebastian Reichel , Linux-Renesas , linux-arm-kernel 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 Tue, Feb 16, 2021 at 4:40 AM Geert Uytterhoeven wrote: > > Currently, there are two drivers binding to the R-Mobile System > Controller (SYSC): > - The rmobile-sysc driver registers PM domains from a core_initcall(), > and does not use a platform driver, > - The optional rmobile-reset driver registers a reset handler, and > does use a platform driver. > > As fw_devlink only considers devices, commit bab2d712eeaf9d60 ("PM: > domains: Mark fwnodes when their powerdomain is added/removed") works > only for PM Domain drivers where the DT node is a real device node, and > not for PM Domain drivers using a hierarchical representation inside a > subnode. Hence if fw_devlink is enabled, probing of on-chip devices > that are part of the SYSC PM domain is deferred until the optional > rmobile-reset driver has been bound. If the rmobile-reset driver is > not available, this will never happen, and thus lead to complete system > boot failures. > > Fix this by explicitly marking the fwnode initialized. > > Suggested-by: Saravana Kannan > Signed-off-by: Geert Uytterhoeven > --- > This is v2 of "soc: renesas: rmobile-sysc: Set OF_POPULATED and absorb > reset handling". > To be queued in renesas-devel as a fix for v5.12 if v5.12-rc1 will have > fw_devlink enabled. > > v2: > - Call fwnode_dev_initialized() instead of setting OF_POPULATED, > - Drop reset handling move, as fwnode_dev_initialized() does not > prevent the rmobile-reset driver from binding against the same > device. > --- > drivers/soc/renesas/rmobile-sysc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/soc/renesas/rmobile-sysc.c b/drivers/soc/renesas/rmobile-sysc.c > index bf64d052f9245db5..204e6135180b919c 100644 > --- a/drivers/soc/renesas/rmobile-sysc.c > +++ b/drivers/soc/renesas/rmobile-sysc.c > @@ -342,6 +342,8 @@ static int __init rmobile_init_pm_domains(void) > of_node_put(np); > break; > } > + > + fwnode_dev_initialized(&np->fwnode, true); > } > > put_special_pds(); Acked-by: Saravana Kannan Keep in mind that this might have to land in driver-core-next since that API is currently only in driver-core-next. -Saravana _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel