Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3704953imm; Mon, 6 Aug 2018 09:10:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcM7sBJW/pOlNQimZa5O2FBsE1Owb4QzNINoEm3WLW9MzRv/xUIe4Nvf2LuvfDgcDt2MEUI X-Received: by 2002:a17:902:1e6:: with SMTP id b93-v6mr14471691plb.149.1533571823730; Mon, 06 Aug 2018 09:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533571823; cv=none; d=google.com; s=arc-20160816; b=boIPEmnDzTdeo79eFUZnAFRAJ1nwApUNyChodrFwdL8EHRPJ/qVqxksJJyVWgdn042 ZwHhOuHNYUAhOLs+/9IX+B7SjiB4/3OhGTvENP7jj3i9Qi+6xMegvK+PMMeMpAfSnlDb uFmZq9mwJWwIVTF8mxI9GsQjKFqR5w1RbfYExVirdMp6MHx6S87zrql+qBNFO64sFYiP gG9c0d6bey08lN5+s8L1byAzLQ+94kI4dy2k99DdZb26VZYOz8e3ZamhLXtEU2QdJ55v LlafQYobhYjDEXmdNdkt8rCUPStSoU7CHYbfvwqPVaH4j2LPsKkFgrDGdxv0kX7zDq8K rm5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=TKjKLVvDI6FyQqaErwvWXTnM7kfW0cYSLkBPqCcIQ0o=; b=LmclfbvmMmzW+q8VLjxcKtzLeQIdA7lK5yFtPehh1LlL/4AmBbIobs/joVTEJ8wU+D Gnlq4GWD4nhQcooMg8yOjG1x/ZAneydvFlA52q77ebJ91fWK1rKBye3LtDAYPt8/CVW8 o9998WPPbptsEIHTlfjsRRmV3hkKRXV2QZKmkeoUb7z5Sid7QmxpucodpZ7fBbZumuap tXQVxQ5zB3MyVXzGnR9/bDoAFdUizOUMFKsTzTFERzZ2t8cPknlLhzDG7BYr6bl3u69R pk4j+pFS0xNEulPDtHLYUr2JMS8Oy1ser3PQ/eBvwV4MCKuKTZmUNSll3yy+X3JPNiOj S1og== 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 s198-v6si10868398pgc.381.2018.08.06.09.10.08; Mon, 06 Aug 2018 09:10:23 -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 S1733164AbeHFSRw (ORCPT + 99 others); Mon, 6 Aug 2018 14:17:52 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:36935 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730876AbeHFSRv (ORCPT ); Mon, 6 Aug 2018 14:17:51 -0400 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fmi34-0006KG-4E; Mon, 06 Aug 2018 18:07:58 +0200 Received: from [IPv6:2001:470:7eea:1122:6c91:b8f:4e84:18d1] (unknown [IPv6:2001:470:7eea:1122:6c91:b8f:4e84:18d1]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (Client CN "mkl@blackshift.org", Issuer "StartCom Class 1 Client CA" (not verified)) (Authenticated sender: mkl@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 3AF0734DC85; Mon, 6 Aug 2018 16:07:56 +0000 (UTC) Subject: Re: [PATCH v3] can: sja1000: plx_pci: add support for ASEM CAN raw device To: Flavio Suligoi , Wolfgang Grandegger Cc: "David S . Miller" , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1533564703-32194-1-git-send-email-f.suligoi@asem.it> From: Marc Kleine-Budde Openpgp: preference=signencrypt Autocrypt: addr=mkl@pengutronix.de; prefer-encrypt=mutual; keydata= mQINBFFVq30BEACtnSvtXHoeHJxG6nRULcvlkW6RuNwHKmrqoksispp43X8+nwqIFYgb8UaX zu8T6kZP2wEIpM9RjEL3jdBjZNCsjSS6x1qzpc2+2ivjdiJsqeaagIgvy2JWy7vUa4/PyGfx QyUeXOxdj59DvLwAx8I6hOgeHx2X/ntKAMUxwawYfPZpP3gwTNKc27dJWSomOLgp+gbmOmgc 6U5KwhAxPTEb3CsT5RicsC+uQQFumdl5I6XS+pbeXZndXwnj5t84M+HEj7RN6bUfV2WZO/AB Xt5+qFkC/AVUcj/dcHvZwQJlGeZxoi4veCoOT2MYqfR0ax1MmN+LVRvKm29oSyD4Ts/97cbs XsZDRxnEG3z/7Winiv0ZanclA7v7CQwrzsbpCv+oj+zokGuKasofzKdpywkjAfSE1zTyF+8K nxBAmzwEqeQ3iKqBc3AcCseqSPX53mPqmwvNVS2GqBpnOfY7Mxr1AEmxdEcRYbhG6Xdn+ACq Dq0Db3A++3PhMSaOu125uIAIwMXRJIzCXYSqXo8NIeo9tobk0C/9w3fUfMTrBDtSviLHqlp8 eQEP8+TDSmRP/CwmFHv36jd+XGmBHzW5I7qw0OORRwNFYBeEuiOIgxAfjjbLGHh9SRwEqXAL kw+WVTwh0MN1k7I9/CDVlGvc3yIKS0sA+wudYiselXzgLuP5cQARAQABtCZNYXJjIEtsZWlu ZS1CdWRkZSA8bWtsQHBlbmd1dHJvbml4LmRlPokCV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y5Y31hPGlQnYDPAuYMrDVBRsIQVwAsWpV83vKjp4WFP4wC1LEYj+j/Oorqv ALsMRq49WSclOMvqDdh//wmfSAbkyn3EA6EMv9mxJHJvKW7PMXvO0Mk1uP/+VR3FudMXhZzz MUYlqpO3B/RmA7lPoMY5+Km8c4/6L9Bn0vcbGMH4piH0IuEK0px64oXtKfti47XrCX+EDpSn ZwhEnNjCKyAJTaangebRpvOwJUZUWVh+hpM5FMcwJGKvVXNmrmSj Message-ID: <53dae6d6-c25b-71d5-b43f-1d444d9c352b@pengutronix.de> Date: Mon, 6 Aug 2018 18:07:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1533564703-32194-1-git-send-email-f.suligoi@asem.it> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SnO1fi2xPrrx4Genl8ZTOqk5JKsrZjKX4" X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SnO1fi2xPrrx4Genl8ZTOqk5JKsrZjKX4 Content-Type: multipart/mixed; boundary="dIeV6iuAuc8X5yptC45kenOB3bMmLhW7e"; protected-headers="v1" From: Marc Kleine-Budde To: Flavio Suligoi , Wolfgang Grandegger Cc: "David S . Miller" , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <53dae6d6-c25b-71d5-b43f-1d444d9c352b@pengutronix.de> Subject: Re: [PATCH v3] can: sja1000: plx_pci: add support for ASEM CAN raw device References: <1533564703-32194-1-git-send-email-f.suligoi@asem.it> In-Reply-To: <1533564703-32194-1-git-send-email-f.suligoi@asem.it> --dIeV6iuAuc8X5yptC45kenOB3bMmLhW7e Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable On 08/06/2018 04:11 PM, Flavio Suligoi wrote: > This patch adds support for ASEM opto-isolated dual channels > CAN raw device (http://www.asem.it) >=20 > Signed-off-by: Flavio Suligoi > --- >=20 > v2: - rename ASEM_... constants to reduce space size; > - remove "else" in "plx_pci_reset_asem_dual_can_raw" function to av= oid=20 > strings breaking > v3: - fix wrong comment for PLX_LINT2_POL > - put string into just one line in "plx_pci_reset_asem_dual_can_raw= " > function >=20 > drivers/net/can/sja1000/Kconfig | 1 + > drivers/net/can/sja1000/plx_pci.c | 67 +++++++++++++++++++++++++++++++= +++++++- > 2 files changed, 67 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/= Kconfig > index 1e65cb6..f6dc899 100644 > --- a/drivers/net/can/sja1000/Kconfig > +++ b/drivers/net/can/sja1000/Kconfig > @@ -88,6 +88,7 @@ config CAN_PLX_PCI > - TEWS TECHNOLOGIES TPMC810 card (http://www.tews.com/) > - IXXAT Automation PC-I 04/PCI card (http://www.ixxat.com/) > - Connect Tech Inc. CANpro/104-Plus Opto (CRG001) card (http://www= =2Econnecttech.com) > + - ASEM CAN raw - 2 isolated CAN channels (www.asem.it) > =20 > config CAN_TSCAN1 > tristate "TS-CAN1 PC104 boards" > diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja100= 0/plx_pci.c > index f8ff25c..f3915db 100644 > --- a/drivers/net/can/sja1000/plx_pci.c > +++ b/drivers/net/can/sja1000/plx_pci.c > @@ -46,7 +46,8 @@ MODULE_SUPPORTED_DEVICE("Adlink PCI-7841/cPCI-7841, "= > "esd CAN-PCIe/2000, " > "Connect Tech Inc. CANpro/104-Plus Opto (CRG001), " > "IXXAT PC-I 04/PCI, " > - "ELCUS CAN-200-PCI") > + "ELCUS CAN-200-PCI, " > + "ASEM DUAL CAN-RAW") > MODULE_LICENSE("GPL v2"); > =20 > #define PLX_PCI_MAX_CHAN 2 > @@ -70,7 +71,9 @@ struct plx_pci_card { > */ > =20 > #define PLX_LINT1_EN 0x1 /* Local interrupt 1 enable */ > +#define PLX_LINT1_POL (1 << 1) /* Local interrupt 1 polarity */ > #define PLX_LINT2_EN (1 << 3) /* Local interrupt 2 enable */ > +#define PLX_LINT2_POL (1 << 4) /* Local interrupt 2 polarity */ > #define PLX_PCI_INT_EN (1 << 6) /* PCI Interrupt Enable */ > #define PLX_PCI_RESET (1 << 30) /* PCI Adapter Software Reset */ > =20 > @@ -92,6 +95,9 @@ struct plx_pci_card { > */ > #define PLX_PCI_OCR (OCR_TX0_PUSHPULL | OCR_TX1_PUSHPULL) > =20 > +/* OCR setting for ASEM Dual CAN raw */ > +#define ASEM_PCI_OCR 0xfe > + > /* > * In the CDR register, you should set CBP to 1. > * You will probably also want to set the clock divider value to 7 > @@ -145,10 +151,20 @@ struct plx_pci_card { > #define MOXA_PCI_VENDOR_ID 0x1393 > #define MOXA_PCI_DEVICE_ID 0x0100 > =20 > +#define ASEM_RAW_CAN_VENDOR_ID 0x10b5 > +#define ASEM_RAW_CAN_DEVICE_ID 0x9030 > +#define ASEM_RAW_CAN_SUB_VENDOR_ID 0x3000 > +#define ASEM_RAW_CAN_SUB_DEVICE_ID 0x1001 > +#define ASEM_RAW_CAN_SUB_DEVICE_ID_BIS 0x1002 > +#define ASEM_RAW_CAN_RST_REGISTER 0x54 > +#define ASEM_RAW_CAN_RST_MASK_CAN1 0x20 > +#define ASEM_RAW_CAN_RST_MASK_CAN2 0x04 > + > static void plx_pci_reset_common(struct pci_dev *pdev); > static void plx9056_pci_reset_common(struct pci_dev *pdev); > static void plx_pci_reset_marathon_pci(struct pci_dev *pdev); > static void plx_pci_reset_marathon_pcie(struct pci_dev *pdev); > +static void plx_pci_reset_asem_dual_can_raw(struct pci_dev *pdev); > =20 > struct plx_pci_channel_map { > u32 bar; > @@ -269,6 +285,14 @@ static struct plx_pci_card_info plx_pci_card_info_= moxa =3D { > /* based on PLX9052 */ > }; > =20 > +static struct plx_pci_card_info plx_pci_card_info_asem_dual_can =3D { > + "ASEM Dual CAN raw PCI", 2, > + PLX_PCI_CAN_CLOCK, ASEM_PCI_OCR, PLX_PCI_CDR, > + {0, 0x00, 0x00}, { {2, 0x00, 0x00}, {4, 0x00, 0x00} }, > + &plx_pci_reset_asem_dual_can_raw > + /* based on PLX9030 */ > +}; > + > static const struct pci_device_id plx_pci_tbl[] =3D { > { > /* Adlink PCI-7841/cPCI-7841 */ > @@ -375,6 +399,20 @@ static const struct pci_device_id plx_pci_tbl[] =3D= { > 0, 0, > (kernel_ulong_t)&plx_pci_card_info_moxa > }, > + { > + /* ASEM Dual CAN raw */ > + ASEM_RAW_CAN_VENDOR_ID, ASEM_RAW_CAN_DEVICE_ID, > + ASEM_RAW_CAN_SUB_VENDOR_ID, ASEM_RAW_CAN_SUB_DEVICE_ID, > + 0, 0, > + (kernel_ulong_t)&plx_pci_card_info_asem_dual_can > + }, > + { > + /* ASEM Dual CAN raw -new model */ > + ASEM_RAW_CAN_VENDOR_ID, ASEM_RAW_CAN_DEVICE_ID, > + ASEM_RAW_CAN_SUB_VENDOR_ID, ASEM_RAW_CAN_SUB_DEVICE_ID_BIS, > + 0, 0, > + (kernel_ulong_t)&plx_pci_card_info_asem_dual_can > + }, > { 0,} > }; > MODULE_DEVICE_TABLE(pci, plx_pci_tbl); > @@ -524,6 +562,33 @@ static void plx_pci_reset_marathon_pcie(struct pci= _dev *pdev) > } > } > =20 > +/* Special reset function for ASEM Dual CAN raw card */ > +static void plx_pci_reset_asem_dual_can_raw(struct pci_dev *pdev) > +{ > + void __iomem *bar0_addr; > + static const int reset_bar; > + u8 tmpval; > + > + plx_pci_reset_common(pdev); > + > + bar0_addr =3D pci_iomap(pdev, reset_bar, 0); We can just use '0' instead of 'reset_bar' here, right? Marc > + if (!bar0_addr) { > + dev_err(&pdev->dev, "Failed to remap reset space %d (BAR%d)\n", > + 0, reset_bar); > + return; > + } > + > + /* reset the two SJA1000 chips */ > + tmpval =3D ioread8(bar0_addr + ASEM_RAW_CAN_RST_REGISTER); > + tmpval &=3D ~(ASEM_RAW_CAN_RST_MASK_CAN1 | ASEM_RAW_CAN_RST_MASK_CAN2= ); > + iowrite8(tmpval, bar0_addr + ASEM_RAW_CAN_RST_REGISTER); > + usleep_range(300, 400); > + tmpval |=3D ASEM_RAW_CAN_RST_MASK_CAN1 | ASEM_RAW_CAN_RST_MASK_CAN2; > + iowrite8(tmpval, bar0_addr + ASEM_RAW_CAN_RST_REGISTER); > + usleep_range(300, 400); > + pci_iounmap(pdev, bar0_addr); > +} > + > static void plx_pci_del_card(struct pci_dev *pdev) > { > struct plx_pci_card *card =3D pci_get_drvdata(pdev); >=20 --=20 Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | --dIeV6iuAuc8X5yptC45kenOB3bMmLhW7e-- --SnO1fi2xPrrx4Genl8ZTOqk5JKsrZjKX4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEENrCndlB/VnAEWuH5k9IU1zQoZfEFAltoclkACgkQk9IU1zQo ZfEXjggAnve03Hr2QbfyldhFb/aU9uGtEl8ZkKvjqp2ExMDHzBxy4sdw4VW9W1f3 4w3ChInIErY9OX5ulp4GKSQjMPCvbduIDWsq715E7pu43H5UnBAcgcr7otByvTVr rCZEB7QdaHgslEqZBF90bRijydweGjbc79XrLgsi9STucE578OO8Nw262vJjjWl7 vdrihV6bIMUxGJhpLAxCbbxmClSnzLb9QnVI9gP0SYbfWBsB0OUnuYTSwsvmm1Pj 4hmfo1w86BGrqA3ilciydA+6df++z2KbOgWgFS3/R9ncB2dl7VfPJjeXiCefeTrY OPPxxpJF1Jurvmo/vA+cXHQx2QUDcA== =2Y6D -----END PGP SIGNATURE----- --SnO1fi2xPrrx4Genl8ZTOqk5JKsrZjKX4--