From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dAVKz-0005aP-3M for barebox@lists.infradead.org; Tue, 16 May 2017 05:48:02 +0000 Date: Tue, 16 May 2017 07:47:39 +0200 From: Sascha Hauer Message-ID: <20170516054739.kkfk5c3xr4nmvabn@pengutronix.de> References: <1494493768-42043-1-git-send-email-s.riedmueller@phytec.de> <1494493768-42043-2-git-send-email-s.riedmueller@phytec.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1494493768-42043-2-git-send-email-s.riedmueller@phytec.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 2/3] ARM: i.MX6ul: Add Clock support for i.MX6ull To: Stefan Riedmueller Cc: barebox@lists.infradead.org On Thu, May 11, 2017 at 11:09:27AM +0200, Stefan Riedmueller wrote: > From linux-4.10 clock support, only skipped some unnecessary clocks > > Signed-off-by: Stefan Riedmueller > --- > drivers/clk/imx/clk-imx6ul.c | 73 +++++++++++++++++++++++++++++++++++++------- > 1 file changed, 62 insertions(+), 11 deletions(-) > > diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c > index f28660d..b0a6bb0 100644 > --- a/drivers/clk/imx/clk-imx6ul.c > +++ b/drivers/clk/imx/clk-imx6ul.c > @@ -66,10 +66,24 @@ static const char *perclk_sels[] = { "ipg", "osc", }; > static const char *lcdif_sels[] = { "lcdif_podf", "ipp_di0", "ipp_di1", "ldb_di0", "ldb_di1", }; > static const char *csi_sels[] = { "osc", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", }; > static const char *sim_sels[] = { "sim_podf", "ipp_di0", "ipp_di1", "ldb_di0", "ldb_di1", }; > +/* epdc_pre_sels, epdc_sels, esai_sels only exists on i.MX6ULL */ > +static const char *epdc_pre_sels[] = { "pll2_bus", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd2_508m", }; > +static const char *esai_sels[] = { "pll4_audio_div", "pll3_pfd2_508m", "pll5_video_div", "pll3_usb_otg", }; > +static const char *epdc_sels[] = { "epdc_podf", "ipp_di0", "ipp_di1", "ldb_di0", "ldb_di1", }; > > static struct clk *clks[IMX6UL_CLK_END]; > static struct clk_onecell_data clk_data; > > +static inline int clk_on_imx6ul(void) > +{ > + return of_machine_is_compatible("fsl,imx6ul"); > +} > + > +static inline int clk_on_imx6ull(void) > +{ > + return of_machine_is_compatible("fsl,imx6ull"); > +} Can we use cpu_is_imx6ul(l) instead here? This would allow us to compile away the code if we one of the two SoCs is disabled in the config. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox