From patchwork Thu Jan 28 10:44:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12053339 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 064FEC433DB for ; Thu, 28 Jan 2021 10:46:52 +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 9D22964DD6 for ; Thu, 28 Jan 2021 10:46:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D22964DD6 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.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:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=zMy4WRsqGTRFlTwSwx6P0olJPMZciVWidBnMe/He5Fc=; b=IS61hN4p5nwHoI4JkSmAe0o459 FlJU5Bk1ka1ZpyjBPVKlQPt6nn5JiE36BdbU5FerRxbMp0m1ePVHd5GOuiHuqSE0XEcB/ZUU+bNIn 0oh4J5lVGZ8FqP+KDYE0s+TBORMqP9Yt/GBWDj1hDEs5zmDXn9JEKF2L2fD83yCQz9BXCIBZD6o1i ayXyMJXb85AvF3BxGCtElipiJy5hWLA+gQLeIXfSqeNEABZIs+rdlmXi14zUhtTzOr08JW3/Jl1AJ ft7KdE+miRIHQIRbl2hv5mCkT+fDeEvftAPtNWQfAfHh5+ZiWD8h9cBu6AcZv6VJ7skCIt9+yD4CU 7vlR1jCg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l54no-0004tS-Eo; Thu, 28 Jan 2021 10:45:28 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l54nm-0004t4-3c for linux-arm-kernel@lists.infradead.org; Thu, 28 Jan 2021 10:45:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1611830726; x=1643366726; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=D6qNV/vjZeiLfEcTt/3jdRVcFKcoTBJFa2PCRv2vvKM=; b=GLpe8NtwBRr7g21/Zp0znvigfQIeOcmH4PqCVnYv3X1m6bVfcJC+/maP FWzOJPBcueBdCxO1QWx1gMLK4np8vtriN1/lplTbA28W3fynTZ9fR8lC8 fr9UEE9JZg7VVDrOjDfQHSgKbIdfCByyoKJnZVyWxkVXKIapyDcNXeJcy S1ycOtrSd95zgWrqOJtVHMv/aC/oSBMJqH3P9myGwSbcKn/o9QtH1iuzm AcLaOr1Uhyk4kp7UYHKpMySLzUobql8v5PdtznzV9PFK1Z4euH/djKmDQ 5tM6bW6tP9vAYwW+6ZhPoioW7354e9gFUAveUcdg2pyHEHGWZiWsGgmHv g==; IronPort-SDR: zBEaE9xo6X1i4YoEqKr+Gu/A4ObzZMwCBJrEaFOqnnWxJCvvGfnXSCZKbNbNGakN1eRVG+ex5p EY5qoedEjlJolArCoYzU7CTBwPe2MgiXTGk6k75kKK26pSNgnZGdqwVrCo+PV0wPKZGswPFyXI L4h8PZnDPo2x79PixPPNjOcccOzcnwek4Qc/bINMq9SBMzAY7d1cBt5gdjJewrhzvI5L9zSSBC Jo9jZ32Y5m6gTgGimj46QFl+by6jVLs8l2JKQ1iSbe4iNf1n6WFx3FetpUS2ZDgJVzakeEdWYE EBQ= X-IronPort-AV: E=Sophos;i="5.79,382,1602572400"; d="scan'208";a="101743811" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Jan 2021 03:45:23 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 28 Jan 2021 03:45:23 -0700 Received: from atudor-ThinkPad-T470p.amer.actel.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Thu, 28 Jan 2021 03:45:20 -0700 From: Tudor Ambarus To: , , , , , , , Subject: [PATCH] clk: at91: sama5d2: Mark device OF_POPULATED after setup Date: Thu, 28 Jan 2021 12:44:46 +0200 Message-ID: <20210128104446.164269-1-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210128_054526_374858_1C12DC06 X-CRM114-Status: GOOD ( 11.23 ) 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: gregkh@linuxfoundation.org, Tudor Ambarus , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The sama5d2 requires the clock provider initialized before timers. We can't use a platform driver for the sama5d2-pmc driver, as the platform_bus_init() is called later on, after time_init(). As fw_devlink considers only devices, it does not know that the pmc is ready. Hence probing of devices that depend on it fail: probe deferral - supplier f0014000.pmc not ready Fix this by setting the OF_POPULATED flag for the sama5d2_pmc device node after successful setup. This will make of_link_to_phandle() ignore the sama5d2_pmc device node as a dependency, and consumer devices will be probed again. Fixes: e590474768f1cc04 ("driver core: Set fw_devlink=on by default") Signed-off-by: Tudor Ambarus --- I'll be out of office, will check the rest of the at91 SoCs at the begining of next week. drivers/clk/at91/sama5d2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c index 9a5cbc7cd55a..5eea2b4a63dd 100644 --- a/drivers/clk/at91/sama5d2.c +++ b/drivers/clk/at91/sama5d2.c @@ -367,6 +367,8 @@ static void __init sama5d2_pmc_setup(struct device_node *np) of_clk_add_hw_provider(np, of_clk_hw_pmc_get, sama5d2_pmc); + of_node_set_flag(np, OF_POPULATED); + return; err_free: