From patchwork Tue Sep 3 15:30:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3378 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A99BA3F1F3 for ; Tue, 3 Sep 2024 17:31:09 +0200 (CEST) Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2f3ea8692a4sf53495261fa.1 for ; Tue, 03 Sep 2024 08:31:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377469; cv=pass; d=google.com; s=arc-20240605; b=DvmNyFmItxEManYH3YagSwka5jc2CkI0uoDVOaTfDTpuB3D+t+5YIR5/qkUv0MMg5k tCX5hQgJag0lzqBL8MImRQcm2N+awlwadMKXPr3T7ZlwOYkAVdHjHtZD+HoqFAvh8K2v Nv0pw75HofWPlSWAACXEripSwKKRS0WlbR2YV20+1NcqgMBmtcB5zp+MKQFY07g9Z6aU F3rfSGkn+7OYImL5i5R9VT9s1zHvdRQpdtoD1kKeqKTeVrmZ8arZLYPM2UMD75w1tUMd fEg4kd9eZnIvzIuDtx0YlTqFwjjBFi0XXFrcZ9KeAe9TvRTDqVxo0x+Z3Kii3voStyR2 njfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=iauPY9f+ryFjjIZe7ja1zCS0TWL1H1KiJvL7+a/i6eo=; fh=BSBKPbyHw8d/kuQEtIaylv104X78zncumwxF1RCel14=; b=E+Tp7Rb1Y+M02knFwMjvbOPvzOolvI1EYsroNXxgfOw6935/qiTytBcBloGDGJlxDa FkSLAMLIUNElzq3uckFEWsamrkrg4a/8NhroPH2vEVorepzOoveTokPty74Kt2YfUzv2 pw21iB2Mlj9MRaFl+73VqRuMXrXmx6OrgX1E289IqQm8N5wG7uFUDsTSts7RfwP7ZiFQ vWCJxGNHKeTlZGfMimWgxDqsCGSRQw8AmbmpEPK1JMz2VP5zViB7jCzBcKXpBZMUiaKf rETDY8wR4oaCTOAoS4ebkgM/rfKFqP1CU0uJzS/aNzL2Bvw9Q/vfpjpexUj9dxoZCw36 l0mQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ClBnuTKE; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725377469; x=1725982269; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=iauPY9f+ryFjjIZe7ja1zCS0TWL1H1KiJvL7+a/i6eo=; b=WiiZcoSb4KLYPY9ZPC3hsEIzJka29+lRxBs3LpFKXNUWE4o76TqDbjZw2Xoyf2EBAr AiOcJ3M3776r2bqhksKmmxggH1MeR1NpWRnkvQ5BWtYoJy7ZIpno4BCzReevVCxGCZim x58UdBLnslSFvkzLg7xusOOfgjRzvlvhSDlfM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377469; x=1725982269; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iauPY9f+ryFjjIZe7ja1zCS0TWL1H1KiJvL7+a/i6eo=; b=KTJv8fBUGk73DEJuDIOmVeSPNfsu84uETA/BhgJ8Oak3W525fDLzA1s595+b6UyIUA DJbqrn7dCNan43vVjKb4o6HYySTi1NEYknm3ldQp2oC4zP+P1Z9SSvpjDGom6rg9IzmO Z4AGGzVM+lvMCmQhxPd/0hy+9GKPw0Zlehq+UH7jP4E00Ro1nyAOprcpj6nfLT12pKtH C9LeMi6ZcreNMm782X0HqVdF98E/VMUkJosFLoG6YFoNb68FVxj7nZ3plkfPkcdcfUIu Wgg/zBWFW2eC6lmUL84sZ2XkvfpIoxSvP1S5iLsAV1yvIjKhuf4bpzJfIoOeOAhJcila IdDw== X-Forwarded-Encrypted: i=2; AJvYcCXKkuk2axeyeTi7djYyownAMvPM6gQ/Dv2RQOjvQ+ZU+W/IHdtHy/UXIDVQIYWZZ3+f3BJ+4S2IWrfZWMEY@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yyk2sXto34moHzbYwG6BS8UQ0Zkympbg1bjR3sOvEwU4duybUbn 7MVt7mCC+ALSC/eyscRKGc/yxiMPiAIy88vZ5/gkDq4qLxnYR7RmqEUFCSSrPPTGLw== X-Google-Smtp-Source: AGHT+IGB9HfvwlGgrHQIt6CpdRFgBdcVShdMbgtTCdpkYlmEYDOtYrYHmp3w+7D53HmuqzVBrS30rQ== X-Received: by 2002:a05:651c:1a0c:b0:2ef:2ef5:ae98 with SMTP id 38308e7fff4ca-2f636a7fec3mr42627891fa.34.1725377469001; Tue, 03 Sep 2024 08:31:09 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a2e:2a46:0:b0:2ef:2594:c65c with SMTP id 38308e7fff4ca-2f610aa7c8als514351fa.2.-pod-prod-01-eu; Tue, 03 Sep 2024 08:31:07 -0700 (PDT) X-Received: by 2002:a2e:a7c1:0:b0:2f3:d82b:1955 with SMTP id 38308e7fff4ca-2f636a2be54mr48501661fa.25.1725377467113; Tue, 03 Sep 2024 08:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377467; cv=none; d=google.com; s=arc-20160816; b=qOCeilKOBScBzmXj2PbAPtfRWOjFVsrQ+dCXEmJV9bmDz+BjD4q29yR6Mj0Iyyv4Y9 KGt0LXEpFE3bjnw2cuP/UAj9ZfcMdiKl2mewCXU0tkC0sR3q2wh6fUY/Kkg/FZgSdBlr D7VaZyLUkiI6sA4M+lxSSJo0uCzbdTw5PoJY7P6WQfh4ivHKMBcdXRVN164fG2KCfoVp 99wHsuGA0ebX95RqNeKJILNmMqITrYL1i89/kB0lFRbM1Up8BpLY8pOWr2EMBk7FV87Y uHXDd+PJyFr5PtE0g+wgAPobgpGrEUIDNtihDiXKswtLE83hytVFdQjhSQREcOO/4HgQ WWPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=MJb8L3BBTTjtu/5QlLxxiEltpkrooBUgYXQnQgVtbv0=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=taD8YuJGvyHzNUtv9gWX70o2m4fXSTnkjd23HmFvwE1sTjJ1S4Zoc8iXM874rJ7+qU /dIjrRlvNRIGlW4vnVP9OS12JkWFBBxLXihQHvmu7IoU/SJDo3ggGB6URkVDE6AFn+jp PqmMx+JD5Ybuu+o3bl9eGIP12yY9nyLDZoYwbpbo8s4W43nqKvvj/pj3yzdftmwQYE5O Tki0/i5oSXrI3I9vhPTdTm871J4MZjGjb3P6TlT5zvlMQsqjkuuAwHdRn4iP+k72cqnb WAT9VWvleLJ8EwHYRuj9feHrgKTT+O/wIBJbmQ1xo7SpvXzwzMZwqTNwEkKRawBotGuX K5Uw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ClBnuTKE; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-42bb709bf58sor45719845e9.9.2024.09.03.08.31.07 for (Google Transport Security); Tue, 03 Sep 2024 08:31:07 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:19cb:b0:426:6696:9e50 with SMTP id 5b1f17b1804b1-42c82f53598mr46386845e9.14.1725377466457; Tue, 03 Sep 2024 08:31:06 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42bb6e273e3sm174168685e9.30.2024.09.03.08.31.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:31:06 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 06/29] clk: imx8mm: Mark IMX8MM_SYS_PLL2 and IMX8MM_SYS_PLL3 as enabled Date: Tue, 3 Sep 2024 17:30:37 +0200 Message-ID: <20240903153100.918077-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903153100.918077-1-dario.binacchi@amarulasolutions.com> References: <20240903153100.918077-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ClBnuTKE; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Michael Trimarchi Both clock are enabled by the bootloader and we need to increase their reference count to avoid disable during reparent operation. Signed-off-by: Michael Trimarchi --- drivers/clk/imx/clk-imx8mm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c index 685e7df0e568..275f1196865b 100644 --- a/drivers/clk/imx/clk-imx8mm.c +++ b/drivers/clk/imx/clk-imx8mm.c @@ -170,6 +170,8 @@ static const char * const imx8mm_ecspi3_sels[] = {"clock-osc-24m", "sys_pll2_200 static int imx8mm_clk_probe(struct udevice *dev) { void __iomem *base; + struct clk *clk; + int ret; base = (void *)ANATOP_BASE_ADDR; @@ -448,6 +450,13 @@ static int imx8mm_clk_probe(struct udevice *dev) clk_dm(IMX8MM_CLK_QSPI_ROOT, imx_clk_gate4("qspi_root_clk", "qspi", base + 0x42f0, 0)); #endif + ret = clk_get_by_id(IMX8MM_SYS_PLL2, &clk); + if (!ret) + clk_enable(clk); + + ret = clk_get_by_id(IMX8MM_SYS_PLL3, &clk); + if (!ret) + clk_enable(clk); return 0; }