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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C99D5C5320E for ; Tue, 20 Aug 2024 07:07:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=e5XzteqfPZidWAoDfu8CD574QN5U/gDbKmwzV72JOdA=; b=k7bSJU4cACSpzTk+iJwsjd9WWR hIemyhakTtHlHhSGIF2rKqKgvU3N8eeO6GvTWaESNZS9LmRou696Txz7PF+7210Yj92fG9SRc0W61 yEvtYCScBgFjkTmMkD1DVyBDAsc/K1E/SvbwusVdZBCd9tRQ5d0sbv0IiJHmE1h4YSAsQuTLGBxyf D2d1GwRti4vyJB40GEUc+ut7vY33VpchtVP/0yjofwDItz0GiRHjTOF/y6lhcw2a13cc2nT8KJF3U XyJQox5cF2lgTJLjp/LcsOQ7WKzukJOgaU5m9SBoXAmQhaHU4KNdn+sngy9eynw5NNAZRR1YyUVBB wTSuFLEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgIxy-000000048dS-0DiK; Tue, 20 Aug 2024 07:07:42 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgIx4-000000048KI-1eNV for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 07:06:47 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5becfd14353so3970418a12.1 for ; Tue, 20 Aug 2024 00:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724137605; x=1724742405; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=e5XzteqfPZidWAoDfu8CD574QN5U/gDbKmwzV72JOdA=; b=bVX70vX5raY7DidPw23TvYIlNyG8X3+9AgIzZum5JEw8PVBJpWmuQGtfKaypLMRR3L enMtRj7SsOqo6KDuOSU0sez42LFef6h7qIsdK/UrdCHqRsDFYFy9+bM5UhfDSmLbDTjl SoPSLo7g43ZV5CnlgnQAaHwhQIqJu16uuaHkmON5Kkx2v2ry4Ry8yeFkLo5N7SoW63vh YAqO2tzKU90/OjRO76PmhtVaaIba9SmOkcrGc4n5DI3bUpgGY5IBB3unRnUKiPM9x1j5 tSR3xR0/38yvf+2Tx5LCwEMXjUcMfPO3V1pvgD2mfxJuh5CNKNeEe41ck74cgc8JzU6y S7WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724137605; x=1724742405; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=e5XzteqfPZidWAoDfu8CD574QN5U/gDbKmwzV72JOdA=; b=llS0U5JxahoAqsVwE3iityk9M4WodIIAFVM014vIxJv/lztjJUjxN1Eoo/x+tqZW+s gmsyhhyV3rImSuy1bjc7UA3kB+2D1Fk3f8GltrN5iH0w3rJ4UFV0Y7/V6cXFyTCorhKl yR0O3kfHhyu0Gkl+ObTOT4gcXIrE78xJswMmdagDvBEaOJkdoWDPVf1IFG151OyzxPc1 H9TOK8Mubb2W3tFQYcJADet7mcd5k/Xs71wu0o0/1qb1OSuqHipvTQGIsaw3u1ii1o9Y 3LD36x+ssT+es0YoqFGmzeIUAf7cN6AnmUvTvpRdWtkg7OwuHpli+Isk8mlGTF0aROZ0 g13Q== X-Forwarded-Encrypted: i=1; AJvYcCUBJdDqIapOAn5mFf7liyusjWvSQ88pBP7sP5lqLLzPcOkd/OqluEau0pyMwlgSqcbb+lRj250SLVuHflIXTUbsgiSwNojgbUGzrCPUTW+nhzFE1Lk= X-Gm-Message-State: AOJu0Yzb9CD4XE5cOX5Yofjhs8qWVxrXNADwmDKbhj/vl1RgMWU4FC41 WlHORqSicyUc2a65Omwq/reU1zFcpJrNJIKpnxieWlkqayM6q4Lx X-Google-Smtp-Source: AGHT+IEstC0d2nHwmzLD9xJbJgCd+PEu3VEWl7DX2uj2D5dGQCq0bpbLjR9G9F10l7LskAcu5QNBOg== X-Received: by 2002:a17:907:d3ea:b0:a7a:97a9:ba28 with SMTP id a640c23a62f3a-a83928d7a91mr936572066b.26.1724137604359; Tue, 20 Aug 2024 00:06:44 -0700 (PDT) Received: from eichest-laptop ([77.109.188.34]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a838394669esm734318766b.143.2024.08.20.00.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 00:06:43 -0700 (PDT) Date: Tue, 20 Aug 2024 09:06:41 +0200 From: Stefan Eichenberger To: Frank Li Cc: hongxing.zhu@nxp.com, l.stach@pengutronix.de, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, francesco.dolcini@toradex.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, Stefan Eichenberger Subject: Re: [PATCH v1 2/3] PCI: imx6: move the wait for clock stabilization to enable ref clk Message-ID: References: <20240819090428.17349-1-eichest@gmail.com> <20240819090428.17349-3-eichest@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240820_000646_508412_08416262 X-CRM114-Status: GOOD ( 16.45 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 19, 2024 at 10:45:13AM -0400, Frank Li wrote: > On Mon, Aug 19, 2024 at 11:03:18AM +0200, Stefan Eichenberger wrote: > > From: Stefan Eichenberger > > > > After enabling the ref clock, we should wait for the clock to stabilize. > > To eliminate the need for code duplication in the future, move the > > usleep to the enable_ref_clk function. > > Logically, it's better wait in imx6_pcie_clk_enable(). But not sure why > it can reduce duplication. I'm using the imx6_pcie_clk_enable in the if statement on resume for the i.MX6Q. If the sleep is not in there I have to add it there as well. I will check if this is still necessary with your changes and if so would update the commit message.