Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp401364pxu; Tue, 1 Dec 2020 14:19:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJx32cI/zvgHMwffg1JG6//ph31fU57Q65BkxvVYirQwrnvJXt7rnu4snyuRg6Uk5k4BqvZH X-Received: by 2002:a50:e791:: with SMTP id b17mr5223529edn.388.1606861177079; Tue, 01 Dec 2020 14:19:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606861177; cv=none; d=google.com; s=arc-20160816; b=q5SqzbTkXTZDT2/P0nFe9CYnW/0uFz8zLMTeH+SsRZ5Pii+sY9MrieYH9YzE1am9oG woETqsjuew6/iwShU6+VD8cahkQ8TMs9MKhRb7nln/NHQ6fnlfAg1ITmx55KX5DZAZI8 QcLZdjz29/I1U+S86VfkeGOkJV8+plqM54NwGY0/S3rHoFzYFDINIEUxNW/jQZm0zcPC IQaHzJsUvCLZNqOxB9NSnIQsuHgregQdNUozSDrMrswmSILH8tMh44Kx2AUQ2IHdeCUA VZ64EbJsK+FU0kK4PnZNL52mF6Ga7YQzKo8PFbklDKH1FpQSV57uwmMbk+50W6F2XvMr 6YxQ== 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=4Um+q92L+7K417y9w8sOuhAU81QLsSR5+MtBYzlnXCI=; b=mrvuei/ybEXirNOd62P5u2UpR/lJ9vYHYPaoHLdVQZykqsOrn4oRWOrbvJkOGH2XJW VNLdtNi7nQlhradelMtbL+nrFrGV36NBp0FNnZnXmIVtcQ3mYVcq8gI/Hsw8CH4kbaZu FZZ7e/I+yO982PXz4JLAfx9lGNT3Noz1XXKIWxsbXvgTo1jeZnwJ8bvxiZtqFnMKOwd+ /Q8w+0E7G2i1z8hqRj4jtYF/ATYbyDT1pY4aFg5WXuxcA2Fyk0jc37sMwPVN4ET8QZyz jBSNMzqIQbmN1rrVZcpo9/ShJSOXwL/HUuRX+OKq0KjDzhaS2xNcXSyaoQOx795e93n7 hYQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MImEHIV0; 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 a15si918942eju.683.2020.12.01.14.19.14; Tue, 01 Dec 2020 14:19:37 -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=MImEHIV0; 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 S2388094AbgLAI7a (ORCPT + 99 others); Tue, 1 Dec 2020 03:59:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:35328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729007AbgLAI70 (ORCPT ); Tue, 1 Dec 2020 03:59:26 -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 9D73A21D46; Tue, 1 Dec 2020 08:58:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606813125; bh=GJL65GZGi3EOuDnTzArVhNwhERhIIvwyePww8iSeO0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MImEHIV0S9ZtUrVUtInwUkgq4F79Qx7NBOwg37WO6SKsNJLHZcPuy0UL7pHa5v+tC XLRR4IIX/Z5KTJPiZpoHG9VTh9ZFSNDgFUqmpXPtGCJOenDS/ajIxWrmcEZwOUwiUi fCYnFTusqWlZ6/9HV6zIzlM4tCf9gcwo6N2Ts1B0= 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 4.14 41/50] can: m_can: fix nominal bitiming tseg2 min for version >= 3.1 Date: Tue, 1 Dec 2020 09:53:40 +0100 Message-Id: <20201201084650.146689436@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084644.803812112@linuxfoundation.org> References: <20201201084644.803812112@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 680ee8345211f..a3f2548c5548c 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -972,7 +972,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