Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4918641imc; Mon, 25 Feb 2019 13:37:21 -0800 (PST) X-Google-Smtp-Source: AHgI3IaZjqT9Ohe0YDdWtIKNarYa6dISEYOzjFwXm6OeDD7MDvxBEyqzAAoqyr3QwIBaH5XYTsdL X-Received: by 2002:a17:902:e01:: with SMTP id 1mr5531551plw.66.1551130641746; Mon, 25 Feb 2019 13:37:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551130641; cv=none; d=google.com; s=arc-20160816; b=niis7mvXxIGpMtfd1zKfKrt4xdFt1+41I2vmRQrDkcPIOH/witnwJDQJTSReW7Ktji SG1OrNkv6MQ8Rj4VCpm60RGdcSp6K1QcXy4nUjLM3BTm+T0k23sVBPF2hwgq5QOeihOO 2fJkP27diSp1zthoaKIrwDbrCBvavL77JvwL5L8oTlG42FUGFyMThSIm7S4598vlbmc1 YjnSbUrVE21QTE0i/RcjtTJoCNlMwmoQz6/tgtFhlcaju+DKArLatCsybhme39oUGolB tCxbfeAXuueN6iRKV80iQ/3e6jdo06pRlEBe70w2z+LIU14JepmLxuC/4wZLfEm4YnuH cgZg== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=qRmqpx3pv2xRUGMtMXrP8mVTLy5+ea4A40c96W22lhM=; b=NO7RNHdvhELZPnm6wZFZMFQEQLl7wmw8mPAslPZuhgBI8pXRSIKPJrTu58+d7EAA// 9ew36sg5+6+jd7d3iRbQG/xAcNdmE/WKHSdcZqOGBEZoweRMZkXHdtUu/+dbMqlMT/+n dcX6Dr+Q5wsAijBd4iRLXrEW0hwIuTDSHoISbyGpHWzkpLPDEuctVIgE3N3b1ZQQPEaZ +qsO46yystEvDv40LdTBRQ/b3wbIu75ojQIesgd8nwrvbdL/yxe7wTFHwfZ3QdX94qz3 0wpRjVPAMV04uDN7sE0cubviP7Z1VwrDCIB50JNe3EZaFhbyP+gEygMAbelq9hWDM+N+ OjKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="US/E7ija"; 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 x12si10215126plv.4.2019.02.25.13.37.06; Mon, 25 Feb 2019 13:37:21 -0800 (PST) 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=@kernel.org header.s=default header.b="US/E7ija"; 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 S1732990AbfBYVfa (ORCPT + 99 others); Mon, 25 Feb 2019 16:35:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:41652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732977AbfBYVf2 (ORCPT ); Mon, 25 Feb 2019 16:35:28 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D8776217F5; Mon, 25 Feb 2019 21:35:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551130527; bh=hUOn7S/OGdg2RRriQOWkt81G2gAoxdTSJ5z7NT7ME9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=US/E7ijauLYKgZoG6zgaM2hm8+LOgnXQg77u70yywhQv9d0PwbcSvbFVHPZjOnxrV n4Oy2NEsWD/gNKGdvE+svhstJCs9mKGEKqkQLOgPc6TQVUeAsmzDVh9kTFXeAnYzPX IAAYJGtgGPizau7RDghwKRKkLXVXeRqZ+iBr20qQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexandre Belloni , Nicolas Ferre , Stephen Boyd Subject: [PATCH 4.20 150/183] clk: at91: fix at91sam9x5 peripheral clock number Date: Mon, 25 Feb 2019 22:12:03 +0100 Message-Id: <20190225195120.284923383@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190225195054.748060397@linuxfoundation.org> References: <20190225195054.748060397@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexandre Belloni commit 1b328a2e095a009518ebac05e937cc0fc242fede upstream. nck() looks at the last id in an array and unfortunately, at91sam9x35_periphck has a sentinel, hence the id is 0 and the calculated number of peripheral clocks is 1 instead of a maximum of 31. Fixes: 1eabdc2f9dd8 ("clk: at91: add at91sam9x5 PMCs driver") Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre Cc: # v4.20+ Signed-off-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman --- drivers/clk/at91/at91sam9x5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/clk/at91/at91sam9x5.c +++ b/drivers/clk/at91/at91sam9x5.c @@ -144,8 +144,7 @@ static void __init at91sam9x5_pmc_setup( return; at91sam9x5_pmc = pmc_data_allocate(PMC_MAIN + 1, - nck(at91sam9x5_systemck), - nck(at91sam9x35_periphck), 0); + nck(at91sam9x5_systemck), 31, 0); if (!at91sam9x5_pmc) return;