Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp487339pxu; Thu, 3 Dec 2020 05:34:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJydiJ8bLl+BN3TUrgO9d24kqMrMA0k8mxijGJzaHbU7IWyENNmUP6BDjGoF1BbD+/odGNHy X-Received: by 2002:a50:d886:: with SMTP id p6mr2951567edj.366.1607002451698; Thu, 03 Dec 2020 05:34:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607002451; cv=none; d=google.com; s=arc-20160816; b=g7el9ZDphVM1l9icl5e6n+Xg9yjW54lIQXjyPwRetDJFiKPpem6cMnU5WBUFmNJYvJ oSEn4z36+q5HdIWZ1dBR4HboQ10x/9sbh6AhcGiuSHSAGiZBcoVImRnpd7U5SA21vmMa wRelVRndh7vuPrcvlbUn6y42O8zaLPWznmsFtncaCR2+OBOQdNv80BkxhxPV2IU4Kk47 8stkXzCoH0GXkUmdltLseHypdKOQZXKtttlaeGKlgJsCHXLneSJ5T8dbJ9NTeXjZ2nB0 Tk4dafa1LuU6EFSgwLNm7Vy2SEQLjMO1qTXLXH/cNVSa/glMZZeop3VXL4neFRhTFr1O B8qA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SvwuHzcbtLbMKmuvgi/emvxE/j9Km60pSGGnrKNjeo0=; b=ZYpQO+OKhlIfhL6hzo2niUpWLTiBWbBZylYqBVMtAP24PTDoukuNp4S2IG0JqkNFiQ xS1WZ7XkECvaptzR9mAAlk3MFpVeXCTvZT5JtasEAZtKpjyogYYB5bjMjr4aFQyckMY9 c7E7sXldptzStKRXxEGoE8SBElNicuh4hnWDAUNjOAqTaYI9uaeXf0FNsWmcDa9OUgIM ripmjrpzJ3SNxU+d1iDW03ODIodggScnTn+300vgbuiDmovxkaY46XonMLleZ8h1L+vY 0ITB+qEPtcF9LpP1/mzZ10tBQ7SkJMLgEsXTR60tsm+fTv4ReIl5CtQI2xfMRA5S/hUR tegQ== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si1216633ejj.700.2020.12.03.05.33.44; Thu, 03 Dec 2020 05:34:11 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436649AbgLCNad (ORCPT + 99 others); Thu, 3 Dec 2020 08:30:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:47842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436623AbgLCNab (ORCPT ); Thu, 3 Dec 2020 08:30:31 -0500 From: Sasha Levin Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Pankaj Sharma , Marc Kleine-Budde , Sasha Levin , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.9 38/39] can: m_can: m_can_dev_setup(): add support for bosch mcan version 3.3.0 Date: Thu, 3 Dec 2020 08:28:32 -0500 Message-Id: <20201203132834.930999-38-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201203132834.930999-1-sashal@kernel.org> References: <20201203132834.930999-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pankaj Sharma [ Upstream commit 5c7d55bded77da6db7c5d249610e3a2eed730b3c ] Add support for mcan bit timing and control mode according to bosch mcan IP version 3.3.0. The mcan version read from the Core Release field of CREL register would be 33. Accordingly the properties are to be set for mcan v3.3.0 Signed-off-by: Pankaj Sharma Link: https://lore.kernel.org/r/1606366302-5520-1-git-send-email-pankj.sharma@samsung.com Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin --- drivers/net/can/m_can/m_can.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index d4030abad935d..61a93b1920379 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -1385,6 +1385,8 @@ static int m_can_dev_setup(struct m_can_classdev *m_can_dev) &m_can_data_bittiming_const_31X; break; case 32: + case 33: + /* Support both MCAN version v3.2.x and v3.3.0 */ m_can_dev->can.bittiming_const = m_can_dev->bit_timing ? m_can_dev->bit_timing : &m_can_bittiming_const_31X; -- 2.27.0