Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1123139pxu; Thu, 26 Nov 2020 23:40:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSnBUWwc9N0H/ho6pTvgKIUy5KdEjGh14v9vuTQ/IKWcKswoDnmpOZVtQy7nvra82f0MUc X-Received: by 2002:a17:907:10d9:: with SMTP id rv25mr6323432ejb.437.1606462839947; Thu, 26 Nov 2020 23:40:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606462839; cv=none; d=google.com; s=arc-20160816; b=xEIAoUy4w6rn14fqL8oTq4X9zzp5LRIyjbp50GDCuwlFg26ITTPi15sN5VfLfUA6zg F7oKdY9KzJlwqfLOxcBvSm4bPqFHEGb4tZbO4JU5MBJd6Wc4UkofezkNb2DGhvpOhUxr 76Mw+mpEatqiFix1tt+p1TOkvF4oitqkf2u52/B8wtb6giUu7fH5gViiBa487Z4wfkQG t2u3W9964tWOH5+Y3CayJvM5mB4yTZn8Pm50RwJAymu8SwIf0RlZ9WLGDfy93odVs8ds k8nFGCjVvh8x434pxaDDn+ObbEvZnZWb3M2kRFWpTiYFhi7lsDmuii17gBftA5b1bV/B 7vEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:message-id:date:subject:cc :to:from:dkim-signature:dkim-filter; bh=SLA+YxSxwuaVy5M4r5sM0kRP4lwMguF/Prn+O9V/IEI=; b=PFhewU+XGP2OhGGvrWkh020AP95qkvlITP6mcNcziF/+WgBs5GyFQY+g3LPH2IJ9/Y SSNYwnnanmzJtMNbleDDxdm+GQR2P3zgEDYCkjPPsfLm+f9j5Z538AmIsAQVeUguyDX5 SJ3J25H3Z6i4P1QFxL+ibC7+E6D6nTd14KnAKzRjWLgljQaoeEt1g0mZmI+9rdMWepQX y116jTaAqRT1lqxf2ZKoL1RgJFL28hEQ+A5FZ6913z9M0ADbJ9/LodfRdrvzeeEOwZga 6J8HxpbUYmSJfJRLlgA4PVQWFNESWA2ozmMDQ/zNEaLWhCdU99vV2uGsA4fBvr+CCMg3 xOMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=qt2D70in; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch6si4437114edb.155.2020.11.26.23.40.17; Thu, 26 Nov 2020 23:40:39 -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=@samsung.com header.s=mail20170921 header.b=qt2D70in; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388123AbgKZKel (ORCPT + 99 others); Thu, 26 Nov 2020 05:34:41 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:48491 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388040AbgKZKek (ORCPT ); Thu, 26 Nov 2020 05:34:40 -0500 Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20201126103436epoutp02ac9a563c933f59897e796a8e72c3b8a3~LCFp9YADu2915829158epoutp02Z for ; Thu, 26 Nov 2020 10:34:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20201126103436epoutp02ac9a563c933f59897e796a8e72c3b8a3~LCFp9YADu2915829158epoutp02Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1606386876; bh=SLA+YxSxwuaVy5M4r5sM0kRP4lwMguF/Prn+O9V/IEI=; h=From:To:Cc:Subject:Date:References:From; b=qt2D70inCTC4LDmk5lr1eTgqho36/gz9LtKosz7MHBS63vH/CMBYhMNSHGRNM6oaI uJy5x5Ud3dVv5OlIAHDy4LzZismHMzGR5ZLjHb8Ikqd6JdJu8sOKhqSgsxXw3g1/cr 6aPkj512U36Tet8UnvK+LvssHssOp2B8wWwYkXp4= Received: from epsmges5p3new.samsung.com (unknown [182.195.42.75]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20201126103436epcas5p180b833cd843d91f42f7321724051be5d~LCFpNe70L2350023500epcas5p1T; Thu, 26 Nov 2020 10:34:36 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 2F.25.33964.BB48FBF5; Thu, 26 Nov 2020 19:34:35 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20201126045221epcas5p46f00cd452b8023262f5556e6f4567352~K9a1ZhjFi0428904289epcas5p4b; Thu, 26 Nov 2020 04:52:21 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201126045221epsmtrp29075bc18fcb1d5b52cbde980e22b689d~K9a1Ysv8o2791927919epsmtrp2J; Thu, 26 Nov 2020 04:52:21 +0000 (GMT) X-AuditID: b6c32a4b-eb7ff700000184ac-76-5fbf84bb50d7 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id D5.A0.13470.5843FBF5; Thu, 26 Nov 2020 13:52:21 +0900 (KST) Received: from ubuntu.sa.corp.samsungelectronics.net (unknown [107.108.83.125]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201126045220epsmtip1a5102e03d1a816fa0344453580167107~K9azy9Xka1656716567epsmtip1C; Thu, 26 Nov 2020 04:52:20 +0000 (GMT) From: Pankaj Sharma To: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: sriram.dash@samsung.com, dmurphy@ti.com, wg@grandegger.com, mkl@pengutronix.de, davem@davemloft.net, kuba@kernel.org, pankaj.dubey@samsung.com, Pankaj Sharma Subject: [PATCH] can: m_can: add support for bosch mcan version 3.3.0 Date: Thu, 26 Nov 2020 10:21:42 +0530 Message-Id: <1606366302-5520-1-git-send-email-pankj.sharma@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrEIsWRmVeSWpSXmKPExsWy7bCmhu7ulv3xBh9vmVvMOd/CYtF9egur xYVtfawWq75PZba4vGsOm8X6RVNYLI4tELNYtPULu8XyrvvMFjfWs1ssvbeT1YHbY8vKm0we Hy/dZvTYtKqTzaP/r4FH35ZVjB7Hb2xn8vi8SS6APYrLJiU1J7MstUjfLoErY+n8t2wFJ9kr jv/bwdbAuJyti5GTQ0LAROLVp8vsXYxcHEICuxkl/myZzwLhfGKUOPd1KlTmG6NEy4r7rDAt OzbPg6rayyhx6fEsVginhUni94zvYFVsAnoSl95PBlsiIhAqsax3AlicWeAAo8SvnzldjBwc wgKuEo2nSkDCLAKqEucPPWIHsXkF3CVm/u2EWiYncfNcJzPIfAmBa+wS154cY4dIuEgcW3yd EcIWlnh1fAtUXEri87u9UM9lSyzc3c8CsktCoEKibYYwRNhe4sCVOWBhZgFNifW79CHCshJT T61jgriST6L39xMmiDivxI55MLaaxNSn76C2ykjcebQZapOHxJLDV8FsIYFYiW2Xl7JOYJSd hbBhASPjKkbJ1ILi3PTUYtMC47zUcr3ixNzi0rx0veT83E2M4GSh5b2D8dGDD3qHGJk4GA8x SnAwK4nwugvvjRfiTUmsrEotyo8vKs1JLT7EKM3BoiTOq/TjTJyQQHpiSWp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VXGKfmoB1+Y+Nq9V/Vrjwe/3cg4gVXe+zy3rOVE g6hdDRtXFeSt5vvN5GXPdtkl8NOOgwb9wW4b99kp+jnHKpxkbNa9qnNr2ySzLzm/uJxEWipN 63/paf/z/bnwUV9Iwll1ibu8tQs7QtyU9u8/5t550umC5bo5es7ip1bHnX/GGajZ0+30ZK/Y t7g6h113bi/T/PqmUcltw3qNhD+hkvOMipVYijMSDbWYi4oTAffoYf+sAgAA X-CMS-MailID: 20201126045221epcas5p46f00cd452b8023262f5556e6f4567352 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P X-CMS-RootMailID: 20201126045221epcas5p46f00cd452b8023262f5556e6f4567352 References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Depends on: https://marc.info/?l=linux-can&m=160624495218700&w=2 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 86bbbfa..7652175 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.7.4