Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1299068pxb; Thu, 7 Oct 2021 05:10:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7B3lTDpkE86M2mYmlVfBkm0d2llzah0Rb05LYcXZ3ulVTqq5STuXfiLHOk86MkZ0aH1bO X-Received: by 2002:a63:454e:: with SMTP id u14mr3068023pgk.314.1633608611627; Thu, 07 Oct 2021 05:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633608611; cv=none; d=google.com; s=arc-20160816; b=LX/I0xfoq6600D2AJnCkFgfJ3SkSIjjhb3pdHaI6hmt+09ixbv2JQBMKb8MdI82pLw NTLiZxUh/ohOeDdlqpfO56ocperWb4/2eZ17eWTE0b4zXH16ov89hXaxVrK/CRU7q2/2 ZT22ds4eLKvJqdsKj2pL0QhqNkAhn95aHO706f1EFYCBjGge/xO0X/fWoRR1J3+SCvTC FU0kEVag7yXOVNaEls6xtjYscishGThlMhXcnWOHinP+FVRwRmwFoZWudXcc+5/S8QSE Zqbu09AWEq28B5QCpCZBDQS1syrtQthDtkOzTyo7klRiEbCcqppQq2f2wbb1qV7TulL5 JKdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UYL0dQzKn7Iszigc6DfLqTu8tw5/EyvjuPdXPqtMfY4=; b=t0hWmH7W3PgDdY7X2eeOmmailRXxz5ST5m8Og1kICepk44T/n0T9DbpY6GPrBH8lwJ hF8yG0b1T6k909GyW0yKpLJe7RWhwmAAXhudx2rgfihzHEGbH4xrxdKpeNBv2zsNwyyG 86qBJxDPLjD2j2y/psgYfwtZZqp0cZmbITkvHC7YxX6uyRxS1PYtVRm0AX0VtGqQs47i 2PQwiesKRKAY6iIv7yMdPXFJMuTLc1bo9fSzdi/MH319HgVyAjIbDIZa5XI6G3QSaPqs 9yiUsk5Sv3f4BCIoZt8BYy7/XmPZJgoOo17Z2PM47xh8le3X6+AyaLAr4mFi7CBW61V7 GeSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qX1bd03C; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si9283494pjk.36.2021.10.07.05.09.50; Thu, 07 Oct 2021 05:10:11 -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=@kernel.org header.s=k20201202 header.b=qX1bd03C; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241223AbhJGMKU (ORCPT + 99 others); Thu, 7 Oct 2021 08:10:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:49836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241185AbhJGMJ7 (ORCPT ); Thu, 7 Oct 2021 08:09:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B3B166124A; Thu, 7 Oct 2021 12:08:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633608485; bh=GxJBOSZPI8VcVuf7ZRY+bIFuULIIPb3wgof+HIqQOWc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qX1bd03C6V/b1wGAo8fBR/Se5DW56qiuXAyFrfQ6Xoquil0Xcu45MrxUmqITFED7f MRUxxD+YvTD2EX2P5tO84D8yO5xTMH7Hqug9f7RBXD1gqiY5E9zOJN/Ef6k+NvXz0J b5oLHOEu4v/RhadrJ6Tz8Ps3f3yn/KHToajOtuFqBhmUVhH9iNU2kb1l0BTSmn5Bk1 TEvGthM9pwnIVFYmunRwUnZSa5vnPYTPhQc+505xi1mE623gJN2P1kF3ulzaP8JMKb vEytu1lg8z5BsB0UWRImDolv9vi4d04XXGZKCpwG4a5WHdjut7k3yALcvIKLPz5SRe kPfmbg7PDPclg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mYSBv-005QTr-ME; Thu, 07 Oct 2021 14:08:03 +0200 From: Mauro Carvalho Chehab To: Michael Turquette , Stephen Boyd Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Manivannan Sadhasivam , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] clk: clk-hi3670: mark some clocks as CLK_IS_CRITICAL Date: Thu, 7 Oct 2021 14:06:55 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some clocks can't be disabled or the device stops working. Mark those with CLK_IS_CRITICAL. Signed-off-by: Mauro Carvalho Chehab --- To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/2] at: https://lore.kernel.org/all/cover.1633607765.git.mchehab+huawei@kernel.org/ drivers/clk/hisilicon/clk-hi3670.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/clk/hisilicon/clk-hi3670.c b/drivers/clk/hisilicon/clk-hi3670.c index 4d05a71683a5..d5813132df9c 100644 --- a/drivers/clk/hisilicon/clk-hi3670.c +++ b/drivers/clk/hisilicon/clk-hi3670.c @@ -82,13 +82,13 @@ static const struct hisi_gate_clock hi3670_crgctrl_gate_sep_clks[] = { { HI3670_PPLL2_EN_ACPU, "ppll2_en_acpu", "clk_ppll2", CLK_SET_RATE_PARENT, 0x0, 3, 0, }, { HI3670_PPLL3_EN_ACPU, "ppll3_en_acpu", "clk_ppll3", - CLK_SET_RATE_PARENT, 0x0, 27, 0, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x0, 27, 0, }, { HI3670_PPLL1_GT_CPU, "ppll1_gt_cpu", "clk_ppll1", CLK_SET_RATE_PARENT, 0x460, 16, 0, }, { HI3670_PPLL2_GT_CPU, "ppll2_gt_cpu", "clk_ppll2", CLK_SET_RATE_PARENT, 0x460, 18, 0, }, { HI3670_PPLL3_GT_CPU, "ppll3_gt_cpu", "clk_ppll3", - CLK_SET_RATE_PARENT, 0x460, 20, 0, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x460, 20, 0, }, { HI3670_CLK_GATE_PPLL2_MEDIA, "clk_gate_ppll2_media", "clk_ppll2", CLK_SET_RATE_PARENT, 0x410, 27, 0, }, { HI3670_CLK_GATE_PPLL3_MEDIA, "clk_gate_ppll3_media", "clk_ppll3", @@ -166,7 +166,7 @@ static const struct hisi_gate_clock hi3670_crgctrl_gate_sep_clks[] = { { HI3670_CLK_CCI400_BYPASS, "clk_cci400_bypass", "clk_ddrc_freq", CLK_SET_RATE_PARENT, 0x22C, 28, 0, }, { HI3670_CLK_GATE_CCI400, "clk_gate_cci400", "clk_ddrc_freq", - CLK_SET_RATE_PARENT, 0x50, 14, 0, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x50, 14, 0, }, { HI3670_CLK_GATE_SD, "clk_gate_sd", "clk_mux_sd_sys", CLK_SET_RATE_PARENT, 0x40, 17, 0, }, { HI3670_HCLK_GATE_SD, "hclk_gate_sd", "clk_div_sysbus", @@ -248,15 +248,15 @@ static const struct hisi_gate_clock hi3670_crgctrl_gate_sep_clks[] = { { HI3670_CLK_GATE_AO_ASP, "clk_gate_ao_asp", "clk_div_ao_asp", CLK_SET_RATE_PARENT, 0x0, 26, 0, }, { HI3670_PCLK_GATE_PCTRL, "pclk_gate_pctrl", "clk_div_ptp", - CLK_SET_RATE_PARENT, 0x20, 31, 0, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x20, 31, 0, }, { HI3670_CLK_CSI_TRANS_GT, "clk_csi_trans_gt", "clk_div_csi_trans", - CLK_SET_RATE_PARENT, 0x30, 24, 0, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x30, 24, 0, }, { HI3670_CLK_DSI_TRANS_GT, "clk_dsi_trans_gt", "clk_div_dsi_trans", CLK_SET_RATE_PARENT, 0x30, 25, 0, }, { HI3670_CLK_GATE_PWM, "clk_gate_pwm", "clk_div_ptp", CLK_SET_RATE_PARENT, 0x20, 0, 0, }, { HI3670_ABB_AUDIO_EN0, "abb_audio_en0", "clk_gate_abb_192", - CLK_SET_RATE_PARENT, 0x30, 8, 0, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x30, 8, 0, }, { HI3670_ABB_AUDIO_EN1, "abb_audio_en1", "clk_gate_abb_192", CLK_SET_RATE_PARENT, 0x30, 9, 0, }, { HI3670_ABB_AUDIO_GT_EN0, "abb_audio_gt_en0", "abb_audio_en0", @@ -331,9 +331,9 @@ static const struct hisi_gate_clock hi3670_crgctrl_gate_clks[] = { { HI3670_CLK_GATE_DSI_TRANS, "clk_gate_dsi_trans", "clk_ppll2", CLK_SET_RATE_PARENT, 0xF4, 1, CLK_GATE_HIWORD_MASK, }, { HI3670_CLK_ANDGT_PTP, "clk_andgt_ptp", "clk_div_320m", - CLK_SET_RATE_PARENT, 0xF8, 5, CLK_GATE_HIWORD_MASK, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0xF8, 5, CLK_GATE_HIWORD_MASK, }, { HI3670_CLK_ANDGT_OUT0, "clk_andgt_out0", "clk_ppll0", - CLK_SET_RATE_PARENT, 0xF0, 10, CLK_GATE_HIWORD_MASK, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0xF0, 10, CLK_GATE_HIWORD_MASK, }, { HI3670_CLK_ANDGT_OUT1, "clk_andgt_out1", "clk_ppll0", CLK_SET_RATE_PARENT, 0xF0, 11, CLK_GATE_HIWORD_MASK, }, { HI3670_CLKGT_DP_AUDIO_PLL_AO, "clkgt_dp_audio_pll_ao", "clk_ppll6", @@ -569,9 +569,9 @@ static const struct hisi_gate_clock hi3670_sctrl_gate_sep_clks[] = { { HI3670_PCLK_GATE_SPI, "pclk_gate_spi", "clk_div_ioperi", CLK_SET_RATE_PARENT, 0x1B0, 10, 0, }, { HI3670_CLK_GATE_UFS_SUBSYS, "clk_gate_ufs_subsys", "clk_div_ufs_subsys", - CLK_SET_RATE_PARENT, 0x1B0, 14, 0, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x1B0, 14, 0, }, { HI3670_CLK_GATE_UFSIO_REF, "clk_gate_ufsio_ref", "clkin_sys", - CLK_SET_RATE_PARENT, 0x1b0, 12, 0, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x1b0, 12, 0, }, { HI3670_PCLK_AO_GPIO0, "pclk_ao_gpio0", "clk_div_aobus", CLK_SET_RATE_PARENT, 0x160, 11, 0, }, { HI3670_PCLK_AO_GPIO1, "pclk_ao_gpio1", "clk_div_aobus", @@ -593,7 +593,7 @@ static const struct hisi_gate_clock hi3670_sctrl_gate_sep_clks[] = { { HI3670_PCLK_GATE_SYSCNT, "pclk_gate_syscnt", "clk_div_aobus", CLK_SET_RATE_PARENT, 0x160, 19, 0, }, { HI3670_CLK_GATE_SYSCNT, "clk_gate_syscnt", "clkin_sys", - CLK_SET_RATE_PARENT, 0x160, 20, 0, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x160, 20, 0, }, { HI3670_CLK_GATE_ASP_SUBSYS_PERI, "clk_gate_asp_subsys_peri", "clk_mux_asp_subsys_peri", CLK_SET_RATE_PARENT, 0x170, 6, 0, }, @@ -703,7 +703,7 @@ static const struct hisi_gate_clock hi3670_media1_gate_sep_clks[] = { { HI3670_PCLK_GATE_DISP_NOC_SUBSYS, "pclk_gate_disp_noc_subsys", "clk_div_sysbus", CLK_SET_RATE_PARENT, 0x10, 18, 0, }, { HI3670_ACLK_GATE_DISP_NOC_SUBSYS, "aclk_gate_disp_noc_subsys", "clk_gate_vivobusfreq", - CLK_SET_RATE_PARENT, 0x10, 17, 0, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x10, 17, 0, }, { HI3670_PCLK_GATE_DSS, "pclk_gate_dss", "pclk_gate_disp_noc_subsys", CLK_SET_RATE_PARENT, 0x00, 14, 0, }, { HI3670_ACLK_GATE_DSS, "aclk_gate_dss", "aclk_gate_disp_noc_subsys", -- 2.31.1