Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1314214ybj; Thu, 7 May 2020 21:16:42 -0700 (PDT) X-Google-Smtp-Source: APiQypI8eXllFax5HD4+k9Ob0oLqeuAhGVt9wWVWtGWq79DXLAuyx0ilrYMjSLqzlN1WxE1PsqS4 X-Received: by 2002:a17:906:2418:: with SMTP id z24mr288332eja.42.1588911402176; Thu, 07 May 2020 21:16:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588911402; cv=none; d=google.com; s=arc-20160816; b=r58A6Mi0p9FpvNMNEGq1QiC1jHcZ/VCsbDxXkAOfCfKEeHl0cKFl3M5WdRwehw5zWO H5hQLuIvRWkPANXnR+/TUEGjgAvZcERwQpAb6vSZ65cNGcD/YpienM2qKpl+2DZgtGHL U7R7hLOQG6G6SbFbMBpPO1DWqIlipGnGaJ13bg6HilneKSjrubyc5lP4/wWKYzgUdhrM VjGycGALuZhO0ajHQ58+ERxf+YGIAwRV+fWrqi7VmSY9C/aPMQhKxmvtqRBwn669hSQu UY2bw0uzejxGalx6S84TBrKWzHyomnfO4v7kiCm3dRjkK/XE6+tAUW7CkXT/l2Me08Dt mnhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=sGTXTVIeWZfMKGu2Tui/sSS6UaYWbPyLZVydf0J+7iw=; b=F2EILGOlKqyZ0hut8+06g500xaeUIXLT2sJXfikQ50l9FVX5HcKn0b56yNMbODpukJ PoHFKHpg8fhU5dRASvj1raU1B1g9Id8VOZ1xnBsOb1sW5JrD6+sI6Q6HWhUQWF7rdMyi FZNTpDE52mG0OiV7UPkFsEQ7fkBw4/C6x6VVDxiH3W3ys6bDt/vpFKXGAMD/BiTYnW4t BhnTUrejdEU25jRDSP5AC+6jh+6xKok1Tj6lWCHQDY1gXZlR00J81rU6rGWI98pX6mqc MgSfRGDausi80u+8gkpKqMtAg0eWKSewGQl6VSSqyw/A24PaHVDPIeQyxfSG1iu/soEi bDYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VrRdrzH7; 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 r8si245093edy.466.2020.05.07.21.16.19; Thu, 07 May 2020 21:16:42 -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=20161025 header.b=VrRdrzH7; 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 S1726771AbgEHENk (ORCPT + 99 others); Fri, 8 May 2020 00:13:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725287AbgEHENj (ORCPT ); Fri, 8 May 2020 00:13:39 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04C5CC05BD43; Thu, 7 May 2020 21:13:39 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id a4so285952pgc.0; Thu, 07 May 2020 21:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sGTXTVIeWZfMKGu2Tui/sSS6UaYWbPyLZVydf0J+7iw=; b=VrRdrzH7uKw/48TsVJC0k5uaudQ/8i4despiyT+mgT4Oe7Uw8VOpOj9Xe9kAwWSOrh FtHdoUcfmFSrMJMUPMSkVlbzZlsazu7YQ21sZyaU2m3P0V48G4dqdsiUOh2Q/rwbZXNy oqV1wlxFAiU8EQHraM/wta9w16G93woaX01sKbrtyrtgLftdjx/Zro/oT0KmPuTWsbfE LsmgyY+DZ9ULBA4C908KplqHUhCNMgRhNIYnh9D/GFBwWyo0nRqKQGw95vF8LczzNpsy OZII5c3ewtpx/1zWKnAbch5U03VOwcZd1k25XnYHOt1PqjJEBxdZ9kaLS8jj7SBzh/8m KTVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sGTXTVIeWZfMKGu2Tui/sSS6UaYWbPyLZVydf0J+7iw=; b=NZQ4D/6UaoW15k+is3B2SQH8/eZB1JqKKT51V18tabirB6fCEkuI0noLRjlBbWGRNi t9EgRxzcyzOvxFLH/0rEwJJVLWv1ZyPUiUtX2UPfdVcOQD81YwUtVicH/3h65ecbN3F0 iMpTn4eI9a+a5Eop5YI5P8wUXWCqBcQPUtWo58HNwRCwtcHXavNElke5GY5bN4qYre8T 6nzOlvzB0j3AqP2Qpld1rpCnIMvVtvWzGUX2LxxqV9GQpnCIt+dwtqeOj8rtj2ZCx085 SOBPVQk0aIjlVWMG2z3ggAmtj+PwE2yup7+q3MB456Et3U429xwAZROBOAavhRJv8mh1 Zhrw== X-Gm-Message-State: AGi0PubYwaRK869FCYFxpll5ItJWcvxI2WHZaQM3vSRJlxMDRYEWqKTz g8yk6g5BoMo71wmELasboTt4ahkDajg= X-Received: by 2002:a62:1994:: with SMTP id 142mr720891pfz.259.1588911218632; Thu, 07 May 2020 21:13:38 -0700 (PDT) Received: from fmin-OptiPlex-7060.nreal.work ([103.206.190.146]) by smtp.gmail.com with ESMTPSA id h12sm314868pfq.176.2020.05.07.21.13.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2020 21:13:38 -0700 (PDT) From: dillon.minfei@gmail.com To: robh+dt@kernel.org, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, mturquette@baylibre.com, sboyd@kernel.org Cc: devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org, dillon min Subject: [PATCH v2 4/5] clk: stm32: Fix stm32f429 ltdc driver loading hang in clk set rate. keep ltdc clk running after kernel startup Date: Fri, 8 May 2020 12:13:13 +0800 Message-Id: <1588911194-12433-5-git-send-email-dillon.minfei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588911194-12433-1-git-send-email-dillon.minfei@gmail.com> References: <1588911194-12433-1-git-send-email-dillon.minfei@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: dillon min as store stm32f4_rcc_register_pll return to the wrong offset of clks, so ltdc gate clk is null. need change clks[PLL_VCO_SAI] to clks[PLL_SAI] add CLK_IGNORE_UNUSED for ltdc to make sure clk not be freed by clk_disable_unused Signed-off-by: dillon min --- drivers/clk/clk-stm32f4.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c index 18117ce..0ba73de 100644 --- a/drivers/clk/clk-stm32f4.c +++ b/drivers/clk/clk-stm32f4.c @@ -129,7 +129,8 @@ 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" }, + { STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div", + CLK_IGNORE_UNUSED }, }; static const struct stm32f4_gate_data stm32f469_gates[] __initconst = { @@ -1757,7 +1758,7 @@ static void __init stm32f4_rcc_init(struct device_node *np) clks[PLL_VCO_I2S] = stm32f4_rcc_register_pll("vco_in", &data->pll_data[1], &stm32f4_clk_lock); - clks[PLL_VCO_SAI] = stm32f4_rcc_register_pll("vco_in", + clks[PLL_SAI] = stm32f4_rcc_register_pll("vco_in", &data->pll_data[2], &stm32f4_clk_lock); for (n = 0; n < MAX_POST_DIV; n++) { -- 2.7.4