Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4302747pxu; Tue, 1 Dec 2020 01:19:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyY/31shnNbwNZLAu7Xz+1KotVXteCH1erWPeKnT5NWKbcOEAWwLWWpvpezAH/wC58igyl6 X-Received: by 2002:aa7:d3d6:: with SMTP id o22mr1998275edr.243.1606814391869; Tue, 01 Dec 2020 01:19:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606814391; cv=none; d=google.com; s=arc-20160816; b=Sfby1Zyr0ZeaQgiliMKls0iqsebjXLfql3N9d1QadfDh+enG7gSyri9YGh0juOSJSz 8cpWY12aDVFxug91O2Q/8ooSch1o2Ceds8k1LWRmegAg/+7BNgWh8/Z79AOR7Tjdj7rA Jfj3BFsMtj21+KTonpxpjiXlviB7KxptDeLq4Pt+CZEtNLXDQO4zcheRp4B1ETcmqmDK yurpyxju5FishXGvE4OgDGIOeZFLMEbXvAf6bF4mCeqv3CT9JCsocn8PEIHGuGzaQxbA eBfz3x+56/UbhtiKu9dXJORYJSxuhyjNhNHk+RagvvPZF6DOH5mygHL/lFEcFlVCV3Ak dqsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XFqnUhOTj4QtI28jT+PoCczmr9sP+br+8jdHVg8wPek=; b=dGDavNvJW1esOiV28HLwEbRrb/dxveruHRybrLvqXRDwFqUjmiMpmeNkOwFfBhbqnz ZT1csucAA4Wf6dzOOiquagAAzy11/7QwSjvdtcb6lEx4600YsY32B8dmY0poETUk506G MDs4AbgCTW1SiFv4Y+es8FcQyh8QJg4IZq+KZHR5M8WNFpz4KuNCMOLA09KzQ//IwigA iExb30AjJdwiP1If5TwfJ2ERcynSJpn0GV4Z/hJi0+eMBrS4Qi4g2NNRpKinF7B+04o/ 3o9GlpxDfyW29J/nsMCuwa79XWlNBUKLgQEAsAbInVJpI5nZ0STcJk0RUaQDat0gmH8R Vvtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XMcwoAJo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a1si553210ejs.714.2020.12.01.01.19.29; Tue, 01 Dec 2020 01:19:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XMcwoAJo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390375AbgLAJOz (ORCPT + 99 others); Tue, 1 Dec 2020 04:14:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:52880 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390236AbgLAJOQ (ORCPT ); Tue, 1 Dec 2020 04:14:16 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 A38F3206CA; Tue, 1 Dec 2020 09:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606814016; bh=QqlQ6Sgkx1P3HyqjJ6RMdu9lyjZDCdJz5lmc1xAzmAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XMcwoAJotNWFJiWyIaM7zY0S0tnU3yodJbKiGfbA0rsowDHFPTTsxnvjtErpk9RMT 9OPzF8qF2lVdO/AQy91vRNegY5MO69M37XLIvx7Xwru77kRIDxeWNkEmJq2eidNDDV E8EUi1OitafQ2smyZ8r68I7hxhAKO1TEjcK86VDo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Murphy , Mario Huettel , Sriram Dash , Marc Kleine-Budde , Sasha Levin Subject: [PATCH 5.9 137/152] can: m_can: fix nominal bitiming tseg2 min for version >= 3.1 Date: Tue, 1 Dec 2020 09:54:12 +0100 Message-Id: <20201201084729.776972198@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084711.707195422@linuxfoundation.org> References: <20201201084711.707195422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marc Kleine-Budde [ Upstream commit e3409e4192535fbcc86a84b7a65d9351f46039ec ] At lest the revision 3.3.0 of the bosch m_can IP core specifies that valid register values for "Nominal Time segment after sample point (NTSEG2)" are from 1 to 127. As the hardware uses a value of one more than the programmed value, mean tseg2_min is 2. This patch fixes the tseg2_min value accordingly. Cc: Dan Murphy Cc: Mario Huettel Acked-by: Sriram Dash Link: https://lore.kernel.org/r/20201124190751.3972238-1-mkl@pengutronix.de Fixes: b03cfc5bb0e1 ("can: m_can: Enable M_CAN version dependent initialization") Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin --- drivers/net/can/m_can/m_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index c62439bdee28c..d4030abad935d 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -1033,7 +1033,7 @@ static const struct can_bittiming_const m_can_bittiming_const_31X = { .name = KBUILD_MODNAME, .tseg1_min = 2, /* Time segment 1 = prop_seg + phase_seg1 */ .tseg1_max = 256, - .tseg2_min = 1, /* Time segment 2 = phase_seg2 */ + .tseg2_min = 2, /* Time segment 2 = phase_seg2 */ .tseg2_max = 128, .sjw_max = 128, .brp_min = 1, -- 2.27.0