From patchwork Mon Mar 18 11:32:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 10857453 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 02C261390 for ; Mon, 18 Mar 2019 11:33:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D131A2939E for ; Mon, 18 Mar 2019 11:33:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C16F7293A1; Mon, 18 Mar 2019 11:33:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1F9812939E for ; Mon, 18 Mar 2019 11:33:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PfSOFSfvSY2jIt9aLMcVg2b0JR+EacC1saCIHph1IAU=; b=i14QrqCRaIFyzK YViHVPrqmE65n25jBzdZcOrum1ghh4Kd3F7gKSrbVqFNZYZs4NcLHW/AtjRyC8kyOgfahKvfexUS+ fBNH54no12u+mh4EZorIa6YsxrKXjM2bZ3wEhFSuWm9g7K1XSXaMWkqIBYs8jDzItlIF9YT5PNFWY HsGz/pRcuYQWMYKhxHcbrstxD0KBmX5sw9IYzdeXZVaSk2Bl/bFcHEprosMJkMz5uo5RHZgLB7oVp L0bHsB2LQ5jrGal7Bs3/fsJz4tgeU2GtP9awMqH5d3DEmSGH/YyrEpzEC0rZ/X36+hPMAU1qLwMNy a6xtNL1jeEuMRrlOL2yg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qWI-0005W7-4S; Mon, 18 Mar 2019 11:33:30 +0000 Received: from mail-by2nam05on061b.outbound.protection.outlook.com ([2a01:111:f400:fe52::61b] helo=NAM05-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qW3-0005Fa-Eb for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2019 11:33:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hxCgXtWgOCGFaandX+L+7vMKJRB1bAfcIVTHL7ayB8o=; b=wKBmBbEC+I5kRBsZ5oDp/Yics644/NnKw07AatXZqGJB78Wmq3+Et4qF/2PJ+TLmOC1+NLD4zqXLWIreCyaZgpKt2QdmKcwEy9yClua/ZbvEZUfTxs6T61Ry98f+fMW3PfGOlM7LzfaxOJR1VcDIygmN0L0ctwxRAXi573c9k3E= Received: from MWHPR0201CA0038.namprd02.prod.outlook.com (2603:10b6:301:73::15) by CY4PR02MB2839.namprd02.prod.outlook.com (2603:10b6:903:121::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Mon, 18 Mar 2019 11:33:10 +0000 Received: from CY1NAM02FT015.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::207) by MWHPR0201CA0038.outlook.office365.com (2603:10b6:301:73::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1709.13 via Frontend Transport; Mon, 18 Mar 2019 11:33:10 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; grandegger.com; dkim=none (message not signed) header.d=none;grandegger.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT015.mail.protection.outlook.com (10.152.75.146) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1730.9 via Frontend Transport; Mon, 18 Mar 2019 11:33:08 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:50614 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1h5qVw-0004fr-E6; Mon, 18 Mar 2019 04:33:08 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1h5qVr-0008T7-AH; Mon, 18 Mar 2019 04:33:03 -0700 Received: from [172.23.37.94] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1h5qVj-0008M3-Ra; Mon, 18 Mar 2019 04:32:56 -0700 From: Appana Durga Kedareswara rao To: , , , Subject: [PATCH 1/6] net: can: xilinx_can: Fix style issues Date: Mon, 18 Mar 2019 17:02:41 +0530 Message-ID: <1552908766-26753-2-git-send-email-appana.durga.rao@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> References: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(136003)(396003)(346002)(376002)(2980300002)(199004)(189003)(336012)(106002)(81156014)(63266004)(7696005)(76176011)(51416003)(446003)(36756003)(2201001)(478600001)(11346002)(476003)(2616005)(8676002)(106466001)(110136005)(54906003)(126002)(2906002)(486006)(356004)(6666004)(48376002)(47776003)(107886003)(50226002)(16586007)(9786002)(14444005)(26005)(316002)(81166006)(6636002)(305945005)(4326008)(8936002)(426003)(186003)(36386004)(77096007)(50466002)(5660300002)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR02MB2839; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; A:1; MX:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3db94384-80e6-40b0-cad0-08d6ab957f52 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4608103)(4709054)(2017052603328)(7153060); SRVR:CY4PR02MB2839; X-MS-TrafficTypeDiagnostic: CY4PR02MB2839: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 098076C36C X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: ZB2wcrCdtNPjqPKni6ETytP1duEd6NSQ2gIqg+9JZiyvvIPuCWB0g9M82UgvUOgcQRwohftewsUnFARayFKgTGYfXnmzCzFl46wCPEpTTsx+6kYSSu8hork+uBZUfG/egGX989XGkvFqJaA5lKodjOX7kskZhQWBMU0kyfCK9bZUJrFIKuYSwfHacIfa49BONf9zNyrLc8Rzukfmz/bMnMEV1AuA0imT9lK7h+3SOThqFFJvL0KXzWCZzg02KtqU7QiI6x6mPgNWRm6fLVucqKzYjqxhNiWMKjQUQZ/jDnzsr9ziOss1J3t0kr41mLm1rv1buwWmWt7Cfus513zL/rAWZNipgtBqYclxxEsCIFHqqWdZInIiJ5JB6WvwqeiWOKMOF8pqkHYAzKHgaREPgJuK9g0AX4X7L4SKDGwWH9o= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2019 11:33:08.8971 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3db94384-80e6-40b0-cad0-08d6ab957f52 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR02MB2839 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190318_043315_493881_A32DC4E3 X-CRM114-Status: GOOD ( 11.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Appana Durga Kedareswara rao , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes below checkpatch warnings and checks in the driver. CHECK: Alignment should match open parenthesis + void (*write_reg)(const struct xcan_priv *priv, enum xcan_reg reg, + u32 val); CHECK: Alignment should match open parenthesis +static void xcan_write_reg_le(const struct xcan_priv *priv, enum xcan_reg reg, + u32 val) CHECK: Alignment should match open parenthesis +static void xcan_write_reg_be(const struct xcan_priv *priv, enum xcan_reg reg, + u32 val) CHECK: Alignment should match open parenthesis + netdev_dbg(ndev, "BRPR=0x%08x, BTR=0x%08x\n", + priv->read_reg(priv, XCAN_BRPR_OFFSET), CHECK: Alignment should match open parenthesis + netdev_warn(ndev, + "timed out for correct mode\n"); CHECK: Alignment should match open parenthesis + netdev_dbg(ndev, "status:#x%08x\n", + priv->read_reg(priv, XCAN_SR_OFFSET)); CHECK: spaces preferred around that '-' (ctx:VxV) + (CAN_EFF_ID_BITS-CAN_SFF_ID_BITS)) << ^ CHECK: Alignment should match open parenthesis + netdev_dbg(ndev, "%s: error status register:0x%x\n", + __func__, priv->read_reg(priv, XCAN_ESR_OFFSET)); WARNING: line over 80 characters + offset = XCAN_RXMSG_2_FRAME_OFFSET(fsr & XCAN_FSR_RI_MASK); WARNING: line over 80 characters + offset = XCAN_RXMSG_FRAME_OFFSET(fsr & XCAN_FSR_RI_MASK); WARNING: line over 80 characters + while ((isr & XCAN_IXR_TXOK_MASK) && !WARN_ON(++retries == 100)) { WARNING: line over 80 characters + priv->write_reg(priv, XCAN_ICR_OFFSET, XCAN_IXR_TXOK_MASK); CHECK: Alignment should match open parenthesis + netdev_err(ndev, "%s: pm_runtime_get failed(%d)\n", + __func__, ret); CHECK: Alignment should match open parenthesis + ret = request_irq(ndev->irq, xcan_interrupt, priv->irq_flags, + ndev->name, ndev); CHECK: Alignment should match open parenthesis +static int xcan_get_berr_counter(const struct net_device *ndev, + struct can_berr_counter *bec) CHECK: Alignment should match open parenthesis + netdev_err(ndev, "%s: pm_runtime_get failed(%d)\n", + __func__, ret); CHECK: Please don't use multiple blank lines + + CHECK: Alignment should match open parenthesis + netdev_err(ndev, "%s: pm_runtime_get failed(%d)\n", + __func__, ret);` Signed-off-by: Appana Durga Kedareswara rao --- drivers/net/can/xilinx_can.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index 97d0933..2de51ac 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -191,7 +191,7 @@ struct xcan_priv { struct napi_struct napi; u32 (*read_reg)(const struct xcan_priv *priv, enum xcan_reg reg); void (*write_reg)(const struct xcan_priv *priv, enum xcan_reg reg, - u32 val); + u32 val); struct device *dev; void __iomem *reg_base; unsigned long irq_flags; @@ -246,7 +246,7 @@ static const struct can_bittiming_const xcan_bittiming_const_canfd2 = { * Write data to the paricular CAN register */ static void xcan_write_reg_le(const struct xcan_priv *priv, enum xcan_reg reg, - u32 val) + u32 val) { iowrite32(val, priv->reg_base + reg); } @@ -273,7 +273,7 @@ static u32 xcan_read_reg_le(const struct xcan_priv *priv, enum xcan_reg reg) * Write data to the paricular CAN register */ static void xcan_write_reg_be(const struct xcan_priv *priv, enum xcan_reg reg, - u32 val) + u32 val) { iowrite32be(val, priv->reg_base + reg); } @@ -381,8 +381,8 @@ static int xcan_set_bittiming(struct net_device *ndev) priv->write_reg(priv, XCAN_BTR_OFFSET, btr1); netdev_dbg(ndev, "BRPR=0x%08x, BTR=0x%08x\n", - priv->read_reg(priv, XCAN_BRPR_OFFSET), - priv->read_reg(priv, XCAN_BTR_OFFSET)); + priv->read_reg(priv, XCAN_BRPR_OFFSET), + priv->read_reg(priv, XCAN_BTR_OFFSET)); return 0; } @@ -447,12 +447,12 @@ static int xcan_chip_start(struct net_device *ndev) while (!(priv->read_reg(priv, XCAN_SR_OFFSET) & reg_sr_mask)) { if (time_after(jiffies, timeout)) { netdev_warn(ndev, - "timed out for correct mode\n"); + "timed out for correct mode\n"); return -ETIMEDOUT; } } netdev_dbg(ndev, "status:#x%08x\n", - priv->read_reg(priv, XCAN_SR_OFFSET)); + priv->read_reg(priv, XCAN_SR_OFFSET)); priv->can.state = CAN_STATE_ERROR_ACTIVE; return 0; @@ -506,7 +506,7 @@ static void xcan_write_frame(struct xcan_priv *priv, struct sk_buff *skb, id = ((cf->can_id & CAN_EFF_MASK) << XCAN_IDR_ID2_SHIFT) & XCAN_IDR_ID2_MASK; id |= (((cf->can_id & CAN_EFF_MASK) >> - (CAN_EFF_ID_BITS-CAN_SFF_ID_BITS)) << + (CAN_EFF_ID_BITS - CAN_SFF_ID_BITS)) << XCAN_IDR_ID1_SHIFT) & XCAN_IDR_ID1_MASK; /* The substibute remote TX request bit should be "1" @@ -942,7 +942,7 @@ static void xcan_err_interrupt(struct net_device *ndev, u32 isr) } netdev_dbg(ndev, "%s: error status register:0x%x\n", - __func__, priv->read_reg(priv, XCAN_ESR_OFFSET)); + __func__, priv->read_reg(priv, XCAN_ESR_OFFSET)); } /** @@ -990,9 +990,11 @@ static int xcan_rx_fifo_get_next_frame(struct xcan_priv *priv) return -ENOENT; if (priv->devtype.flags & XCAN_FLAG_CANFD_2) - offset = XCAN_RXMSG_2_FRAME_OFFSET(fsr & XCAN_FSR_RI_MASK); + offset = + XCAN_RXMSG_2_FRAME_OFFSET(fsr & XCAN_FSR_RI_MASK); else - offset = XCAN_RXMSG_FRAME_OFFSET(fsr & XCAN_FSR_RI_MASK); + offset = + XCAN_RXMSG_FRAME_OFFSET(fsr & XCAN_FSR_RI_MASK); } else { /* check if RX FIFO is empty */ @@ -1102,8 +1104,10 @@ static void xcan_tx_interrupt(struct net_device *ndev, u32 isr) * via TXFEMP handling as we read TXFEMP *after* TXOK * clear to satisfy (1). */ - while ((isr & XCAN_IXR_TXOK_MASK) && !WARN_ON(++retries == 100)) { - priv->write_reg(priv, XCAN_ICR_OFFSET, XCAN_IXR_TXOK_MASK); + while ((isr & XCAN_IXR_TXOK_MASK) && + !WARN_ON(++retries == 100)) { + priv->write_reg(priv, XCAN_ICR_OFFSET, + XCAN_IXR_TXOK_MASK); isr = priv->read_reg(priv, XCAN_ISR_OFFSET); } @@ -1216,12 +1220,12 @@ static int xcan_open(struct net_device *ndev) ret = pm_runtime_get_sync(priv->dev); if (ret < 0) { netdev_err(ndev, "%s: pm_runtime_get failed(%d)\n", - __func__, ret); + __func__, ret); return ret; } ret = request_irq(ndev->irq, xcan_interrupt, priv->irq_flags, - ndev->name, ndev); + ndev->name, ndev); if (ret < 0) { netdev_err(ndev, "irq allocation for CAN failed\n"); goto err; @@ -1292,7 +1296,7 @@ static int xcan_close(struct net_device *ndev) * Return: 0 on success and failure value on error */ static int xcan_get_berr_counter(const struct net_device *ndev, - struct can_berr_counter *bec) + struct can_berr_counter *bec) { struct xcan_priv *priv = netdev_priv(ndev); int ret; @@ -1300,7 +1304,7 @@ static int xcan_get_berr_counter(const struct net_device *ndev, ret = pm_runtime_get_sync(priv->dev); if (ret < 0) { netdev_err(ndev, "%s: pm_runtime_get failed(%d)\n", - __func__, ret); + __func__, ret); return ret; } @@ -1313,7 +1317,6 @@ static int xcan_get_berr_counter(const struct net_device *ndev, return 0; } - static const struct net_device_ops xcan_netdev_ops = { .ndo_open = xcan_open, .ndo_stop = xcan_close, @@ -1597,7 +1600,7 @@ static int xcan_probe(struct platform_device *pdev) ret = pm_runtime_get_sync(&pdev->dev); if (ret < 0) { netdev_err(ndev, "%s: pm_runtime_get failed(%d)\n", - __func__, ret); + __func__, ret); goto err_pmdisable; } From patchwork Mon Mar 18 11:32:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 10857451 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 72A911390 for ; Mon, 18 Mar 2019 11:33:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 488762939E for ; Mon, 18 Mar 2019 11:33:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BEA2293A2; Mon, 18 Mar 2019 11:33:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C825B2939E for ; Mon, 18 Mar 2019 11:33:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6NERyJSwpk+kb0CwlchoQ3Zmg4rCzvjT7YgXv7VbF00=; b=Y7Exr56dFJxTK6 eLV10eNbH6AySAg6yYzETl99hr0jnh7FsLl1XeSmULFMXimt9G2fYU/67UJIVqS3gb+xIm0Evd7Ol WYxItf9cqEmBSDWYaw5nWis6Odu+3J/kYc3u0EHkClsu9Eygc5sLI6dTbRJNathT8lSJgcTla/VO2 sQ80dsx5LNQKgjokabgMrg9yjlp+hrMdf/7hJhCnY6WlrAmNkE9hMnkQQNigZ2NNuMtVRTfw6g5Dk P8KC0e1qfaxerSGA4iwRmsLif9TBZK9CsNDJTAv1zNplCZY7LrwJOgzhAkO+LqSWz2FFe2dBEHnlY 7OLIaz/j3ePteB7ePpHw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qW7-0005HU-9Y; Mon, 18 Mar 2019 11:33:19 +0000 Received: from mail-co1nam04on0610.outbound.protection.outlook.com ([2a01:111:f400:fe4d::610] helo=NAM04-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qW3-0005FV-9n for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2019 11:33:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=okNNCHEXBRhgdXL/4EBOpmgxLrPFSQuen/NuDUzWii0=; b=o1vOv08dny92FnZILIUDcN7fFylY1XnUK6Ip3Gajeymm9/LMUkfjJ+5PdpsE55UbcxPta2UlnW6nYG8/aFocYNr24+uoTcO9PofvxdItHWB1WV545l3oX4mVbGj994sxXXtk0lEnmNvXJR/PbIZlhbA4YUTs+jyC8cos0lhzqY0= Received: from CY4PR02CA0020.namprd02.prod.outlook.com (2603:10b6:903:18::30) by DM6PR02MB4060.namprd02.prod.outlook.com (2603:10b6:5:96::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Mon, 18 Mar 2019 11:33:10 +0000 Received: from SN1NAM02FT064.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::205) by CY4PR02CA0020.outlook.office365.com (2603:10b6:903:18::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1709.13 via Frontend Transport; Mon, 18 Mar 2019 11:33:09 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; grandegger.com; dkim=none (message not signed) header.d=none;grandegger.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by SN1NAM02FT064.mail.protection.outlook.com (10.152.72.143) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1730.9 via Frontend Transport; Mon, 18 Mar 2019 11:33:09 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:50638 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1h5qVw-0004ft-PT; Mon, 18 Mar 2019 04:33:08 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1h5qVr-0008T7-Lg; Mon, 18 Mar 2019 04:33:03 -0700 Received: from [172.23.37.94] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1h5qVm-0008M3-Ki; Mon, 18 Mar 2019 04:32:59 -0700 From: Appana Durga Kedareswara rao To: , , , Subject: [PATCH 2/6] net: can: xilinx_can: Fix flags field initialization for axi can and canps Date: Mon, 18 Mar 2019 17:02:42 +0530 Message-ID: <1552908766-26753-3-git-send-email-appana.durga.rao@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> References: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(136003)(396003)(376002)(346002)(39860400002)(2980300002)(189003)(199004)(356004)(478600001)(6666004)(48376002)(36386004)(26005)(186003)(336012)(77096007)(47776003)(426003)(9786002)(4744005)(54906003)(4326008)(110136005)(16586007)(316002)(107886003)(50466002)(8936002)(51416003)(7696005)(76176011)(2906002)(305945005)(106466001)(106002)(11346002)(2201001)(36756003)(5660300002)(6636002)(81166006)(63266004)(50226002)(486006)(81156014)(8676002)(446003)(126002)(476003)(2616005)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB4060; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; MX:1; A:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a2e17122-2141-42da-c28e-08d6ab957f61 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4608103)(4709054)(2017052603328)(7153060); SRVR:DM6PR02MB4060; X-MS-TrafficTypeDiagnostic: DM6PR02MB4060: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 098076C36C X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: //udOzgv+p8wDIG4JpMzPXERgigB+gZ3Hfp5IxHjYW9XfNDtOxqJ4BQkAmPLD3REpOH6NYcpWX4yTXqmKpQEpK3xqKmb31mV/ckkIpjrbnaOYj4lFRpJVh3rDFL+pBs0qjblM31BR/bCjCOTeOssiTOz4zCOnzNebAC3XWEvT7iKhYQkfcnmy0nvxOhCBVRUmGOYVeQ1QEuu1MEbI9L47F0Xa6BFYRJSlHdxSdspI7MOwDwn2gsElYL/eoIR6fTbnewHkSIysqh46TkSnfdnG597PhwylgsNeYpN0c41J28yzTNZh41ZQ2K7E/aYpnFKxplJES0CaQXK3xpGElkWUMJYv6g8tSE1in4uLj7mlOL1AFD8ffnKa93M3SI/cdWttxId2mlddtLPB0gIN2YaoLTM9cCSm1mmP2SdcKhntoo= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2019 11:33:09.1891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a2e17122-2141-42da-c28e-08d6ab957f61 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB4060 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190318_043315_400772_7EB84492 X-CRM114-Status: UNSURE ( 8.84 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Appana Durga Kedareswara rao , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP AXI CAN IP and CANPS IP supports tx fifo empty feature, this patch updates the flags field for the same. Signed-off-by: Appana Durga Kedareswara rao --- drivers/net/can/xilinx_can.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index 2de51ac..22569ef 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -1428,6 +1428,7 @@ static const struct dev_pm_ops xcan_dev_pm_ops = { }; static const struct xcan_devtype_data xcan_zynq_data = { + .flags = XCAN_FLAG_TXFEMP, .bittiming_const = &xcan_bittiming_const, .btr_ts2_shift = XCAN_BTR_TS2_SHIFT, .btr_sjw_shift = XCAN_BTR_SJW_SHIFT, @@ -1435,6 +1436,7 @@ static const struct xcan_devtype_data xcan_zynq_data = { }; static const struct xcan_devtype_data xcan_axi_data = { + .flags = XCAN_FLAG_TXFEMP, .bittiming_const = &xcan_bittiming_const, .btr_ts2_shift = XCAN_BTR_TS2_SHIFT, .btr_sjw_shift = XCAN_BTR_SJW_SHIFT, From patchwork Mon Mar 18 11:32:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 10857469 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4AFD01390 for ; Mon, 18 Mar 2019 11:33:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2AB542933E for ; Mon, 18 Mar 2019 11:33:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EA5F2939A; Mon, 18 Mar 2019 11:33:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B012A2933E for ; Mon, 18 Mar 2019 11:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4TKs5bqZ1+C+QlljXNjctUdgx8ScwhzVG8Z899viWnI=; b=NkvOpQ5BhDzPWS 6Gbw00LUMMK6FGgD2SbaOOn62MvZDCGC4sNwzbighg+JZmBSi5bj2pPhddoZUD3wAcknU8aLsFtug GLdSea/bshzItZqrJireMI9x2Wi7aoCTDLdntQtLo40sZuqtS3L9U4RhNzDI1vJ6kCtxhw1qQZ7ef 0LYwFVx0G7Mx1wl12iIfzzAjG19+a76YHiM8AY3donUT1ehDPfyH/fE02nAJVUKtgHqcYCP4hkrHC ZnxBrOaLh690RQLLu+Oznf8jP8LKlBKxsgCJ9o2sTkFqZJ7kT4KIAxplKuGO2q9FPS1i49ExJjGo4 se1WKTlI6PQ5Fn+YkV5Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qWd-00060b-2G; Mon, 18 Mar 2019 11:33:51 +0000 Received: from mail-eopbgr770072.outbound.protection.outlook.com ([40.107.77.72] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qW8-0005Ho-Ty for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2019 11:33:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gK9Gbl0P4XLcr/I9gV0aHSS0MW5B3oyAsCDK9uPObiU=; b=o/4MxDxkIBc+L5POF9nK8Z3eSyKr7VGPboeSLQef732Q4TmEKAFCo2aoEUGkvoiXFI0V8o0eoa5Hz7wXkpBEz5RIE1Bt8rP3nqSUwmdg+3X/9xaY+btZNQJIrTJUFqvnLxMIVWV0rZrAZRg989bvbEZs07agO3vILSWP1oVVeV0= Received: from CY4PR02CA0011.namprd02.prod.outlook.com (2603:10b6:903:18::21) by DM6PR02MB4060.namprd02.prod.outlook.com (2603:10b6:5:96::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Mon, 18 Mar 2019 11:33:10 +0000 Received: from CY1NAM02FT009.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::208) by CY4PR02CA0011.outlook.office365.com (2603:10b6:903:18::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1709.13 via Frontend Transport; Mon, 18 Mar 2019 11:33:09 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; grandegger.com; dkim=none (message not signed) header.d=none;grandegger.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT009.mail.protection.outlook.com (10.152.75.12) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1730.9 via Frontend Transport; Mon, 18 Mar 2019 11:33:09 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:50629 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1h5qVw-0004fs-KL; Mon, 18 Mar 2019 04:33:08 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1h5qVr-0008T7-GW; Mon, 18 Mar 2019 04:33:03 -0700 Received: from [172.23.37.94] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1h5qVp-0008M3-Eq; Mon, 18 Mar 2019 04:33:01 -0700 From: Appana Durga Kedareswara rao To: , , , Subject: [PATCH 3/6] net: can: xilinx_can: Add cantype parameter in xcan_devtype_data struct Date: Mon, 18 Mar 2019 17:02:43 +0530 Message-ID: <1552908766-26753-4-git-send-email-appana.durga.rao@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> References: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(136003)(396003)(376002)(346002)(39860400002)(2980300002)(189003)(199004)(356004)(478600001)(6666004)(48376002)(36386004)(26005)(186003)(336012)(77096007)(47776003)(426003)(9786002)(54906003)(4326008)(110136005)(16586007)(316002)(107886003)(50466002)(8936002)(51416003)(7696005)(76176011)(2906002)(305945005)(106466001)(106002)(11346002)(2201001)(36756003)(5660300002)(6636002)(81166006)(63266004)(50226002)(486006)(81156014)(8676002)(446003)(126002)(476003)(2616005)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB4060; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; MX:1; A:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c64045a2-c980-4ec2-d784-08d6ab957f65 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4608103)(4709054)(2017052603328)(7153060); SRVR:DM6PR02MB4060; X-MS-TrafficTypeDiagnostic: DM6PR02MB4060: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 098076C36C X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: UOP2H4pgfRXWSUqnU39F65BaL46vNT27TlsNDy8JI/AGajDNuR9QjbRaWnJHJmoEwkKcKE1vd7VazgSHTgvRXJjwDsx17j6+j7TfbOa2Hz79jtHxw/fLEoz8GLJF3VmFkA7oTZ5kTyN7Dec+aedP/KY+hTrXgaZs0PjSiXBO3I+u5Og6EFlXHYaGk814Qro6f44hN4axcoHmNbyAt+CK2jPFNZ3HdRGotxlnZVuWeAcBLtK20SNEhMVn4OrW650IxN/ebWAj29EooYiZksgKYm3Weq0wsq6UBl0zRk31tB4IelDpmgqVcJy7IZ18brBm8kKAzv2Xm+RlOt3bmvfSZo1HSTgLH70/lZMQW8IwNjQPL6Cs9qDD7/0yczp00ex2WZLJkA3xrP7PyhLz2tgEkdk96tvbCHTIvSQLbLnMmJ0= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2019 11:33:09.0907 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c64045a2-c980-4ec2-d784-08d6ab957f65 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB4060 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190318_043321_332617_EEE62A4A X-CRM114-Status: UNSURE ( 9.28 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Appana Durga Kedareswara rao , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To differentiate between different CAN IP's this patch adds cantype enum variable in the xcan_devtype_data structure Signed-off-by: Appana Durga Kedareswara rao --- drivers/net/can/xilinx_can.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index 22569ef..b45ece9 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -157,7 +157,15 @@ enum xcan_reg { #define XCAN_FLAG_RX_FIFO_MULTI 0x0010 #define XCAN_FLAG_CANFD_2 0x0020 +enum xcan_ip_type { + XAXI_CAN = 0, + XZYNQ_CANPS, + XAXI_CANFD, + XAXI_CANFD_2_0, +}; + struct xcan_devtype_data { + enum xcan_ip_type cantype; unsigned int flags; const struct can_bittiming_const *bittiming_const; const char *bus_clk_name; @@ -1428,6 +1436,7 @@ static const struct dev_pm_ops xcan_dev_pm_ops = { }; static const struct xcan_devtype_data xcan_zynq_data = { + .cantype = XZYNQ_CANPS, .flags = XCAN_FLAG_TXFEMP, .bittiming_const = &xcan_bittiming_const, .btr_ts2_shift = XCAN_BTR_TS2_SHIFT, @@ -1436,6 +1445,7 @@ static const struct xcan_devtype_data xcan_zynq_data = { }; static const struct xcan_devtype_data xcan_axi_data = { + .cantype = XAXI_CAN, .flags = XCAN_FLAG_TXFEMP, .bittiming_const = &xcan_bittiming_const, .btr_ts2_shift = XCAN_BTR_TS2_SHIFT, @@ -1444,6 +1454,7 @@ static const struct xcan_devtype_data xcan_axi_data = { }; static const struct xcan_devtype_data xcan_canfd_data = { + .cantype = XAXI_CANFD, .flags = XCAN_FLAG_EXT_FILTERS | XCAN_FLAG_RXMNF | XCAN_FLAG_TX_MAILBOXES | @@ -1455,6 +1466,7 @@ static const struct xcan_devtype_data xcan_canfd_data = { }; static const struct xcan_devtype_data xcan_canfd2_data = { + .cantype = XAXI_CANFD_2_0, .flags = XCAN_FLAG_EXT_FILTERS | XCAN_FLAG_RXMNF | XCAN_FLAG_TX_MAILBOXES | From patchwork Mon Mar 18 11:32:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 10857473 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C9221390 for ; Mon, 18 Mar 2019 11:34:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A08E28478 for ; Mon, 18 Mar 2019 11:34:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5977E284B5; Mon, 18 Mar 2019 11:34:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7E1CA28478 for ; Mon, 18 Mar 2019 11:34:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CVw+2U0oKEMm4l/Nd69txpy/t2006fCbsFwYzLmF9n0=; b=OtMzRAdzUSyA8x NLj3/aHhfQRs02RHMJkzCfElgYcNIWtqMtdSv90aySUYfkzMwlAU6EMFwF6zME4z4hvuJCiyfGTbN pNHDqyjSEyPX69+W/kEYh51U2xKEkp6Cqpond7cHdTOhGaua4hghIk8aBpsrzp3zhhLj200nqrs6C LCiXPN+cONPcJ76CAluBx1/5a55WX7xpQKVMwDRhJTYqMNRrV3FTbV+lbRtbzRBNOSt/3JKN7CjsR MWxKW3L+QjQITwqLqyp1zWuBVbxPh5JVeDEficspiyrTMtW83fg8ZLLCN2PrcCQKM2xBefktUlFeR JFH/VSSKEK7Niax9lo2Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qWz-0006Ul-VN; Mon, 18 Mar 2019 11:34:14 +0000 Received: from mail-eopbgr780074.outbound.protection.outlook.com ([40.107.78.74] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qWA-0005LR-SV for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2019 11:33:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Kgo/LjzNAlf1qs8SAUViZ26syvbhnVoD3u3SD4wxBJo=; b=gMEGBL1GjFYpmiBz+ZuCsCUJ36ecsqm1UCLBwcJhMy6o7NJuawZrwKvsrRn/3jJ6t9sLKc7/zt1mrW7i3/7H7bEqrepkcbTM9qTB8Gr5ZNWsglUVGqBi1JfApwJOmnZbWkPdLZLCGbIACAJzb9gFbZSsT7WHd2P18eaPUxiN4Us= Received: from CY4PR02CA0032.namprd02.prod.outlook.com (2603:10b6:903:117::18) by CY4PR02MB2839.namprd02.prod.outlook.com (2603:10b6:903:121::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Mon, 18 Mar 2019 11:33:20 +0000 Received: from SN1NAM02FT029.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::209) by CY4PR02CA0032.outlook.office365.com (2603:10b6:903:117::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1709.13 via Frontend Transport; Mon, 18 Mar 2019 11:33:20 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; grandegger.com; dkim=none (message not signed) header.d=none;grandegger.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by SN1NAM02FT029.mail.protection.outlook.com (10.152.72.110) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1730.9 via Frontend Transport; Mon, 18 Mar 2019 11:33:19 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1h5qW7-0007io-1O; Mon, 18 Mar 2019 04:33:19 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1h5qW1-0008WO-Tn; Mon, 18 Mar 2019 04:33:13 -0700 Received: from [172.23.37.94] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1h5qVs-0008M3-FM; Mon, 18 Mar 2019 04:33:04 -0700 From: Appana Durga Kedareswara rao To: , , , Subject: [PATCH 4/6] net: can: xilinx_can: Add support for CANFD FD frames Date: Mon, 18 Mar 2019 17:02:44 +0530 Message-ID: <1552908766-26753-5-git-send-email-appana.durga.rao@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> References: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(136003)(396003)(346002)(376002)(2980300002)(199004)(189003)(336012)(106002)(81156014)(63266004)(7696005)(76176011)(51416003)(446003)(36756003)(2201001)(478600001)(11346002)(476003)(2616005)(8676002)(106466001)(110136005)(54906003)(126002)(2906002)(486006)(356004)(6666004)(48376002)(47776003)(107886003)(50226002)(16586007)(9786002)(14444005)(26005)(316002)(81166006)(6636002)(305945005)(4326008)(8936002)(426003)(186003)(36386004)(30864003)(77096007)(50466002)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR02MB2839; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ca61f2be-68b3-4c85-ad24-08d6ab95858a X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4608103)(4709054)(2017052603328)(7153060); SRVR:CY4PR02MB2839; X-MS-TrafficTypeDiagnostic: CY4PR02MB2839: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 098076C36C X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: RUaT+LkJnGJKgHrHljqo0vBVQpZ2zQEjjQgOw3FLsfhlvEAuGyDMbbGCIA/nPHJ2Amq/vhS1sF+M9bVBLk4MlmU5qoFzwGBXlyK93JI0gL7jKnL8Rly4jcv6XdH4Vmyst4PcYE1kN1AbTXJZrdgCH2PrbpIhGhMAzLbEBmsXJdD6Ti3i5H7qN7NqlJthctKy+xcATGGsTGeMUOaRUXz18B4l1yibW/pHhxf9jXyKhzR+VC4MkB1OSYCrrqHSILCTcGcXIET2HVtAKU/N2fRJ+i3CmepXffGtNfbFjSNVtzZRECmu8tpDf+eNZddvtqY0JhrVKPbr0bM2nh0DSK3eIv9zptQpIrb/T3EKzSoGjZ1P6NQ8iygYHf5K737GGmjdGJJ1L73jc6qURl9cSzR5rUsPJRE6h8JQv/4xrhUNeFc= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2019 11:33:19.4815 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ca61f2be-68b3-4c85-ad24-08d6ab95858a X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR02MB2839 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190318_043323_475068_7F3520C3 X-CRM114-Status: GOOD ( 19.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Naga Sureshkumar Relli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-can@vger.kernel.org, Appana Durga Kedareswara rao , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP CANFD IP supports both CAN and CAN FD frames, Existing driver supports only CAN frames, This patch adds support for CAN FD frames. Signed-off-by: Naga Sureshkumar Relli Signed-off-by: Appana Durga Kedareswara rao --- drivers/net/can/xilinx_can.c | 230 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 214 insertions(+), 16 deletions(-) diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index b45ece9..3d75a28 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -58,6 +58,10 @@ enum xcan_reg { XCAN_AFR_OFFSET = 0x60, /* Acceptance Filter */ /* only on CAN FD cores */ + XCAN_F_BRPR_OFFSET = 0x088, /* Data Phase Baud Rate + * Prescalar + */ + XCAN_F_BTR_OFFSET = 0x08C, /* Data Phase Bit Timing */ XCAN_TRR_OFFSET = 0x0090, /* TX Buffer Ready Request */ XCAN_AFR_EXT_OFFSET = 0x00E0, /* Acceptance Filter */ XCAN_FSR_OFFSET = 0x00E8, /* RX FIFO Status */ @@ -70,6 +74,8 @@ enum xcan_reg { #define XCAN_FRAME_DLC_OFFSET(frame_base) ((frame_base) + 0x04) #define XCAN_FRAME_DW1_OFFSET(frame_base) ((frame_base) + 0x08) #define XCAN_FRAME_DW2_OFFSET(frame_base) ((frame_base) + 0x0C) +#define XCANFD_FRAME_DW_OFFSET(frame_base, n) (((frame_base) + 0x08) + \ + ((n) * XCAN_CANFD_FRAME_SIZE)) #define XCAN_CANFD_FRAME_SIZE 0x48 #define XCAN_TXMSG_FRAME_OFFSET(n) (XCAN_TXMSG_BASE_OFFSET + \ @@ -128,6 +134,8 @@ enum xcan_reg { #define XCAN_FSR_FL_MASK 0x00003F00 /* RX Fill Level */ #define XCAN_FSR_IRI_MASK 0x00000080 /* RX Increment Read Index */ #define XCAN_FSR_RI_MASK 0x0000001F /* RX Read Index */ +#define XCAN_DLCR_EDL_MASK 0x08000000 /* EDL Mask in DLC */ +#define XCAN_DLCR_BRS_MASK 0x04000000 /* BRS Mask in DLC */ /* CAN register bit shift - XCAN___SHIFT */ #define XCAN_BTR_SJW_SHIFT 7 /* Synchronous jump width */ @@ -141,6 +149,7 @@ enum xcan_reg { /* CAN frame length constants */ #define XCAN_FRAME_MAX_DATA_LEN 8 +#define XCANFD_DW_BYTES 4 #define XCAN_TIMEOUT (1 * HZ) /* TX-FIFO-empty interrupt available */ @@ -221,6 +230,7 @@ static const struct can_bittiming_const xcan_bittiming_const = { .brp_inc = 1, }; +/* AXI CANFD Arbitration Bittiming constants as per AXI CANFD 1.0 spec */ static const struct can_bittiming_const xcan_bittiming_const_canfd = { .name = DRIVER_NAME, .tseg1_min = 1, @@ -233,6 +243,20 @@ static const struct can_bittiming_const xcan_bittiming_const_canfd = { .brp_inc = 1, }; +/* AXI CANFD Data Bittiming constants as per AXI CANFD 1.0 specs */ +static struct can_bittiming_const xcan_data_bittiming_const_canfd = { + .name = DRIVER_NAME, + .tseg1_min = 1, + .tseg1_max = 16, + .tseg2_min = 1, + .tseg2_max = 8, + .sjw_max = 8, + .brp_min = 1, + .brp_max = 256, + .brp_inc = 1, +}; + +/* AXI CANFD 2.0 Arbitration Bittiming constants as per AXI CANFD 2.0 spec */ static const struct can_bittiming_const xcan_bittiming_const_canfd2 = { .name = DRIVER_NAME, .tseg1_min = 1, @@ -245,6 +269,19 @@ static const struct can_bittiming_const xcan_bittiming_const_canfd2 = { .brp_inc = 1, }; +/* AXI CANFD 2.0 Data Bittiming constants as per AXI CANFD 2.0 spec */ +static struct can_bittiming_const xcan_data_bittiming_const_canfd2 = { + .name = DRIVER_NAME, + .tseg1_min = 1, + .tseg1_max = 32, + .tseg2_min = 1, + .tseg2_max = 16, + .sjw_max = 16, + .brp_min = 1, + .brp_max = 256, + .brp_inc = 1, +}; + /** * xcan_write_reg_le - Write a value to the device register little endian * @priv: Driver private data structure @@ -359,6 +396,7 @@ static int xcan_set_bittiming(struct net_device *ndev) { struct xcan_priv *priv = netdev_priv(ndev); struct can_bittiming *bt = &priv->can.bittiming; + struct can_bittiming *dbt = &priv->can.data_bittiming; u32 btr0, btr1; u32 is_config_mode; @@ -388,6 +426,24 @@ static int xcan_set_bittiming(struct net_device *ndev) priv->write_reg(priv, XCAN_BRPR_OFFSET, btr0); priv->write_reg(priv, XCAN_BTR_OFFSET, btr1); + if (priv->devtype.cantype == XAXI_CANFD || + priv->devtype.cantype == XAXI_CANFD_2_0) { + /* Setting Baud Rate prescalar value in F_BRPR Register */ + btr0 = dbt->brp - 1; + + /* Setting Time Segment 1 in BTR Register */ + btr1 = dbt->prop_seg + bt->phase_seg1 - 1; + + /* Setting Time Segment 2 in BTR Register */ + btr1 |= (dbt->phase_seg2 - 1) << priv->devtype.btr_ts2_shift; + + /* Setting Synchronous jump width in BTR Register */ + btr1 |= (dbt->sjw - 1) << priv->devtype.btr_sjw_shift; + + priv->write_reg(priv, XCAN_F_BRPR_OFFSET, btr0); + priv->write_reg(priv, XCAN_F_BTR_OFFSET, btr1); + } + netdev_dbg(ndev, "BRPR=0x%08x, BTR=0x%08x\n", priv->read_reg(priv, XCAN_BRPR_OFFSET), priv->read_reg(priv, XCAN_BTR_OFFSET)); @@ -506,7 +562,8 @@ static void xcan_write_frame(struct xcan_priv *priv, struct sk_buff *skb, int frame_offset) { u32 id, dlc, data[2] = {0, 0}; - struct can_frame *cf = (struct can_frame *)skb->data; + struct canfd_frame *cf = (struct canfd_frame *)skb->data; + u32 ramoff, dwindex = 0, i; /* Watch carefully on the bit sequence */ if (cf->can_id & CAN_EFF_FLAG) { @@ -535,26 +592,44 @@ static void xcan_write_frame(struct xcan_priv *priv, struct sk_buff *skb, id |= XCAN_IDR_SRR_MASK; } - dlc = cf->can_dlc << XCAN_DLCR_DLC_SHIFT; - - if (cf->can_dlc > 0) - data[0] = be32_to_cpup((__be32 *)(cf->data + 0)); - if (cf->can_dlc > 4) - data[1] = be32_to_cpup((__be32 *)(cf->data + 4)); + dlc = can_len2dlc(cf->len) << XCAN_DLCR_DLC_SHIFT; + if (can_is_canfd_skb(skb)) { + if (cf->flags & CANFD_BRS) + dlc |= XCAN_DLCR_BRS_MASK; + dlc |= XCAN_DLCR_EDL_MASK; + } priv->write_reg(priv, XCAN_FRAME_ID_OFFSET(frame_offset), id); /* If the CAN frame is RTR frame this write triggers transmission * (not on CAN FD) */ priv->write_reg(priv, XCAN_FRAME_DLC_OFFSET(frame_offset), dlc); - if (!(cf->can_id & CAN_RTR_FLAG)) { - priv->write_reg(priv, XCAN_FRAME_DW1_OFFSET(frame_offset), - data[0]); - /* If the CAN frame is Standard/Extended frame this - * write triggers transmission (not on CAN FD) - */ - priv->write_reg(priv, XCAN_FRAME_DW2_OFFSET(frame_offset), - data[1]); + if (priv->devtype.cantype == XAXI_CANFD || + priv->devtype.cantype == XAXI_CANFD_2_0) { + for (i = 0; i < cf->len; i += 4) { + ramoff = XCANFD_FRAME_DW_OFFSET(frame_offset, dwindex) + + (dwindex * XCANFD_DW_BYTES); + priv->write_reg(priv, ramoff, + be32_to_cpup((__be32 *)(cf->data + i))); + dwindex++; + } + } else { + if (cf->len > 0) + data[0] = be32_to_cpup((__be32 *)(cf->data + 0)); + if (cf->len > 4) + data[1] = be32_to_cpup((__be32 *)(cf->data + 4)); + + if (!(cf->can_id & CAN_RTR_FLAG)) { + priv->write_reg(priv, + XCAN_FRAME_DW1_OFFSET(frame_offset), + data[0]); + /* If the CAN frame is Standard/Extended frame this + * write triggers transmission (not on CAN FD) + */ + priv->write_reg(priv, + XCAN_FRAME_DW2_OFFSET(frame_offset), + data[1]); + } } } @@ -728,6 +803,113 @@ static int xcan_rx(struct net_device *ndev, int frame_base) } /** + * xcanfd_rx - Is called from CAN isr to complete the received + * frame processing + * @ndev: Pointer to net_device structure + * @frame_base: Register offset to the frame to be read + * + * This function is invoked from the CAN isr(poll) to process the Rx frames. It + * does minimal processing and invokes "netif_receive_skb" to complete further + * processing. + * Return: 1 on success and 0 on failure. + */ +static int xcanfd_rx(struct net_device *ndev, int frame_base) +{ + struct xcan_priv *priv = netdev_priv(ndev); + struct net_device_stats *stats = &ndev->stats; + struct canfd_frame *cf; + struct sk_buff *skb; + u32 id_xcan, dlc, data[2] = {0, 0}, dwindex = 0, i, fsr, readindex; + + fsr = priv->read_reg(priv, XCAN_FSR_OFFSET); + if (fsr & XCAN_FSR_FL_MASK) { + readindex = fsr & XCAN_FSR_RI_MASK; + id_xcan = priv->read_reg(priv, + XCAN_FRAME_ID_OFFSET(frame_base)); + dlc = priv->read_reg(priv, XCAN_FRAME_DLC_OFFSET(frame_base)); + if (dlc & XCAN_DLCR_EDL_MASK) + skb = alloc_canfd_skb(ndev, &cf); + else + skb = alloc_can_skb(ndev, (struct can_frame **)&cf); + + if (unlikely(!skb)) { + stats->rx_dropped++; + return 0; + } + + /* Change Xilinx CANFD data length format to socketCAN data + * format + */ + if (dlc & XCAN_DLCR_EDL_MASK) + cf->len = can_dlc2len((dlc & XCAN_DLCR_DLC_MASK) >> + XCAN_DLCR_DLC_SHIFT); + else + cf->len = get_can_dlc((dlc & XCAN_DLCR_DLC_MASK) >> + XCAN_DLCR_DLC_SHIFT); + + /* Change Xilinx CAN ID format to socketCAN ID format */ + if (id_xcan & XCAN_IDR_IDE_MASK) { + /* The received frame is an Extended format frame */ + cf->can_id = (id_xcan & XCAN_IDR_ID1_MASK) >> 3; + cf->can_id |= (id_xcan & XCAN_IDR_ID2_MASK) >> + XCAN_IDR_ID2_SHIFT; + cf->can_id |= CAN_EFF_FLAG; + if (id_xcan & XCAN_IDR_RTR_MASK) + cf->can_id |= CAN_RTR_FLAG; + } else { + /* The received frame is a standard format frame */ + cf->can_id = (id_xcan & XCAN_IDR_ID1_MASK) >> + XCAN_IDR_ID1_SHIFT; + if (!(dlc & XCAN_DLCR_EDL_MASK) && (id_xcan & + XCAN_IDR_SRR_MASK)) + cf->can_id |= CAN_RTR_FLAG; + } + + /* Check the frame received is FD or not*/ + if (dlc & XCAN_DLCR_EDL_MASK) { + for (i = 0; i < cf->len; i += 4) { + if (priv->devtype.flags & XCAN_FLAG_CANFD_2) + data[0] = priv->read_reg(priv, + (XCAN_RXMSG_2_FRAME_OFFSET(readindex) + + (dwindex * XCANFD_DW_BYTES))); + else + data[0] = priv->read_reg(priv, + (XCAN_RXMSG_FRAME_OFFSET(readindex) + + (dwindex * XCANFD_DW_BYTES))); + *(__be32 *)(cf->data + i) = + cpu_to_be32(data[0]); + dwindex++; + } + } else { + for (i = 0; i < cf->len; i += 4) { + if (priv->devtype.flags & XCAN_FLAG_CANFD_2) + data[0] = priv->read_reg(priv, + XCAN_RXMSG_2_FRAME_OFFSET(readindex) + i); + else + data[0] = priv->read_reg(priv, + XCAN_RXMSG_FRAME_OFFSET(readindex) + i); + *(__be32 *)(cf->data + i) = + cpu_to_be32(data[0]); + } + } + /* Update FSR Register so that next packet will save to + * buffer + */ + fsr = priv->read_reg(priv, XCAN_FSR_OFFSET); + fsr |= XCAN_FSR_IRI_MASK; + priv->write_reg(priv, XCAN_FSR_OFFSET, fsr); + fsr = priv->read_reg(priv, XCAN_FSR_OFFSET); + stats->rx_bytes += cf->len; + stats->rx_packets++; + netif_receive_skb(skb); + + return 1; + } + /* If FSR Register is not updated with fill level */ + return 0; +} + +/** * xcan_current_error_state - Get current error state from HW * @ndev: Pointer to net_device structure * @@ -1037,7 +1219,10 @@ static int xcan_rx_poll(struct napi_struct *napi, int quota) while ((frame_offset = xcan_rx_fifo_get_next_frame(priv)) >= 0 && (work_done < quota)) { - work_done += xcan_rx(ndev, frame_offset); + if (xcan_rx_int_mask(priv) & XCAN_IXR_RXOK_MASK) + work_done += xcanfd_rx(ndev, frame_offset); + else + work_done += xcan_rx(ndev, frame_offset); if (priv->devtype.flags & XCAN_FLAG_RX_FIFO_MULTI) /* increment read index */ @@ -1579,6 +1764,19 @@ static int xcan_probe(struct platform_device *pdev) priv->can.do_get_berr_counter = xcan_get_berr_counter; priv->can.ctrlmode_supported = CAN_CTRLMODE_LOOPBACK | CAN_CTRLMODE_BERR_REPORTING; + + if (devtype->cantype == XAXI_CANFD) + priv->can.data_bittiming_const = + &xcan_data_bittiming_const_canfd; + + if (devtype->cantype == XAXI_CANFD_2_0) + priv->can.data_bittiming_const = + &xcan_data_bittiming_const_canfd2; + + if (devtype->cantype == XAXI_CANFD || + devtype->cantype == XAXI_CANFD_2_0) + priv->can.ctrlmode_supported |= CAN_CTRLMODE_FD; + priv->reg_base = addr; priv->tx_max = tx_max; priv->devtype = *devtype; From patchwork Mon Mar 18 11:32:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 10857475 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D41D6922 for ; Mon, 18 Mar 2019 11:34:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3E94284B5 for ; Mon, 18 Mar 2019 11:34:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A73FB284B1; Mon, 18 Mar 2019 11:34:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 35DA6284B1 for ; Mon, 18 Mar 2019 11:34:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PE7K6qassn/ID3eaWx8Vn7Oka1jag3SqTFi4nO+xpfU=; b=aijD3Ccvl4AuNk Cqhlswy6QrXS3978C5SUqladUU1hQ8aztC64/hOoyfBR2wSZBQQUMSeyx/aADGCUwyzmTn4Q+QTgE vZNQSno91SNZtevCwhptWAyk2B2GPFkSdSYV2K5K5sBF/H3uULpDKdyR0XEvulAg3R0clwL9itzy7 9AO9HTh15CgJuLoI2Ml38myTeCUqUZt8thkb/I4vgyPwWwYQUWWgnG1sCZXXcHpdrkCtlMl2lgqzh VnZuu56lcYuYX+KjtHpYgcUst2aLrxXKY7z/bvji0Le+EqZPKPafPyda94kR7mPd0CqxNnTKm6AWv 8ugX7TeokIvAdK1fEaTQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qX9-0006iz-Jz; Mon, 18 Mar 2019 11:34:23 +0000 Received: from mail-eopbgr720051.outbound.protection.outlook.com ([40.107.72.51] helo=NAM05-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qWB-0005LX-59 for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2019 11:33:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iQgmK2MtkXRhV0wbfhSCQ6YDSTfd0/j3kCjjaT2iHDw=; b=PlBpEdHkYWJEOuxiYheG5x9tTvw/S/wMyEKKVSlRZvRGMAOetiBInwSj87Nwt0tt6DkuSuy0g2yk0JBC9NcKmw9HClX0/F3kIXRK8b7jmvOck6cDAT57iA+w8fa095HiusgATDQoDZJwrDx72HAmbB6sgxiE22UhBi27QtcxNbE= Received: from DM6PR02CA0074.namprd02.prod.outlook.com (10.141.168.143) by BYAPR02MB4056.namprd02.prod.outlook.com (20.176.248.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Mon, 18 Mar 2019 11:33:20 +0000 Received: from BL2NAM02FT037.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::208) by DM6PR02CA0074.outlook.office365.com (2603:10b6:5:1f4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13 via Frontend Transport; Mon, 18 Mar 2019 11:33:20 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; grandegger.com; dkim=none (message not signed) header.d=none;grandegger.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT037.mail.protection.outlook.com (10.152.77.11) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1730.9 via Frontend Transport; Mon, 18 Mar 2019 11:33:19 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1h5qW7-0007ip-34; Mon, 18 Mar 2019 04:33:19 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1h5qW1-0008WO-VL; Mon, 18 Mar 2019 04:33:14 -0700 Received: from [172.23.37.94] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1h5qVv-0008M3-8F; Mon, 18 Mar 2019 04:33:07 -0700 From: Appana Durga Kedareswara rao To: , , , Subject: [PATCH 5/6] net: can: xilinx_can: Add SPDX license Date: Mon, 18 Mar 2019 17:02:45 +0530 Message-ID: <1552908766-26753-6-git-send-email-appana.durga.rao@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> References: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(136003)(376002)(396003)(346002)(39860400002)(2980300002)(189003)(199004)(336012)(486006)(2616005)(426003)(2201001)(446003)(126002)(476003)(11346002)(5660300002)(36756003)(106002)(16586007)(54906003)(110136005)(14444005)(6636002)(50226002)(9786002)(8936002)(8676002)(81156014)(81166006)(2906002)(36386004)(356004)(305945005)(6666004)(50466002)(186003)(48376002)(4326008)(106466001)(76176011)(7696005)(316002)(478600001)(51416003)(63266004)(107886003)(77096007)(47776003)(26005)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR02MB4056; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; MX:1; A:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c3ced3c2-bd2b-47ef-3ff9-08d6ab958589 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4608103)(4709054)(2017052603328)(7153060); SRVR:BYAPR02MB4056; X-MS-TrafficTypeDiagnostic: BYAPR02MB4056: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 098076C36C X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: AtEs3Y8Se0tigJ4wc1nxEGgB6hI6TZTZaPtHv4a3hmIA+EQfSClcEy5X6/F1XiDdWEHSOaZaSsnTkG2YQH/RmBjeRuqC4gFEZOaVM+cdJ4+YdYVnw4p7YnTtHZJc/Zo4DQGmTxVaONemo1c13mUlFgZ269nTh+XPaO3O3GxxK0AAM/DLtWKQWVcUmgmUbepGdGIFgsYA9YCu7aLFEsWfbnlk3AxbQ5m5FOKQiyojrtSSXDbCLSjjVd7pGkgSCU1F/Vyizb2jQxgErsbWfUmcCX22zuRfuj08fP3ZAcp3WKVfWNMKwpJpDGqFQPc0nSSb+YF7DdxL2Jq3M9+JlHn5u0BvaBk6gfnfMHVCeQX/8EPRvjEKotH3TXw+SCQLiiqv2hByvA3DLWHppORGtMW/sAOARhA2b6szJAdCKxOw48s= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2019 11:33:19.6593 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3ced3c2-bd2b-47ef-3ff9-08d6ab958589 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB4056 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190318_043323_745289_D153C39D X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Appana Durga Kedareswara rao , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Update driver to have SPDX identifiers. Signed-off-by: Appana Durga Kedareswara rao --- drivers/net/can/xilinx_can.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index 3d75a28..e1544e0 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -1,20 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ /* Xilinx CAN device driver * * Copyright (C) 2012 - 2014 Xilinx, Inc. * Copyright (C) 2009 PetaLogix. All rights reserved. * Copyright (C) 2017 - 2018 Sandvik Mining and Construction Oy * - * Description: - * This driver is developed for Axi CAN IP and for Zynq CANPS Controller. - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ #include From patchwork Mon Mar 18 11:32:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 10857471 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E5414922 for ; Mon, 18 Mar 2019 11:34:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0497282EC for ; Mon, 18 Mar 2019 11:34:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0CB42818A; Mon, 18 Mar 2019 11:34:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4AE402818A for ; Mon, 18 Mar 2019 11:34:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Pg06JNRBkXZIMuYGK06vBr/y4qI2JAFRdeq4kDc2C+0=; b=g/JwbnQ0RRiolQ fmqfaGKguPhmPCWxhS0kyIan6oFoZIXX6yasEKTtkM/utvNuqk1tNQTy1w8GYQOh5i3XLY/9a69Iw +uLHuFebV8djRsrt2YpCzNIg5yGqi7LbEpN26f0vSFtAYZQpQJT2SSXK5gYLPZp1oZsmLHhtorqOv 1pQo8yiHfF2pL4X9AUtVC5Cf6YeB9WiGeeKQLN/yMDjLjuNCpCCznhRBwFmss6dSek+RYHPt+SjiO n7pJ2OdQVwtel4Tczr/gdMXiimnpDzb8wxSBWIurZBzt04M0R2Ye90CROzwt1BB6miuMkXnqnSc2p okx+bFZ7osEFnfnJGSfw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qWn-0006GX-Vg; Mon, 18 Mar 2019 11:34:01 +0000 Received: from mail-eopbgr700049.outbound.protection.outlook.com ([40.107.70.49] helo=NAM04-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qWB-0005LV-7F for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2019 11:33:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=irxE9mPOTe1f+rMN9CkG+svBXNKpnigSCZ327C2v+7k=; b=xQpl+9C0MDsMU+ZyKh+ZnOfiRnD9p477SvlBaUWpMjcguH0sDGZ0SeGYlwRPEQ0LagUHa6ZwAv6ge7xwil3mb5XXxqyrqHRZShiRnwYtSf4FSUj1cd8qGGGlNFT6o+K6ST7K3+02B6tMoOxL4FaAziqHV0nFbJa7nERSzQKv6qM= Received: from BN7PR02CA0026.namprd02.prod.outlook.com (2603:10b6:408:20::39) by CY4PR02MB2840.namprd02.prod.outlook.com (2603:10b6:903:11c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Mon, 18 Mar 2019 11:33:21 +0000 Received: from CY1NAM02FT041.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::207) by BN7PR02CA0026.outlook.office365.com (2603:10b6:408:20::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1709.13 via Frontend Transport; Mon, 18 Mar 2019 11:33:20 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; grandegger.com; dkim=none (message not signed) header.d=none;grandegger.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT041.mail.protection.outlook.com (10.152.74.156) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1730.9 via Frontend Transport; Mon, 18 Mar 2019 11:33:19 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:50932 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1h5qW7-0004gF-4R; Mon, 18 Mar 2019 04:33:19 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1h5qW2-0008WO-0f; Mon, 18 Mar 2019 04:33:14 -0700 Received: from [172.23.37.94] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1h5qVy-0008M3-2h; Mon, 18 Mar 2019 04:33:10 -0700 From: Appana Durga Kedareswara rao To: , , , Subject: [PATCH 6/6] net: can: xilinx_can: Fix kernel doc warnings Date: Mon, 18 Mar 2019 17:02:46 +0530 Message-ID: <1552908766-26753-7-git-send-email-appana.durga.rao@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> References: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(376002)(136003)(396003)(346002)(2980300002)(189003)(199004)(8676002)(356004)(6666004)(81156014)(81166006)(107886003)(36756003)(14444005)(48376002)(50466002)(305945005)(5660300002)(47776003)(51416003)(7696005)(36386004)(76176011)(6636002)(50226002)(446003)(486006)(2616005)(126002)(476003)(11346002)(478600001)(8936002)(426003)(63266004)(2201001)(4326008)(336012)(110136005)(54906003)(106466001)(9786002)(2906002)(77096007)(106002)(26005)(186003)(16586007)(316002)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR02MB2840; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; MX:1; A:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d88bf0c1-d7b0-49ce-12f0-08d6ab9585a6 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4608103)(4709054)(2017052603328)(7153060); SRVR:CY4PR02MB2840; X-MS-TrafficTypeDiagnostic: CY4PR02MB2840: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 098076C36C X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: Kmw8e8uqQDu93HHgRGM2PH4tXnBTJzuGRtCWcTs4U7lxmA49vELgp1WVj4ap7pN6ov6zuM1wEaLi55i+so4/5cgN4aTVmBzqEemuHnd1rTgQZbtELfqS3/p7GfNkOpILtoUjxgvXk2iaLiIYf6yijSrlX3sgJoU9JNSrvDvPtM14oYulofokIZr0lTw4s6H4RPqiEkGrxu/A+XVReDpeHROZEjGW6r9iU3hexZRFxhn1P9aGxXnGhuWcXK6/HsMxCigpB7EmlrH3rkgA9KsWlkoMP4gl5v/GSFeCu7XS85x5sF1fs53OthgtiEgqFmxPlhWE/feVT2U5puw7sxM3+gkWRXsfGhl8q9i+NoYIhvvqSS1rwp4iO2Ro0cTVgJ0i2VN89keMl0EFoYH/1uWa5zNVLB2L950oQu/Th6k4y30= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2019 11:33:19.5980 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d88bf0c1-d7b0-49ce-12f0-08d6ab9585a6 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR02MB2840 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190318_043323_820254_EAF192B3 X-CRM114-Status: UNSURE ( 8.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Appana Durga Kedareswara rao , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes below kernel doc warnings warning: Function parameter or member 'priv' not described in 'xcan_write_frame' warning: Function parameter or member 'skb' not described in 'xcan_start_xmit_fifo' warning: Function parameter or member 'ndev' not described in 'xcan_start_xmit_fifo' warning: Function parameter or member 'skb' not described in 'xcan_start_xmit_mailbox' warning: Function parameter or member 'ndev' not described in 'xcan_start_xmit_mailbox' warning: Function parameter or member 'priv' not described in 'xcan_rx_fifo_get_next_frame' Signed-off-by: Appana Durga Kedareswara rao --- drivers/net/can/xilinx_can.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index e1544e0..ac6fcae 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -545,6 +545,7 @@ static int xcan_do_set_mode(struct net_device *ndev, enum can_mode mode) /** * xcan_write_frame - Write a frame to HW + * @priv: Driver private data structure * @skb: sk_buff pointer that contains data to be Txed * @frame_offset: Register offset to write the frame to */ @@ -625,6 +626,8 @@ static void xcan_write_frame(struct xcan_priv *priv, struct sk_buff *skb, /** * xcan_start_xmit_fifo - Starts the transmission (FIFO mode) + * @skb: sk_buff pointer that contains data to be Txed + * @ndev: Pointer to net_device structure * * Return: 0 on success, -ENOSPC if FIFO is full. */ @@ -661,6 +664,8 @@ static int xcan_start_xmit_fifo(struct sk_buff *skb, struct net_device *ndev) /** * xcan_start_xmit_mailbox - Starts the transmission (mailbox mode) + * @skb: sk_buff pointer that contains data to be Txed + * @ndev: Pointer to net_device structure * * Return: 0 on success, -ENOSPC if there is no space */ @@ -1148,6 +1153,7 @@ static void xcan_state_interrupt(struct net_device *ndev, u32 isr) /** * xcan_rx_fifo_get_next_frame - Get register offset of next RX frame + * @priv: Driver private data structure * * Return: Register offset of the next frame in RX FIFO. */