Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp11058247imu; Thu, 6 Dec 2018 10:50:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wyk8dyyZ4KKUBLSCpw+74K43R9rRPYr+CCPxJKvMj71mQPnngHQANR/VGS4G6PSuGwRSs1 X-Received: by 2002:a63:d846:: with SMTP id k6mr24376224pgj.251.1544122233729; Thu, 06 Dec 2018 10:50:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544122233; cv=none; d=google.com; s=arc-20160816; b=Q8lAUssC98b4JR8P1nHqqkbMqWEfCxVhix83aw+MPWeANjZyff3cDJ5sdaGIboL63M U2mIkfm3TIj1YJOzHEyDTITL3EclUbRbYd1vdmcskLRWbUjaK8mAD5gHGspATGKG6eM7 xSO5lsoAB6QtI2FqsOcHV96O9QrnZRgiTrS0AgazBsxlI2GEeMVtlKZdaDLh21o7S3Hw pvq/rGHGzgPj9BDrpmTpE0RB3lQwpTMpoXjYd7Fy+gVqlHo9wU+ik3YCKQx4sTvKnWPB i9m4xC80xgPEaQlZrO8ubokPaFJ5FOapnCPQ0XGUxJCVDqYJw5lvGpIeHkAAdnOHu9le /GeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature; bh=OXlhBbD9lu0ij75xiC9pDC3dCVk+TFchbyjR9UkEGd4=; b=oA7bt3eNVYH/h5EQ7cGX9ZuT4+kc6rkiETtcSfcyx06TqSbruqz5P5l929bhxDEVde kd3jwo+HK80OyBislhzCXdNLZ9klXmnL+jQjUueZ+TrJXYvCBYbctLFGmIYT1kZ7BFEU SEa2ntTVshQLH9+0HGn/ijWeyK+7KNN13Bq+E5OhZaZxdFOGxapMhWs5p22BbqiFtH8M kZarKbfk2JSRdyLcYov/HlsRwa3Ufv7Il5/dKRg7t28fyAKyYwc/RnAab3xMDM5zjoQp R4wQd7LqHqd85nlwrx5lVFCiurilUpqtK4YO323uN+oeeDLLEzt0YDBREphNc6QaDGi8 D7BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JAl5s94V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u69si875651pfj.219.2018.12.06.10.50.17; Thu, 06 Dec 2018 10:50:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JAl5s94V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726027AbeLFStk (ORCPT + 99 others); Thu, 6 Dec 2018 13:49:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:49120 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbeLFStk (ORCPT ); Thu, 6 Dec 2018 13:49:40 -0500 Received: from localhost (unknown [104.132.1.77]) (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 8F1B420892; Thu, 6 Dec 2018 18:49:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544122179; bh=c2FkfkWDfo0X+sfR3Y93kLhJbaEGXTN6njPigIWWPDQ=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=JAl5s94VPqFfFbh1gWNiJu22dLzK2B9x/9fi1g7vGsbe1XKX9J73zVYtm5oP7Hnmw +nmxhmFCaaPBVR/LboMYG8rqFj3cIL2t1o1zYTFVTWCriYMypAhig8b0WDICIE0Dd/ tXE9tKIrf8pOz9Qk43YsWf6TepH45S+M18pvYAgA= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Tali Perry , avifishman70@gmail.com, brendanhiggins@google.com, mturquette@baylibre.com, tmaimon77@gmail.com, venture@google.com, yuenn@google.com From: Stephen Boyd In-Reply-To: <20181206084431.315559-1-tali.perry1@gmail.com> Cc: openbmc@lists.ozlabs.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Tali Perry , Wei Yongjun References: <20181206084431.315559-1-tali.perry1@gmail.com> Message-ID: <154412217893.88331.5801113240812610558@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v2] clk: npcm7xx: get fixed clocks from DT Date: Thu, 06 Dec 2018 10:49:38 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Tali Perry (2018-12-06 00:44:31) > diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c > index 27a86b7a34db..4bd2e40997d4 100644 > --- a/drivers/clk/clk-npcm7xx.c > +++ b/drivers/clk/clk-npcm7xx.c > @@ -8,13 +8,19 @@ > */ > = > #include > +#include > #include > +#include > #include > #include > #include > +#include > +#include > #include > +#include > #include > #include > +#include Why? > #include > = > #include > @@ -568,6 +575,31 @@ static void __init npcm7xx_clk_init(struct device_no= de *clk_np) > for (i =3D 0; i < NPCM7XX_NUM_CLOCKS; i++) > npcm7xx_clk_data->hws[i] =3D ERR_PTR(-EPROBE_DEFER); > = > + /* Read fixed clocks. These 3 clocks must be defined in DT */ > + clk =3D of_clk_get_by_name(clk_np, NPCM7XX_CLK_S_REFCLK); > + if (IS_ERR(clk)) { > + pr_err("failed to find external REFCLK on device tree, er= r=3D%ld\n", > + PTR_ERR(clk)); > + clk_put(clk); > + goto npcm7xx_init_fail_no_clk_on_dt; > + } > + > + clk =3D of_clk_get_by_name(clk_np, NPCM7XX_CLK_S_SYSBYPCK); > + if (IS_ERR(clk)) { > + pr_err("failed to find external SYSBYPCK on device tree, = err=3D%ld\n", > + PTR_ERR(clk)); > + clk_put(clk); > + goto npcm7xx_init_fail_no_clk_on_dt; > + } > + > + clk =3D of_clk_get_by_name(clk_np, NPCM7XX_CLK_S_MCBYPCK); > + if (IS_ERR(clk)) { > + pr_err("failed to find external MCBYPCK on device tree, e= rr=3D%ld\n", > + PTR_ERR(clk)); > + clk_put(clk); > + goto npcm7xx_init_fail_no_clk_on_dt; > + } Now this looks like a DT validator in the kernel. DT folks are working on a schema and validator, which should be able to make sure that the DTS file has the proper set of clks specified for this drivers' node so that we don't need to check in the kernel. So it looks like nothing needs to change here?