From patchwork Thu May 14 11:33:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "bhupesh.sharma@freescale.com" X-Patchwork-Id: 6404881 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 963D49F374 for ; Thu, 14 May 2015 11:38:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C452020453 for ; Thu, 14 May 2015 11:38:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D078C202F0 for ; Thu, 14 May 2015 11:38:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YsrQl-0007zX-CX; Thu, 14 May 2015 11:35:59 +0000 Received: from mail-bn1bon0114.outbound.protection.outlook.com ([157.56.111.114] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YsrPY-0006Cn-Mr for linux-arm-kernel@lists.infradead.org; Thu, 14 May 2015 11:34:46 +0000 Received: from BN3PR0301CA0011.namprd03.prod.outlook.com (10.160.180.149) by BY1PR0301MB1304.namprd03.prod.outlook.com (10.161.206.153) with Microsoft SMTP Server (TLS) id 15.1.154.19; Thu, 14 May 2015 11:34:20 +0000 Received: from BY2FFO11OLC003.protection.gbl (2a01:111:f400:7c0c::168) by BN3PR0301CA0011.outlook.office365.com (2a01:111:e400:4000::21) with Microsoft SMTP Server (TLS) id 15.1.166.22 via Frontend Transport; Thu, 14 May 2015 11:34:19 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; lists.infradead.org; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11OLC003.mail.protection.outlook.com (10.1.15.183) with Microsoft SMTP Server (TLS) id 15.1.160.8 via Frontend Transport; Thu, 14 May 2015 11:34:16 +0000 Received: from b45370.ap.freescale.net (B45370-01.ap.freescale.net [10.232.40.212]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t4EBXct0006339; Thu, 14 May 2015 04:34:12 -0700 From: Bhupesh Sharma To: , , Subject: [PATCH v2 3/5] can: flexcan: Add ls1021a flexcan device entry Date: Thu, 14 May 2015 17:03:33 +0530 Message-ID: <1431603215-25546-4-git-send-email-bhupesh.sharma@freescale.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1431603215-25546-1-git-send-email-bhupesh.sharma@freescale.com> References: <1431603215-25546-1-git-send-email-bhupesh.sharma@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC003; 1:fd69J7JB5W/G7TnUrCcygQY2iww4bCwDMhYjfSNd7xqWm1lfi5jaq8N0VzJZBsMbzwrQv0vHXfHMr8pV2yUMgLGXGf1hcLweplsnD1hwmCEAuFtxSGPS3yZVeX3cvYV/+7rl9FxnOfRc4sn219xC5yA5WEh9VzinhxrTGUgNi/86577nSSUym64EXpDOZVrBFtyOmKSk8INnH4ADtLVq57PdHxa9oY2eOxFRQjNLbipVOjo6ENbA087EMdZMUvyW/XrpMg1Q3+v3WxLwL27QGlLgIjvP99BpDwVHlLzs2P8A2qOtrtU2TzXYAtxDId8EsjT76tM9kapTcrx4Tsm4vA== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(189998001)(104016003)(19580395003)(5001960100002)(19580405001)(48376002)(50466002)(33646002)(77096005)(105606002)(50226001)(6806004)(2201001)(87936001)(2950100001)(106466001)(36756003)(76176999)(85426001)(46102003)(50986999)(92566002)(62966003)(77156002)(5001770100001)(575784001)(86362001)(47776003)(229853001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB1304; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1304; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BY1PR0301MB1304; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB1304; X-Forefront-PRVS: 0576145E86 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2015 11:34:16.0609 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1304 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150514_043445_051805_057A7185 X-CRM114-Status: UNSURE ( 8.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: bhupesh.sharma@freescale.com, bhupesh.linux@gmail.com, linux-arm-kernel@lists.infradead.org, Sakar.Arora@freescale.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds ls1021a flexcan device entry to the flexcan driver code. Signed-off-by: Bhupesh Sharma --- drivers/net/can/flexcan.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index ad0a7e8..deaa24e 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -267,10 +267,26 @@ static struct flexcan_devtype_data fsl_imx28_devtype_data; static struct flexcan_devtype_data fsl_imx6q_devtype_data = { .features = FLEXCAN_HAS_V10_FEATURES, }; + static struct flexcan_devtype_data fsl_vf610_devtype_data = { .features = FLEXCAN_HAS_V10_FEATURES | FLEXCAN_HAS_MECR_FEATURES, }; +/* LS1021A-Rev1 has a broken RX-FIFO support. So only legacy RX message-buffers + * work here. + */ +static struct flexcan_devtype_data fsl_ls1021a_devtype_data = { + .features = FLEXCAN_HAS_V10_FEATURES | FLEXCAN_HAS_MECR_FEATURES | + FLEXCAN_HAS_ONLY_LEGACY_RX_SUPPORT, +}; + +/* LS1021A-Rev2 has functional RX-FIFO mode, so no need to fall back to + * the legacy mode. + */ +static struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = { + .features = FLEXCAN_HAS_V10_FEATURES | FLEXCAN_HAS_MECR_FEATURES, +}; + static const struct can_bittiming_const flexcan_bittiming_const = { .name = DRV_NAME, .tseg1_min = 4, @@ -1139,6 +1155,10 @@ static void unregister_flexcandev(struct net_device *dev) static const struct of_device_id flexcan_of_match[] = { { .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, }, { .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, }, + { .compatible = "fsl,ls1021a-flexcan", + .data = &fsl_ls1021a_devtype_data, }, + { .compatible = "fsl,ls1021ar2-flexcan", + .data = &fsl_ls1021a_r2_devtype_data, }, { .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, }, { .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, }, { /* sentinel */ },