From patchwork Wed Jul 24 07:50:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 11056233 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ADD1D1398 for ; Wed, 24 Jul 2019 07:59:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CADE28585 for ; Wed, 24 Jul 2019 07:59:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DFAE28782; Wed, 24 Jul 2019 07:59:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4501B28585 for ; Wed, 24 Jul 2019 07:59:49 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=1THtam7ITejmSqqkkqfDrIJ344IeNp/2Y1VI26iepw0=; b=lvr OR3genEADpfzWq1fRCYIiI2/Co6o19jHgUTKMlU3BtjJAKYw3dOwo0EvIT0FOi9I/wtYLzAVeCkWF mAw8vQKZJ6ZnrMpqYLbJCvL5/50ZYnEnRV/l2wOTQ6bvHaY+zc936j6HdnsYOME8WMgGA4oC3M2xt gzCG3LF4/NshU7r6f3QceWNfmn/3vM6w1R38Ox58Ki1HBXpyTPXK1j/M7ZAscdkFiktYRMdGG2Gh2 YqSb7h9OQkM9Ne5tg3XMzLDnVNsmMx8uee3WnRAUAqw5fSGVsh9Lr/UuLqyau8tm6A0rFREfoBOW2 WCky7D1UckehsGlJYTieoy5T/K1+H5g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hqCBg-0004oV-MW; Wed, 24 Jul 2019 07:59:48 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hqCBd-0004oE-Fz for linux-arm-kernel@lists.infradead.org; Wed, 24 Jul 2019 07:59:46 +0000 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 13FCA1A0240; Wed, 24 Jul 2019 09:59:44 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C7C801A031A; Wed, 24 Jul 2019 09:59:38 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 17F27402F6; Wed, 24 Jul 2019 15:59:32 +0800 (SGT) From: Anson.Huang@nxp.com To: mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] clk: imx8mn: Keep uart clocks on for early console Date: Wed, 24 Jul 2019 15:50:17 +0800 Message-Id: <20190724075017.11003-1-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.9.5 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190724_005945_676660_6FB5A6AC X-CRM114-Status: UNSURE ( 8.15 ) X-CRM114-Notice: Please train this message. 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: Linux-imx@nxp.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Anson Huang Call imx_register_uart_clocks() API to keep uart clocks enabled when earlyprintk or earlycon is active. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa --- drivers/clk/imx/clk-imx8mn.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index 07481a5..ecd1062 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -355,6 +355,14 @@ static const char * const imx8mn_clko2_sels[] = {"osc_24m", "sys_pll2_200m", "sy static struct clk *clks[IMX8MN_CLK_END]; static struct clk_onecell_data clk_data; +static struct clk ** const uart_clks[] = { + &clks[IMX8MN_CLK_UART1_ROOT], + &clks[IMX8MN_CLK_UART2_ROOT], + &clks[IMX8MN_CLK_UART3_ROOT], + &clks[IMX8MN_CLK_UART4_ROOT], + NULL +}; + static int imx8mn_clocks_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -612,6 +620,8 @@ static int imx8mn_clocks_probe(struct platform_device *pdev) goto unregister_clks; } + imx_register_uart_clocks(uart_clks); + return 0; unregister_clks: