From patchwork Wed Sep 11 15:10:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3436 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D59AE42E89 for ; Wed, 11 Sep 2024 17:10:48 +0200 (CEST) Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-378929f1a4esf2248878f8f.1 for ; Wed, 11 Sep 2024 08:10:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067448; cv=pass; d=google.com; s=arc-20240605; b=EYwLIlSShqQH9qru3RP8+t2jvyd3MlB7t6XrLFDpMwX3xIiamqn0t1KzF5n7MnfyyS 6bAHDHxrtsIwCig+KatOf3j+uQItWj3XclVnxFGDFNQrQ0XaAxtMk6s0WyUbrOhrGSnF BHNkI1L4HEmHGXwmi2FF5VBJ8sI0TibLq+qwb+rWHdT30wlGVcxexrh2PzaBtqGiLZLi 7+SUcQAjzfv2O8wJ3Et01JFCpaNi2RTO6Bvfa1fpVjxhrQFzgQjY8VtB+qjnYlJD7PIw E4lTGFAYzjgfebe/ciocPvBjWAmQDrg8LM67Vi1yJ3vRqhO9BXMFm07HwbAraK6UTdCS OvsA== 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=Pokxv+l831iZeIKII6NqvEv+yrJuUfjMwDzJi0OPw9M=; b=Irjk8U3v0m+Kq3dAy45eu0jlNyf61C/t/1ullHYowP52tpH0kQHJg8uGD0JJrPjp98 nj81Y+ECKmmob+5oa+0EnIJoPQaXaYYz02vagk6JVaS5zHCr5MSaAkzE0YActXizBnHl RZzMZIb2fqUG52DpeAaMxm0HztwRqeLh+3WdbT5a8vKLHBJqxyxEdhzJDoCoC8dPtJ/R aMPJoA2G/SWhPBW8bqx2BUKvCY1RARn06Bch6IWwDzESB1XpqB28arrDc/82AUahmUCm giUi7RCFXj5uBXkYiEVckwExf4RV6S0Lw5REG4RxQl223f9Em+ovlvII/lquAtj7ePU1 cG2g==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qUWcU5rh; 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=1726067448; x=1726672248; 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=pYJR0gh6sKWxuXL+toP8hYrEBx9OHPC4BfQEfKUsr9tnSI6xkhI0JBI29FT52/Pf7X C+1Jx1ZdviifRFG1rlQdGqBNdqeeTQUnImj4vOsHaj5fTtPK0OdxxqXZiiyBvVQXd26V 5IFK9/EUwaSS1rNCz3ht/DoP+4VycFgK4nbzg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067448; x=1726672248; 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=Taf5Yek5rIns+VyuiPmHW+SG/p786xk/S2Ssbs6IVuhk9K2LxwIbUEmemQkcOJDKyS YtjvIoKG9/DKkiIdsIVi8a9Sh00f9ttx/A3IQpKlMWgGNWBw87+b6tyLfGHOLu82wJxO BCk1qSFIr2SrNWTYOhN+Tc53IJeGtbjw6rEh5B/mvgKGZ4/CGoyZFaPcdssIOPBznCNM Y6VBD/Wz2KRPreVz5go7D3Y+7tZPu06eSgcQlj6t+zvxGeJarlVAwcXRjMKsGHLb2oYP cNxhGP76yBIONLZMahX7aUgpzRemwnc8MjxSeG3tq6m7k2CgVasxg/bW+OP749RzELe6 48Wg== X-Forwarded-Encrypted: i=2; AJvYcCWUi9RbSFiXKnzG+pWtCSt1OjA8DeAXzuz8zNKWCEC3HZ6rMtxKp4kNqNzn+IejW7b1AdEnYcRJdyvipZDt@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YzoiSXSt+UOXIe/CxK3nSz7tuZr9h+JdJ/Z8qyaesaQElAiHTaj jyYdyk/+WWdZ94UIeu0EsOD2Obc/bgnJY1UqrcvHdj2Ic7TmX3rOJWMtgd/8Bo5WhQ== X-Google-Smtp-Source: AGHT+IGNv9OnC9ehR1i36S//1LH/zoY9776+DG/d6TPPrMXBYyynUyrd396oQiAAUmRFGdJU9H1qPQ== X-Received: by 2002:adf:e552:0:b0:374:cd36:8533 with SMTP id ffacd0b85a97d-3788967a404mr9265848f8f.54.1726067448354; Wed, 11 Sep 2024 08:10:48 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:f001:0:b0:374:d111:63a3 with SMTP id ffacd0b85a97d-378883bbce2ls1460757f8f.1.-pod-prod-09-eu; Wed, 11 Sep 2024 08:10:47 -0700 (PDT) X-Received: by 2002:a5d:5545:0:b0:374:c269:df6e with SMTP id ffacd0b85a97d-378895ddf36mr11349230f8f.25.1726067446815; Wed, 11 Sep 2024 08:10:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067446; cv=none; d=google.com; s=arc-20160816; b=uIxAiB9wDIQzBnNXHk7grVbIxnVMQrrjU3OCwcjdZSYcvueTT1QN7yODzh0rxqaeHd WQxibRRA2oq/+CPzrGrgRU0+zurdwaz6fS7oSP9F6dxk5dIDViY9SFmwOYJl0xD0ce9a TeDZ7bGFUldAHV+BJTt8wu8ZDwB9UvlYEIu5hYGBXgQIb9KBXF2X6C/21+rdpVLVVU7S QbMdymDZiGCeBaubMRX6o531A7w1R/YdNWFD58mqqQULzXdGS5ZHdCjgWCpTODCfjqVA n33pt/UX6l7nOsJO8YMDFfGYbaVobgOODyN3jtr/cM0wu0qT5IOrTg2870zuSsqFpNFX oRjw== 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=d6+VOfYra3+q2SMqgl9BozXbWlEJQzDvEybK0MpTdi99IbqOZTu6uzitv0j0PawErr iAH8pYsfFUpjnmjpFjdmpBTe+Ezpn06KjkL/qZrTx1gBcBiAWzNRD33MMVSbn8KaSGFq ZkVsVadHV88pWfZV81702ZYaK4ty/wGxSqLp7pP1o3m/FHDDtGRE27bkfQ3pEYYr1pHp Iw91O9hZ0VDEBQTSNILyAtltifMzUV4k9PTqJ8djLt5g75o3xygAElX1yCcsv7LfdRnO 5YgudpJF8nhzYtYKZqBD/nQOV8f+tUIVhg5SyIaOJtzyfLCgqvDpQ6Mx6k8qIVJLCdBZ x2Jw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qUWcU5rh; 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 ffacd0b85a97d-3789560331fsor2307884f8f.2.2024.09.11.08.10.46 for (Google Transport Security); Wed, 11 Sep 2024 08:10:46 -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:adf:f74c:0:b0:374:caf6:ca2f with SMTP id ffacd0b85a97d-37889675924mr12029077f8f.45.1726067446158; Wed, 11 Sep 2024 08:10:46 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42cb116f44esm137688375e9.45.2024.09.11.08.10.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:10:45 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 06/27] clk: imx8mm: Mark IMX8MM_SYS_PLL2 and IMX8MM_SYS_PLL3 as enabled Date: Wed, 11 Sep 2024 17:10:18 +0200 Message-ID: <20240911151039.2914886-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151039.2914886-1-dario.binacchi@amarulasolutions.com> References: <20240911151039.2914886-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=qUWcU5rh; 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; }