Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp977293rdb; Fri, 16 Feb 2024 01:08:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWdUcdzmcXyM8rOE243HVmq0cYE73PI/w7P/Ay6n1mKZonZiYAgGmMRE2O0q5JnY8PmSdtI+jxTs8iXfTiy5wWdpY8qK2eV14MMRRLu4g== X-Google-Smtp-Source: AGHT+IE8l6Q/kAkd+eBcpiiYeloUJ6zNXEoHp2MuKQvo0iCRvscwlSxL4OykmViUatqmkBoPKhZY X-Received: by 2002:a05:6a20:d38f:b0:19e:9a97:cb12 with SMTP id iq15-20020a056a20d38f00b0019e9a97cb12mr5191454pzb.54.1708074514392; Fri, 16 Feb 2024 01:08:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708074514; cv=pass; d=google.com; s=arc-20160816; b=uk/twyZn6IDnJsb6S1F+jpZs0p5WfBS5qqG5l2eEJpzzFsz/4MmxmkjxuNjzEKyfo5 mRcPf8ExGyYKxWvRonyZlebVU1krfArs2sfSE8KgfNPfb8W3osiez7kbYgdCrAEH7tYE mSX5hPQJi4EgmEFRRjlAEzBW+LubzH1VVIiGosDsvAgHRrSanMBZu+rMedG2if6XVkWQ O3os1RkH+CrLDuJG8m7vrdSmViaV9B9HvpAPhE6ZykVJjo8D7pQWmZhLx9szL2jQFbiV aBJiCBB1OQPAdgj9gOHuE9rcDbvPhmKycap2blnkfDvvpj+Ep7g7Dm2r82lBdY4OA/jm 4fmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qKnEBzEkahRZQGyLlG5caVJAX0ujkHEkHCnhmcHnJss=; fh=EcJvb/UD0Sxp1uzQaY//O6gLwLaT7WN+xZLAIKTz/F0=; b=BFhqjcyv2xBRiYEyKbLr8Ber595qsAVBge9pryZsNWSNkYegEzxuJT7MbgqENj8MzV SAVY44kURYyk1Woz/RWUQu4ptlWm2bbPUEo+lK/cGJnlR2pjDiokCrid+bjzg+rqQPjZ OOLxelsjLRR5lOkB/mVsdAxHTD0ttxpOtQCjC7AcClR3QSJMHPQ7t6MqbKP9FRuPoCKV 9fsQEr/gNjFea6i9aVxRI7c80G6VBQXOzu4Svyf9tw4t32q/DtDZAv7gX6YFEBx8HPW6 13P4YYgRSI6tlYUAJgHSq3QrP/RxqQ4ciDuYhPL3r1iG8jJqNtT5APnL9ecxF3NLGcmF bNVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Ga1ELh13; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-68302-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68302-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z3-20020a62d103000000b006e07224f0bdsi2664092pfg.276.2024.02.16.01.08.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 01:08:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68302-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Ga1ELh13; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-68302-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68302-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5FBC7285B89 for ; Fri, 16 Feb 2024 09:05:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 764B41B951; Fri, 16 Feb 2024 09:05:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Ga1ELh13" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F30581BC20; Fri, 16 Feb 2024 09:05:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708074323; cv=none; b=I5gD+qJL6fl+jJRUt9k2S+qedBhIwiTVAGPyxgJxsuLtE8ea3aNFFD1IFmD6OctpvDupAildxquIKmAJ37uJ9YIul4ni14YF8Xri/iBesfpIxIWHUqd51CGuRCX6V2JirYKMh+MCwMkTysMuZmqEqblBxTlXrTELXXUyKyRhWEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708074323; c=relaxed/simple; bh=KKzuGXf/3m5GUFN2wQqWlaT/zKCh0DST4P6XXk09AyE=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ksqHlq7h6Xxt0mb7UGXirK3SvBBldlQtAO/cjw/xqnN0Eq8cK34LTjY/yQ1jbp2RDIjXDvhFkSWYJ2CKiwNUPLrQd4cBlE26iX7RD7HoqnDGQFEMGeT87jWwF7zsnfeprsXS/52PHAz19S7LRtLBbKSQ6XRFkqijBahdX5YcEPE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=Ga1ELh13; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 41G94eJE042556; Fri, 16 Feb 2024 03:04:40 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1708074280; bh=qKnEBzEkahRZQGyLlG5caVJAX0ujkHEkHCnhmcHnJss=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=Ga1ELh13Fmc4SCWCtqOcJOvkxzdlZcoRb+2I2ZtdsBOn+CHXoQZBCTZqXQO27M3GE m+QAAFnGAOnJiRL3AGE3v/YrTKt/Tddb7d18CVJad8VrRKNSSCBFxqe1xJTGhfaXX1 N+K101UbOoQH2ziHXxgx59QU6QLKo1rC7coWs7q8= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 41G94ecD023131 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 16 Feb 2024 03:04:40 -0600 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 16 Feb 2024 03:04:40 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 16 Feb 2024 03:04:40 -0600 Received: from localhost (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 41G94drM059981; Fri, 16 Feb 2024 03:04:40 -0600 Date: Fri, 16 Feb 2024 14:34:39 +0530 From: Siddharth Vadapalli To: Vinod Koul CC: Andy Shevchenko , Thomas Richard , Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Haojian Zhuang , Vignesh R , Aaro Koskinen , Janusz Krzysztofik , Andi Shyti , Peter Rosin , Kishon Vijay Abraham I , Philipp Zabel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , , , , , , , , , , , , Subject: Re: [PATCH v3 08/18] phy: ti: phy-j721e-wiz: split wiz_clock_init() function Message-ID: <14429802-b4d8-4a3e-88ea-a9fc55d2251c@ti.com> References: <20240102-j7200-pcie-s2r-v3-0-5c2e4a3fac1f@bootlin.com> <20240102-j7200-pcie-s2r-v3-8-5c2e4a3fac1f@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On 24/02/16 11:32AM, Vinod Koul wrote: > On 15-02-24, 17:43, Andy Shevchenko wrote: > > On Thu, Feb 15, 2024 at 04:17:53PM +0100, Thomas Richard wrote: > > > The wiz_clock_init() function mixes probe and hardware configuration. > > > Rename the wiz_clock_init() to wiz_clock_probe() and move the hardware > > > configuration part in a new function named wiz_clock_init(). > > > > > > This hardware configuration sequence must be called during the resume > > > stage of the driver. > > > > ... > > > > (Side note, as this can be done later) > > > > > if (rate >= 100000000) > > > > > + if (rate >= 100000000) > > > > > + if (rate >= 100000000) > > > > I would make local definition and use it, we may get the global one as there > > are users. > > > > #define HZ_PER_GHZ 1000000000UL > > Better to define as: > #define HZ_PER_GHZ 1 * GIGA The variable "rate" is being compared against 100 MHz and not 1 GHz. The driver already has the following macros defined: #define REF_CLK_19_2MHZ 19200000 #define REF_CLK_25MHZ 25000000 #define REF_CLK_100MHZ 100000000 #define REF_CLK_156_25MHZ 156250000 So would it be acceptable to change it to: if (rate >= REF_CLK_100MHZ) instead? Regards, Siddharth.