From patchwork Fri Sep 13 09:55:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3473 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 18BCA412D2 for ; Fri, 13 Sep 2024 11:57:08 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5c24e546f3fsf1064813a12.1 for ; Fri, 13 Sep 2024 02:57:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726221428; cv=pass; d=google.com; s=arc-20240605; b=JkC0lxYCrIxyps3WjiprZtdnoLYm7//oXdv0sAzN7OkM0afCNE/nseTJ09xMQjIvqQ W9xIKLbBC7jTOyUZU+zj+BhoOJexli1U2611M+SVNBLrFGlK6a1CUu9JF43KMKSKImZP mrfwZUmwey3QTODctGmxDGX34JwoaQSAH3zzIsKhABNGYlYXLX45n5oBhwvPALx3ezi/ 79NhihcO8ONEDUeAcMozMtYoGb2x8dsuyv2HbM7dKSWx5nSsBcPzMYRSSYKG0+lQq4FK 0R80W8xXIULfuLjrmv5oBEpUr6gGEolJhFJeSokGvkukxGjHM0YY/javXMVyhN50k9bn tBvg== 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:cc:to:from:dkim-signature; bh=Gpbut0KAPN9OcoWJIqzfgCoNbwKHXJxIxCnu/prRtVU=; fh=l2NtubBxusUxLYUUrrU98d81tjOJOb20ZOJgvBZZCjE=; b=SzBk1WLQ0VAfvBxym0Mc+BQ+kCFMcfcUwFvrdd5L3q7swYtcrVxLfJOcAQ8Z8f9l+B cmH9Yja3whKp+I9Jw3prGZ4bWwz+6gWipZc8YUIIHMC+qMnvlI+shPn3U/EWPmQSXYR6 LWpWayH3c3t0fn5iecaEZSWfVkBSXRXEDakn/CcOVEPAcGR+2DsJWpoOPfAgVS69z6vn 6wOLYtaPONIcsNagAkjYhoZ/5xkV1md5E46oDG/C/OaS3sOraYUT4+0xGIchwC+CUWEx BuRD77WCUr80bijKS+N6dklbJWCqGnK+es4R2xYV+wj7BQzuFiHDslE31eQHffPxSAKq X6+w==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TryMknPD; 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=1726221428; x=1726826228; 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:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Gpbut0KAPN9OcoWJIqzfgCoNbwKHXJxIxCnu/prRtVU=; b=XAttGzqOghLg5hPg331eurvhib7WPEq74Wn+dtqZvk7UB9g8O/baX26PXeLsEEOE4i BiJkEjKCfHfcavwNVOMlwePm1bAAwV4r8tlsPAOSG1wQGTi8zalgR8gT4owXyV7PwzzE sL65OH92VHJbJfbuBEfp8Wj31xV57+bkv5/OI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726221428; x=1726826228; 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:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Gpbut0KAPN9OcoWJIqzfgCoNbwKHXJxIxCnu/prRtVU=; b=G8OHYwuMSwEibaKXyT1nU7cdMINwKjPSsf2WA99NJwsZqxcQ6DgmtrOIK+2t4fQdIW +59fqYZRN49FGt29PebvbFO1dsDPrqFkZ7OtXY0GpImM2Q/9f8kKphXNPCG0myx6mv37 0Ly5arxFRyGqfxzTLlYrqOfCVZDuklutM/N4sElw6SEQkD2+sKfYEIbvKzvw8cb2O04h 6SkDPx+U2f1igK/wAwT5HuMDSvRuQJ8IxlOdY1w1Ip9NlIzRLAcF3zAGmaal46ka5otf Z4+djyel5IIWB8emSlXSujWLKOKCZShuKaRtZ8ONxCIaALx+H5UJusl3ywkY/PpoJKzS in9w== X-Forwarded-Encrypted: i=2; AJvYcCWUPIdyYzieQiF98wztLQFwUONwSarOmkP/Iw0KBXzjt1S7kGmlf8V7bDEb+/q9GpDlO7LJ4e4LP9xMCrs7@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yz+1VHNmZMSTO7xAvuQq5N794psEH1+dXh1jCV6QTvTXiiRo989 Rr252ud+bK4cJKVwU0PUcu9PaaOpgRtmxWDaVM7WR3JR3wpTk/Yn1RjE1AUSxsoJUg== X-Google-Smtp-Source: AGHT+IEXp1WaU1KmnvJe/kGLKoZluFujGhvlVmljObZZ0iZA2yzytgPyJ4ATlfYNK3n02yZmICv19A== X-Received: by 2002:a05:6402:1e8a:b0:5c2:6311:844f with SMTP id 4fb4d7f45d1cf-5c413e1fd9cmr4091613a12.17.1726221427687; Fri, 13 Sep 2024 02:57:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:2552:b0:5be:ef89:e79e with SMTP id 4fb4d7f45d1cf-5c41408cb34ls73946a12.2.-pod-prod-02-eu; Fri, 13 Sep 2024 02:57:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVveKAplEZHIQ9TAA4+rFA6dl8b1FrqCaGfjN7Fh/4yLmTspYXNqBd2GxbTj6AkeqwHxJjBzncMPFSWgeCV@amarulasolutions.com X-Received: by 2002:a17:906:d7dd:b0:a7a:b4bd:d0eb with SMTP id a640c23a62f3a-a902944e611mr506683266b.24.1726221426107; Fri, 13 Sep 2024 02:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726221426; cv=none; d=google.com; s=arc-20160816; b=i3159BosnO0E4dw31VbFVvRVgrRYC+k47Nn9hPkFrvcVQSqVyMWXhiMJvaDQi1PE+s uDmY1Zdmz/TDdiOeofiCWgDSX0BUyqjFMHCeI1Eh3Wg2FVZpiqEK5UNmajN2gnig1QTB 0fZBFuZHKVy70b0ogT0IlwZVOAaofD9ppDbpGty6NYc+f4olmv5e7FqVHGWqC+iJJhXK uinddqu5VybvL0H7vSIU/xm03KXCVe7JhSRT9VMC+iezR0NxSelvtZ/lf7x8avAZPnQq kWvZ6kIKVpBmaKpmCLDSgntIVYnn3ZOVDElBC6ShEntdwNbatMuroOACwv228J/k48a4 HC5g== 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:cc:to:from:dkim-signature; bh=DayMO+BG8fGqGpPxigAvYP6Gde782r5ZKw0Wsq4LiYs=; fh=wMsQUoyFwHXRmGXtS5+PYZfeGnrLkFxE2NXaPaknLRU=; b=LJFAHjNdqcMJsVRF2BOtUCmyk4E5bJQq/EmEV/XX1GYvIdsRK3DHMDybJgYDYPIk4w IxOAIgVl/yjug6Dry6ARaDehkgdBOnqZeIyz/XucV7LHeLarv/iYpLVhuD0+BmLnO/ZT e7DuRfFVlumkmSFpXmfhtJYG8VlILsrF5I4O0Ec3CGFtngzI1W04Y81vk7nnt3vRRbqM TgTTzPqjOBsZkjJETQokWt2zfBVK8BEaOLjR1Gk4BCWvnsXBsZu1/0EfNl8S7bkoaY+p vODqxeWsTh8UT7VEojOPMyvvZw1wdssysXuyGL+YUdgJdvJgrQPrn578bfhDCOIyp7aq 8IBg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TryMknPD; 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 a640c23a62f3a-a8d25cc6aa4sor403368066b.18.2024.09.13.02.57.06 for (Google Transport Security); Fri, 13 Sep 2024 02:57:06 -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-Forwarded-Encrypted: i=1; AJvYcCXYW7kjSusxOICMg4qg0PlWLHNyCZs1dN47yByFjWJs/Y0ZR94an5cIe22+aA11MJJKZaWKu0/nXItSwf1+@amarulasolutions.com X-Received: by 2002:a17:907:f747:b0:a8d:6921:e181 with SMTP id a640c23a62f3a-a902943273bmr496515866b.16.1726221425488; Fri, 13 Sep 2024 02:57:05 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-4-102-18.retail.telecomitalia.it. [87.4.102.18]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25cee72bsm863224766b.173.2024.09.13.02.57.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2024 02:57:05 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: Fabio Estevam , linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Miquel Raynal , Dario Binacchi , Hou Zhiqiang , Lukasz Majewski , Marek Vasut , Sean Anderson , Tim Harvey , Tom Rini Subject: [PATCH 05/26] clk: imx8mm: Mark IMX8MM_SYS_PLL2 and IMX8MM_SYS_PLL3 as enabled Date: Fri, 13 Sep 2024 11:55:47 +0200 Message-ID: <20240913095622.72377-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240913095622.72377-1-dario.binacchi@amarulasolutions.com> References: <20240913095622.72377-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=TryMknPD; 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 Signed-off-by: Dario Binacchi --- 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 432348a15cad..0e71ceefe96c 100644 --- a/drivers/clk/imx/clk-imx8mm.c +++ b/drivers/clk/imx/clk-imx8mm.c @@ -176,6 +176,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; @@ -458,6 +460,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); clk_dm(IMX8MM_CLK_ARM, imx_clk_mux2_flags("arm_core", base + 0x9880, 24, 1,