Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4811947pxb; Tue, 2 Nov 2021 16:36:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySkSGBz2KzvPUehrEqht6s/on13dcAv2w4EVGMSoJ7GodT1UB33BcyPnNBQ8+cl27Kr6Z3 X-Received: by 2002:a17:906:58c6:: with SMTP id e6mr18228635ejs.524.1635896205533; Tue, 02 Nov 2021 16:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635896205; cv=none; d=google.com; s=arc-20160816; b=ZfrW/MR0H2cR9FjxfyIwBrnY5hMSRWe/P8gD0wLB95g2KMZnQpzqz9WF8jxyfHs52a ruwsAyUJyJJrwTCrRCukIo7llcq0+Vp5XifdrwijcYa7bifh7m3uqAmAk7KarSgARdZ7 O7QZQWqc/xaMK/AeglMF+pPjsLszkvNh6RrDi/7C2HpOMOmf3orjDFJq3lS1P9RXaPYR +8ozlqVbyuT4vnpRPJiyp8/Dzo9ty5XpijeLAfPSiF6s1EH5w4aS1XQU6BEw+OcFVMcP w3vM4r/bW3H8t/shR/agg/xZPhGYK3NXFZWEdnOSJRfz0s0AttE8HdAZkiPZma+EZAxd Q+dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WExrQsHq2+oSn64OIwRtqz+A7F4kLA/sw615cMT17iA=; b=swbz3nWEOzpuuNbaMbnh8D9/FQio0L8PqouHfESa6LOOFpvIHua1Por8dkeFVBKcm/ Bt9muXzOdx4Hi1wUTCLC5AuV+5nWkVSr8wJfHIOUCnGcCnBoz2zALRTDqW+Nf1v8TP5d Ycnis5RqNDL3v+zdvUe5lfRy/j2hzx7y+9az2QyOuDGb+nhz9iG/yg1UGb22m1KG1drx B3a2+k7DeGjUKcH+n6P37PMLVdDXg6Nd8CFFUzDLcVekF6TMQSF2Om/dJ5xJQ9TPI0iZ 57f3WzjXl4/jF5bqh3R9QwJ+JE8gw36QAsFCTJ2IN35uKYGMBPRmn+Nij1FaLJAtZICV 0qiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HCmVnRxR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz13si638175ejb.619.2021.11.02.16.36.22; Tue, 02 Nov 2021 16:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HCmVnRxR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231167AbhKBXhO (ORCPT + 99 others); Tue, 2 Nov 2021 19:37:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230054AbhKBXhN (ORCPT ); Tue, 2 Nov 2021 19:37:13 -0400 Received: from mail-ua1-x92d.google.com (mail-ua1-x92d.google.com [IPv6:2607:f8b0:4864:20::92d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71744C061203; Tue, 2 Nov 2021 16:34:38 -0700 (PDT) Received: by mail-ua1-x92d.google.com with SMTP id o26so1156305uab.5; Tue, 02 Nov 2021 16:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WExrQsHq2+oSn64OIwRtqz+A7F4kLA/sw615cMT17iA=; b=HCmVnRxR0fmsMlryA0puisk728Cvco3Lv5XxJp6kRibLhmBpMZfrnNErKOsheskWB+ 22RUFqwoPnQBcSIZIYFO7pkAtmaFQ4CTgo1OBGBeIJxpYc6WyT70Ks7XagV+jnHtqwhk tnfPsRCiSFpcemJLu+256qHzVVNSnZgvS8JSsk4skTKgkHqqFH1/ra95nJtRG9M7l75e Fl558NlMqAlMABEtstkuxphKjN9f7s6qxsIIDScN2ws2WQd+zfOTZoY+ICSTE5bPag8E ltdHM9ZDHfY02MPV8i5FSOTnDNuehgxDHoZxx0igYv5QNYAJeyc/OsxB/77QJ4MNBJPu HeMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WExrQsHq2+oSn64OIwRtqz+A7F4kLA/sw615cMT17iA=; b=h+D4i/fOj4HwPD2S3yF9Ug9SrWjY2D9GXPKzvn5/GT+hJBcQRCKCg6n9ixdxupHUM+ jFafW/bYd6ZBWl5BmH099VzdCW+Tt6/3wN7GWREgxvVg8DjfejTqXffcXG+3sFS15E4v sKMOSFBxxlURFHKM+5cSO1ax+y31bKqsM1gKc+WFqmUNByTnTwP3Un29yjc/C1cvLcN7 2IVZcNjcqRuB1GlVywB8+uRZvS79igPiqi/03sPGwp1xav+XOwL2jATcitAM/umhlc5C +8CVylVVBWzInKMMFtS56h1SEPbB5F1vLWJL4qdNf0xscczHKXcIYgpcA4Vg3M4JSozP vl7A== X-Gm-Message-State: AOAM532q7hNOn+jk5KZ3JK1ENgoqDUwVuesPMypTeA87a0G0vx8hJ//2 KrUB6L3PntOyleKJbOsz2O4Pktvyhw/9A3bRtw3UyKtuFdQ= X-Received: by 2002:a67:af13:: with SMTP id v19mr4344787vsl.5.1635896077608; Tue, 02 Nov 2021 16:34:37 -0700 (PDT) MIME-Version: 1.0 References: <20211102225701.98944-1-Mr.Bossman075@gmail.com> <20211102225701.98944-8-Mr.Bossman075@gmail.com> In-Reply-To: <20211102225701.98944-8-Mr.Bossman075@gmail.com> From: Fabio Estevam Date: Tue, 2 Nov 2021 20:34:26 -0300 Message-ID: Subject: Re: [PATCH v2 07/13] clk: imx: Add initial support for i.MXRT clock driver To: Jesse Taube Cc: NXP Linux Team , Michael Turquette , Stephen Boyd , Rob Herring , Shawn Guo , Sascha Hauer , Sascha Hauer , Ulf Hansson , Dong Aisheng , Stefan Agner , Linus Walleij , Greg Kroah-Hartman , Arnd Bergmann , Olof Johansson , soc@kernel.org, Russell King - ARM Linux , Abel Vesa , Adrian Hunter , Jiri Slaby , Giulio Benetti , Nobuhiro Iwamatsu , linux-clk , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-kernel , linux-mmc , "open list:GPIO SUBSYSTEM" , linux-serial@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 2, 2021 at 7:57 PM Jesse Taube wrote: > +#include "clk.h" > +#define ANATOP_BASE_ADDR 0x400d8000 This is now unused. Please remove it. > + clk[IMXRT1050_CLK_USDHC1] = imx_clk_gate2("usdhc1", "usdhc1_podf", ccm_base + 0x80, 2); > + clk[IMXRT1050_CLK_USDHC2] = imx_clk_gate2("usdhc2", "usdhc2_podf", ccm_base + 0x80, 4); > + clk[IMXRT1050_CLK_LPUART1] = imx_clk_gate2("lpuart1", "lpuart_podf", ccm_base + 0x7c, 24); > + clk[IMXRT1050_CLK_LCDIF_APB] = imx_clk_gate2("lcdif", "lcdif_podf", ccm_base + 0x74, 10); > + clk[IMXRT1050_CLK_DMA] = imx_clk_gate("dma", "ipg", ccm_base + 0x7C, 6); > + clk[IMXRT1050_CLK_DMA_MUX] = imx_clk_gate("dmamux0", "ipg", ccm_base + 0x7C, 7); The imx clock drivers have been converted to the clk_hw API. For a reference, please check: f1541e15e38e ("clk: imx6sx: Switch to clk_hw based API") The same conversion could be done here. > + imx_check_clocks(clk, ARRAY_SIZE(clk)); > + clk_data.clks = clk; > + clk_data.clk_num = ARRAY_SIZE(clk); > + of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); > + clk_prepare_enable(clk[IMXRT1050_CLK_PLL1_ARM]); > + clk_prepare_enable(clk[IMXRT1050_CLK_PLL2_SYS]); > + clk_prepare_enable(clk[IMXRT1050_CLK_PLL3_USB_OTG]); > + clk_prepare_enable(clk[IMXRT1050_CLK_PLL3_PFD1_664_62M]); > + clk_prepare_enable(clk[IMXRT1050_CLK_PLL2_PFD2_396M]); If these clocks are essential for the SoC to work, then you could pass the CLK_IS_CRITICAL flag instead of calling clk_prepare_enable()