Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3054296img; Mon, 25 Mar 2019 02:49:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGasiqkM8uR0Kjdimr8k/uhEggKdpwtNF9x0abgoG4PrSQAbxT9nRIZmbC8EgDrXYfF3Sd X-Received: by 2002:aa7:91d7:: with SMTP id z23mr23502545pfa.137.1553507371483; Mon, 25 Mar 2019 02:49:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553507371; cv=none; d=google.com; s=arc-20160816; b=lP9d0frBGOsf04WwO1omWafasEkyrnXr+r0jkIc23YtaRSvXYDqRtovIeze60Q6FZx ojO6P5e+OAbsVq88dPqKPkoX0ICFeOZY96NoK6kei9gMlkrz1EKNmVYFa4NWOu0fV3E1 MWH8M1nZshSropNXfwlO5AHf9YvBr4GUCWfKc7GjHKTD87KIcNjo2a8NhPmGgPKAr/eJ 0mN+/KnqDmALbCLSsJDtEyN9bECzmm02GQfn7RMfThBOdShaPlTHjlBv+NUVLcaUhwzg ethj4OocMDKdZTDmn+ZaEXxGkr5tBGlDN/mQxszkHyAx8gG2B24JEkpE0GaVrk9E7m+p hGBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=tBC5OtGtmN7x85dPX6xr2NlJXzvSgP8RiHmhhpk+SWM=; b=hZ899vuXLe2TET5T9bpljZ6xUyqKY3KrFgUs5/WjRRxERHV/C6G5pvzGExJUHFBaIn XLxXKS7XQOVwAOcqAH5HkOdwN7oXSrupOFHJdsMW98e7JjKmosyj2N3Uqe/amcpkqLvf y7mFzIf9OwZIT/BeQlKdI9yFphWxNpePO8tMP/5i4x8Oac+93kc4BSJ1ZMwk7qsWxrab UJd6N3ioFwG6fDZhXEzbysIW5whoU13hvQFpZ4uXGFFujgUSDPTa9PmCC5WvX87v0W3j ckNEYzh/OdN0rsrDiSCpW24YObZPPnN0Y5gPKrsaUfiNGlR+vyrv0pLElr5AiZgGG4WJ sVTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=uzlHV+6U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si13523711pfe.4.2019.03.25.02.49.16; Mon, 25 Mar 2019 02:49:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=uzlHV+6U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730360AbfCYJsk (ORCPT + 99 others); Mon, 25 Mar 2019 05:48:40 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:39772 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729912AbfCYJsk (ORCPT ); Mon, 25 Mar 2019 05:48:40 -0400 Received: by mail-wr1-f66.google.com with SMTP id j9so9280722wrn.6 for ; Mon, 25 Mar 2019 02:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=tBC5OtGtmN7x85dPX6xr2NlJXzvSgP8RiHmhhpk+SWM=; b=uzlHV+6UMXSg0tjYKE5trY4EL/bIkIe7rrqKL/k9OSsZq6JewmtnBfoxvbZ5L3R45i SjSVcKdYuy7qQOBIWqoge/FQWx3y+mXiB7tUNzOKeCnrQyxDlg90/2rDwYrJpk9neqew 8yaBrEPFkqLcbvRHiCh1lJ9hdjf93Wb7/4isxEtK1iknXeZvAKRCpOGTCsdBdpqTtORc b1BJ8zUBJfYmwGgcaHQrf4yLS3BXgTKFoEj3k5VSkwGS+QO2jxx1OjoXeTwdbTGs7XN5 L2BdRbnw9GWR2w4KhVz2m1BUs4qAQySjhyEJ/23tmrZtcyb5JrF3uLozgvBJ2yaD0Yit IdQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=tBC5OtGtmN7x85dPX6xr2NlJXzvSgP8RiHmhhpk+SWM=; b=REyWczjrP5/WsnnQUYc3ECCs9uUuqYbPv5SQvAQJIP1UsVoECwKwy8FgD1XIj8Ev85 r+NgUin90rvrQuctodymGi0lRzd7gWiP2WHhXXnQubjXyWN3tFFvyunZ01WNGlt9QCzf YpX0S2KpypJsH3zpkRByByth8ZZpu1Bg5b101HjeZmjyK2npD+JEFQYX0Ik/xDzBst7J WsvsDQa3ZsacRPXgMfLGv1MyOSR/sCtL8aaEU3eYliicls0kGqbx4KzsYAoykK3g2Czs 2DA5UK1b7GuBxGfojIGxlVfyXAaTAbBAhMqUuVd+GtH9yv1BCYdUaC89UP36ZIf1g3oj uS3A== X-Gm-Message-State: APjAAAXEAGPASlmJ8AooBejKAWBnIBXYAk9lgBbqNlBjlra+zsNNmFVB r9zBNO1vDkX0rmgVxax1reGZVQ== X-Received: by 2002:adf:dc88:: with SMTP id r8mr8719485wrj.28.1553507318621; Mon, 25 Mar 2019 02:48:38 -0700 (PDT) Received: from boomer.baylibre.com ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.gmail.com with ESMTPSA id f9sm16675248wmb.36.2019.03.25.02.48.36 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 25 Mar 2019 02:48:37 -0700 (PDT) Message-ID: Subject: Re: [PATCH 1/1] clk: meson: pll: fix rounding and setting a rate that matches precisely From: Jerome Brunet To: Martin Blumenstingl , narmstrong@baylibre.com, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org Cc: mturquette@baylibre.com, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Mon, 25 Mar 2019 10:48:35 +0100 In-Reply-To: <20190324164327.22590-2-martin.blumenstingl@googlemail.com> References: <20190324164327.22590-1-martin.blumenstingl@googlemail.com> <20190324164327.22590-2-martin.blumenstingl@googlemail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2019-03-24 at 17:43 +0100, Martin Blumenstingl wrote: > Make meson_clk_pll_is_better() consider a rate that precisely matches > the requested rate to be better than any previous rate (which was > smaller than the current). > > Prior to commit 8eed1db1adec6a ("clk: meson: pll: update driver for the > g12a") meson_clk_get_pll_settings() returned early (before calling > meson_clk_pll_is_better()) if the rate from the current iteration > matches the requested rate precisely. After this commit > meson_clk_pll_is_better() is called unconditionally. This requires > meson_clk_pll_is_better() to work with the case where "now == rate". > > This fixes a hang during boot on Meson8b / Odroid-C1 for me. > > Fixes: 8eed1db1adec6a ("clk: meson: pll: update driver for the g12a") > Signed-off-by: Martin Blumenstingl Good catch ! Reviewed-by: Jerome Brunet