From: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
To: <wg@grandegger.com>, <mkl@pengutronix.de>, <davem@davemloft.net>,
<michal.simek@xilinx.com>
Cc: <linux-can@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
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 [thread overview]
Message-ID: <1552908766-26753-4-git-send-email-appana.durga.rao@xilinx.com> (raw)
In-Reply-To: <1552908766-26753-1-git-send-email-appana.durga.rao@xilinx.com>
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 <appana.durga.rao@xilinx.com>
---
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 |
--
2.7.4
next prev parent reply other threads:[~2019-03-18 11:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-18 11:32 [PATCH 0/6] net: can: xilinx_can: Bug fixes and Enhancements Appana Durga Kedareswara rao
2019-03-18 11:32 ` [PATCH 1/6] net: can: xilinx_can: Fix style issues Appana Durga Kedareswara rao
2019-03-18 11:32 ` [PATCH 2/6] net: can: xilinx_can: Fix flags field initialization for axi can and canps Appana Durga Kedareswara rao
2019-10-04 14:32 ` Anssi Hannula
2019-10-09 4:01 ` Appana Durga Kedareswara Rao
2019-10-09 7:17 ` Marc Kleine-Budde
2019-10-09 7:31 ` Appana Durga Kedareswara Rao
2019-03-18 11:32 ` Appana Durga Kedareswara rao [this message]
2019-03-18 11:32 ` [PATCH 4/6] net: can: xilinx_can: Add support for CANFD FD frames Appana Durga Kedareswara rao
2019-03-18 11:32 ` [PATCH 5/6] net: can: xilinx_can: Add SPDX license Appana Durga Kedareswara rao
2019-03-18 11:32 ` [PATCH 6/6] net: can: xilinx_can: Fix kernel doc warnings Appana Durga Kedareswara rao
2019-03-20 13:08 ` [PATCH 0/6] net: can: xilinx_can: Bug fixes and Enhancements Marc Kleine-Budde
2019-03-21 6:36 ` Appana Durga Kedareswara Rao
2019-04-23 6:38 ` Appana Durga Kedareswara Rao
2019-06-07 6:58 ` Appana Durga Kedareswara Rao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1552908766-26753-4-git-send-email-appana.durga.rao@xilinx.com \
--to=appana.durga.rao@xilinx.com \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®