From patchwork Mon Feb 8 08:49:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 61384 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1307201lbl; Mon, 8 Feb 2016 00:49:39 -0800 (PST) X-Received: by 10.66.216.69 with SMTP id oo5mr40060470pac.126.1454921379140; Mon, 08 Feb 2016 00:49:39 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qo15si45104932pab.12.2016.02.08.00.49.38; Mon, 08 Feb 2016 00:49:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750866AbcBHIti (ORCPT + 3 others); Mon, 8 Feb 2016 03:49:38 -0500 Received: from mail-lf0-f47.google.com ([209.85.215.47]:33167 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750829AbcBHIth (ORCPT ); Mon, 8 Feb 2016 03:49:37 -0500 Received: by mail-lf0-f47.google.com with SMTP id m1so92099094lfg.0 for ; Mon, 08 Feb 2016 00:49:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=g42ZAGa1SaGx53qS/CPc3NBQGffO+lteVkFvaf2eeJc=; b=JpFaDwmLmPjymz2k8AANLO+GNYkWUUN+USZ+cqj9wx3SiB49/F5egNEo81ttT0IYSm cyHgKlKu0IkB/r5zdTU0ibTQLzgkfy9VlXWjWB+p0Ga6+OkwZrOM0PnFF4wTmEVb7Ef1 zxnTVVWkzTpjevRlc1z71zyHBJ8Hot9QXWc2s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=g42ZAGa1SaGx53qS/CPc3NBQGffO+lteVkFvaf2eeJc=; b=Mz/cmwRsNzGwmoAudmham/0VL5ZMqwc/THUhE6NhE2LIZzNybwhlLduAUDLwlREEsq 94eC0swjS3EhgXRV5TvHOea07bXc/yXYM0PfAuDB+mGrN/X8i0ASnD3sADWq4UZdwitn HI2e6v4ikPB642iEpTBnXuP3VrcZYEfiD0UjZXDbbbBExkvN5Z0A4r92G/qA1K80xzCC IW3Alyrv867vkLVp2bzWigad/Gg7ZV7SirZC14hJ+hKunYW8g3eb8JXappC97Vm3SKhR jr8wls2xD4DGkhe8ulNI6s6cll6+JwOKTeBH0Xx296AongLYPJt3Ldhrd0E3NMvNesht IVgA== X-Gm-Message-State: AG10YORDL+nheELOeLRrS9mdsMwQmZ9HMLvjf2Y0U8iBaNmtJUXduFpG+dh70/iHpnS3qwNm X-Received: by 10.25.83.137 with SMTP id h131mr2038622lfb.0.1454921376026; Mon, 08 Feb 2016 00:49:36 -0800 (PST) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id ay2sm837995lbc.39.2016.02.08.00.49.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Feb 2016 00:49:35 -0800 (PST) From: Linus Walleij To: Russell King Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij , stable@vger.kernel.org Subject: [PATCH] ARM: ICST: try other dividends than 1 Date: Mon, 8 Feb 2016 09:49:25 +0100 Message-Id: <1454921365-4140-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Since the dawn of time the ICST code has only supported divide by one or hang in an eternal loop. Luckily we were always dividing by one because the reference frequency for the systems using the ICSTs is 24MHz and the [min,max] values for the PLL input if [10,320] MHz for ICST307 and [6,200] for ICST525, so the loop will always terminate immediately without assigning any divisor for the reference frequency. But for the code to make sense, let's insert the missing i++ Reported-by: David Binderman Cc: Russell King Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij --- I ran into the mail David sent in december and looked closer at this. It's not a regression in any deployed systems but it's disturbing so let's fix it. --- arch/arm/common/icst.c | 1 + 1 file changed, 1 insertion(+) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/common/icst.c b/arch/arm/common/icst.c index 2dc6da70ae59..3b3e58b7ba74 100644 --- a/arch/arm/common/icst.c +++ b/arch/arm/common/icst.c @@ -58,6 +58,7 @@ icst_hz_to_vco(const struct icst_params *p, unsigned long freq) if (f > p->vco_min && f <= p->vco_max) break; + i++; } while (i < 8); if (i >= 8)