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=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS 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 59CD4C4321A for ; Thu, 25 Apr 2019 20:58:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EF602077C for ; Thu, 25 Apr 2019 20:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556225894; bh=8m5+haKLvhFLfF1z86HrpUJs3hxsLdAiFKGFP5CKDf8=; h=In-Reply-To:References:Cc:From:Subject:To:Date:List-ID:From; b=gP9nPWlXg+RHCuAG7NnPwrJwRpj6/APrZ+koQVYrLiHmy9bLPC/naYUrVJc2FFHI5 bsifna0JIv+o13J58BGJvr3UQDdEWycnyvwZCd4DqK5PmpUPhxC0JMFznSMJJs8tNX gvpbyDdEE0my34Uy2WE8cH7ZpxJhl6AVvJsNrJQ0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727161AbfDYU6N (ORCPT ); Thu, 25 Apr 2019 16:58:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:60304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726282AbfDYU6M (ORCPT ); Thu, 25 Apr 2019 16:58:12 -0400 Received: from localhost (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0C347206BF; Thu, 25 Apr 2019 20:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556225892; bh=8m5+haKLvhFLfF1z86HrpUJs3hxsLdAiFKGFP5CKDf8=; h=In-Reply-To:References:Cc:From:Subject:To:Date:From; b=fjc1pXU15rRcX8MvSe2qKPdkxu7boJVCvBSM5cEBGyd9nN6WKHFt2rNpBQ4bN7DjD oOA81PwYZrMm/IiJeggPhNPJL7RdGBpPRzcaUTg4at/+uKgqC6GoZt2TKsRN1t+TzT Af2AnmwAPREgiUfaPlJD7pLZlgib2EWd+pWjX8xM= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190425203139.GO14604@piout.net> References: <20190402125056.21509-1-alexandre.belloni@bootlin.com> <20190402125056.21509-8-alexandre.belloni@bootlin.com> <155622113579.15276.15900194435736283135@swboyd.mtv.corp.google.com> <20190425203139.GO14604@piout.net> Cc: Nicolas Ferre , Claudiu Beznea , Michael Turquette , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Stephen Boyd Subject: Re: [PATCH v3 7/7] clk: at91: add sam9x60 pmc driver To: Alexandre Belloni Message-ID: <155622589096.15276.8583738150370510787@swboyd.mtv.corp.google.com> User-Agent: alot/0.8 Date: Thu, 25 Apr 2019 13:58:10 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Alexandre Belloni (2019-04-25 13:31:39) > On 25/04/2019 12:38:55-0700, Stephen Boyd wrote: > > Quoting Alexandre Belloni (2019-04-02 05:50:56) > > > diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c > > > new file mode 100644 > > > index 000000000000..22bf51c55bdc > > > --- /dev/null > > > +++ b/drivers/clk/at91/sam9x60.c > > > @@ -0,0 +1,307 @@ > > > +// SPDX-License-Identifier: GPL-2.0 > > > +#include > > > +#include > > > +#include > > > + > > > +#include > > > + > > > +#include "pmc.h" > > > + > > > +DEFINE_SPINLOCK(pmc_pll_lock); > > > + > > > +static const struct clk_master_characteristics mck_characteristics = =3D { > > > + .output =3D { .min =3D 140000000, .max =3D 200000000 }, > > > + .divisors =3D { 1, 2, 4, 3 }, > > > + .have_div3_pres =3D 1, > > > +}; > > > + > > > +static const struct clk_master_layout sam9x60_master_layout =3D { > > > + .mask =3D 0x373, > > > + .pres_shift =3D 4, > > > + .offset =3D 0x28, > > > +}; > > > + > > > +static struct clk_range plla_outputs[] =3D { > >=20 > > const? > >=20 >=20 > Right, can you fix that up or should I send a new version? >=20 I can fix it. > > > + { .min =3D 300000000, .max =3D 600000000 }, > > > +}; > > [...] > > > + > > > +} > > > + > > > +CLK_OF_DECLARE_DRIVER(sam9x60_pmc, "microchip,sam9x60-pmc", sam9x60_= pmc_setup); > > > --=20 > >=20 > > Can't be platform device? > >=20 >=20 > IIRC two clocks are used by the clocksource and having it as a platform > device make the clocksource driver fail with -EPROBE_DEFER. >=20 Ok. I'll add a comment in the driver. It needs to be CLK_OF_DECLARE_DRIVER() because it's used somewhere else too? Or it can be CLK_OF_DECLARE() instead? 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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 55A4DC43218 for ; Thu, 25 Apr 2019 20:58:23 +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 5CF06206BF for ; Thu, 25 Apr 2019 20:58:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xawo9M9l"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="fjc1pXU1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CF06206BF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Date:Message-ID:To:Subject:From: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pivugrb5UNnkCGCDzudgt5d3Esr7k3BmwFwDe0E85uU=; b=Xawo9M9lRIIJ+q R/4pxZgpH83OM8yAA8wVHSANiSAzOsxA32ur2ZNMyOY5Ml5loXZ+I+W5q9s34y8FWo7aoFfhzKXub ieAYHy7H0Hn0vj6kC80B4oO0PNhHjI23HrpeSF4SNaV1hAQmdqsGjc0C6s1nJYvZl1mHB0NWMhQI/ Lb0o7maQHQjSesJi5XBGfik37tVGqmNqRwwlSyFeFjbwFoOVLRFy9RTkNQDB3Lo08LunsmU+dVYe+ jvBHd16/b+Au26OfUk2sCsMXfobkwXQAPYanCbYeT4rbHKK5rKJkNOebZ3q6HS2jz08pmrIdll1BN 3ej+jjA0MmVNhyGzNe/w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJlRf-0004S1-Sd; Thu, 25 Apr 2019 20:58:15 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJlRc-0004Rg-H7 for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2019 20:58:13 +0000 Received: from localhost (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0C347206BF; Thu, 25 Apr 2019 20:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556225892; bh=8m5+haKLvhFLfF1z86HrpUJs3hxsLdAiFKGFP5CKDf8=; h=In-Reply-To:References:Cc:From:Subject:To:Date:From; b=fjc1pXU15rRcX8MvSe2qKPdkxu7boJVCvBSM5cEBGyd9nN6WKHFt2rNpBQ4bN7DjD oOA81PwYZrMm/IiJeggPhNPJL7RdGBpPRzcaUTg4at/+uKgqC6GoZt2TKsRN1t+TzT Af2AnmwAPREgiUfaPlJD7pLZlgib2EWd+pWjX8xM= MIME-Version: 1.0 In-Reply-To: <20190425203139.GO14604@piout.net> References: <20190402125056.21509-1-alexandre.belloni@bootlin.com> <20190402125056.21509-8-alexandre.belloni@bootlin.com> <155622113579.15276.15900194435736283135@swboyd.mtv.corp.google.com> <20190425203139.GO14604@piout.net> From: Stephen Boyd Subject: Re: [PATCH v3 7/7] clk: at91: add sam9x60 pmc driver To: Alexandre Belloni Message-ID: <155622589096.15276.8583738150370510787@swboyd.mtv.corp.google.com> User-Agent: alot/0.8 Date: Thu, 25 Apr 2019 13:58:10 -0700 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190425_135812_589209_753C6BF5 X-CRM114-Status: GOOD ( 13.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Turquette , linux-kernel@vger.kernel.org, Claudiu Beznea , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Alexandre Belloni (2019-04-25 13:31:39) > On 25/04/2019 12:38:55-0700, Stephen Boyd wrote: > > Quoting Alexandre Belloni (2019-04-02 05:50:56) > > > diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c > > > new file mode 100644 > > > index 000000000000..22bf51c55bdc > > > --- /dev/null > > > +++ b/drivers/clk/at91/sam9x60.c > > > @@ -0,0 +1,307 @@ > > > +// SPDX-License-Identifier: GPL-2.0 > > > +#include > > > +#include > > > +#include > > > + > > > +#include > > > + > > > +#include "pmc.h" > > > + > > > +DEFINE_SPINLOCK(pmc_pll_lock); > > > + > > > +static const struct clk_master_characteristics mck_characteristics = { > > > + .output = { .min = 140000000, .max = 200000000 }, > > > + .divisors = { 1, 2, 4, 3 }, > > > + .have_div3_pres = 1, > > > +}; > > > + > > > +static const struct clk_master_layout sam9x60_master_layout = { > > > + .mask = 0x373, > > > + .pres_shift = 4, > > > + .offset = 0x28, > > > +}; > > > + > > > +static struct clk_range plla_outputs[] = { > > > > const? > > > > Right, can you fix that up or should I send a new version? > I can fix it. > > > + { .min = 300000000, .max = 600000000 }, > > > +}; > > [...] > > > + > > > +} > > > + > > > +CLK_OF_DECLARE_DRIVER(sam9x60_pmc, "microchip,sam9x60-pmc", sam9x60_pmc_setup); > > > -- > > > > Can't be platform device? > > > > IIRC two clocks are used by the clocksource and having it as a platform > device make the clocksource driver fail with -EPROBE_DEFER. > Ok. I'll add a comment in the driver. It needs to be CLK_OF_DECLARE_DRIVER() because it's used somewhere else too? Or it can be CLK_OF_DECLARE() instead? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel