From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CB9BC433FE for ; Fri, 8 Oct 2021 10:31:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08EC660FF2 for ; Fri, 8 Oct 2021 10:31:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240060AbhJHKdF (ORCPT ); Fri, 8 Oct 2021 06:33:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240036AbhJHKcx (ORCPT ); Fri, 8 Oct 2021 06:32:53 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7702C061773; Fri, 8 Oct 2021 03:30:54 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id nn3-20020a17090b38c300b001a03bb6c4ebso4997816pjb.1; Fri, 08 Oct 2021 03:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=++IO6RFxmgIsh9EOoHZYHnkeJIbAQGN9wkMCCBk4kyE=; b=CwlDyo774NtGyKk1cxH/9sglt/KFox7LkT9WPq4RfCnIAf/BkETkcyZ+gfEmWVzGnY 2HQLKpBE68Se4oLP/pXpP40qKq3MH8f2ppWuGZ6BedqOOM5t8MVKd/bmm+GxjsWa97/r 4fBL7IH8bJiw90lqcJMHheRculDxhUtpU2M23mLygNKLPJmlygKJfyBI9gD1Lksu43CO xR7hX2FiA9vm6UojlHrW7Azxk+9tYAKAXyoB0fOOQiPg3EZaWONzabxxXgap/+kgSAge X1rHvrcqAIdrkWzAQnxZZRUuV0bQklhb6FrdIrhb0B/2LFdjrUq7fZJFpamKeKBhUPTd 0CRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=++IO6RFxmgIsh9EOoHZYHnkeJIbAQGN9wkMCCBk4kyE=; b=0MFYztVxs4WN2iVqiVRDLS9snQ/Tc4tKcSN/+mmA0szZEgHg9mVhpWf5SqgJfAKUZG /c9txxFtOSUbxhHUoW/NJYFyAAnYgSm0R66QH0RytJ6hiXXJPwRuMZG5/s7Bl7va35qB LNC0dblvmB+xNTxSeR8hCJ0mvPA8HYXpUZ2k4bST7CJF2KNKOJ8NQd8En7xcjKMMIO+B vxdVpHlcdo7MmeNtTSFUoiIophIm0xmBuIe1dIpUhiaS2II5vQKRjy0BhbROqIOeeRT2 PBbe482AnYKLyE8SDgHnbQMrDWS3dvWej1/73WJOfV5hkwH9Al7Jwr2l3LY7P73a05VI 4E/g== X-Gm-Message-State: AOAM531uWaa6u+kq5w5hyhpGPq1bH+kw6iGXAeo7G0mAYe0o0181+eHI MyDq8t9iYYqdp5BIZbmBLDI= X-Google-Smtp-Source: ABdhPJy14VnYxwwq2lQHd+a0qYTqLFH07Gh9t1d4uurzdGPcgHbi+dJcSgw1qqdkSjE8q240Ky+xwA== X-Received: by 2002:a17:90a:de16:: with SMTP id m22mr11445604pjv.38.1633689054454; Fri, 08 Oct 2021 03:30:54 -0700 (PDT) Received: from fmin-OptiPlex-7060.nreal.work ([137.59.103.165]) by smtp.gmail.com with ESMTPSA id y15sm2620151pfa.64.2021.10.08.03.30.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Oct 2021 03:30:54 -0700 (PDT) From: dillon.minfei@gmail.com To: mchehab@kernel.org, mchehab+huawei@kernel.org, hverkuil-cisco@xs4all.nl, ezequiel@collabora.com, gnurou@gmail.com, pihsun@chromium.org, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, gabriel.fernandez@st.com, gabriel.fernandez@foss.st.com Cc: patrice.chotard@foss.st.com, hugues.fruchet@foss.st.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Dillon Min Subject: [PATCH v3 7/8] clk: stm32: Fix ltdc's clock turn off by clk_disable_unused() after enter shell Date: Fri, 8 Oct 2021 18:30:11 +0800 Message-Id: <1633689012-14492-8-git-send-email-dillon.minfei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1633689012-14492-1-git-send-email-dillon.minfei@gmail.com> References: <1633689012-14492-1-git-send-email-dillon.minfei@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dillon Min stm32's clk driver register two ltdc gate clk to clk core by clk_hw_register_gate() and clk_hw_register_composite() first: 'stm32f429_gates[]', clk name is 'ltdc', which no user to use. second: 'stm32f429_aux_clk[]', clk name is 'lcd-tft', used by ltdc driver both of them point to the same offset of stm32's RCC register. after kernel enter console, clk core turn off ltdc's clk as 'stm32f429_gates[]' is no one to use. but, actually 'stm32f429_aux_clk[]' is in use. stm32f469/746/769 has same issue, fix it. Fixes: daf2d117cbca ("clk: stm32f4: Add lcd-tft clock") Signed-off-by: Dillon Min Acked-by: Stephen Boyd Link: https://lore.kernel.org/linux-arm-kernel/1590564453-24499-7-git-send-email-dillon.minfei@gmail.com/ Link: https://lore.kernel.org/lkml/CAPTRvHkf0cK_4ZidM17rPo99gWDmxgqFt4CDUjqFFwkOeQeFDg@mail.gmail.com/ --- v3: introduce this patch for Gabriel Fernandez to review. drivers/clk/clk-stm32f4.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c index af46176ad053..473dfe632cc5 100644 --- a/drivers/clk/clk-stm32f4.c +++ b/drivers/clk/clk-stm32f4.c @@ -129,7 +129,6 @@ static const struct stm32f4_gate_data stm32f429_gates[] __initconst = { { STM32F4_RCC_APB2ENR, 20, "spi5", "apb2_div" }, { STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" }, { STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" }, - { STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" }, }; static const struct stm32f4_gate_data stm32f469_gates[] __initconst = { @@ -211,7 +210,6 @@ static const struct stm32f4_gate_data stm32f469_gates[] __initconst = { { STM32F4_RCC_APB2ENR, 20, "spi5", "apb2_div" }, { STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" }, { STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" }, - { STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" }, }; static const struct stm32f4_gate_data stm32f746_gates[] __initconst = { @@ -286,7 +284,6 @@ static const struct stm32f4_gate_data stm32f746_gates[] __initconst = { { STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" }, { STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" }, { STM32F4_RCC_APB2ENR, 23, "sai2", "apb2_div" }, - { STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" }, }; static const struct stm32f4_gate_data stm32f769_gates[] __initconst = { @@ -364,7 +361,6 @@ static const struct stm32f4_gate_data stm32f769_gates[] __initconst = { { STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" }, { STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" }, { STM32F4_RCC_APB2ENR, 23, "sai2", "apb2_div" }, - { STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" }, { STM32F4_RCC_APB2ENR, 30, "mdio", "apb2_div" }, }; -- 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 513E7C433F5 for ; Fri, 8 Oct 2021 10:35:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DBFF60F6C for ; Fri, 8 Oct 2021 10:35:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1DBFF60F6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=43RyFVkhS32gavGn2Jy0S7xV7OwGilqo2e84G2Sq51c=; b=d9SRNOWuWA0lPd I62hDsEc/+U7OjxpMmdPIR/SThUY+vj3OC4vpmTEhp2cZTOgGAMrml3J6KrzlNkaJV6p/e5H3kpT+ T7rjxtiMbWNDu62Rv1JKYHiF6c3kkcNJqXvEvrOboVhy+R5SekE/8741Ag6FbU/d7ClsGi1Pbg2+l v7Q5p746vgqIxnLZhhnRG7V2WYcWFQXJidTTR7QS+YmHlc6q14oxWhGbQ/M1BWktMpPIprRX1CEaD TFBe5pCQ2nGDSDOcjcwQxlw6qUtVqvQFHvPBnFsYu8Q7SAI6/kpTFTyMz5K5yhGZZyBL02Nf8tJMY JDOAh7t4fY3j/vd5QC9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYnC9-002Ohx-44; Fri, 08 Oct 2021 10:33:42 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYn9S-002NUu-TV for linux-arm-kernel@lists.infradead.org; Fri, 08 Oct 2021 10:30:56 +0000 Received: by mail-pj1-x1030.google.com with SMTP id ls18so7212389pjb.3 for ; Fri, 08 Oct 2021 03:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=++IO6RFxmgIsh9EOoHZYHnkeJIbAQGN9wkMCCBk4kyE=; b=CwlDyo774NtGyKk1cxH/9sglt/KFox7LkT9WPq4RfCnIAf/BkETkcyZ+gfEmWVzGnY 2HQLKpBE68Se4oLP/pXpP40qKq3MH8f2ppWuGZ6BedqOOM5t8MVKd/bmm+GxjsWa97/r 4fBL7IH8bJiw90lqcJMHheRculDxhUtpU2M23mLygNKLPJmlygKJfyBI9gD1Lksu43CO xR7hX2FiA9vm6UojlHrW7Azxk+9tYAKAXyoB0fOOQiPg3EZaWONzabxxXgap/+kgSAge X1rHvrcqAIdrkWzAQnxZZRUuV0bQklhb6FrdIrhb0B/2LFdjrUq7fZJFpamKeKBhUPTd 0CRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=++IO6RFxmgIsh9EOoHZYHnkeJIbAQGN9wkMCCBk4kyE=; b=OrUzsO+GLEAOVvFMXNXb7HDAJmqogEagvLm2ovXO7kwEGzlPRaXFakMUuVwwE62I6M Myn0YyYJtOzrLCluss8q463WoRsz2mPxS0OsanC6ZWMnpQA6XSACIpDNRTnFY8G87o09 IipcbarlgPlZi1G3xnsGGxa+AP/MzDNPltR8NjQRPvFj188VCpAyxnggwO05/Ckctt1B nSO9pogwSk8LefjvxN8lmMliPHoSttuAJn9lfRgOfmv4itIWj6NMvtiDnaV5a9zLgsmo eGXdBQrzWJJT6qnLavRqFBU/Slw4gIc6pvQPYJQSfWlqjJW75aF6mgVfBcmHamuOFzsO aleQ== X-Gm-Message-State: AOAM531nOixSz7hfRw6CTWDYW2rSqDlyMAIMxabm/GqLjHyqMm14zrB3 M7vfyHbh/bZa0TfgEP+NjRA= X-Google-Smtp-Source: ABdhPJy14VnYxwwq2lQHd+a0qYTqLFH07Gh9t1d4uurzdGPcgHbi+dJcSgw1qqdkSjE8q240Ky+xwA== X-Received: by 2002:a17:90a:de16:: with SMTP id m22mr11445604pjv.38.1633689054454; Fri, 08 Oct 2021 03:30:54 -0700 (PDT) Received: from fmin-OptiPlex-7060.nreal.work ([137.59.103.165]) by smtp.gmail.com with ESMTPSA id y15sm2620151pfa.64.2021.10.08.03.30.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Oct 2021 03:30:54 -0700 (PDT) From: dillon.minfei@gmail.com To: mchehab@kernel.org, mchehab+huawei@kernel.org, hverkuil-cisco@xs4all.nl, ezequiel@collabora.com, gnurou@gmail.com, pihsun@chromium.org, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, gabriel.fernandez@st.com, gabriel.fernandez@foss.st.com Cc: patrice.chotard@foss.st.com, hugues.fruchet@foss.st.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Dillon Min Subject: [PATCH v3 7/8] clk: stm32: Fix ltdc's clock turn off by clk_disable_unused() after enter shell Date: Fri, 8 Oct 2021 18:30:11 +0800 Message-Id: <1633689012-14492-8-git-send-email-dillon.minfei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1633689012-14492-1-git-send-email-dillon.minfei@gmail.com> References: <1633689012-14492-1-git-send-email-dillon.minfei@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211008_033054_993608_907E9110 X-CRM114-Status: GOOD ( 13.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Dillon Min stm32's clk driver register two ltdc gate clk to clk core by clk_hw_register_gate() and clk_hw_register_composite() first: 'stm32f429_gates[]', clk name is 'ltdc', which no user to use. second: 'stm32f429_aux_clk[]', clk name is 'lcd-tft', used by ltdc driver both of them point to the same offset of stm32's RCC register. after kernel enter console, clk core turn off ltdc's clk as 'stm32f429_gates[]' is no one to use. but, actually 'stm32f429_aux_clk[]' is in use. stm32f469/746/769 has same issue, fix it. Fixes: daf2d117cbca ("clk: stm32f4: Add lcd-tft clock") Signed-off-by: Dillon Min Acked-by: Stephen Boyd Link: https://lore.kernel.org/linux-arm-kernel/1590564453-24499-7-git-send-email-dillon.minfei@gmail.com/ Link: https://lore.kernel.org/lkml/CAPTRvHkf0cK_4ZidM17rPo99gWDmxgqFt4CDUjqFFwkOeQeFDg@mail.gmail.com/ --- v3: introduce this patch for Gabriel Fernandez to review. drivers/clk/clk-stm32f4.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c index af46176ad053..473dfe632cc5 100644 --- a/drivers/clk/clk-stm32f4.c +++ b/drivers/clk/clk-stm32f4.c @@ -129,7 +129,6 @@ static const struct stm32f4_gate_data stm32f429_gates[] __initconst = { { STM32F4_RCC_APB2ENR, 20, "spi5", "apb2_div" }, { STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" }, { STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" }, - { STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" }, }; static const struct stm32f4_gate_data stm32f469_gates[] __initconst = { @@ -211,7 +210,6 @@ static const struct stm32f4_gate_data stm32f469_gates[] __initconst = { { STM32F4_RCC_APB2ENR, 20, "spi5", "apb2_div" }, { STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" }, { STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" }, - { STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" }, }; static const struct stm32f4_gate_data stm32f746_gates[] __initconst = { @@ -286,7 +284,6 @@ static const struct stm32f4_gate_data stm32f746_gates[] __initconst = { { STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" }, { STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" }, { STM32F4_RCC_APB2ENR, 23, "sai2", "apb2_div" }, - { STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" }, }; static const struct stm32f4_gate_data stm32f769_gates[] __initconst = { @@ -364,7 +361,6 @@ static const struct stm32f4_gate_data stm32f769_gates[] __initconst = { { STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" }, { STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" }, { STM32F4_RCC_APB2ENR, 23, "sai2", "apb2_div" }, - { STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" }, { STM32F4_RCC_APB2ENR, 30, "mdio", "apb2_div" }, }; -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel