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=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 412A5C433E0 for ; Wed, 3 Feb 2021 18:16:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F2E1364E33 for ; Wed, 3 Feb 2021 18:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233015AbhBCSQa (ORCPT ); Wed, 3 Feb 2021 13:16:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231740AbhBCSQS (ORCPT ); Wed, 3 Feb 2021 13:16:18 -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 A62D3C061786 for ; Wed, 3 Feb 2021 10:15:37 -0800 (PST) Received: by mail-yb1-xb2f.google.com with SMTP id b187so475357ybg.9 for ; Wed, 03 Feb 2021 10:15:37 -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=6sqZaAUfYP8DNj5oKyeEZdFXBpvCgFM5Th4Vqh4Q634=; b=lOCi5F89Jo6/RQia3F3QjW5H8JRtVAggDniGtWTFvyV29+w/Me9pVYU6kUFe+j8AdD qR/LTy8y0uCprC78deNpv0fM4YqNxpwAlhTkmPymYshYb58sHNW6VxQ3VeQDwfP9pwUD SRIH+3sg5aSF0mreMNA4LIqsyTSfytG9hVCw8diN2pZRiQV0maZkxpsMncxXL1t79+pc ITxSmChZwdKprpJ2cfy2SJfVLcA8AfrkZOdEgJoVOQIwnIQefxdOUKPFZhG1UMKB5LDk xjzJ/dDwZFpWlZ7HTeQgdbIXpAtf4jv8Top90svdbXLULybjAQJK1nvChss4hc8iKTb8 mldw== 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=6sqZaAUfYP8DNj5oKyeEZdFXBpvCgFM5Th4Vqh4Q634=; b=st6d76D+sqkKWXalJBQyBoSGvDkUKlOktL/5nEDGjfP6/aERzLdZGNu2DTaDg3qPBV eAhZPxr+SChGxb+8ynZ+ZjUFck7yF3cn2V6gmvcnpZvtAeuq7lk1g6BMSF7c7svgE0bd m286Jn0/+RGoB3oq7aQqZUDmQNratmoSofewTULcpC9MhyiXCJEwb41yNG+SfEcF6OxY eCKHsXdsU/xXGQ+9mrTZJFNNS7MHqE3QQBUe6X/qfXJTRyEVYZU35iODYb9fv3Ghcenk wdRxSmy8tGU68fz41cnFpOmoVBfZh/hhjV0zkkRmc+OfRf8Q7p4vZL8cCURKSvndHnts Nqmg== X-Gm-Message-State: AOAM533QGSCKDuTdQd3t0B1VPS/AnYee9G/MKGSszT43AVzDIzmmLAsD 4FYITLwfASEdyMn1e5ee1YHWwbBEjE/9LI8SlBrq8g== X-Google-Smtp-Source: ABdhPJz6aZVy82ZsC3b1j0AJTJk7Kz1cmCa03LfsrOrXyhMqcF+421DMroQW7sZo7ORWxNkWA8sj6OoRS32EqQl5p9o= X-Received: by 2002:a25:718b:: with SMTP id m133mr6743785ybc.412.1612376136653; Wed, 03 Feb 2021 10:15:36 -0800 (PST) MIME-Version: 1.0 References: <20210203154332.470587-1-tudor.ambarus@microchip.com> In-Reply-To: <20210203154332.470587-1-tudor.ambarus@microchip.com> From: Saravana Kannan Date: Wed, 3 Feb 2021 10:15:00 -0800 Message-ID: Subject: Re: [PATCH] clk: at91: Fix the declaration of the clocks To: Tudor Ambarus Cc: Michael Turquette , Stephen Boyd , nicolas.ferre@microchip.com, Alexandre Belloni , Ludovic Desroches , Greg Kroah-Hartman , Geert Uytterhoeven , mirq-linux@rere.qmqm.pl, Claudiu Beznea , a.fatoum@pengutronix.de, Krzysztof Kozlowski , codrin.ciubotariu@microchip.com, linux-clk , linux-arm-kernel , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 3, 2021 at 7:43 AM Tudor Ambarus wrote: > > These are all "early clocks" that require initialization just at > of_clk_init() time. Use CLK_OF_DECLARE() to declare them. > > This also fixes a problem that was spotted when fw_devlink was > set to 'on' by default: the boards failed to boot. The reason is > that CLK_OF_DECLARE_DRIVER() clears the OF_POPULATED and causes > the consumers of the clock to be postponed by fw_devlink until > the second initialization routine of the clock has been completed. > One of the consumers of the clock is the timer, which is used as a > clocksource, and needs the clock initialized early. Postponing the > timers caused the fail at boot. > > Signed-off-by: Tudor Ambarus Thanks Tudor! Acked-by: Saravana Kannan -Saravana > --- > Tested on sama5d2_xplained. > > drivers/clk/at91/at91rm9200.c | 3 +-- > drivers/clk/at91/at91sam9260.c | 16 ++++++++-------- > drivers/clk/at91/at91sam9g45.c | 3 +-- > drivers/clk/at91/at91sam9n12.c | 3 +-- > drivers/clk/at91/at91sam9rl.c | 3 ++- > drivers/clk/at91/at91sam9x5.c | 20 ++++++++++---------- > drivers/clk/at91/sama5d2.c | 3 ++- > drivers/clk/at91/sama5d3.c | 2 +- > drivers/clk/at91/sama5d4.c | 3 ++- > 9 files changed, 28 insertions(+), 28 deletions(-) > > diff --git a/drivers/clk/at91/at91rm9200.c b/drivers/clk/at91/at91rm9200.c > index 0fad1009f315..428a6f4b9ebc 100644 > --- a/drivers/clk/at91/at91rm9200.c > +++ b/drivers/clk/at91/at91rm9200.c > @@ -215,5 +215,4 @@ static void __init at91rm9200_pmc_setup(struct device_node *np) > * deferring properly. Once this is fixed, this can be switched to a platform > * driver. > */ > -CLK_OF_DECLARE_DRIVER(at91rm9200_pmc, "atmel,at91rm9200-pmc", > - at91rm9200_pmc_setup); > +CLK_OF_DECLARE(at91rm9200_pmc, "atmel,at91rm9200-pmc", at91rm9200_pmc_setup); > diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c > index ceb5495f723a..b29843bea278 100644 > --- a/drivers/clk/at91/at91sam9260.c > +++ b/drivers/clk/at91/at91sam9260.c > @@ -491,26 +491,26 @@ static void __init at91sam9260_pmc_setup(struct device_node *np) > { > at91sam926x_pmc_setup(np, &at91sam9260_data); > } > -CLK_OF_DECLARE_DRIVER(at91sam9260_pmc, "atmel,at91sam9260-pmc", > - at91sam9260_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9260_pmc, "atmel,at91sam9260-pmc", at91sam9260_pmc_setup); > > static void __init at91sam9261_pmc_setup(struct device_node *np) > { > at91sam926x_pmc_setup(np, &at91sam9261_data); > } > -CLK_OF_DECLARE_DRIVER(at91sam9261_pmc, "atmel,at91sam9261-pmc", > - at91sam9261_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9261_pmc, "atmel,at91sam9261-pmc", at91sam9261_pmc_setup); > > static void __init at91sam9263_pmc_setup(struct device_node *np) > { > at91sam926x_pmc_setup(np, &at91sam9263_data); > } > -CLK_OF_DECLARE_DRIVER(at91sam9263_pmc, "atmel,at91sam9263-pmc", > - at91sam9263_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9263_pmc, "atmel,at91sam9263-pmc", at91sam9263_pmc_setup); > > static void __init at91sam9g20_pmc_setup(struct device_node *np) > { > at91sam926x_pmc_setup(np, &at91sam9g20_data); > } > -CLK_OF_DECLARE_DRIVER(at91sam9g20_pmc, "atmel,at91sam9g20-pmc", > - at91sam9g20_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9g20_pmc, "atmel,at91sam9g20-pmc", at91sam9g20_pmc_setup); > diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c > index 0214333dedd3..15da0dfe3ef2 100644 > --- a/drivers/clk/at91/at91sam9g45.c > +++ b/drivers/clk/at91/at91sam9g45.c > @@ -228,5 +228,4 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np) > * The TCB is used as the clocksource so its clock is needed early. This means > * this can't be a platform driver. > */ > -CLK_OF_DECLARE_DRIVER(at91sam9g45_pmc, "atmel,at91sam9g45-pmc", > - at91sam9g45_pmc_setup); > +CLK_OF_DECLARE(at91sam9g45_pmc, "atmel,at91sam9g45-pmc", at91sam9g45_pmc_setup); > diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c > index f9db5316a7f1..7fe435f4b46b 100644 > --- a/drivers/clk/at91/at91sam9n12.c > +++ b/drivers/clk/at91/at91sam9n12.c > @@ -255,5 +255,4 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np) > * The TCB is used as the clocksource so its clock is needed early. This means > * this can't be a platform driver. > */ > -CLK_OF_DECLARE_DRIVER(at91sam9n12_pmc, "atmel,at91sam9n12-pmc", > - at91sam9n12_pmc_setup); > +CLK_OF_DECLARE(at91sam9n12_pmc, "atmel,at91sam9n12-pmc", at91sam9n12_pmc_setup); > diff --git a/drivers/clk/at91/at91sam9rl.c b/drivers/clk/at91/at91sam9rl.c > index 66736e03cfef..ecbabf5162bd 100644 > --- a/drivers/clk/at91/at91sam9rl.c > +++ b/drivers/clk/at91/at91sam9rl.c > @@ -186,4 +186,5 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np) > err_free: > kfree(at91sam9rl_pmc); > } > -CLK_OF_DECLARE_DRIVER(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup); > diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c > index 79b9d3667228..5cce48c64ea2 100644 > --- a/drivers/clk/at91/at91sam9x5.c > +++ b/drivers/clk/at91/at91sam9x5.c > @@ -302,33 +302,33 @@ static void __init at91sam9g15_pmc_setup(struct device_node *np) > { > at91sam9x5_pmc_setup(np, at91sam9g15_periphck, true); > } > -CLK_OF_DECLARE_DRIVER(at91sam9g15_pmc, "atmel,at91sam9g15-pmc", > - at91sam9g15_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9g15_pmc, "atmel,at91sam9g15-pmc", at91sam9g15_pmc_setup); > > static void __init at91sam9g25_pmc_setup(struct device_node *np) > { > at91sam9x5_pmc_setup(np, at91sam9g25_periphck, false); > } > -CLK_OF_DECLARE_DRIVER(at91sam9g25_pmc, "atmel,at91sam9g25-pmc", > - at91sam9g25_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9g25_pmc, "atmel,at91sam9g25-pmc", at91sam9g25_pmc_setup); > > static void __init at91sam9g35_pmc_setup(struct device_node *np) > { > at91sam9x5_pmc_setup(np, at91sam9g35_periphck, true); > } > -CLK_OF_DECLARE_DRIVER(at91sam9g35_pmc, "atmel,at91sam9g35-pmc", > - at91sam9g35_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9g35_pmc, "atmel,at91sam9g35-pmc", at91sam9g35_pmc_setup); > > static void __init at91sam9x25_pmc_setup(struct device_node *np) > { > at91sam9x5_pmc_setup(np, at91sam9x25_periphck, false); > } > -CLK_OF_DECLARE_DRIVER(at91sam9x25_pmc, "atmel,at91sam9x25-pmc", > - at91sam9x25_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9x25_pmc, "atmel,at91sam9x25-pmc", at91sam9x25_pmc_setup); > > static void __init at91sam9x35_pmc_setup(struct device_node *np) > { > at91sam9x5_pmc_setup(np, at91sam9x35_periphck, true); > } > -CLK_OF_DECLARE_DRIVER(at91sam9x35_pmc, "atmel,at91sam9x35-pmc", > - at91sam9x35_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9x35_pmc, "atmel,at91sam9x35-pmc", at91sam9x35_pmc_setup); > diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c > index 9a5cbc7cd55a..3d1f78176c3e 100644 > --- a/drivers/clk/at91/sama5d2.c > +++ b/drivers/clk/at91/sama5d2.c > @@ -372,4 +372,5 @@ static void __init sama5d2_pmc_setup(struct device_node *np) > err_free: > kfree(sama5d2_pmc); > } > -CLK_OF_DECLARE_DRIVER(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup); > + > +CLK_OF_DECLARE(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup); > diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c > index 87009ee8effc..d376257807d2 100644 > --- a/drivers/clk/at91/sama5d3.c > +++ b/drivers/clk/at91/sama5d3.c > @@ -255,4 +255,4 @@ static void __init sama5d3_pmc_setup(struct device_node *np) > * The TCB is used as the clocksource so its clock is needed early. This means > * this can't be a platform driver. > */ > -CLK_OF_DECLARE_DRIVER(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup); > +CLK_OF_DECLARE(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup); > diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c > index 57fff790188b..5cbaac68da44 100644 > --- a/drivers/clk/at91/sama5d4.c > +++ b/drivers/clk/at91/sama5d4.c > @@ -286,4 +286,5 @@ static void __init sama5d4_pmc_setup(struct device_node *np) > err_free: > kfree(sama5d4_pmc); > } > -CLK_OF_DECLARE_DRIVER(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup); > + > +CLK_OF_DECLARE(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup); > -- 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=-14.3 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 190DFC433E6 for ; Wed, 3 Feb 2021 18:16:56 +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 9DFD964F7C for ; Wed, 3 Feb 2021 18:16:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DFD964F7C 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=DBGd6LhXwLAvsBN8IlhX9YFMIzW0HmV2+Dy6elKvXVQ=; b=BNVIp4HbnVbYhaSYImT/AJpcL Q6Yb1emfJ4tMT+lf2AxjfLlqyNXnTUgBdzvYY+4bu+EO8qs6y7JLgCbcYqPhSva1/RguzQdmpygTh ie4AZbyqYNOKNqqo1eH0yHNuEe550DhfvUias92POSqvNUMlJGTjkfk8alL3O+Eh+ur2+Q/tMoLPK AElIvdxNAD75L/3FuLMA73mzXeISnZpHtWObLnQAYaSIIfVfb/tN8TJtcaDt+hhXJDdRhODoTkEZn +Q9eGuyydj1tff/4B0QHu5dSbTBUJ7giwoR9ODqS4fIEKYpSktD9QIBQPaEWvbM62n9XE8E5mtegv LUdZUDzAA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7Mgp-0004MU-56; Wed, 03 Feb 2021 18:15:43 +0000 Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7Mgm-0004Kf-RL for linux-arm-kernel@lists.infradead.org; Wed, 03 Feb 2021 18:15:41 +0000 Received: by mail-yb1-xb32.google.com with SMTP id m76so541101ybf.0 for ; Wed, 03 Feb 2021 10:15:38 -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=6sqZaAUfYP8DNj5oKyeEZdFXBpvCgFM5Th4Vqh4Q634=; b=lOCi5F89Jo6/RQia3F3QjW5H8JRtVAggDniGtWTFvyV29+w/Me9pVYU6kUFe+j8AdD qR/LTy8y0uCprC78deNpv0fM4YqNxpwAlhTkmPymYshYb58sHNW6VxQ3VeQDwfP9pwUD SRIH+3sg5aSF0mreMNA4LIqsyTSfytG9hVCw8diN2pZRiQV0maZkxpsMncxXL1t79+pc ITxSmChZwdKprpJ2cfy2SJfVLcA8AfrkZOdEgJoVOQIwnIQefxdOUKPFZhG1UMKB5LDk xjzJ/dDwZFpWlZ7HTeQgdbIXpAtf4jv8Top90svdbXLULybjAQJK1nvChss4hc8iKTb8 mldw== 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=6sqZaAUfYP8DNj5oKyeEZdFXBpvCgFM5Th4Vqh4Q634=; b=L4+vq4pqccW5UtWblFn1QsXUTVJLFD0+2osq8Vb/LwM4U3b8Bxi0nIjWLjvopiOf5Z MKadCK0rgm85Aflmb8T/aJRclktzmD37kgFK9x6CGEoVStwiJPSLnjXepw6DCaNuAYOP XizvNlEvmK2J/sCa6rTEWq7D2HmqRovvYePJTwDqszxAsQVdKN7PGIVnROT5tUHkCA3s im2wiTJ/GPxBtQxzblhl9J39iX6J63P515isLhfCUQbAQupd2WBTKarvW4VlSdT/lt02 sMRqCd38+TOgwwoh0eVUgi4c6yjDLQbKwu6vAQXpyuWNvaVtmXrb8+RoglB4weHr5rGt oXDg== X-Gm-Message-State: AOAM530lJpTtFFaDa5I41Ome1V4MFbBfrGmn8PK0NMjfTKtTdNb7SYXb 0EGAs+utBmdLiDoAmwQqqyZ1Z4gXQnIpkan6XDk7ZQ== X-Google-Smtp-Source: ABdhPJz6aZVy82ZsC3b1j0AJTJk7Kz1cmCa03LfsrOrXyhMqcF+421DMroQW7sZo7ORWxNkWA8sj6OoRS32EqQl5p9o= X-Received: by 2002:a25:718b:: with SMTP id m133mr6743785ybc.412.1612376136653; Wed, 03 Feb 2021 10:15:36 -0800 (PST) MIME-Version: 1.0 References: <20210203154332.470587-1-tudor.ambarus@microchip.com> In-Reply-To: <20210203154332.470587-1-tudor.ambarus@microchip.com> From: Saravana Kannan Date: Wed, 3 Feb 2021 10:15:00 -0800 Message-ID: Subject: Re: [PATCH] clk: at91: Fix the declaration of the clocks To: Tudor Ambarus X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210203_131540_939266_5302B06C X-CRM114-Status: GOOD ( 22.99 ) 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: Alexandre Belloni , a.fatoum@pengutronix.de, LKML , Stephen Boyd , Greg Kroah-Hartman , Michael Turquette , linux-clk , Krzysztof Kozlowski , mirq-linux@rere.qmqm.pl, Ludovic Desroches , Geert Uytterhoeven , codrin.ciubotariu@microchip.com, Claudiu Beznea , 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 Wed, Feb 3, 2021 at 7:43 AM Tudor Ambarus wrote: > > These are all "early clocks" that require initialization just at > of_clk_init() time. Use CLK_OF_DECLARE() to declare them. > > This also fixes a problem that was spotted when fw_devlink was > set to 'on' by default: the boards failed to boot. The reason is > that CLK_OF_DECLARE_DRIVER() clears the OF_POPULATED and causes > the consumers of the clock to be postponed by fw_devlink until > the second initialization routine of the clock has been completed. > One of the consumers of the clock is the timer, which is used as a > clocksource, and needs the clock initialized early. Postponing the > timers caused the fail at boot. > > Signed-off-by: Tudor Ambarus Thanks Tudor! Acked-by: Saravana Kannan -Saravana > --- > Tested on sama5d2_xplained. > > drivers/clk/at91/at91rm9200.c | 3 +-- > drivers/clk/at91/at91sam9260.c | 16 ++++++++-------- > drivers/clk/at91/at91sam9g45.c | 3 +-- > drivers/clk/at91/at91sam9n12.c | 3 +-- > drivers/clk/at91/at91sam9rl.c | 3 ++- > drivers/clk/at91/at91sam9x5.c | 20 ++++++++++---------- > drivers/clk/at91/sama5d2.c | 3 ++- > drivers/clk/at91/sama5d3.c | 2 +- > drivers/clk/at91/sama5d4.c | 3 ++- > 9 files changed, 28 insertions(+), 28 deletions(-) > > diff --git a/drivers/clk/at91/at91rm9200.c b/drivers/clk/at91/at91rm9200.c > index 0fad1009f315..428a6f4b9ebc 100644 > --- a/drivers/clk/at91/at91rm9200.c > +++ b/drivers/clk/at91/at91rm9200.c > @@ -215,5 +215,4 @@ static void __init at91rm9200_pmc_setup(struct device_node *np) > * deferring properly. Once this is fixed, this can be switched to a platform > * driver. > */ > -CLK_OF_DECLARE_DRIVER(at91rm9200_pmc, "atmel,at91rm9200-pmc", > - at91rm9200_pmc_setup); > +CLK_OF_DECLARE(at91rm9200_pmc, "atmel,at91rm9200-pmc", at91rm9200_pmc_setup); > diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c > index ceb5495f723a..b29843bea278 100644 > --- a/drivers/clk/at91/at91sam9260.c > +++ b/drivers/clk/at91/at91sam9260.c > @@ -491,26 +491,26 @@ static void __init at91sam9260_pmc_setup(struct device_node *np) > { > at91sam926x_pmc_setup(np, &at91sam9260_data); > } > -CLK_OF_DECLARE_DRIVER(at91sam9260_pmc, "atmel,at91sam9260-pmc", > - at91sam9260_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9260_pmc, "atmel,at91sam9260-pmc", at91sam9260_pmc_setup); > > static void __init at91sam9261_pmc_setup(struct device_node *np) > { > at91sam926x_pmc_setup(np, &at91sam9261_data); > } > -CLK_OF_DECLARE_DRIVER(at91sam9261_pmc, "atmel,at91sam9261-pmc", > - at91sam9261_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9261_pmc, "atmel,at91sam9261-pmc", at91sam9261_pmc_setup); > > static void __init at91sam9263_pmc_setup(struct device_node *np) > { > at91sam926x_pmc_setup(np, &at91sam9263_data); > } > -CLK_OF_DECLARE_DRIVER(at91sam9263_pmc, "atmel,at91sam9263-pmc", > - at91sam9263_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9263_pmc, "atmel,at91sam9263-pmc", at91sam9263_pmc_setup); > > static void __init at91sam9g20_pmc_setup(struct device_node *np) > { > at91sam926x_pmc_setup(np, &at91sam9g20_data); > } > -CLK_OF_DECLARE_DRIVER(at91sam9g20_pmc, "atmel,at91sam9g20-pmc", > - at91sam9g20_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9g20_pmc, "atmel,at91sam9g20-pmc", at91sam9g20_pmc_setup); > diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c > index 0214333dedd3..15da0dfe3ef2 100644 > --- a/drivers/clk/at91/at91sam9g45.c > +++ b/drivers/clk/at91/at91sam9g45.c > @@ -228,5 +228,4 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np) > * The TCB is used as the clocksource so its clock is needed early. This means > * this can't be a platform driver. > */ > -CLK_OF_DECLARE_DRIVER(at91sam9g45_pmc, "atmel,at91sam9g45-pmc", > - at91sam9g45_pmc_setup); > +CLK_OF_DECLARE(at91sam9g45_pmc, "atmel,at91sam9g45-pmc", at91sam9g45_pmc_setup); > diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c > index f9db5316a7f1..7fe435f4b46b 100644 > --- a/drivers/clk/at91/at91sam9n12.c > +++ b/drivers/clk/at91/at91sam9n12.c > @@ -255,5 +255,4 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np) > * The TCB is used as the clocksource so its clock is needed early. This means > * this can't be a platform driver. > */ > -CLK_OF_DECLARE_DRIVER(at91sam9n12_pmc, "atmel,at91sam9n12-pmc", > - at91sam9n12_pmc_setup); > +CLK_OF_DECLARE(at91sam9n12_pmc, "atmel,at91sam9n12-pmc", at91sam9n12_pmc_setup); > diff --git a/drivers/clk/at91/at91sam9rl.c b/drivers/clk/at91/at91sam9rl.c > index 66736e03cfef..ecbabf5162bd 100644 > --- a/drivers/clk/at91/at91sam9rl.c > +++ b/drivers/clk/at91/at91sam9rl.c > @@ -186,4 +186,5 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np) > err_free: > kfree(at91sam9rl_pmc); > } > -CLK_OF_DECLARE_DRIVER(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup); > diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c > index 79b9d3667228..5cce48c64ea2 100644 > --- a/drivers/clk/at91/at91sam9x5.c > +++ b/drivers/clk/at91/at91sam9x5.c > @@ -302,33 +302,33 @@ static void __init at91sam9g15_pmc_setup(struct device_node *np) > { > at91sam9x5_pmc_setup(np, at91sam9g15_periphck, true); > } > -CLK_OF_DECLARE_DRIVER(at91sam9g15_pmc, "atmel,at91sam9g15-pmc", > - at91sam9g15_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9g15_pmc, "atmel,at91sam9g15-pmc", at91sam9g15_pmc_setup); > > static void __init at91sam9g25_pmc_setup(struct device_node *np) > { > at91sam9x5_pmc_setup(np, at91sam9g25_periphck, false); > } > -CLK_OF_DECLARE_DRIVER(at91sam9g25_pmc, "atmel,at91sam9g25-pmc", > - at91sam9g25_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9g25_pmc, "atmel,at91sam9g25-pmc", at91sam9g25_pmc_setup); > > static void __init at91sam9g35_pmc_setup(struct device_node *np) > { > at91sam9x5_pmc_setup(np, at91sam9g35_periphck, true); > } > -CLK_OF_DECLARE_DRIVER(at91sam9g35_pmc, "atmel,at91sam9g35-pmc", > - at91sam9g35_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9g35_pmc, "atmel,at91sam9g35-pmc", at91sam9g35_pmc_setup); > > static void __init at91sam9x25_pmc_setup(struct device_node *np) > { > at91sam9x5_pmc_setup(np, at91sam9x25_periphck, false); > } > -CLK_OF_DECLARE_DRIVER(at91sam9x25_pmc, "atmel,at91sam9x25-pmc", > - at91sam9x25_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9x25_pmc, "atmel,at91sam9x25-pmc", at91sam9x25_pmc_setup); > > static void __init at91sam9x35_pmc_setup(struct device_node *np) > { > at91sam9x5_pmc_setup(np, at91sam9x35_periphck, true); > } > -CLK_OF_DECLARE_DRIVER(at91sam9x35_pmc, "atmel,at91sam9x35-pmc", > - at91sam9x35_pmc_setup); > + > +CLK_OF_DECLARE(at91sam9x35_pmc, "atmel,at91sam9x35-pmc", at91sam9x35_pmc_setup); > diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c > index 9a5cbc7cd55a..3d1f78176c3e 100644 > --- a/drivers/clk/at91/sama5d2.c > +++ b/drivers/clk/at91/sama5d2.c > @@ -372,4 +372,5 @@ static void __init sama5d2_pmc_setup(struct device_node *np) > err_free: > kfree(sama5d2_pmc); > } > -CLK_OF_DECLARE_DRIVER(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup); > + > +CLK_OF_DECLARE(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup); > diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c > index 87009ee8effc..d376257807d2 100644 > --- a/drivers/clk/at91/sama5d3.c > +++ b/drivers/clk/at91/sama5d3.c > @@ -255,4 +255,4 @@ static void __init sama5d3_pmc_setup(struct device_node *np) > * The TCB is used as the clocksource so its clock is needed early. This means > * this can't be a platform driver. > */ > -CLK_OF_DECLARE_DRIVER(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup); > +CLK_OF_DECLARE(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup); > diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c > index 57fff790188b..5cbaac68da44 100644 > --- a/drivers/clk/at91/sama5d4.c > +++ b/drivers/clk/at91/sama5d4.c > @@ -286,4 +286,5 @@ static void __init sama5d4_pmc_setup(struct device_node *np) > err_free: > kfree(sama5d4_pmc); > } > -CLK_OF_DECLARE_DRIVER(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup); > + > +CLK_OF_DECLARE(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup); > -- _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel