Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6537529imd; Wed, 31 Oct 2018 13:17:06 -0700 (PDT) X-Google-Smtp-Source: AJdET5fosaRnFycGsDuPSC/ifDBnWT0VrqUeZBDPyn8Ta272HKcKgOKWdO7o9EvYDybguFgkh2sh X-Received: by 2002:a63:9b11:: with SMTP id r17mr4548583pgd.416.1541017026322; Wed, 31 Oct 2018 13:17:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541017026; cv=none; d=google.com; s=arc-20160816; b=VR7YQtuDOxmkFaKMqUIder6GBuHtGGe2M3cxQ8HA9my1zz3aSjgwBb7sz4S6hbA2Zi 5zG6jFS/KF/Qr/s9s742LSzE/kVKStJSl7N0Dtju7BIt8foA6wZhx0hlYBktKUbDD+rO dL2aCBIL6hh+Nc1u3E7aNdFXfxaVsDf8UChXdkgcIjMpCP+waG73TYPjBhyDUcKq8rdk d2eCufVune8yzMyg/TUEzwVPhK4SJOSpNaHWAXPi4nx2N19A4GB11jHgrEFfA+x1Ti22 wUt/xDEGVcxVnlGLPNX/WxbLwMM/S0B1uZMAtZj1ls+hZoPvlVzK6zWFTcYfXWPGVrX0 BkAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=QjRZadd/yILJAGgQziPWcYBYJmjXGqchoVMubWa6j9I=; b=CG2SJ5Phztsfn68huDUmVyONOBBX6wzrt3vyFIL0YkCbKnW+B72Dyt9dO7Y/GjxYUZ 8s0TTk/LNSYRaw+/Yo5ZaCgnJhmtgUo1gJlD8J75033ysmy7vmLljGPB/MiqXJVLdHfP tYvGwFPOHBMcVkm0nodhz1CNr+n+oxwYHqNGPeBHzCZBzcKQ/ci+7ICAWMk3gJxREi2J pwM3qHGMC5njjtTfj3QHiD/1dqlGHQYrxjBhHRMr8zIER4jmH4WU+q6hhCOiW3CgDAW7 lzklSNsMpwOBhPLZNR42uE7d2dzYzp1V+US9D/akgxFyBhnjjl1n9fkkKDTt0LzZ463h cTxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 17-v6si28852545pgz.577.2018.10.31.13.16.50; Wed, 31 Oct 2018 13:17:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729933AbeKAFQB (ORCPT + 99 others); Thu, 1 Nov 2018 01:16:01 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:41874 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729344AbeKAFQA (ORCPT ); Thu, 1 Nov 2018 01:16:00 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id w9VKGBgC052529; Wed, 31 Oct 2018 15:16:11 -0500 Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id w9VKGBEv003295 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 31 Oct 2018 15:16:11 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 31 Oct 2018 15:16:11 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 31 Oct 2018 15:16:11 -0500 Received: from [172.22.181.153] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9VKGBRC025069; Wed, 31 Oct 2018 15:16:11 -0500 Subject: Re: [RFC PATCH 1/3] can: m_can: Create m_can core to leverage common code To: Wolfgang Grandegger , , CC: , , References: <20181010142055.25271-1-dmurphy@ti.com> <20181010142055.25271-2-dmurphy@ti.com> <52811b27-00c0-f5e2-2b18-608ccf846723@grandegger.com> From: Dan Murphy Message-ID: <349ef8be-f4c7-25cc-2c33-7ce1fd0b0f40@ti.com> Date: Wed, 31 Oct 2018 15:15:56 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <52811b27-00c0-f5e2-2b18-608ccf846723@grandegger.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wolfgang Thanks for the review On 10/27/2018 09:19 AM, Wolfgang Grandegger wrote: > Hello Dan, > > for the RFC, could you please just do the necessary changes to the > existing code. We can discuss about better names, etc. later. For > the review if the common code I quickly did: > > mv m_can.c m_can_platform.c > mv m_can_core.c m_can.c > > The file names are similar to what we have for the C_CAN driver. > > s/classdev/priv/ > variable name s/m_can_dev/priv/ > > Then your patch 1/3 looks as shown below. I'm going to comment on that > one. The comments start with "***".... > So you would like me to align the names with the c_can driver? > > *** I didn't review the rest of the patch for now. > snipped the code to reply to the comment. > Looking to the generic code, you didn't really change the way > the driver is accessing the registers. Also the interrupt handling > and rx polling is as it was before. Does that work properly using > the SPI interface of the TCAN4x5x? I don't want to change any of that yet. Maybe my cover letter was not clear or did not go through. But the intention was just to break out the functionality to create a MCAN framework that can be used by devices that contain the Bosch MCAN core and provider their own protocal to access the registers in the device. I don't want to do any functional changes at this time on the IP code itself until we have a framework. There should be no regression in the io mapped code. I did comment on the interrupt handling and asked if a threaded work queue would affect CAN timing. For the original TCAN driver this was the way it was implemented. > > I was also thinking about optimized read/write functions handling > more than 4 bytes of data, e.g. for the CAN payload data. That > would speed-up SPI transfers, I think. But that could also be > introduced later-on. That would be the plan. > > Wolfgang. > > > > -- ------------------ Dan Murphy