Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp446420imd; Sat, 3 Nov 2018 03:47:08 -0700 (PDT) X-Google-Smtp-Source: AJdET5cSVxqpBAaIqNhQLHktG5aqGbyxCW08Oj/FINreYMl43fTqwrdrpmH/THdTiyQAP22NU6qL X-Received: by 2002:a62:2f44:: with SMTP id v65-v6mr14906637pfv.235.1541242028411; Sat, 03 Nov 2018 03:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541242028; cv=none; d=google.com; s=arc-20160816; b=L7Bxf45hsLkSWx8giFwfZYalouZVP5vR9ke2sLmOfG6TCLdaYAoqROc0DVoByq3J0d qFGYiMwS310+mifFjgQiJrSgeCz4MoI1yNb7JLRROcqRA01NLkhnHFKyZNIQ7ybYPc8d jMFHbv7+12OECyqTBFjeQlvgxdIoHg24gUeWchbB6KWKubaWPNqa3RGinMLGwAkAp737 5SdNtD35NteF3A0gs3I5lYzQ8GVzyHosYw05NoEB3wDYytwq2U4kQQC13bwCx0yQVBBN W6wwJfFB+PT3jtLA5nYKdL6WKlywRkApR+ybEEvQlVF4F8VJq42aask0GLsj8Nd2wXoz 06ZA== 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:autocrypt:openpgp:from:references:cc:to:subject; bh=itE+iN7J8AkLSpGIYL3mwHuNWnQR8lHeTOeoBg9VObk=; b=k57q6WAyZQPl9esg3sZCNiGjlgRdUxYOPRn01RLDkOJuXkwcFsyZ4uBFvMC4WYdPcR HEdWCPcG7aH80nOJTYTOXrNr+EtoNRGG3d7BDtRXW1bhitAxbCnTKz77gndrQVm7YNiK JrTkXlpxe0ZTQiZZgkVnNHBMjhu4msbNpmvYLcR6Gf3YBtbHqvw7JtcdlH7doW+4Sec9 yfQbrJI46PHnexuI17d6iN+sflyJGWUE0u51+AtABekNNjWjH1aXXWxin0JB/AQBBen7 nw7shnVFL+ODyTqxsR7T6+Kv/TK3kc/UnHB20UWq74BEA5XFzlOzaCF54psKfT1UUaBp tZug== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17-v6si36014822pge.209.2018.11.03.03.46.53; Sat, 03 Nov 2018 03:47:08 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728530AbeKCT4r (ORCPT + 99 others); Sat, 3 Nov 2018 15:56:47 -0400 Received: from mailproxy06.manitu.net ([217.11.48.70]:56786 "EHLO mailproxy06.manitu.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727644AbeKCT4q (ORCPT ); Sat, 3 Nov 2018 15:56:46 -0400 Received: from [10.0.30.7] (dslb-188-104-003-195.188.104.pools.vodafone-ip.de [188.104.3.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: wg@grandegger.com) by mailproxy06.manitu.net (Postfix) with ESMTPSA id 08EAB58279D; Sat, 3 Nov 2018 11:45:50 +0100 (CET) Subject: Re: [RFC PATCH 1/3] can: m_can: Create m_can core to leverage common code To: Dan Murphy , mkl@pengutronix.de, davem@davemloft.net Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181010142055.25271-1-dmurphy@ti.com> <20181010142055.25271-2-dmurphy@ti.com> <52811b27-00c0-f5e2-2b18-608ccf846723@grandegger.com> <349ef8be-f4c7-25cc-2c33-7ce1fd0b0f40@ti.com> From: Wolfgang Grandegger Openpgp: preference=signencrypt Autocrypt: addr=wg@grandegger.com; prefer-encrypt=mutual; keydata= xsFNBFtEb5MBEAC5aRjs5jLwjbOaEE6rczZSqck7B3iGK8ldrV8HGSjxb1MAf4VbvDWrzXfA phEgX3e54AnYhnKcf6BA3J9TlSDdUAW7r/ijOFl+TehMz7holgjhlDK41acJ/klwXJotIqby bWqFgFw6o7b8hfbVzPi8Pz/+WOIKaDOb1Keb989mn253RF1yFakgvoQfCyAeVcnO5kcByW17 zbTEHsSduYi0Zir26Oedb2Vtas4SovrEXVh4e2dRdbEbHlI8po3Ih117CuGIPAe2RSfZKY88 8c9m+WsJKtrIDIMY+f5kcHG5mib++u1oTg7wjfFgTr925g2WjzT63YRibW8Vazot9yXquMo2 HYQStmnN9MuAkL/jslnxhGKNwTzpXv6FD2g/9hcLfSjaaCwGzj2j2ucJglJnO1n+ibVB14l2 JLVe+IKJaE1gvm2v9HPsE+o1P4O8I9iCiAbQ6BGUszHADOg7r8CeTQ+AOCypfEZ5l1Hwa3gw V+TtqyCU70U9LA0AKaDZ02vf0hFRWeXV/ErFq878GOXbbVMZu8G5aO0EcCBC75/KQnyi0WEl KVIcyTyxKel/Ext7vUFIkiA16JNWRpS85YDfe9CoEZcZK+nUU268j6Bp5a7MYaF/dZaLT+Du hLA82ry8IkPQvyV5yV+B0PwDM/w7de8zIzMy9YBXU8KGGDmgYQARAQABzSdXb2xmZ2FuZyBH cmFuZGVnZ2VyIDx3Z0BncmFuZGVnZ2VyLmNvbT7CwX8EEwECACkFAltEb5MCGyMFCQlmAYAH CwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRDwuz7LbZzIUhvED/4vTUqS0c/V5a4hc5Md u/8qkF7qg011tM0lXrZZxMQ8NrjdFuDhUefZ1q59QbLFU9da9D/CRVJUSx6BnY9jkR6lIm9l OGqS9Z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 9t2EkSpgVHI0Cd0ldxD4eaGNwpeHJ5WGGzZrOE7PCcRziJX0qO/FpLjTQ6scf+bPACgduY71 AwXyA24mg7F2vK+Vth+Yp7MlgwYBMUy6D140jrkWrcRxKYfW1BgcKpbG/dh5DhUAvoOzFD7i zHrGK5FhzqJDBwKk7n9jGohf/MJWs2UKai/u4ogZBhhD5JPR8GG6VzO4snWisFLFuAEAEQEA AcLBZQQYAQIADwUCW0RvkwIbDAUJCWYBgAAKCRDwuz7LbZzIUkA3D/wJOvcQ7rTeoRiamOIB kD4n2Jsv8Vti/XfM0DTmhfnWL4y96VzSzNfl+EHAwXE4161qnXxTHnFK1hq7QklNdDiGW3iH nKZUyHUTnlUlCocv8jWtlqrpH0XVtF12JET65mE14Hga6BQ4ECXwU2GcP3202A55EzMj31b/ 59GD3CDIJy7bjQi+pIRuA9ZQRsFas7Od7AWO/nFns2wJ6AJkjXdCUCZ4iOuf82gLK9olDSmd H73Epc6l3jca62L2Lzei405LQSsfOZ06uH2aGPUJX4odUlEF6arm2j+9Q8Vyi4CJ316f2kAa sl7LhAwZtaj8hjl/PUWfd5w47dUBDUZjIRYcdM2TTU3Spgvg3zqXUzur5+r0jkUl2naeiSB1 vwjfIwnPqZOVr9FAXuLbAdUyCCC0ohGLrq5Nsc1A02rxpQHRxTSm2FOdn2jYvuD7JUgkhmUh /TXb8aL6A4hfX7oV4tGq7nSmDOCmgWRmAHAGp85fVq2iylCxZ1kKi8EYCSa28eQzetukFbAx JwmcrUSaCOK+jpHlNY0PkghSIzAE/7Se+c37unJ39xJLkrgehLYmUF7cBeNWhfchu4fAJosM 5mXohGkBKcd5YYmF13imYtAG5/VSmBm/0CFNGFO49MVTNGXGBznrPrWwtPZNwjJdi7JrvEbm 8QEfHnPzgykCs2DOOQ== Message-ID: <9003a544-83cf-7dce-7f14-4abd292d470e@grandegger.com> Date: Sat, 3 Nov 2018 11:45:50 +0100 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: <349ef8be-f4c7-25cc-2c33-7ce1fd0b0f40@ti.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Dan, Am 31.10.2018 um 21:15 schrieb Dan Murphy: > 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? That would be the obvious choice. > >> >> *** 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. Do threaded interrupts with RX polling make sense? I think we need a common interface allowing to select hard-irqs+napi or threaded-irqs. Wolfgang.