qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/6] CTU CAN FD core support
@ 2020-07-14 12:20 pisa
  2020-07-14 12:20 ` [PATCH v1 1/6] net/can: Initial host SocketCan support for CAN FD pisa
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: pisa @ 2020-07-14 12:20 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini
  Cc: Marek Vasut, Oliver Hartkopp, Jiri Novak, Stefan Hajnoczi,
	Deniz Eren, Markus Armbruster, Oleksij Rempel, Konrad Frederic,
	Jan Charvat, Jan Kiszka, Ondrej Ille, Pavel Pisa

From: Pavel Pisa <pisa@cmp.felk.cvut.cz>

CTU CAN FD is an open source soft core written in VHDL.
It originated in 2015 as Ondrej Ille's project at the
Department of Measurement of FEE at CTU.

Integration for Xilinx Zynq and Intel based SoCs is available
as well as support for PCIe integration of the core.

The core sources

  https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core

The controller model and QEMU CAN subsystem extension to CAN FD
has been implemented in frame of bachelor theses of Jan Charvat.
The development branch ctu-canfd in CTU local project repository

  https://gitlab.fel.cvut.cz/canbus/qemu-canbus

More CAN bus related project from Czech Technical University
in Prague, Faculty of Electrical Engineering at

  http://canbus.pages.fel.cvut.cz/

Jan Charvat (5):
  net/can: Initial host SocketCan support for CAN FD.
  hw/net/can: sja1000 ignore CAN FD frames
  net/can: Add can_dlc2len and can_len2dlc for CAN FD.
  hw/net/can/ctucafd: Add CTU CAN FD core register definitions.
  hw/net/can: CTU CAN FD IP open hardware core emulation.

Pavel Pisa (1):
  hw/net/can: Documentation for CTU CAN FD IP open hardware core
    emulation.

 MAINTAINERS                   |   8 +
 docs/can.txt                  | 113 +++-
 hw/net/can/Makefile.objs      |   3 +
 hw/net/can/can_sja1000.c      |  31 +-
 hw/net/can/ctu_can_fd_frame.h | 190 +++++++
 hw/net/can/ctu_can_fd_regs.h  | 972 ++++++++++++++++++++++++++++++++++
 hw/net/can/ctucan_core.c      | 691 ++++++++++++++++++++++++
 hw/net/can/ctucan_core.h      | 127 +++++
 hw/net/can/ctucan_pci.c       | 281 ++++++++++
 include/net/can_emu.h         |  12 +-
 net/can/can_core.c            |  36 ++
 net/can/can_socketcan.c       |  47 +-
 12 files changed, 2490 insertions(+), 21 deletions(-)
 create mode 100644 hw/net/can/ctu_can_fd_frame.h
 create mode 100644 hw/net/can/ctu_can_fd_regs.h
 create mode 100644 hw/net/can/ctucan_core.c
 create mode 100644 hw/net/can/ctucan_core.h
 create mode 100644 hw/net/can/ctucan_pci.c

-- 
2.20.1



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH v1 1/6] net/can: Initial host SocketCan support for CAN FD.
  2020-07-14 12:20 [PATCH v1 0/6] CTU CAN FD core support pisa
@ 2020-07-14 12:20 ` pisa
  2020-09-01 20:01   ` Vikram Garhwal
  2020-07-14 12:20 ` [PATCH v1 2/6] hw/net/can: sja1000 ignore CAN FD frames pisa
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: pisa @ 2020-07-14 12:20 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini
  Cc: Marek Vasut, Oliver Hartkopp, Jiri Novak, Stefan Hajnoczi,
	Deniz Eren, Markus Armbruster, Oleksij Rempel, Konrad Frederic,
	Jan Charvat, Jan Kiszka, Ondrej Ille, Pavel Pisa

From: Jan Charvat <charvj10@fel.cvut.cz>

Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
---
 hw/net/can/can_sja1000.c |  2 ++
 include/net/can_emu.h    |  8 ++++++-
 net/can/can_socketcan.c  | 47 +++++++++++++++++++++++++++++++++++++---
 3 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/hw/net/can/can_sja1000.c b/hw/net/can/can_sja1000.c
index ea915a023a..d83c550edc 100644
--- a/hw/net/can/can_sja1000.c
+++ b/hw/net/can/can_sja1000.c
@@ -268,6 +268,7 @@ static void buff2frame_pel(const uint8_t *buff, qemu_can_frame *frame)
 {
     uint8_t i;
 
+    frame->flags = 0;
     frame->can_id = 0;
     if (buff[0] & 0x40) { /* RTR */
         frame->can_id = QEMU_CAN_RTR_FLAG;
@@ -303,6 +304,7 @@ static void buff2frame_bas(const uint8_t *buff, qemu_can_frame *frame)
 {
     uint8_t i;
 
+    frame->flags = 0;
     frame->can_id = ((buff[0] << 3) & (0xff << 3)) + ((buff[1] >> 5) & 0x07);
     if (buff[1] & 0x10) { /* RTR */
         frame->can_id = QEMU_CAN_RTR_FLAG;
diff --git a/include/net/can_emu.h b/include/net/can_emu.h
index fce9770928..c6164dcfb4 100644
--- a/include/net/can_emu.h
+++ b/include/net/can_emu.h
@@ -46,7 +46,8 @@ typedef uint32_t qemu_canid_t;
 typedef struct qemu_can_frame {
     qemu_canid_t    can_id;  /* 32 bit CAN_ID + EFF/RTR/ERR flags */
     uint8_t         can_dlc; /* data length code: 0 .. 8 */
-    uint8_t         data[8] QEMU_ALIGNED(8);
+    uint8_t         flags;
+    uint8_t         data[64] QEMU_ALIGNED(8);
 } qemu_can_frame;
 
 /* Keep defines for QEMU separate from Linux ones for now */
@@ -58,6 +59,10 @@ typedef struct qemu_can_frame {
 #define QEMU_CAN_SFF_MASK 0x000007FFU /* standard frame format (SFF) */
 #define QEMU_CAN_EFF_MASK 0x1FFFFFFFU /* extended frame format (EFF) */
 
+#define QEMU_CAN_FRMF_BRS     0x01 /* bit rate switch (2nd bitrate for data) */
+#define QEMU_CAN_FRMF_ESI     0x02 /* error state ind. of transmitting node */
+#define QEMU_CAN_FRMF_TYPE_FD 0x10 /* internal bit ind. of CAN FD frame */
+
 /**
  * struct qemu_can_filter - CAN ID based filter in can_register().
  * @can_id:   relevant bits of CAN ID which are not masked out.
@@ -97,6 +102,7 @@ struct CanBusClientState {
     char *model;
     char *name;
     void (*destructor)(CanBusClientState *);
+    bool fd_mode;
 };
 
 #define TYPE_CAN_BUS "can-bus"
diff --git a/net/can/can_socketcan.c b/net/can/can_socketcan.c
index b7ef63ec0e..fbc0b62ea4 100644
--- a/net/can/can_socketcan.c
+++ b/net/can/can_socketcan.c
@@ -103,6 +103,14 @@ static void can_host_socketcan_read(void *opaque)
         return;
     }
 
+    if (!ch->bus_client.fd_mode) {
+        c->buf[0].flags = 0;
+    } else {
+        if (c->bufcnt > CAN_MTU) {
+            c->buf[0].flags |= QEMU_CAN_FRMF_TYPE_FD;
+        }
+    }
+
     can_bus_client_send(&ch->bus_client, c->buf, 1);
 
     if (DEBUG_CAN) {
@@ -121,12 +129,21 @@ static ssize_t can_host_socketcan_receive(CanBusClientState *client,
     CanHostState *ch = container_of(client, CanHostState, bus_client);
     CanHostSocketCAN *c = CAN_HOST_SOCKETCAN(ch);
 
-    size_t len = sizeof(qemu_can_frame);
+    size_t len;
     int res;
 
     if (c->fd < 0) {
         return -1;
     }
+    if (frames->flags & QEMU_CAN_FRMF_TYPE_FD) {
+        if (!ch->bus_client.fd_mode) {
+            return 0;
+        }
+        len = CANFD_MTU;
+    } else {
+        len = CAN_MTU;
+
+    }
 
     res = write(c->fd, frames, len);
 
@@ -172,6 +189,8 @@ static void can_host_socketcan_connect(CanHostState *ch, Error **errp)
 {
     CanHostSocketCAN *c = CAN_HOST_SOCKETCAN(ch);
     int s; /* can raw socket */
+    int mtu;
+    int enable_canfd = 1;
     struct sockaddr_can addr;
     struct ifreq ifr;
 
@@ -185,13 +204,34 @@ static void can_host_socketcan_connect(CanHostState *ch, Error **errp)
     addr.can_family = AF_CAN;
     memset(&ifr.ifr_name, 0, sizeof(ifr.ifr_name));
     strcpy(ifr.ifr_name, c->ifname);
+    /* check if the frame fits into the CAN netdevice */
     if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
         error_setg_errno(errp, errno,
-                         "SocketCAN host interface %s not available", c->ifname);
+                         "SocketCAN host interface %s not available",
+                         c->ifname);
         goto fail;
     }
     addr.can_ifindex = ifr.ifr_ifindex;
 
+    if (ioctl(s, SIOCGIFMTU, &ifr) < 0) {
+        error_setg_errno(errp, errno,
+                         "SocketCAN host interface %s SIOCGIFMTU failed",
+                         c->ifname);
+        goto fail;
+    }
+    mtu = ifr.ifr_mtu;
+
+    if (mtu >= CANFD_MTU) {
+        /* interface is ok - try to switch the socket into CAN FD mode */
+        if (setsockopt(s, SOL_CAN_RAW, CAN_RAW_FD_FRAMES,
+                        &enable_canfd, sizeof(enable_canfd))) {
+            warn_report("SocketCAN host interface %s enabling CAN FD failed",
+                        c->ifname);
+        } else {
+            c->parent.bus_client.fd_mode = true;
+        }
+    }
+
     c->err_mask = 0xffffffff; /* Receive error frame. */
     setsockopt(s, SOL_CAN_RAW, CAN_RAW_ERR_FILTER,
                    &c->err_mask, sizeof(c->err_mask));
@@ -232,7 +272,8 @@ static char *can_host_socketcan_get_if(Object *obj, Error **errp)
     return g_strdup(c->ifname);
 }
 
-static void can_host_socketcan_set_if(Object *obj, const char *value, Error **errp)
+static void can_host_socketcan_set_if(Object *obj, const char *value,
+                                      Error **errp)
 {
     CanHostSocketCAN *c = CAN_HOST_SOCKETCAN(obj);
     struct ifreq ifr;
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v1 2/6] hw/net/can: sja1000 ignore CAN FD frames
  2020-07-14 12:20 [PATCH v1 0/6] CTU CAN FD core support pisa
  2020-07-14 12:20 ` [PATCH v1 1/6] net/can: Initial host SocketCan support for CAN FD pisa
@ 2020-07-14 12:20 ` pisa
  2020-09-01 17:07   ` Vikram Garhwal
  2020-07-14 12:20 ` [PATCH v1 3/6] net/can: Add can_dlc2len and can_len2dlc for CAN FD pisa
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: pisa @ 2020-07-14 12:20 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini
  Cc: Marek Vasut, Oliver Hartkopp, Jiri Novak, Stefan Hajnoczi,
	Deniz Eren, Markus Armbruster, Oleksij Rempel, Konrad Frederic,
	Jan Charvat, Jan Kiszka, Ondrej Ille, Pavel Pisa

From: Jan Charvat <charvj10@fel.cvut.cz>

Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
---
 hw/net/can/can_sja1000.c | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/hw/net/can/can_sja1000.c b/hw/net/can/can_sja1000.c
index d83c550edc..382911560c 100644
--- a/hw/net/can/can_sja1000.c
+++ b/hw/net/can/can_sja1000.c
@@ -323,11 +323,16 @@ static void buff2frame_bas(const uint8_t *buff, qemu_can_frame *frame)
 static int frame2buff_pel(const qemu_can_frame *frame, uint8_t *buff)
 {
     int i;
+    int dlen = frame->can_dlc;
 
     if (frame->can_id & QEMU_CAN_ERR_FLAG) { /* error frame, NOT support now. */
         return -1;
     }
 
+    if (dlen > 8) {
+        return -1;
+    }
+
     buff[0] = 0x0f & frame->can_dlc; /* DLC */
     if (frame->can_id & QEMU_CAN_RTR_FLAG) { /* RTR */
         buff[0] |= (1 << 6);
@@ -338,18 +343,18 @@ static int frame2buff_pel(const qemu_can_frame *frame, uint8_t *buff)
         buff[2] = extract32(frame->can_id, 13, 8); /* ID.20~ID.13 */
         buff[3] = extract32(frame->can_id, 5, 8);  /* ID.12~ID.05 */
         buff[4] = extract32(frame->can_id, 0, 5) << 3; /* ID.04~ID.00,xxx */
-        for (i = 0; i < frame->can_dlc; i++) {
+        for (i = 0; i < dlen; i++) {
             buff[5 + i] = frame->data[i];
         }
-        return frame->can_dlc + 5;
+        return dlen + 5;
     } else { /* SFF */
         buff[1] = extract32(frame->can_id, 3, 8); /* ID.10~ID.03 */
         buff[2] = extract32(frame->can_id, 0, 3) << 5; /* ID.02~ID.00,xxxxx */
-        for (i = 0; i < frame->can_dlc; i++) {
+        for (i = 0; i < dlen; i++) {
             buff[3 + i] = frame->data[i];
         }
 
-        return frame->can_dlc + 3;
+        return dlen + 3;
     }
 
     return -1;
@@ -358,6 +363,7 @@ static int frame2buff_pel(const qemu_can_frame *frame, uint8_t *buff)
 static int frame2buff_bas(const qemu_can_frame *frame, uint8_t *buff)
 {
     int i;
+    int dlen = frame->can_dlc;
 
      /*
       * EFF, no support for BasicMode
@@ -369,17 +375,21 @@ static int frame2buff_bas(const qemu_can_frame *frame, uint8_t *buff)
         return -1;
     }
 
+    if (dlen > 8) {
+        return -1;
+    }
+
     buff[0] = extract32(frame->can_id, 3, 8); /* ID.10~ID.03 */
     buff[1] = extract32(frame->can_id, 0, 3) << 5; /* ID.02~ID.00,xxxxx */
     if (frame->can_id & QEMU_CAN_RTR_FLAG) { /* RTR */
         buff[1] |= (1 << 4);
     }
     buff[1] |= frame->can_dlc & 0x0f;
-    for (i = 0; i < frame->can_dlc; i++) {
+    for (i = 0; i < dlen; i++) {
         buff[2 + i] = frame->data[i];
     }
 
-    return frame->can_dlc + 2;
+    return dlen + 2;
 }
 
 static void can_sja_update_pel_irq(CanSJA1000State *s)
@@ -764,6 +774,13 @@ ssize_t can_sja_receive(CanBusClientState *client, const qemu_can_frame *frames,
     if (frames_cnt <= 0) {
         return 0;
     }
+    if (frame->flags && QEMU_CAN_FRMF_TYPE_FD) {
+        if (DEBUG_FILTER) {
+            can_display_msg("[cansja]: ignor fd frame ", frame);
+        }
+        return 1;
+    }
+
     if (DEBUG_FILTER) {
         can_display_msg("[cansja]: receive ", frame);
     }
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v1 3/6] net/can: Add can_dlc2len and can_len2dlc for CAN FD.
  2020-07-14 12:20 [PATCH v1 0/6] CTU CAN FD core support pisa
  2020-07-14 12:20 ` [PATCH v1 1/6] net/can: Initial host SocketCan support for CAN FD pisa
  2020-07-14 12:20 ` [PATCH v1 2/6] hw/net/can: sja1000 ignore CAN FD frames pisa
@ 2020-07-14 12:20 ` pisa
  2020-09-03  5:43   ` Vikram Garhwal
  2020-07-14 12:20 ` [PATCH v1 4/6] hw/net/can/ctucafd: Add CTU CAN FD core register definitions pisa
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: pisa @ 2020-07-14 12:20 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini
  Cc: Marek Vasut, Oliver Hartkopp, Jiri Novak, Stefan Hajnoczi,
	Deniz Eren, Markus Armbruster, Oleksij Rempel, Konrad Frederic,
	Jan Charvat, Jan Kiszka, Ondrej Ille, Pavel Pisa

From: Jan Charvat <charvj10@fel.cvut.cz>

Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
---
 include/net/can_emu.h |  4 ++++
 net/can/can_core.c    | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/include/net/can_emu.h b/include/net/can_emu.h
index c6164dcfb4..7d395fbb9b 100644
--- a/include/net/can_emu.h
+++ b/include/net/can_emu.h
@@ -127,4 +127,8 @@ int can_bus_client_set_filters(CanBusClientState *,
                                const struct qemu_can_filter *filters,
                                size_t filters_cnt);
 
+uint8_t can_dlc2len(uint8_t can_dlc);
+
+uint8_t can_len2dlc(uint8_t len);
+
 #endif
diff --git a/net/can/can_core.c b/net/can/can_core.c
index 90f4d8576a..0115d78794 100644
--- a/net/can/can_core.c
+++ b/net/can/can_core.c
@@ -33,6 +33,42 @@
 #include "net/can_emu.h"
 #include "qom/object_interfaces.h"
 
+/* CAN DLC to real data length conversion helpers */
+
+static const uint8_t dlc2len[] = {
+    0, 1, 2, 3, 4, 5, 6, 7,
+    8, 12, 16, 20, 24, 32, 48, 64
+};
+
+/* get data length from can_dlc with sanitized can_dlc */
+uint8_t can_dlc2len(uint8_t can_dlc)
+{
+    return dlc2len[can_dlc & 0x0F];
+}
+
+static const uint8_t len2dlc[] = {
+    0, 1, 2, 3, 4, 5, 6, 7, 8,                              /* 0 - 8 */
+    9, 9, 9, 9,                                             /* 9 - 12 */
+    10, 10, 10, 10,                                         /* 13 - 16 */
+    11, 11, 11, 11,                                         /* 17 - 20 */
+    12, 12, 12, 12,                                         /* 21 - 24 */
+    13, 13, 13, 13, 13, 13, 13, 13,                         /* 25 - 32 */
+    14, 14, 14, 14, 14, 14, 14, 14,                         /* 33 - 40 */
+    14, 14, 14, 14, 14, 14, 14, 14,                         /* 41 - 48 */
+    15, 15, 15, 15, 15, 15, 15, 15,                         /* 49 - 56 */
+    15, 15, 15, 15, 15, 15, 15, 15                          /* 57 - 64 */
+};
+
+/* map the sanitized data length to an appropriate data length code */
+uint8_t can_len2dlc(uint8_t len)
+{
+    if (unlikely(len > 64)) {
+        return 0xF;
+    }
+
+    return len2dlc[len];
+}
+
 struct CanBusState {
     Object object;
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v1 4/6] hw/net/can/ctucafd: Add CTU CAN FD core register definitions.
  2020-07-14 12:20 [PATCH v1 0/6] CTU CAN FD core support pisa
                   ` (2 preceding siblings ...)
  2020-07-14 12:20 ` [PATCH v1 3/6] net/can: Add can_dlc2len and can_len2dlc for CAN FD pisa
@ 2020-07-14 12:20 ` pisa
  2020-07-14 12:20 ` [PATCH v1 5/6] hw/net/can: CTU CAN FD IP open hardware core emulation pisa
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 20+ messages in thread
From: pisa @ 2020-07-14 12:20 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini
  Cc: Marek Vasut, Oliver Hartkopp, Jiri Novak, Stefan Hajnoczi,
	Deniz Eren, Markus Armbruster, Oleksij Rempel, Konrad Frederic,
	Jan Charvat, Jan Kiszka, Ondrej Ille, Pavel Pisa

From: Jan Charvat <charvj10@fel.cvut.cz>

Definitions of registers and CAN FD frame message box of CTU CAN FD
IP core are generated the specification in CACTUS/IP-XACT format.

CTU CAN FD IP core repository

  https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core

The location of the CTU CAN IP core specification within
IP core design

  spec/CTU/ip/CAN_FD_IP_Core/2.1/CAN_FD_IP_Core.2.1.xml

The header files are generated by pyXact_generator designed
by Ondrej Ille which is based on ipyxact_parser.

The specification is source of header files for driver and emulation,
documentation and VHDL registers map implementation.

Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
---
 hw/net/can/ctu_can_fd_frame.h | 190 +++++++
 hw/net/can/ctu_can_fd_regs.h  | 972 ++++++++++++++++++++++++++++++++++
 2 files changed, 1162 insertions(+)
 create mode 100644 hw/net/can/ctu_can_fd_frame.h
 create mode 100644 hw/net/can/ctu_can_fd_regs.h

diff --git a/hw/net/can/ctu_can_fd_frame.h b/hw/net/can/ctu_can_fd_frame.h
new file mode 100644
index 0000000000..d1d6f8ef24
--- /dev/null
+++ b/hw/net/can/ctu_can_fd_frame.h
@@ -0,0 +1,190 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*******************************************************************************
+ *
+ * CTU CAN FD IP Core
+ * Copyright (C) 2015-2018
+ *
+ * Authors:
+ *     Ondrej Ille <ondrej.ille@gmail.com>
+ *     Martin Jerabek <martin.jerabek01@gmail.com>
+ *     Jaroslav Beran <jara.beran@gmail.com>
+ *
+ * Project advisors:
+ *     Jiri Novak <jnovak@fel.cvut.cz>
+ *     Pavel Pisa <pisa@cmp.felk.cvut.cz>
+ *
+ * Department of Measurement         (http://meas.fel.cvut.cz/)
+ * Faculty of Electrical Engineering (http://www.fel.cvut.cz)
+ * Czech Technical University        (http://www.cvut.cz/)
+ *
+ * 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.
+ ******************************************************************************/
+
+/* This file is autogenerated, DO NOT EDIT! */
+
+#ifndef __CTU_CAN_FD_CAN_FD_FRAME_FORMAT__
+#define __CTU_CAN_FD_CAN_FD_FRAME_FORMAT__
+
+/* CAN_Frame_format memory map */
+enum ctu_can_fd_can_frame_format {
+	CTU_CAN_FD_FRAME_FORM_W        = 0x0,
+	CTU_CAN_FD_IDENTIFIER_W        = 0x4,
+	CTU_CAN_FD_TIMESTAMP_L_W       = 0x8,
+	CTU_CAN_FD_TIMESTAMP_U_W       = 0xc,
+	CTU_CAN_FD_DATA_1_4_W         = 0x10,
+	CTU_CAN_FD_DATA_5_8_W         = 0x14,
+	CTU_CAN_FD_DATA_61_64_W       = 0x4c,
+};
+
+
+/* Register descriptions: */
+union ctu_can_fd_frame_form_w {
+	uint32_t u32;
+	struct ctu_can_fd_frame_form_w_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* FRAME_FORM_W */
+		uint32_t dlc                     : 4;
+		uint32_t reserved_4              : 1;
+		uint32_t rtr                     : 1;
+		uint32_t ide                     : 1;
+		uint32_t fdf                     : 1;
+		uint32_t reserved_8              : 1;
+		uint32_t brs                     : 1;
+		uint32_t esi_rsv                 : 1;
+		uint32_t rwcnt                   : 5;
+		uint32_t reserved_31_16         : 16;
+#else
+		uint32_t reserved_31_16         : 16;
+		uint32_t rwcnt                   : 5;
+		uint32_t esi_rsv                 : 1;
+		uint32_t brs                     : 1;
+		uint32_t reserved_8              : 1;
+		uint32_t fdf                     : 1;
+		uint32_t ide                     : 1;
+		uint32_t rtr                     : 1;
+		uint32_t reserved_4              : 1;
+		uint32_t dlc                     : 4;
+#endif
+	} s;
+};
+
+enum ctu_can_fd_frame_form_w_rtr {
+	NO_RTR_FRAME       = 0x0,
+	RTR_FRAME          = 0x1,
+};
+
+enum ctu_can_fd_frame_form_w_ide {
+	BASE           = 0x0,
+	EXTENDED       = 0x1,
+};
+
+enum ctu_can_fd_frame_form_w_fdf {
+	NORMAL_CAN       = 0x0,
+	FD_CAN           = 0x1,
+};
+
+enum ctu_can_fd_frame_form_w_brs {
+	BR_NO_SHIFT       = 0x0,
+	BR_SHIFT          = 0x1,
+};
+
+enum ctu_can_fd_frame_form_w_esi_rsv {
+	ESI_ERR_ACTIVE       = 0x0,
+	ESI_ERR_PASIVE       = 0x1,
+};
+
+union ctu_can_fd_identifier_w {
+	uint32_t u32;
+	struct ctu_can_fd_identifier_w_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* IDENTIFIER_W */
+		uint32_t identifier_ext         : 18;
+		uint32_t identifier_base        : 11;
+		uint32_t reserved_31_29          : 3;
+#else
+		uint32_t reserved_31_29          : 3;
+		uint32_t identifier_base        : 11;
+		uint32_t identifier_ext         : 18;
+#endif
+	} s;
+};
+
+union ctu_can_fd_timestamp_l_w {
+	uint32_t u32;
+	struct ctu_can_fd_timestamp_l_w_s {
+  /* TIMESTAMP_L_W */
+		uint32_t time_stamp_31_0        : 32;
+	} s;
+};
+
+union ctu_can_fd_timestamp_u_w {
+	uint32_t u32;
+	struct ctu_can_fd_timestamp_u_w_s {
+  /* TIMESTAMP_U_W */
+		uint32_t timestamp_l_w          : 32;
+	} s;
+};
+
+union ctu_can_fd_data_1_4_w {
+	uint32_t u32;
+	struct ctu_can_fd_data_1_4_w_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* DATA_1_4_W */
+		uint32_t data_1                  : 8;
+		uint32_t data_2                  : 8;
+		uint32_t data_3                  : 8;
+		uint32_t data_4                  : 8;
+#else
+		uint32_t data_4                  : 8;
+		uint32_t data_3                  : 8;
+		uint32_t data_2                  : 8;
+		uint32_t data_1                  : 8;
+#endif
+	} s;
+};
+
+union ctu_can_fd_data_5_8_w {
+	uint32_t u32;
+	struct ctu_can_fd_data_5_8_w_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* DATA_5_8_W */
+		uint32_t data_5                  : 8;
+		uint32_t data_6                  : 8;
+		uint32_t data_7                  : 8;
+		uint32_t data_8                  : 8;
+#else
+		uint32_t data_8                  : 8;
+		uint32_t data_7                  : 8;
+		uint32_t data_6                  : 8;
+		uint32_t data_5                  : 8;
+#endif
+	} s;
+};
+
+union ctu_can_fd_data_61_64_w {
+	uint32_t u32;
+	struct ctu_can_fd_data_61_64_w_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* DATA_61_64_W */
+		uint32_t data_61                 : 8;
+		uint32_t data_62                 : 8;
+		uint32_t data_63                 : 8;
+		uint32_t data_64                 : 8;
+#else
+		uint32_t data_64                 : 8;
+		uint32_t data_63                 : 8;
+		uint32_t data_62                 : 8;
+		uint32_t data_61                 : 8;
+#endif
+	} s;
+};
+
+#endif
diff --git a/hw/net/can/ctu_can_fd_regs.h b/hw/net/can/ctu_can_fd_regs.h
new file mode 100644
index 0000000000..a3b3b5c374
--- /dev/null
+++ b/hw/net/can/ctu_can_fd_regs.h
@@ -0,0 +1,972 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*******************************************************************************
+ *
+ * CTU CAN FD IP Core
+ * Copyright (C) 2015-2018
+ *
+ * Authors:
+ *     Ondrej Ille <ondrej.ille@gmail.com>
+ *     Martin Jerabek <martin.jerabek01@gmail.com>
+ *     Jaroslav Beran <jara.beran@gmail.com>
+ *
+ * Project advisors:
+ *     Jiri Novak <jnovak@fel.cvut.cz>
+ *     Pavel Pisa <pisa@cmp.felk.cvut.cz>
+ *
+ * Department of Measurement         (http://meas.fel.cvut.cz/)
+ * Faculty of Electrical Engineering (http://www.fel.cvut.cz)
+ * Czech Technical University        (http://www.cvut.cz/)
+ *
+ * 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.
+ ******************************************************************************/
+
+/* This file is autogenerated, DO NOT EDIT! */
+
+#ifndef __CTU_CAN_FD_CAN_FD_REGISTER_MAP__
+#define __CTU_CAN_FD_CAN_FD_REGISTER_MAP__
+
+/* CAN_Registers memory map */
+enum ctu_can_fd_can_registers {
+	CTU_CAN_FD_DEVICE_ID             = 0x0,
+	CTU_CAN_FD_VERSION               = 0x2,
+	CTU_CAN_FD_MODE                  = 0x4,
+	CTU_CAN_FD_SETTINGS              = 0x6,
+	CTU_CAN_FD_STATUS                = 0x8,
+	CTU_CAN_FD_COMMAND               = 0xc,
+	CTU_CAN_FD_INT_STAT             = 0x10,
+	CTU_CAN_FD_INT_ENA_SET          = 0x14,
+	CTU_CAN_FD_INT_ENA_CLR          = 0x18,
+	CTU_CAN_FD_INT_MASK_SET         = 0x1c,
+	CTU_CAN_FD_INT_MASK_CLR         = 0x20,
+	CTU_CAN_FD_BTR                  = 0x24,
+	CTU_CAN_FD_BTR_FD               = 0x28,
+	CTU_CAN_FD_EWL                  = 0x2c,
+	CTU_CAN_FD_ERP                  = 0x2d,
+	CTU_CAN_FD_FAULT_STATE          = 0x2e,
+	CTU_CAN_FD_REC                  = 0x30,
+	CTU_CAN_FD_TEC                  = 0x32,
+	CTU_CAN_FD_ERR_NORM             = 0x34,
+	CTU_CAN_FD_ERR_FD               = 0x36,
+	CTU_CAN_FD_CTR_PRES             = 0x38,
+	CTU_CAN_FD_FILTER_A_MASK        = 0x3c,
+	CTU_CAN_FD_FILTER_A_VAL         = 0x40,
+	CTU_CAN_FD_FILTER_B_MASK        = 0x44,
+	CTU_CAN_FD_FILTER_B_VAL         = 0x48,
+	CTU_CAN_FD_FILTER_C_MASK        = 0x4c,
+	CTU_CAN_FD_FILTER_C_VAL         = 0x50,
+	CTU_CAN_FD_FILTER_RAN_LOW       = 0x54,
+	CTU_CAN_FD_FILTER_RAN_HIGH      = 0x58,
+	CTU_CAN_FD_FILTER_CONTROL       = 0x5c,
+	CTU_CAN_FD_FILTER_STATUS        = 0x5e,
+	CTU_CAN_FD_RX_MEM_INFO          = 0x60,
+	CTU_CAN_FD_RX_POINTERS          = 0x64,
+	CTU_CAN_FD_RX_STATUS            = 0x68,
+	CTU_CAN_FD_RX_SETTINGS          = 0x6a,
+	CTU_CAN_FD_RX_DATA              = 0x6c,
+	CTU_CAN_FD_TX_STATUS            = 0x70,
+	CTU_CAN_FD_TX_COMMAND           = 0x74,
+	CTU_CAN_FD_TX_PRIORITY          = 0x78,
+	CTU_CAN_FD_ERR_CAPT             = 0x7c,
+	CTU_CAN_FD_ALC                  = 0x7e,
+	CTU_CAN_FD_TRV_DELAY            = 0x80,
+	CTU_CAN_FD_SSP_CFG              = 0x82,
+	CTU_CAN_FD_RX_FR_CTR            = 0x84,
+	CTU_CAN_FD_TX_FR_CTR            = 0x88,
+	CTU_CAN_FD_DEBUG_REGISTER       = 0x8c,
+	CTU_CAN_FD_YOLO_REG             = 0x90,
+	CTU_CAN_FD_TIMESTAMP_LOW        = 0x94,
+	CTU_CAN_FD_TIMESTAMP_HIGH       = 0x98,
+	CTU_CAN_FD_TXTB1_DATA_1        = 0x100,
+	CTU_CAN_FD_TXTB1_DATA_2        = 0x104,
+	CTU_CAN_FD_TXTB1_DATA_20       = 0x14c,
+	CTU_CAN_FD_TXTB2_DATA_1        = 0x200,
+	CTU_CAN_FD_TXTB2_DATA_2        = 0x204,
+	CTU_CAN_FD_TXTB2_DATA_20       = 0x24c,
+	CTU_CAN_FD_TXTB3_DATA_1        = 0x300,
+	CTU_CAN_FD_TXTB3_DATA_2        = 0x304,
+	CTU_CAN_FD_TXTB3_DATA_20       = 0x34c,
+	CTU_CAN_FD_TXTB4_DATA_1        = 0x400,
+	CTU_CAN_FD_TXTB4_DATA_2        = 0x404,
+	CTU_CAN_FD_TXTB4_DATA_20       = 0x44c,
+};
+
+
+/* Register descriptions: */
+union ctu_can_fd_device_id_version {
+	uint32_t u32;
+	struct ctu_can_fd_device_id_version_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* DEVICE_ID */
+		uint32_t device_id              : 16;
+  /* VERSION */
+		uint32_t ver_minor               : 8;
+		uint32_t ver_major               : 8;
+#else
+		uint32_t ver_major               : 8;
+		uint32_t ver_minor               : 8;
+		uint32_t device_id              : 16;
+#endif
+	} s;
+};
+
+enum ctu_can_fd_device_id_device_id {
+	CTU_CAN_FD_ID    = 0xcafd,
+};
+
+union ctu_can_fd_mode_settings {
+	uint32_t u32;
+	struct ctu_can_fd_mode_settings_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* MODE */
+		uint32_t rst                     : 1;
+		uint32_t lom                     : 1;
+		uint32_t stm                     : 1;
+		uint32_t afm                     : 1;
+		uint32_t fde                     : 1;
+		uint32_t reserved_6_5            : 2;
+		uint32_t acf                     : 1;
+		uint32_t tstm                    : 1;
+		uint32_t reserved_15_9           : 7;
+  /* SETTINGS */
+		uint32_t rtrle                   : 1;
+		uint32_t rtrth                   : 4;
+		uint32_t ilbp                    : 1;
+		uint32_t ena                     : 1;
+		uint32_t nisofd                  : 1;
+		uint32_t pex                     : 1;
+		uint32_t reserved_31_25          : 7;
+#else
+		uint32_t reserved_31_25          : 7;
+		uint32_t pex                     : 1;
+		uint32_t nisofd                  : 1;
+		uint32_t ena                     : 1;
+		uint32_t ilbp                    : 1;
+		uint32_t rtrth                   : 4;
+		uint32_t rtrle                   : 1;
+		uint32_t reserved_15_9           : 7;
+		uint32_t tstm                    : 1;
+		uint32_t acf                     : 1;
+		uint32_t reserved_6_5            : 2;
+		uint32_t fde                     : 1;
+		uint32_t afm                     : 1;
+		uint32_t stm                     : 1;
+		uint32_t lom                     : 1;
+		uint32_t rst                     : 1;
+#endif
+	} s;
+};
+
+enum ctu_can_fd_mode_lom {
+	LOM_DISABLED       = 0x0,
+	LOM_ENABLED        = 0x1,
+};
+
+enum ctu_can_fd_mode_stm {
+	STM_DISABLED       = 0x0,
+	STM_ENABLED        = 0x1,
+};
+
+enum ctu_can_fd_mode_afm {
+	AFM_DISABLED       = 0x0,
+	AFM_ENABLED        = 0x1,
+};
+
+enum ctu_can_fd_mode_fde {
+	FDE_DISABLE       = 0x0,
+	FDE_ENABLE        = 0x1,
+};
+
+enum ctu_can_fd_mode_acf {
+	ACF_DISABLED       = 0x0,
+	ACF_ENABLED        = 0x1,
+};
+
+enum ctu_can_fd_settings_rtrle {
+	RTRLE_DISABLED       = 0x0,
+	RTRLE_ENABLED        = 0x1,
+};
+
+enum ctu_can_fd_settings_ilbp {
+	INT_LOOP_DISABLED       = 0x0,
+	INT_LOOP_ENABLED        = 0x1,
+};
+
+enum ctu_can_fd_settings_ena {
+	CTU_CAN_DISABLED       = 0x0,
+	CTU_CAN_ENABLED        = 0x1,
+};
+
+enum ctu_can_fd_settings_nisofd {
+	ISO_FD           = 0x0,
+	NON_ISO_FD       = 0x1,
+};
+
+enum ctu_can_fd_settings_pex {
+	PROTOCOL_EXCEPTION_DISABLED       = 0x0,
+	PROTOCOL_EXCEPTION_ENABLED        = 0x1,
+};
+
+union ctu_can_fd_status {
+	uint32_t u32;
+	struct ctu_can_fd_status_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* STATUS */
+		uint32_t rxne                    : 1;
+		uint32_t dor                     : 1;
+		uint32_t txnf                    : 1;
+		uint32_t eft                     : 1;
+		uint32_t rxs                     : 1;
+		uint32_t txs                     : 1;
+		uint32_t ewl                     : 1;
+		uint32_t idle                    : 1;
+		uint32_t reserved_31_8          : 24;
+#else
+		uint32_t reserved_31_8          : 24;
+		uint32_t idle                    : 1;
+		uint32_t ewl                     : 1;
+		uint32_t txs                     : 1;
+		uint32_t rxs                     : 1;
+		uint32_t eft                     : 1;
+		uint32_t txnf                    : 1;
+		uint32_t dor                     : 1;
+		uint32_t rxne                    : 1;
+#endif
+	} s;
+};
+
+union ctu_can_fd_command {
+	uint32_t u32;
+	struct ctu_can_fd_command_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+		uint32_t reserved_1_0            : 2;
+  /* COMMAND */
+		uint32_t rrb                     : 1;
+		uint32_t cdo                     : 1;
+		uint32_t ercrst                  : 1;
+		uint32_t rxfcrst                 : 1;
+		uint32_t txfcrst                 : 1;
+		uint32_t reserved_31_7          : 25;
+#else
+		uint32_t reserved_31_7          : 25;
+		uint32_t txfcrst                 : 1;
+		uint32_t rxfcrst                 : 1;
+		uint32_t ercrst                  : 1;
+		uint32_t cdo                     : 1;
+		uint32_t rrb                     : 1;
+		uint32_t reserved_1_0            : 2;
+#endif
+	} s;
+};
+
+union ctu_can_fd_int_stat {
+	uint32_t u32;
+	struct ctu_can_fd_int_stat_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* INT_STAT */
+		uint32_t rxi                     : 1;
+		uint32_t txi                     : 1;
+		uint32_t ewli                    : 1;
+		uint32_t doi                     : 1;
+		uint32_t fcsi                    : 1;
+		uint32_t ali                     : 1;
+		uint32_t bei                     : 1;
+		uint32_t ofi                     : 1;
+		uint32_t rxfi                    : 1;
+		uint32_t bsi                     : 1;
+		uint32_t rbnei                   : 1;
+		uint32_t txbhci                  : 1;
+		uint32_t reserved_31_12         : 20;
+#else
+		uint32_t reserved_31_12         : 20;
+		uint32_t txbhci                  : 1;
+		uint32_t rbnei                   : 1;
+		uint32_t bsi                     : 1;
+		uint32_t rxfi                    : 1;
+		uint32_t ofi                     : 1;
+		uint32_t bei                     : 1;
+		uint32_t ali                     : 1;
+		uint32_t fcsi                    : 1;
+		uint32_t doi                     : 1;
+		uint32_t ewli                    : 1;
+		uint32_t txi                     : 1;
+		uint32_t rxi                     : 1;
+#endif
+	} s;
+};
+
+union ctu_can_fd_int_ena_set {
+	uint32_t u32;
+	struct ctu_can_fd_int_ena_set_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* INT_ENA_SET */
+		uint32_t int_ena_set            : 12;
+		uint32_t reserved_31_12         : 20;
+#else
+		uint32_t reserved_31_12         : 20;
+		uint32_t int_ena_set            : 12;
+#endif
+	} s;
+};
+
+union ctu_can_fd_int_ena_clr {
+	uint32_t u32;
+	struct ctu_can_fd_int_ena_clr_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* INT_ENA_CLR */
+		uint32_t int_ena_clr            : 12;
+		uint32_t reserved_31_12         : 20;
+#else
+		uint32_t reserved_31_12         : 20;
+		uint32_t int_ena_clr            : 12;
+#endif
+	} s;
+};
+
+union ctu_can_fd_int_mask_set {
+	uint32_t u32;
+	struct ctu_can_fd_int_mask_set_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* INT_MASK_SET */
+		uint32_t int_mask_set           : 12;
+		uint32_t reserved_31_12         : 20;
+#else
+		uint32_t reserved_31_12         : 20;
+		uint32_t int_mask_set           : 12;
+#endif
+	} s;
+};
+
+union ctu_can_fd_int_mask_clr {
+	uint32_t u32;
+	struct ctu_can_fd_int_mask_clr_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* INT_MASK_CLR */
+		uint32_t int_mask_clr           : 12;
+		uint32_t reserved_31_12         : 20;
+#else
+		uint32_t reserved_31_12         : 20;
+		uint32_t int_mask_clr           : 12;
+#endif
+	} s;
+};
+
+union ctu_can_fd_btr {
+	uint32_t u32;
+	struct ctu_can_fd_btr_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* BTR */
+		uint32_t prop                    : 7;
+		uint32_t ph1                     : 6;
+		uint32_t ph2                     : 6;
+		uint32_t brp                     : 8;
+		uint32_t sjw                     : 5;
+#else
+		uint32_t sjw                     : 5;
+		uint32_t brp                     : 8;
+		uint32_t ph2                     : 6;
+		uint32_t ph1                     : 6;
+		uint32_t prop                    : 7;
+#endif
+	} s;
+};
+
+union ctu_can_fd_btr_fd {
+	uint32_t u32;
+	struct ctu_can_fd_btr_fd_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* BTR_FD */
+		uint32_t prop_fd                 : 6;
+		uint32_t reserved_6              : 1;
+		uint32_t ph1_fd                  : 5;
+		uint32_t reserved_12             : 1;
+		uint32_t ph2_fd                  : 5;
+		uint32_t reserved_18             : 1;
+		uint32_t brp_fd                  : 8;
+		uint32_t sjw_fd                  : 5;
+#else
+		uint32_t sjw_fd                  : 5;
+		uint32_t brp_fd                  : 8;
+		uint32_t reserved_18             : 1;
+		uint32_t ph2_fd                  : 5;
+		uint32_t reserved_12             : 1;
+		uint32_t ph1_fd                  : 5;
+		uint32_t reserved_6              : 1;
+		uint32_t prop_fd                 : 6;
+#endif
+	} s;
+};
+
+union ctu_can_fd_ewl_erp_fault_state {
+	uint32_t u32;
+	struct ctu_can_fd_ewl_erp_fault_state_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* EWL */
+		uint32_t ew_limit                : 8;
+  /* ERP */
+		uint32_t erp_limit               : 8;
+  /* FAULT_STATE */
+		uint32_t era                     : 1;
+		uint32_t erp                     : 1;
+		uint32_t bof                     : 1;
+		uint32_t reserved_31_19         : 13;
+#else
+		uint32_t reserved_31_19         : 13;
+		uint32_t bof                     : 1;
+		uint32_t erp                     : 1;
+		uint32_t era                     : 1;
+		uint32_t erp_limit               : 8;
+		uint32_t ew_limit                : 8;
+#endif
+	} s;
+};
+
+union ctu_can_fd_rec_tec {
+	uint32_t u32;
+	struct ctu_can_fd_rec_tec_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* REC */
+		uint32_t rec_val                 : 9;
+		uint32_t reserved_15_9           : 7;
+  /* TEC */
+		uint32_t tec_val                 : 9;
+		uint32_t reserved_31_25          : 7;
+#else
+		uint32_t reserved_31_25          : 7;
+		uint32_t tec_val                 : 9;
+		uint32_t reserved_15_9           : 7;
+		uint32_t rec_val                 : 9;
+#endif
+	} s;
+};
+
+union ctu_can_fd_err_norm_err_fd {
+	uint32_t u32;
+	struct ctu_can_fd_err_norm_err_fd_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* ERR_NORM */
+		uint32_t err_norm_val           : 16;
+  /* ERR_FD */
+		uint32_t err_fd_val             : 16;
+#else
+		uint32_t err_fd_val             : 16;
+		uint32_t err_norm_val           : 16;
+#endif
+	} s;
+};
+
+union ctu_can_fd_ctr_pres {
+	uint32_t u32;
+	struct ctu_can_fd_ctr_pres_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* CTR_PRES */
+		uint32_t ctpv                    : 9;
+		uint32_t ptx                     : 1;
+		uint32_t prx                     : 1;
+		uint32_t enorm                   : 1;
+		uint32_t efd                     : 1;
+		uint32_t reserved_31_13         : 19;
+#else
+		uint32_t reserved_31_13         : 19;
+		uint32_t efd                     : 1;
+		uint32_t enorm                   : 1;
+		uint32_t prx                     : 1;
+		uint32_t ptx                     : 1;
+		uint32_t ctpv                    : 9;
+#endif
+	} s;
+};
+
+union ctu_can_fd_filter_a_mask {
+	uint32_t u32;
+	struct ctu_can_fd_filter_a_mask_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* FILTER_A_MASK */
+		uint32_t bit_mask_a_val         : 29;
+		uint32_t reserved_31_29          : 3;
+#else
+		uint32_t reserved_31_29          : 3;
+		uint32_t bit_mask_a_val         : 29;
+#endif
+	} s;
+};
+
+union ctu_can_fd_filter_a_val {
+	uint32_t u32;
+	struct ctu_can_fd_filter_a_val_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* FILTER_A_VAL */
+		uint32_t bit_val_a_val          : 29;
+		uint32_t reserved_31_29          : 3;
+#else
+		uint32_t reserved_31_29          : 3;
+		uint32_t bit_val_a_val          : 29;
+#endif
+	} s;
+};
+
+union ctu_can_fd_filter_b_mask {
+	uint32_t u32;
+	struct ctu_can_fd_filter_b_mask_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* FILTER_B_MASK */
+		uint32_t bit_mask_b_val         : 29;
+		uint32_t reserved_31_29          : 3;
+#else
+		uint32_t reserved_31_29          : 3;
+		uint32_t bit_mask_b_val         : 29;
+#endif
+	} s;
+};
+
+union ctu_can_fd_filter_b_val {
+	uint32_t u32;
+	struct ctu_can_fd_filter_b_val_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* FILTER_B_VAL */
+		uint32_t bit_val_b_val          : 29;
+		uint32_t reserved_31_29          : 3;
+#else
+		uint32_t reserved_31_29          : 3;
+		uint32_t bit_val_b_val          : 29;
+#endif
+	} s;
+};
+
+union ctu_can_fd_filter_c_mask {
+	uint32_t u32;
+	struct ctu_can_fd_filter_c_mask_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* FILTER_C_MASK */
+		uint32_t bit_mask_c_val         : 29;
+		uint32_t reserved_31_29          : 3;
+#else
+		uint32_t reserved_31_29          : 3;
+		uint32_t bit_mask_c_val         : 29;
+#endif
+	} s;
+};
+
+union ctu_can_fd_filter_c_val {
+	uint32_t u32;
+	struct ctu_can_fd_filter_c_val_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* FILTER_C_VAL */
+		uint32_t bit_val_c_val          : 29;
+		uint32_t reserved_31_29          : 3;
+#else
+		uint32_t reserved_31_29          : 3;
+		uint32_t bit_val_c_val          : 29;
+#endif
+	} s;
+};
+
+union ctu_can_fd_filter_ran_low {
+	uint32_t u32;
+	struct ctu_can_fd_filter_ran_low_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* FILTER_RAN_LOW */
+		uint32_t bit_ran_low_val        : 29;
+		uint32_t reserved_31_29          : 3;
+#else
+		uint32_t reserved_31_29          : 3;
+		uint32_t bit_ran_low_val        : 29;
+#endif
+	} s;
+};
+
+union ctu_can_fd_filter_ran_high {
+	uint32_t u32;
+	struct ctu_can_fd_filter_ran_high_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* FILTER_RAN_HIGH */
+		uint32_t bit_ran_high_val       : 29;
+		uint32_t reserved_31_29          : 3;
+#else
+		uint32_t reserved_31_29          : 3;
+		uint32_t bit_ran_high_val       : 29;
+#endif
+	} s;
+};
+
+union ctu_can_fd_filter_control_filter_status {
+	uint32_t u32;
+	struct ctu_can_fd_filter_control_filter_status_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* FILTER_CONTROL */
+		uint32_t fanb                    : 1;
+		uint32_t fane                    : 1;
+		uint32_t fafb                    : 1;
+		uint32_t fafe                    : 1;
+		uint32_t fbnb                    : 1;
+		uint32_t fbne                    : 1;
+		uint32_t fbfb                    : 1;
+		uint32_t fbfe                    : 1;
+		uint32_t fcnb                    : 1;
+		uint32_t fcne                    : 1;
+		uint32_t fcfb                    : 1;
+		uint32_t fcfe                    : 1;
+		uint32_t frnb                    : 1;
+		uint32_t frne                    : 1;
+		uint32_t frfb                    : 1;
+		uint32_t frfe                    : 1;
+  /* FILTER_STATUS */
+		uint32_t sfa                     : 1;
+		uint32_t sfb                     : 1;
+		uint32_t sfc                     : 1;
+		uint32_t sfr                     : 1;
+		uint32_t reserved_31_20         : 12;
+#else
+		uint32_t reserved_31_20         : 12;
+		uint32_t sfr                     : 1;
+		uint32_t sfc                     : 1;
+		uint32_t sfb                     : 1;
+		uint32_t sfa                     : 1;
+		uint32_t frfe                    : 1;
+		uint32_t frfb                    : 1;
+		uint32_t frne                    : 1;
+		uint32_t frnb                    : 1;
+		uint32_t fcfe                    : 1;
+		uint32_t fcfb                    : 1;
+		uint32_t fcne                    : 1;
+		uint32_t fcnb                    : 1;
+		uint32_t fbfe                    : 1;
+		uint32_t fbfb                    : 1;
+		uint32_t fbne                    : 1;
+		uint32_t fbnb                    : 1;
+		uint32_t fafe                    : 1;
+		uint32_t fafb                    : 1;
+		uint32_t fane                    : 1;
+		uint32_t fanb                    : 1;
+#endif
+	} s;
+};
+
+union ctu_can_fd_rx_mem_info {
+	uint32_t u32;
+	struct ctu_can_fd_rx_mem_info_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* RX_MEM_INFO */
+		uint32_t rx_buff_size           : 13;
+		uint32_t reserved_15_13          : 3;
+		uint32_t rx_mem_free            : 13;
+		uint32_t reserved_31_29          : 3;
+#else
+		uint32_t reserved_31_29          : 3;
+		uint32_t rx_mem_free            : 13;
+		uint32_t reserved_15_13          : 3;
+		uint32_t rx_buff_size           : 13;
+#endif
+	} s;
+};
+
+union ctu_can_fd_rx_pointers {
+	uint32_t u32;
+	struct ctu_can_fd_rx_pointers_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* RX_POINTERS */
+		uint32_t rx_wpp                 : 12;
+		uint32_t reserved_15_12          : 4;
+		uint32_t rx_rpp                 : 12;
+		uint32_t reserved_31_28          : 4;
+#else
+		uint32_t reserved_31_28          : 4;
+		uint32_t rx_rpp                 : 12;
+		uint32_t reserved_15_12          : 4;
+		uint32_t rx_wpp                 : 12;
+#endif
+	} s;
+};
+
+union ctu_can_fd_rx_status_rx_settings {
+	uint32_t u32;
+	struct ctu_can_fd_rx_status_rx_settings_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* RX_STATUS */
+		uint32_t rxe                     : 1;
+		uint32_t rxf                     : 1;
+		uint32_t reserved_3_2            : 2;
+		uint32_t rxfrc                  : 11;
+		uint32_t reserved_15             : 1;
+  /* RX_SETTINGS */
+		uint32_t rtsop                   : 1;
+		uint32_t reserved_31_17         : 15;
+#else
+		uint32_t reserved_31_17         : 15;
+		uint32_t rtsop                   : 1;
+		uint32_t reserved_15             : 1;
+		uint32_t rxfrc                  : 11;
+		uint32_t reserved_3_2            : 2;
+		uint32_t rxf                     : 1;
+		uint32_t rxe                     : 1;
+#endif
+	} s;
+};
+
+enum ctu_can_fd_rx_settings_rtsop {
+	RTS_END       = 0x0,
+	RTS_BEG       = 0x1,
+};
+
+union ctu_can_fd_rx_data {
+	uint32_t u32;
+	struct ctu_can_fd_rx_data_s {
+  /* RX_DATA */
+		uint32_t rx_data                : 32;
+	} s;
+};
+
+union ctu_can_fd_tx_status {
+	uint32_t u32;
+	struct ctu_can_fd_tx_status_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* TX_STATUS */
+		uint32_t tx1s                    : 4;
+		uint32_t tx2s                    : 4;
+		uint32_t tx3s                    : 4;
+		uint32_t tx4s                    : 4;
+		uint32_t reserved_31_16         : 16;
+#else
+		uint32_t reserved_31_16         : 16;
+		uint32_t tx4s                    : 4;
+		uint32_t tx3s                    : 4;
+		uint32_t tx2s                    : 4;
+		uint32_t tx1s                    : 4;
+#endif
+	} s;
+};
+
+enum ctu_can_fd_tx_status_tx1s {
+	TXT_RDY        = 0x1,
+	TXT_TRAN       = 0x2,
+	TXT_ABTP       = 0x3,
+	TXT_TOK        = 0x4,
+	TXT_ERR        = 0x6,
+	TXT_ABT        = 0x7,
+	TXT_ETY        = 0x8,
+};
+
+union ctu_can_fd_tx_command {
+	uint32_t u32;
+	struct ctu_can_fd_tx_command_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* TX_COMMAND */
+		uint32_t txce                    : 1;
+		uint32_t txcr                    : 1;
+		uint32_t txca                    : 1;
+		uint32_t reserved_7_3            : 5;
+		uint32_t txb1                    : 1;
+		uint32_t txb2                    : 1;
+		uint32_t txb3                    : 1;
+		uint32_t txb4                    : 1;
+		uint32_t reserved_31_12         : 20;
+#else
+		uint32_t reserved_31_12         : 20;
+		uint32_t txb4                    : 1;
+		uint32_t txb3                    : 1;
+		uint32_t txb2                    : 1;
+		uint32_t txb1                    : 1;
+		uint32_t reserved_7_3            : 5;
+		uint32_t txca                    : 1;
+		uint32_t txcr                    : 1;
+		uint32_t txce                    : 1;
+#endif
+	} s;
+};
+
+union ctu_can_fd_tx_priority {
+	uint32_t u32;
+	struct ctu_can_fd_tx_priority_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* TX_PRIORITY */
+		uint32_t txt1p                   : 3;
+		uint32_t reserved_3              : 1;
+		uint32_t txt2p                   : 3;
+		uint32_t reserved_7              : 1;
+		uint32_t txt3p                   : 3;
+		uint32_t reserved_11             : 1;
+		uint32_t txt4p                   : 3;
+		uint32_t reserved_31_15         : 17;
+#else
+		uint32_t reserved_31_15         : 17;
+		uint32_t txt4p                   : 3;
+		uint32_t reserved_11             : 1;
+		uint32_t txt3p                   : 3;
+		uint32_t reserved_7              : 1;
+		uint32_t txt2p                   : 3;
+		uint32_t reserved_3              : 1;
+		uint32_t txt1p                   : 3;
+#endif
+	} s;
+};
+
+union ctu_can_fd_err_capt_alc {
+	uint32_t u32;
+	struct ctu_can_fd_err_capt_alc_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* ERR_CAPT */
+		uint32_t err_pos                 : 5;
+		uint32_t err_type                : 3;
+		uint32_t reserved_15_8           : 8;
+  /* ALC */
+		uint32_t alc_bit                 : 5;
+		uint32_t alc_id_field            : 3;
+		uint32_t reserved_31_24          : 8;
+#else
+		uint32_t reserved_31_24          : 8;
+		uint32_t alc_id_field            : 3;
+		uint32_t alc_bit                 : 5;
+		uint32_t reserved_15_8           : 8;
+		uint32_t err_type                : 3;
+		uint32_t err_pos                 : 5;
+#endif
+	} s;
+};
+
+enum ctu_can_fd_err_capt_err_pos {
+	ERC_POS_SOF         = 0x0,
+	ERC_POS_ARB         = 0x1,
+	ERC_POS_CTRL        = 0x2,
+	ERC_POS_DATA        = 0x3,
+	ERC_POS_CRC         = 0x4,
+	ERC_POS_ACK         = 0x5,
+	ERC_POS_EOF         = 0x6,
+	ERC_POS_ERR         = 0x7,
+	ERC_POS_OVRL        = 0x8,
+	ERC_POS_OTHER      = 0x1f,
+};
+
+enum ctu_can_fd_err_capt_err_type {
+	ERC_BIT_ERR        = 0x0,
+	ERC_CRC_ERR        = 0x1,
+	ERC_FRM_ERR        = 0x2,
+	ERC_ACK_ERR        = 0x3,
+	ERC_STUF_ERR       = 0x4,
+};
+
+enum ctu_can_fd_alc_alc_id_field {
+	ALC_RSVD            = 0x0,
+	ALC_BASE_ID         = 0x1,
+	ALC_SRR_RTR         = 0x2,
+	ALC_IDE             = 0x3,
+	ALC_EXTENSION       = 0x4,
+	ALC_RTR             = 0x5,
+};
+
+union ctu_can_fd_trv_delay_ssp_cfg {
+	uint32_t u32;
+	struct ctu_can_fd_trv_delay_ssp_cfg_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* TRV_DELAY */
+		uint32_t trv_delay_value         : 7;
+		uint32_t reserved_15_7           : 9;
+  /* SSP_CFG */
+		uint32_t ssp_offset              : 8;
+		uint32_t ssp_src                 : 2;
+		uint32_t reserved_31_26          : 6;
+#else
+		uint32_t reserved_31_26          : 6;
+		uint32_t ssp_src                 : 2;
+		uint32_t ssp_offset              : 8;
+		uint32_t reserved_15_7           : 9;
+		uint32_t trv_delay_value         : 7;
+#endif
+	} s;
+};
+
+enum ctu_can_fd_ssp_cfg_ssp_src {
+	SSP_SRC_MEAS_N_OFFSET       = 0x0,
+	SSP_SRC_NO_SSP              = 0x1,
+	SSP_SRC_OFFSET              = 0x2,
+};
+
+union ctu_can_fd_rx_fr_ctr {
+	uint32_t u32;
+	struct ctu_can_fd_rx_fr_ctr_s {
+  /* RX_FR_CTR */
+		uint32_t rx_fr_ctr_val          : 32;
+	} s;
+};
+
+union ctu_can_fd_tx_fr_ctr {
+	uint32_t u32;
+	struct ctu_can_fd_tx_fr_ctr_s {
+  /* TX_FR_CTR */
+		uint32_t tx_fr_ctr_val          : 32;
+	} s;
+};
+
+union ctu_can_fd_debug_register {
+	uint32_t u32;
+	struct ctu_can_fd_debug_register_s {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+  /* DEBUG_REGISTER */
+		uint32_t stuff_count             : 3;
+		uint32_t destuff_count           : 3;
+		uint32_t pc_arb                  : 1;
+		uint32_t pc_con                  : 1;
+		uint32_t pc_dat                  : 1;
+		uint32_t pc_stc                  : 1;
+		uint32_t pc_crc                  : 1;
+		uint32_t pc_crcd                 : 1;
+		uint32_t pc_ack                  : 1;
+		uint32_t pc_ackd                 : 1;
+		uint32_t pc_eof                  : 1;
+		uint32_t pc_int                  : 1;
+		uint32_t pc_susp                 : 1;
+		uint32_t pc_ovr                  : 1;
+		uint32_t pc_sof                  : 1;
+		uint32_t reserved_31_19         : 13;
+#else
+		uint32_t reserved_31_19         : 13;
+		uint32_t pc_sof                  : 1;
+		uint32_t pc_ovr                  : 1;
+		uint32_t pc_susp                 : 1;
+		uint32_t pc_int                  : 1;
+		uint32_t pc_eof                  : 1;
+		uint32_t pc_ackd                 : 1;
+		uint32_t pc_ack                  : 1;
+		uint32_t pc_crcd                 : 1;
+		uint32_t pc_crc                  : 1;
+		uint32_t pc_stc                  : 1;
+		uint32_t pc_dat                  : 1;
+		uint32_t pc_con                  : 1;
+		uint32_t pc_arb                  : 1;
+		uint32_t destuff_count           : 3;
+		uint32_t stuff_count             : 3;
+#endif
+	} s;
+};
+
+union ctu_can_fd_yolo_reg {
+	uint32_t u32;
+	struct ctu_can_fd_yolo_reg_s {
+  /* YOLO_REG */
+		uint32_t yolo_val               : 32;
+	} s;
+};
+
+union ctu_can_fd_timestamp_low {
+	uint32_t u32;
+	struct ctu_can_fd_timestamp_low_s {
+  /* TIMESTAMP_LOW */
+		uint32_t timestamp_low          : 32;
+	} s;
+};
+
+union ctu_can_fd_timestamp_high {
+	uint32_t u32;
+	struct ctu_can_fd_timestamp_high_s {
+  /* TIMESTAMP_HIGH */
+		uint32_t timestamp_high         : 32;
+	} s;
+};
+
+#endif
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v1 5/6] hw/net/can: CTU CAN FD IP open hardware core emulation.
  2020-07-14 12:20 [PATCH v1 0/6] CTU CAN FD core support pisa
                   ` (3 preceding siblings ...)
  2020-07-14 12:20 ` [PATCH v1 4/6] hw/net/can/ctucafd: Add CTU CAN FD core register definitions pisa
@ 2020-07-14 12:20 ` pisa
  2020-07-24  9:46   ` Pavel Pisa
  2020-07-14 12:20 ` [PATCH v1 6/6] hw/net/can: Documentation for " pisa
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: pisa @ 2020-07-14 12:20 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini
  Cc: Marek Vasut, Oliver Hartkopp, Jiri Novak, Stefan Hajnoczi,
	Deniz Eren, Markus Armbruster, Oleksij Rempel, Konrad Frederic,
	Jan Charvat, Jan Kiszka, Ondrej Ille, Pavel Pisa

From: Jan Charvat <charvj10@fel.cvut.cz>

The implementation of the model of complete open-source/design/hardware
CAN FD controller. The IP core project has been started and is maintained
by Ondrej Ille at Czech Technical University in Prague.

CTU CAN FD project pages:
	https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core

CAN bus CTU FEE Projects Listing page:
	http://canbus.pages.fel.cvut.cz/

The core is mapped to PCIe card same as on one of its real hardware
adaptations. The device implementing two CTU CAN FD ip cores
is instantiated after CAN bus definition

	-object can-bus,id=canbus0-bus

by QEMU parameters

	-device ctucan_pci,canbus0=canbus0-bus,canbus1=canbus0-bus

Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
---
 hw/net/can/Makefile.objs |   3 +
 hw/net/can/ctucan_core.c | 691 +++++++++++++++++++++++++++++++++++++++
 hw/net/can/ctucan_core.h | 127 +++++++
 hw/net/can/ctucan_pci.c  | 281 ++++++++++++++++
 4 files changed, 1102 insertions(+)
 create mode 100644 hw/net/can/ctucan_core.c
 create mode 100644 hw/net/can/ctucan_core.h
 create mode 100644 hw/net/can/ctucan_pci.c

diff --git a/hw/net/can/Makefile.objs b/hw/net/can/Makefile.objs
index 9f0c4ee332..8945576a22 100644
--- a/hw/net/can/Makefile.objs
+++ b/hw/net/can/Makefile.objs
@@ -2,3 +2,6 @@ common-obj-$(CONFIG_CAN_SJA1000) += can_sja1000.o
 common-obj-$(CONFIG_CAN_PCI) += can_kvaser_pci.o
 common-obj-$(CONFIG_CAN_PCI) += can_pcm3680_pci.o
 common-obj-$(CONFIG_CAN_PCI) += can_mioe3680_pci.o
+
+common-obj-$(CONFIG_CAN_PCI) += ctucan_core.o
+common-obj-$(CONFIG_CAN_PCI) += ctucan_pci.o
diff --git a/hw/net/can/ctucan_core.c b/hw/net/can/ctucan_core.c
new file mode 100644
index 0000000000..f260646777
--- /dev/null
+++ b/hw/net/can/ctucan_core.c
@@ -0,0 +1,691 @@
+/*
+ * CTU CAN FD PCI device emulation
+ * http://canbus.pages.fel.cvut.cz/
+ *
+ * Copyright (c) 2019 Jan Charvat (jancharvat.charvat@gmail.com)
+ *
+ * Based on Kvaser PCI CAN device (SJA1000 based) emulation implemented by
+ * Jin Yang and Pavel Pisa
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/log.h"
+#include "chardev/char.h"
+#include "hw/irq.h"
+#include "migration/vmstate.h"
+#include "net/can_emu.h"
+
+#include "ctucan_core.h"
+
+#ifndef DEBUG_CAN
+#define DEBUG_CAN 0
+#endif /*DEBUG_CAN*/
+
+#define DPRINTF(fmt, ...) \
+    do { \
+        if (DEBUG_CAN) { \
+            qemu_log("[ctucan]: " fmt , ## __VA_ARGS__); \
+        } \
+    } while (0)
+
+static void ctucan_buff2frame(const uint8_t *buff, qemu_can_frame *frame)
+{
+    frame->can_id = 0;
+    frame->can_dlc = 0;
+    frame->flags = 0;
+
+    if (buff == NULL) {
+        return;
+    }
+    {
+        union ctu_can_fd_frame_form_w frame_form_w;
+        union ctu_can_fd_identifier_w identifier_w;
+        unsigned int ide;
+
+        frame_form_w = *(union ctu_can_fd_frame_form_w *) buff;
+        frame->can_dlc = can_dlc2len(frame_form_w.s.dlc);
+
+        identifier_w = *(union ctu_can_fd_identifier_w *) (buff + 4);
+
+        ide = frame_form_w.s.ide;
+        if (ide) {
+            frame->can_id = (identifier_w.s.identifier_base << 18) |
+                            identifier_w.s.identifier_ext;
+            frame->can_id |= QEMU_CAN_EFF_FLAG;
+        } else {
+            frame->can_id = identifier_w.s.identifier_base;
+        }
+
+        if (frame_form_w.s.esi_rsv) {
+            frame->flags |= QEMU_CAN_FRMF_ESI;
+        }
+
+        if (frame_form_w.s.rtr) {
+            frame->can_id |= QEMU_CAN_RTR_FLAG;
+        }
+
+        if (frame_form_w.s.fdf) {   /*CAN FD*/
+            frame->flags |= QEMU_CAN_FRMF_TYPE_FD;
+            if (frame_form_w.s.brs) {
+                frame->flags |= QEMU_CAN_FRMF_BRS;
+            }
+        }
+    }
+
+    memcpy(frame->data, buff + 0x10, 0x40);
+}
+
+
+static int ctucan_frame2buff(const qemu_can_frame *frame, uint8_t *buff)
+{
+    unsigned int bytes_cnt = -1;
+    memset(buff, 0, CTUCAN_MSG_MAX_LEN * sizeof(*buff));
+
+    if (frame == NULL) {
+        return bytes_cnt;
+    }
+    {
+        union ctu_can_fd_frame_form_w *frame_form_w;
+        union ctu_can_fd_identifier_w *identifier_w;
+        frame_form_w = (union ctu_can_fd_frame_form_w *) buff;
+        identifier_w = (union ctu_can_fd_identifier_w *) (buff + 4);
+
+        frame_form_w->u32 = 0;
+        identifier_w->u32 = 0;
+
+        bytes_cnt = frame->can_dlc;
+        bytes_cnt = (bytes_cnt + 3) & ~3;
+        bytes_cnt += 16;
+        frame_form_w->s.rwcnt = (bytes_cnt >> 2) - 1;
+
+        frame_form_w->s.dlc = can_len2dlc(frame->can_dlc);
+
+        if (frame->can_id & QEMU_CAN_EFF_FLAG) {
+            frame_form_w->s.ide = 1;
+            identifier_w->s.identifier_base =
+                                    (frame->can_id & 0x1FFC0000) >> 18;
+            identifier_w->s.identifier_ext = frame->can_id & 0x3FFFF;
+        } else {
+            identifier_w->s.identifier_base = frame->can_id & 0x7FF;
+        }
+
+        if (frame->flags & QEMU_CAN_FRMF_ESI) {
+            frame_form_w->s.esi_rsv = 1;
+        }
+
+        if (frame->can_id & QEMU_CAN_RTR_FLAG) {
+            frame_form_w->s.rtr = 1;
+        }
+
+        if (frame->flags & QEMU_CAN_FRMF_TYPE_FD) {  /*CAN FD*/
+           frame_form_w->s.fdf = 1;
+            if (frame->flags & QEMU_CAN_FRMF_BRS) {
+                frame_form_w->s.brs = 1;
+            }
+        }
+    }
+
+    memcpy(buff + 0x10, frame->data, 0x40);
+
+    return bytes_cnt;
+}
+
+static void ctucan_update_irq(CtuCanCoreState *s)
+{
+    union ctu_can_fd_int_stat int_rq;
+
+    int_rq.u32 = 0;
+
+    if (s->rx_status_rx_settings.s.rxfrc) {
+        int_rq.s.rbnei = 1;
+    }
+
+    int_rq.u32 &= ~s->int_mask.u32;
+    s->int_stat.u32 |= int_rq.u32;
+    if (s->int_stat.u32 & s->int_ena.u32) {
+        qemu_irq_raise(s->irq);
+    } else {
+        qemu_irq_lower(s->irq);
+    }
+}
+
+static void ctucan_update_txnf(CtuCanCoreState *s)
+{
+    int i;
+    int txnf;
+    unsigned int buff_st;
+
+    txnf = 0;
+
+    for (i = 0; i < CTUCAN_CORE_TXBUF_NUM; i++) {
+        buff_st = (s->tx_status.u32 >> (i * 4)) & 0xf;
+        if (buff_st == TXT_ETY) {
+            txnf = 1;
+        }
+    }
+    s->status.s.txnf = txnf;
+}
+
+void ctucan_hardware_reset(CtuCanCoreState *s)
+{
+    DPRINTF("Hardware reset in progress!!!\n");
+    int i;
+    unsigned int buff_st;
+    uint32_t buff_st_mask;
+
+    s->tx_status.u32 = 0;
+    for (i = 0; i < CTUCAN_CORE_TXBUF_NUM; i++) {
+        buff_st_mask = 0xf << (i * 4);
+        buff_st = TXT_ETY;
+        s->tx_status.u32 = (s->tx_status.u32 & ~buff_st_mask) |
+            (buff_st << (i * 4));
+    }
+    s->status.s.idle = 1;
+
+    ctucan_update_txnf(s);
+
+    s->rx_status_rx_settings.u32 = 0;
+    s->rx_tail_pos = 0;
+    s->rx_cnt = 0;
+    s->rx_frame_rem = 0;
+
+    /* Flush RX buffer */
+    s->rx_tail_pos = 0;
+    s->rx_cnt = 0;
+    s->rx_frame_rem = 0;
+
+    /* Set on progdokum reset value */
+    s->mode_settings.u32 = 0;
+    s->mode_settings.s.fde = 1;
+
+    s->int_stat.u32 = 0;
+    s->int_ena.u32 = 0;
+    s->int_mask.u32 = 0;
+
+    s->rx_status_rx_settings.u32 = 0;
+    s->rx_status_rx_settings.s.rxe = 0;
+
+    s->rx_fr_ctr.u32 = 0;
+    s->tx_fr_ctr.u32 = 0;
+
+    s->yolo_reg.s.yolo_val = 3735928559;
+
+    qemu_irq_lower(s->irq);
+}
+
+static void ctucan_send_ready_buffers(CtuCanCoreState *s)
+{
+    qemu_can_frame frame;
+    uint8_t *pf;
+    int buff2tx_idx;
+    uint32_t tx_prio_max;
+    unsigned int buff_st;
+    uint32_t buff_st_mask;
+
+    if (!s->mode_settings.s.ena) {
+        return;
+    }
+
+    do {
+        union ctu_can_fd_int_stat int_stat;
+        int i;
+        buff2tx_idx = -1;
+        tx_prio_max = 0;
+
+        for (i = 0; i < CTUCAN_CORE_TXBUF_NUM; i++) {
+            uint32_t prio;
+
+            buff_st_mask = 0xf << (i * 4);
+            buff_st = (s->tx_status.u32 >> (i * 4)) & 0xf;
+
+            if (buff_st != TXT_RDY) {
+                continue;
+            }
+            prio = (s->tx_priority.u32 >> (i * 4)) & 0x7;
+            if (tx_prio_max < prio) {
+                tx_prio_max = prio;
+                buff2tx_idx = i;
+            }
+        }
+        if (buff2tx_idx == -1) {
+            break;
+        }
+        buff_st_mask = 0xf << (buff2tx_idx * 4);
+        buff_st = (s->tx_status.u32 >> (buff2tx_idx * 4)) & 0xf;
+        int_stat.u32 = 0;
+        buff_st = TXT_RDY;
+        pf = s->tx_buffer[buff2tx_idx].data;
+        ctucan_buff2frame(pf, &frame);
+        s->status.s.idle = 0;
+        s->status.s.txs = 1;
+        can_bus_client_send(&s->bus_client, &frame, 1);
+        s->status.s.idle = 1;
+        s->status.s.txs = 0;
+        s->tx_fr_ctr.s.tx_fr_ctr_val++;
+        buff_st = TXT_TOK;
+        int_stat.s.txi = 1;
+        int_stat.s.txbhci = 1;
+        s->int_stat.u32 |= int_stat.u32 & ~s->int_mask.u32;
+        s->tx_status.u32 = (s->tx_status.u32 & ~buff_st_mask) |
+                        (buff_st << (buff2tx_idx * 4));
+    } while (1);
+}
+
+#define CTUCAN_CORE_TXBUFF_SPAN \
+            (CTU_CAN_FD_TXTB2_DATA_1 - CTU_CAN_FD_TXTB1_DATA_1)
+
+void ctucan_mem_write(CtuCanCoreState *s, hwaddr addr, uint64_t val,
+                       unsigned size)
+{
+    int              i;
+
+    DPRINTF("write 0x%02llx addr 0x%02x\n",
+            (unsigned long long)val, (unsigned int)addr);
+
+    if (addr > CTUCAN_CORE_MEM_SIZE) {
+        return;
+    }
+
+    if (addr >= CTU_CAN_FD_TXTB1_DATA_1) {
+        int buff_num;
+        addr -= CTU_CAN_FD_TXTB1_DATA_1;
+        buff_num = addr / CTUCAN_CORE_TXBUFF_SPAN;
+        addr %= CTUCAN_CORE_TXBUFF_SPAN;
+        if (buff_num < CTUCAN_CORE_TXBUF_NUM) {
+            *(uint32_t *)(s->tx_buffer[buff_num].data + addr) = val;
+        }
+    } else {
+        switch (addr & ~3) {
+        case CTU_CAN_FD_MODE:
+            s->mode_settings.u32 = (uint32_t)val;
+            if (s->mode_settings.s.rst) {
+                ctucan_hardware_reset(s);
+                s->mode_settings.s.rst = 0;
+            }
+            break;
+        case CTU_CAN_FD_COMMAND:
+        {
+            union ctu_can_fd_command command;
+            command.u32 = (uint32_t)val;
+            if (command.s.cdo) {
+                s->status.s.dor = 0;
+            }
+            if (command.s.rrb) {
+                s->rx_tail_pos = 0;
+                s->rx_cnt = 0;
+                s->rx_frame_rem = 0;
+                s->rx_status_rx_settings.s.rxfrc = 0;
+            }
+            if (command.s.txfcrst) {
+                s->tx_fr_ctr.s.tx_fr_ctr_val = 0;
+            }
+            if (command.s.rxfcrst) {
+                s->rx_fr_ctr.s.rx_fr_ctr_val = 0;
+            }
+            break;
+        }
+        case CTU_CAN_FD_INT_STAT:
+            s->int_stat.u32 &= ~(uint32_t)val;
+            break;
+        case CTU_CAN_FD_INT_ENA_SET:
+            s->int_ena.u32 |= (uint32_t)val;
+            break;
+        case CTU_CAN_FD_INT_ENA_CLR:
+            s->int_ena.u32 &= ~(uint32_t)val;
+            break;
+        case CTU_CAN_FD_INT_MASK_SET:
+            s->int_mask.u32 |= (uint32_t)val;
+            break;
+        case CTU_CAN_FD_INT_MASK_CLR:
+            s->int_mask.u32 &= ~(uint32_t)val;
+            break;
+        case CTU_CAN_FD_TX_COMMAND:
+            if (s->mode_settings.s.ena) {
+                union ctu_can_fd_tx_command tx_command;
+                union ctu_can_fd_tx_command mask;
+                unsigned int buff_st;
+                uint32_t buff_st_mask;
+
+                tx_command.u32 = (uint32_t)val;
+                mask.u32 = 0;
+                mask.s.txb1 = 1;
+
+                for (i = 0; i < CTUCAN_CORE_TXBUF_NUM; i++) {
+                    if (!(tx_command.u32 & (mask.u32 << i))) {
+                        continue;
+                    }
+                    buff_st_mask = 0xf << (i * 4);
+                    buff_st = (s->tx_status.u32 >> (i * 4)) & 0xf;
+                    if (tx_command.s.txca) {
+                        if (buff_st == TXT_RDY) {
+                            buff_st = TXT_ABT;
+                        }
+                    }
+                    if (tx_command.s.txcr) {
+                        if ((buff_st == TXT_TOK) || (buff_st == TXT_ERR) ||
+                            (buff_st == TXT_ABT) || (buff_st == TXT_ETY))
+                            buff_st = TXT_RDY;
+                    }
+                    if (tx_command.s.txce) {
+                        if ((buff_st == TXT_TOK) || (buff_st == TXT_ERR) ||
+                            (buff_st == TXT_ABT))
+                            buff_st = TXT_ETY;
+                    }
+                    s->tx_status.u32 = (s->tx_status.u32 & ~buff_st_mask) |
+                                        (buff_st << (i * 4));
+                }
+
+                ctucan_send_ready_buffers(s);
+                ctucan_update_txnf(s);
+            }
+            break;
+        case CTU_CAN_FD_TX_PRIORITY:
+            s->tx_priority.u32 = (uint32_t)val;
+            break;
+        }
+
+        ctucan_update_irq(s);
+    }
+
+    return;
+}
+
+uint64_t ctucan_mem_read(CtuCanCoreState *s, hwaddr addr, unsigned size)
+{
+    uint32_t val = 0;
+
+    DPRINTF("read addr 0x%02x ...\n", (unsigned int)addr);
+
+    if (addr > CTUCAN_CORE_MEM_SIZE) {
+        return 0;
+    }
+
+    switch (addr & ~3) {
+    case CTU_CAN_FD_DEVICE_ID:
+        {
+            union ctu_can_fd_device_id_version idver;
+            idver.u32 = 0;
+            idver.s.device_id = CTU_CAN_FD_ID;
+            idver.s.ver_major = 2;
+            idver.s.ver_minor = 2;
+            val = idver.u32;
+        }
+        break;
+    case CTU_CAN_FD_MODE:
+        val = s->mode_settings.u32;
+        break;
+    case CTU_CAN_FD_STATUS:
+        val = s->status.u32;
+        break;
+    case CTU_CAN_FD_INT_STAT:
+        val = s->int_stat.u32;
+        break;
+    case CTU_CAN_FD_INT_ENA_SET:
+    case CTU_CAN_FD_INT_ENA_CLR:
+        val = s->int_ena.u32;
+        break;
+    case CTU_CAN_FD_INT_MASK_SET:
+    case CTU_CAN_FD_INT_MASK_CLR:
+        val = s->int_mask.u32;
+        break;
+    case CTU_CAN_FD_RX_MEM_INFO:
+        s->rx_mem_info.u32 = 0;
+        s->rx_mem_info.s.rx_buff_size = CTUCAN_RCV_BUF_LEN >> 2;
+        s->rx_mem_info.s.rx_mem_free = (CTUCAN_RCV_BUF_LEN -
+                                        s->rx_cnt) >> 2;
+        val = s->rx_mem_info.u32;
+        break;
+    case CTU_CAN_FD_RX_POINTERS:
+    {
+        uint32_t rx_head_pos = s->rx_tail_pos + s->rx_cnt;
+        rx_head_pos %= CTUCAN_RCV_BUF_LEN;
+        s->rx_pointers.s.rx_wpp = rx_head_pos;
+        s->rx_pointers.s.rx_rpp = s->rx_tail_pos;
+        val = s->rx_pointers.u32;
+        break;
+    }
+    case CTU_CAN_FD_RX_STATUS:
+    case CTU_CAN_FD_RX_SETTINGS:
+        if (!s->rx_status_rx_settings.s.rxfrc) {
+            s->rx_status_rx_settings.s.rxe = 1;
+        } else {
+            s->rx_status_rx_settings.s.rxe = 0;
+        }
+        if (((s->rx_cnt + 3) & ~3) == CTUCAN_RCV_BUF_LEN) {
+            s->rx_status_rx_settings.s.rxf = 1;
+        } else {
+            s->rx_status_rx_settings.s.rxf = 0;
+        }
+        val = s->rx_status_rx_settings.u32;
+        break;
+    case CTU_CAN_FD_RX_DATA:
+        if (s->rx_cnt) {
+            memcpy(&val, s->rx_buff + s->rx_tail_pos, 4);
+            if (!s->rx_frame_rem) {
+                union ctu_can_fd_frame_form_w frame_form_w;
+                frame_form_w.u32 = val;
+                s->rx_frame_rem = frame_form_w.s.rwcnt * 4 + 4;
+            }
+            s->rx_cnt -= 4;
+            s->rx_frame_rem -= 4;
+            if (!s->rx_frame_rem) {
+                s->rx_status_rx_settings.s.rxfrc--;
+                if (!s->rx_status_rx_settings.s.rxfrc) {
+                    s->status.s.rxne = 0;
+                    s->status.s.idle = 1;
+                    s->status.s.rxs = 0;
+                }
+            }
+            s->rx_tail_pos = (s->rx_tail_pos + 4) % CTUCAN_RCV_BUF_LEN;
+        } else {
+            val = 0;
+        }
+        break;
+    case CTU_CAN_FD_TX_STATUS:
+        val = s->tx_status.u32;
+        break;
+    case CTU_CAN_FD_TX_PRIORITY:
+        val = s->tx_priority.u32;
+        break;
+    case CTU_CAN_FD_RX_FR_CTR:
+        val = s->rx_fr_ctr.s.rx_fr_ctr_val;
+        break;
+    case CTU_CAN_FD_TX_FR_CTR:
+        val = s->tx_fr_ctr.s.tx_fr_ctr_val;
+        break;
+    case CTU_CAN_FD_YOLO_REG:
+        val = s->yolo_reg.s.yolo_val;
+        break;
+    }
+
+    val >>= ((addr & 3) << 3);
+    if (size < 8) {
+        val &= ((uint64_t)1 << (size << 3)) - 1;
+    }
+
+    return val;
+}
+
+bool ctucan_can_receive(CanBusClientState *client)
+{
+    CtuCanCoreState *s = container_of(client, CtuCanCoreState, bus_client);
+
+    if (!s->mode_settings.s.ena) {
+        return false;
+    }
+
+    return true; /* always return true, when operation mode */
+}
+
+ssize_t ctucan_receive(CanBusClientState *client, const qemu_can_frame *frames,
+                        size_t frames_cnt)
+{
+    CtuCanCoreState *s = container_of(client, CtuCanCoreState, bus_client);
+    static uint8_t rcv[CTUCAN_MSG_MAX_LEN];
+    int i;
+    int ret = -1;
+    const qemu_can_frame *frame = frames;
+    union ctu_can_fd_int_stat int_stat;
+    int_stat.u32 = 0;
+
+    if (frames_cnt <= 0) {
+        return 0;
+    }
+
+    ret = ctucan_frame2buff(frame, rcv);
+
+    if (s->rx_cnt + ret > CTUCAN_RCV_BUF_LEN) { /* Data overrun. */
+        s->status.s.dor = 1;
+        int_stat.s.doi = 1;
+        s->int_stat.u32 |= int_stat.u32 & ~s->int_mask.u32;
+        ctucan_update_irq(s);
+        DPRINTF("Receive FIFO overrun\n");
+        return ret;
+    }
+    s->status.s.idle = 0;
+    s->status.s.rxs = 1;
+    int_stat.s.rxi = 1;
+    if (((s->rx_cnt + 3) & ~3) == CTUCAN_RCV_BUF_LEN) {
+        int_stat.s.rxfi = 1;
+    }
+    s->int_stat.u32 |= int_stat.u32 & ~s->int_mask.u32;
+    s->rx_fr_ctr.s.rx_fr_ctr_val++;
+    s->rx_status_rx_settings.s.rxfrc++;
+    for (i = 0; i < ret; i++) {
+        s->rx_buff[(s->rx_tail_pos + s->rx_cnt) % CTUCAN_RCV_BUF_LEN] = rcv[i];
+        s->rx_cnt++;
+    }
+    s->status.s.rxne = 1;
+
+    ctucan_update_irq(s);
+
+    return 1;
+}
+
+static CanBusClientInfo ctucan_bus_client_info = {
+    .can_receive = ctucan_can_receive,
+    .receive = ctucan_receive,
+};
+
+
+int ctucan_connect_to_bus(CtuCanCoreState *s, CanBusState *bus)
+{
+    s->bus_client.info = &ctucan_bus_client_info;
+
+    if (!bus) {
+        return -EINVAL;
+    }
+
+    if (can_bus_insert_client(bus, &s->bus_client) < 0) {
+        return -1;
+    }
+
+    return 0;
+}
+
+void ctucan_disconnect(CtuCanCoreState *s)
+{
+    can_bus_remove_client(&s->bus_client);
+}
+
+int ctucan_init(CtuCanCoreState *s, qemu_irq irq)
+{
+    s->irq = irq;
+
+    qemu_irq_lower(s->irq);
+
+    ctucan_hardware_reset(s);
+
+    return 0;
+}
+
+const VMStateDescription vmstate_qemu_ctucan_tx_buffer = {
+    .name = "qemu_ctucan_tx_buffer",
+    .version_id = 1,
+    .minimum_version_id = 1,
+    .minimum_version_id_old = 1,
+    .fields = (VMStateField[]) {
+        VMSTATE_UINT8_ARRAY(data, CtuCanCoreMsgBuffer, CTUCAN_CORE_MSG_MAX_LEN),
+        VMSTATE_END_OF_LIST()
+    }
+};
+
+static int ctucan_post_load(void *opaque, int version_id)
+{
+    CtuCanCoreState *s = opaque;
+    ctucan_update_irq(s);
+    return 0;
+}
+
+/* VMState is needed for live migration of QEMU images */
+const VMStateDescription vmstate_ctucan = {
+    .name = "ctucan",
+    .version_id = 1,
+    .minimum_version_id = 1,
+    .minimum_version_id_old = 1,
+    .post_load = ctucan_post_load,
+    .fields = (VMStateField[]) {
+        VMSTATE_UINT32(mode_settings.u32, CtuCanCoreState),
+        VMSTATE_UINT32(status.u32, CtuCanCoreState),
+        VMSTATE_UINT32(int_stat.u32, CtuCanCoreState),
+        VMSTATE_UINT32(int_ena.u32, CtuCanCoreState),
+        VMSTATE_UINT32(int_mask.u32, CtuCanCoreState),
+        VMSTATE_UINT32(brt.u32, CtuCanCoreState),
+        VMSTATE_UINT32(brt_fd.u32, CtuCanCoreState),
+        VMSTATE_UINT32(ewl_erp_fault_state.u32, CtuCanCoreState),
+        VMSTATE_UINT32(rec_tec.u32, CtuCanCoreState),
+        VMSTATE_UINT32(err_norm_err_fd.u32, CtuCanCoreState),
+        VMSTATE_UINT32(ctr_pres.u32, CtuCanCoreState),
+        VMSTATE_UINT32(filter_a_mask.u32, CtuCanCoreState),
+        VMSTATE_UINT32(filter_a_val.u32, CtuCanCoreState),
+        VMSTATE_UINT32(filter_b_mask.u32, CtuCanCoreState),
+        VMSTATE_UINT32(filter_b_val.u32, CtuCanCoreState),
+        VMSTATE_UINT32(filter_c_mask.u32, CtuCanCoreState),
+        VMSTATE_UINT32(filter_c_val.u32, CtuCanCoreState),
+        VMSTATE_UINT32(filter_ran_low.u32, CtuCanCoreState),
+        VMSTATE_UINT32(filter_ran_high.u32, CtuCanCoreState),
+        VMSTATE_UINT32(filter_control_filter_status.u32, CtuCanCoreState),
+        VMSTATE_UINT32(rx_mem_info.u32, CtuCanCoreState),
+        VMSTATE_UINT32(rx_pointers.u32, CtuCanCoreState),
+        VMSTATE_UINT32(rx_status_rx_settings.u32, CtuCanCoreState),
+        VMSTATE_UINT32(tx_status.u32, CtuCanCoreState),
+        VMSTATE_UINT32(tx_priority.u32, CtuCanCoreState),
+        VMSTATE_UINT32(err_capt_alc.u32, CtuCanCoreState),
+        VMSTATE_UINT32(trv_delay_ssp_cfg.u32, CtuCanCoreState),
+        VMSTATE_UINT32(rx_fr_ctr.u32, CtuCanCoreState),
+        VMSTATE_UINT32(tx_fr_ctr.u32, CtuCanCoreState),
+        VMSTATE_UINT32(debug_register.u32, CtuCanCoreState),
+        VMSTATE_UINT32(yolo_reg.u32, CtuCanCoreState),
+        VMSTATE_UINT32(timestamp_low.u32, CtuCanCoreState),
+        VMSTATE_UINT32(timestamp_high.u32, CtuCanCoreState),
+
+        VMSTATE_STRUCT_ARRAY(tx_buffer, CtuCanCoreState,
+                CTUCAN_CORE_TXBUF_NUM, 0, vmstate_qemu_ctucan_tx_buffer,
+                CtuCanCoreMsgBuffer),
+
+        VMSTATE_BUFFER(rx_buff, CtuCanCoreState),
+        VMSTATE_UINT32(rx_tail_pos, CtuCanCoreState),
+        VMSTATE_UINT32(rx_cnt, CtuCanCoreState),
+        VMSTATE_UINT32(rx_frame_rem, CtuCanCoreState),
+
+        VMSTATE_END_OF_LIST()
+    }
+};
diff --git a/hw/net/can/ctucan_core.h b/hw/net/can/ctucan_core.h
new file mode 100644
index 0000000000..f21cb1c5ec
--- /dev/null
+++ b/hw/net/can/ctucan_core.h
@@ -0,0 +1,127 @@
+/*
+ * CTU CAN FD device emulation
+ * http://canbus.pages.fel.cvut.cz/
+ *
+ * Copyright (c) 2019 Jan Charvat (jancharvat.charvat@gmail.com)
+ *
+ * Based on Kvaser PCI CAN device (SJA1000 based) emulation implemented by
+ * Jin Yang and Pavel Pisa
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#ifndef HW_CAN_CTUCAN_CORE_H
+#define HW_CAN_CTUCAN_CORE_H
+
+#include "exec/hwaddr.h"
+#include "net/can_emu.h"
+
+
+#ifndef __LITTLE_ENDIAN_BITFIELD
+#define __LITTLE_ENDIAN_BITFIELD 1
+#endif
+
+#include "ctu_can_fd_frame.h"
+#include "ctu_can_fd_regs.h"
+
+#define CTUCAN_CORE_MEM_SIZE       0x500
+
+/* The max size for a message in FIFO */
+#define CTUCAN_MSG_MAX_LEN        (CTU_CAN_FD_DATA_1_4_W + 64)
+/* The receive buffer size. */
+#define CTUCAN_RCV_BUF_LEN        (1024 * 8)
+
+
+/* The max size for a message buffer */
+#define CTUCAN_CORE_MSG_MAX_LEN       0x50
+/* The receive buffer size. */
+#define CTUCAN_CORE_RCV_BUF_LEN       0x1000
+
+#define CTUCAN_CORE_TXBUF_NUM            4
+
+typedef struct CtuCanCoreMsgBuffer {
+    uint8_t data[CTUCAN_CORE_MSG_MAX_LEN];
+} CtuCanCoreMsgBuffer;
+
+typedef struct CtuCanCoreState {
+    union ctu_can_fd_mode_settings                  mode_settings;
+    union ctu_can_fd_status                         status;
+    union ctu_can_fd_int_stat                       int_stat;
+    union ctu_can_fd_int_ena_set                    int_ena;
+    union ctu_can_fd_int_mask_set                   int_mask;
+    union ctu_can_fd_btr                            brt;
+    union ctu_can_fd_btr_fd                         brt_fd;
+    union ctu_can_fd_ewl_erp_fault_state            ewl_erp_fault_state;
+    union ctu_can_fd_rec_tec                        rec_tec;
+    union ctu_can_fd_err_norm_err_fd                err_norm_err_fd;
+    union ctu_can_fd_ctr_pres                       ctr_pres;
+    union ctu_can_fd_filter_a_mask                  filter_a_mask;
+    union ctu_can_fd_filter_a_val                   filter_a_val;
+    union ctu_can_fd_filter_b_mask                  filter_b_mask;
+    union ctu_can_fd_filter_b_val                   filter_b_val;
+    union ctu_can_fd_filter_c_mask                  filter_c_mask;
+    union ctu_can_fd_filter_c_val                   filter_c_val;
+    union ctu_can_fd_filter_ran_low                 filter_ran_low;
+    union ctu_can_fd_filter_ran_high                filter_ran_high;
+    union ctu_can_fd_filter_control_filter_status   filter_control_filter_status;
+    union ctu_can_fd_rx_mem_info                    rx_mem_info;
+    union ctu_can_fd_rx_pointers                    rx_pointers;
+    union ctu_can_fd_rx_status_rx_settings          rx_status_rx_settings;
+    union ctu_can_fd_tx_status                      tx_status;
+    union ctu_can_fd_tx_priority                    tx_priority;
+    union ctu_can_fd_err_capt_alc                   err_capt_alc;
+    union ctu_can_fd_trv_delay_ssp_cfg              trv_delay_ssp_cfg;
+    union ctu_can_fd_rx_fr_ctr                      rx_fr_ctr;
+    union ctu_can_fd_tx_fr_ctr                      tx_fr_ctr;
+    union ctu_can_fd_debug_register                 debug_register;
+    union ctu_can_fd_yolo_reg                       yolo_reg;
+    union ctu_can_fd_timestamp_low                  timestamp_low;
+    union ctu_can_fd_timestamp_high                 timestamp_high;
+
+    CtuCanCoreMsgBuffer tx_buffer[CTUCAN_CORE_TXBUF_NUM];
+
+    uint8_t         rx_buff[CTUCAN_RCV_BUF_LEN];  /* 32~95 .. 64bytes Rx FIFO */
+    uint32_t        rx_tail_pos;        /* Count by bytes. */
+    uint32_t        rx_cnt;        /* Count by bytes. */
+    uint32_t        rx_frame_rem;
+
+    qemu_irq        irq;
+    CanBusClientState bus_client;
+} CtuCanCoreState;
+
+void ctucan_hardware_reset(CtuCanCoreState *s);
+
+void ctucan_mem_write(CtuCanCoreState *s, hwaddr addr, uint64_t val,
+                       unsigned size);
+
+uint64_t ctucan_mem_read(CtuCanCoreState *s, hwaddr addr, unsigned size);
+
+int ctucan_connect_to_bus(CtuCanCoreState *s, CanBusState *bus);
+
+void ctucan_disconnect(CtuCanCoreState *s);
+
+int ctucan_init(CtuCanCoreState *s, qemu_irq irq);
+
+bool ctucan_can_receive(CanBusClientState *client);
+
+ssize_t ctucan_receive(CanBusClientState *client,
+                        const qemu_can_frame *frames, size_t frames_cnt);
+
+extern const VMStateDescription vmstate_ctucan;
+
+#endif
diff --git a/hw/net/can/ctucan_pci.c b/hw/net/can/ctucan_pci.c
new file mode 100644
index 0000000000..accc7f0fd9
--- /dev/null
+++ b/hw/net/can/ctucan_pci.c
@@ -0,0 +1,281 @@
+/*
+ * CTU CAN FD PCI device emulation
+ * http://canbus.pages.fel.cvut.cz/
+ *
+ * Copyright (c) 2019 Jan Charvat (jancharvat.charvat@gmail.com)
+ *
+ * Based on Kvaser PCI CAN device (SJA1000 based) emulation implemented by
+ * Jin Yang and Pavel Pisa
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/event_notifier.h"
+#include "qemu/module.h"
+#include "qemu/thread.h"
+#include "qemu/sockets.h"
+#include "qapi/error.h"
+#include "chardev/char.h"
+#include "hw/irq.h"
+#include "hw/pci/pci.h"
+#include "hw/qdev-properties.h"
+#include "migration/vmstate.h"
+#include "net/can_emu.h"
+
+#include "ctucan_core.h"
+
+#define TYPE_CAN_PCI_DEV "ctucan_pci"
+
+#define CTUCAN_PCI_DEV(obj) \
+    OBJECT_CHECK(CtuCanPCIState, (obj), TYPE_CAN_PCI_DEV)
+
+#define CTUCAN_PCI_CORE_COUNT     2
+#define CTUCAN_PCI_CORE_RANGE     0x10000
+
+#define CTUCAN_PCI_BAR_COUNT      2
+
+#define CTUCAN_PCI_BYTES_PER_CORE 0x4000
+
+#ifndef PCI_VENDOR_ID_TEDIA
+#define PCI_VENDOR_ID_TEDIA 0x1760
+#endif
+
+#define PCI_DEVICE_ID_TEDIA_CTUCAN_VER21 0xff00
+
+#define CTUCAN_BAR0_RANGE 0x8000
+#define CTUCAN_BAR0_CTUCAN_ID 0x0000
+#define CTUCAN_BAR0_CRA_BASE  0x4000
+#define CYCLONE_IV_CRA_A2P_IE (0x0050)
+
+#define CTUCAN_WITHOUT_CTUCAN_ID  0
+#define CTUCAN_WITH_CTUCAN_ID     1
+
+typedef struct CtuCanPCIState {
+    /*< private >*/
+    PCIDevice       dev;
+    /*< public >*/
+    MemoryRegion    ctucan_io[CTUCAN_PCI_BAR_COUNT];
+
+    CtuCanCoreState ctucan_state[CTUCAN_PCI_CORE_COUNT];
+    qemu_irq        irq;
+
+    char            *model; /* The model that support, only SJA1000 now. */
+    CanBusState     *canbus[CTUCAN_PCI_CORE_COUNT];
+} CtuCanPCIState;
+
+static void ctucan_pci_reset(DeviceState *dev)
+{
+    CtuCanPCIState *d = CTUCAN_PCI_DEV(dev);
+    int i;
+
+    for (i = 0 ; i < CTUCAN_PCI_CORE_COUNT; i++) {
+        ctucan_hardware_reset(&d->ctucan_state[i]);
+    }
+}
+
+static uint64_t ctucan_pci_id_cra_io_read(void *opaque, hwaddr addr,
+                                          unsigned size)
+{
+    if (addr >= 4) {
+        return 0;
+    }
+
+    uint64_t tmp = 0xC0000000 + CTUCAN_PCI_CORE_COUNT;
+    tmp >>= ((addr & 3) << 3);
+    if (size < 8) {
+        tmp &= ((uint64_t)1 << (size << 3)) - 1;
+    }
+    printf("addr=%lx,size=%x,tmp=%lx\n", addr, size, tmp);
+    return tmp;
+}
+
+static void ctucan_pci_id_cra_io_write(void *opaque, hwaddr addr, uint64_t data,
+                             unsigned size)
+{
+
+}
+
+static uint64_t ctucan_pci_cores_io_read(void *opaque, hwaddr addr,
+                                          unsigned size)
+{
+    CtuCanPCIState *d = opaque;
+    CtuCanCoreState *s;
+    hwaddr core_num = addr / CTUCAN_PCI_BYTES_PER_CORE;
+
+    if (core_num >= CTUCAN_PCI_CORE_COUNT) {
+        return 0;
+    }
+
+    s = &d->ctucan_state[core_num];
+
+    return ctucan_mem_read(s, addr % CTUCAN_PCI_BYTES_PER_CORE, size);
+}
+
+static void ctucan_pci_cores_io_write(void *opaque, hwaddr addr, uint64_t data,
+                             unsigned size)
+{
+    CtuCanPCIState *d = opaque;
+    CtuCanCoreState *s;
+    hwaddr core_num = addr / CTUCAN_PCI_BYTES_PER_CORE;
+
+    if (core_num >= CTUCAN_PCI_CORE_COUNT) {
+        return;
+    }
+
+    s = &d->ctucan_state[core_num];
+
+    return ctucan_mem_write(s, addr % CTUCAN_PCI_BYTES_PER_CORE, data, size);
+}
+
+static const MemoryRegionOps ctucan_pci_id_cra_io_ops = {
+    .read = ctucan_pci_id_cra_io_read,
+    .write = ctucan_pci_id_cra_io_write,
+    .endianness = DEVICE_LITTLE_ENDIAN,
+    .impl.min_access_size = 1,
+    .impl.max_access_size = 4,
+    .valid.min_access_size = 1,
+    .valid.max_access_size = 4,
+};
+
+static const MemoryRegionOps ctucan_pci_cores_io_ops = {
+    .read = ctucan_pci_cores_io_read,
+    .write = ctucan_pci_cores_io_write,
+    .endianness = DEVICE_LITTLE_ENDIAN,
+    .impl.min_access_size = 1,
+    .impl.max_access_size = 4,
+    .valid.min_access_size = 1,
+    .valid.max_access_size = 4,
+};
+
+static void ctucan_pci_realize(PCIDevice *pci_dev, Error **errp)
+{
+    CtuCanPCIState *d = CTUCAN_PCI_DEV(pci_dev);
+    uint8_t *pci_conf;
+    int i;
+
+    pci_conf = pci_dev->config;
+    pci_conf[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */
+
+    d->irq = pci_allocate_irq(&d->dev);
+
+    for (i = 0 ; i < CTUCAN_PCI_CORE_COUNT; i++) {
+        ctucan_init(&d->ctucan_state[i], d->irq);
+    }
+
+    for (i = 0 ; i < CTUCAN_PCI_CORE_COUNT; i++) {
+        if (ctucan_connect_to_bus(&d->ctucan_state[i], d->canbus[i]) < 0) {
+            error_setg(errp, "ctucan_connect_to_bus failed");
+            return;
+        }
+    }
+
+    memory_region_init_io(&d->ctucan_io[0], OBJECT(d),
+                          &ctucan_pci_id_cra_io_ops, d,
+                          "ctucan_pci-core0", CTUCAN_BAR0_RANGE);
+    memory_region_init_io(&d->ctucan_io[1], OBJECT(d),
+                          &ctucan_pci_cores_io_ops, d,
+                          "ctucan_pci-core1", CTUCAN_PCI_CORE_RANGE);
+
+    for (i = 0 ; i < CTUCAN_PCI_BAR_COUNT; i++) {
+        pci_register_bar(&d->dev, i, PCI_BASE_ADDRESS_MEM_MASK & 0,
+                         &d->ctucan_io[i]);
+    }
+}
+
+static void ctucan_pci_exit(PCIDevice *pci_dev)
+{
+    CtuCanPCIState *d = CTUCAN_PCI_DEV(pci_dev);
+    int i;
+
+    for (i = 0 ; i < CTUCAN_PCI_CORE_COUNT; i++) {
+        ctucan_disconnect(&d->ctucan_state[i]);
+    }
+
+    qemu_free_irq(d->irq);
+}
+
+static const VMStateDescription vmstate_ctucan_pci = {
+    .name = "ctucan_pci",
+    .version_id = 1,
+    .minimum_version_id = 1,
+    .minimum_version_id_old = 1,
+    .fields = (VMStateField[]) {
+        VMSTATE_PCI_DEVICE(dev, CtuCanPCIState),
+        VMSTATE_STRUCT(ctucan_state[0], CtuCanPCIState, 0, vmstate_ctucan,
+                       CtuCanCoreState),
+#if CTUCAN_PCI_CORE_COUNT >= 2
+        VMSTATE_STRUCT(ctucan_state[1], CtuCanPCIState, 0, vmstate_ctucan,
+                       CtuCanCoreState),
+#endif
+        VMSTATE_END_OF_LIST()
+    }
+};
+
+static void ctucan_pci_instance_init(Object *obj)
+{
+    CtuCanPCIState *d = CTUCAN_PCI_DEV(obj);
+
+    object_property_add_link(obj, "canbus0", TYPE_CAN_BUS,
+                             (Object **)&d->canbus[0],
+                             qdev_prop_allow_set_link_before_realize, 0);
+#if CTUCAN_PCI_CORE_COUNT >= 2
+    object_property_add_link(obj, "canbus1", TYPE_CAN_BUS,
+                             (Object **)&d->canbus[1],
+                             qdev_prop_allow_set_link_before_realize, 0);
+#endif
+}
+
+static void ctucan_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+
+    k->realize = ctucan_pci_realize;
+    k->exit = ctucan_pci_exit;
+    k->vendor_id = PCI_VENDOR_ID_TEDIA;
+    k->device_id = PCI_DEVICE_ID_TEDIA_CTUCAN_VER21;
+    k->revision = 0x00;
+    k->class_id = 0x000c09;
+    k->subsystem_vendor_id = PCI_VENDOR_ID_TEDIA;
+    k->subsystem_id = PCI_DEVICE_ID_TEDIA_CTUCAN_VER21;
+    dc->desc = "CTU CAN PCI";
+    dc->vmsd = &vmstate_ctucan_pci;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+    dc->reset = ctucan_pci_reset;
+}
+
+static const TypeInfo ctucan_pci_info = {
+    .name          = TYPE_CAN_PCI_DEV,
+    .parent        = TYPE_PCI_DEVICE,
+    .instance_size = sizeof(CtuCanPCIState),
+    .class_init    = ctucan_pci_class_init,
+    .instance_init = ctucan_pci_instance_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_CONVENTIONAL_PCI_DEVICE },
+        { },
+    },
+};
+
+static void ctucan_pci_register_types(void)
+{
+    type_register_static(&ctucan_pci_info);
+}
+
+type_init(ctucan_pci_register_types)
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v1 6/6] hw/net/can: Documentation for CTU CAN FD IP open hardware core emulation.
  2020-07-14 12:20 [PATCH v1 0/6] CTU CAN FD core support pisa
                   ` (4 preceding siblings ...)
  2020-07-14 12:20 ` [PATCH v1 5/6] hw/net/can: CTU CAN FD IP open hardware core emulation pisa
@ 2020-07-14 12:20 ` pisa
  2020-07-14 12:47 ` [PATCH v1 0/6] CTU CAN FD core support no-reply
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 20+ messages in thread
From: pisa @ 2020-07-14 12:20 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini
  Cc: Marek Vasut, Oliver Hartkopp, Jiri Novak, Stefan Hajnoczi,
	Deniz Eren, Markus Armbruster, Oleksij Rempel, Konrad Frederic,
	Jan Charvat, Jan Kiszka, Ondrej Ille, Pavel Pisa

From: Pavel Pisa <pisa@cmp.felk.cvut.cz>

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
---
 MAINTAINERS  |   8 ++++
 docs/can.txt | 113 ++++++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 110 insertions(+), 11 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index fe8139f367..d554a1cb41 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2058,6 +2058,14 @@ F: hw/rx/
 F: include/hw/intc/rx_icu.h
 F: include/hw/rx/
 
+CAN bus subsystem and hardware
+M: Pavel Pisa <pisa@cmp.felk.cvut.cz>
+S: Maintained
+W: https://canbus.pages.fel.cvut.cz/
+F: net/can/*
+F: hw/net/can/*
+F: include/net/can_*.h
+
 Subsystems
 ----------
 Audio
diff --git a/docs/can.txt b/docs/can.txt
index 11ed8f2d68..5838f6620c 100644
--- a/docs/can.txt
+++ b/docs/can.txt
@@ -8,13 +8,22 @@ can be connected to host system CAN API (at this time only Linux
 SocketCAN is supported).
 
 The concept of busses is generic and different CAN controllers
-can be implemented for it but at this time only SJA1000 chip
-controller is implemented.
+can be implemented.
+
+The initial submission implemented SJA1000 controller which
+is common and well supported by by drivers for the most operating
+systems.
 
 The PCI addon card hardware has been selected as the first CAN
 interface to implement because such device can be easily connected
 to systems with different CPU architectures (x86, PowerPC, Arm, etc.).
 
+In 2020, CTU CAN FD controller model has been added as part
+of the bachelor theses of Jan Charvat. This controller is complete
+open-source/design/hardware solution. The core designer
+of the project is Ondrej Ille, the financial support has been
+provided by CTU, and more companies including Volkswagen subsidiaries.
+
 The project has been initially started in frame of RTEMS GSoC 2013
 slot by Jin Yang under our mentoring  The initial idea was to provide generic
 CAN subsystem for RTEMS. But lack of common environment for code and RTEMS
@@ -22,8 +31,8 @@ testing lead to goal change to provide environment which provides complete
 emulated environment for testing and RTEMS GSoC slot has been donated
 to work on CAN hardware emulation on QEMU.
 
-Examples how to use CAN emulation
-=================================
+Examples how to use CAN emulation for SJA1000 based borads
+==========================================================
 
 When QEMU with CAN PCI support is compiled then one of the next
 CAN boards can be selected
@@ -90,18 +99,100 @@ traffic with "candump" command which is included in "can-utils".
 
   candump can0
 
+CTU CAN FD support examples
+===========================
+
+This open-source core provides CAN FD support. CAN FD drames are
+delivered even to the host systems when SocketCAN interface is found
+CAN FD capable.
+
+The PCIe borad emulation is provided for now (the device identifier is
+ctucan_pci). The defauld build defines two CTU CAN FD cores
+on the board.
+
+Example how to connect the canbus0-bus (virtual wire) to the host
+Linux system (SocketCAN used) and to both CTU CAN FD cores emulated
+on the corresponding PCI card expects that host system CAN bus
+is setup according to the previous SJA1000 section.
+
+  qemu-system-x86_64 -enable-kvm -kernel /boot/vmlinuz-4.19.52+ \
+      -initrd ramdisk.cpio \
+      -virtfs local,path=shareddir,security_model=none,mount_tag=shareddir \
+      -vga cirrus \
+      -append "console=ttyS0" \
+      -object can-bus,id=canbus0-bus \
+      -object can-host-socketcan,if=can0,canbus=canbus0-bus,id=canbus0-socketcan \
+      -device ctucan_pci,canbus0=canbus0-bus,canbus1=canbus0-bus \
+      -nographic
+
+Setup of CTU CAN FD controller in a guest Linux system
+
+  insmod ctucanfd.ko || modprobe ctucanfd
+  insmod ctucanfd_pci.ko || modprobe ctucanfd_pci
+
+  for ifc in /sys/class/net/can* ; do
+    if [ -e  $ifc/device/vendor ] ; then
+      if ! grep -q 0x1760 $ifc/device/vendor ; then
+        continue;
+      fi
+    else
+      continue;
+    fi
+    if [ -e  $ifc/device/device ] ; then
+       if ! grep -q 0xff00 $ifc/device/device ; then
+         continue;
+       fi
+    else
+      continue;
+    fi
+    ifc=$(basename $ifc)
+    /bin/ip link set $ifc type can bitrate 1000000 dbitrate 10000000 fd on
+    /bin/ip link set $ifc up
+  done
+
+The test can run for example
+
+  candump can1
+
+in the guest system and next commands in the host system for basic CAN
+
+  cangen can0
+
+for CAN FD without bitrate switch
+
+  cangen can0 -f
+
+and with bitrate switch
+
+  cangen can0 -b
+
+The test can be run viceversa, generate messages in the guest system and capture them
+in the host one and much more combinations.
+
 Links to other resources
 ========================
 
- (1) Repository with development branch can-pci at Czech Technical University
-     https://gitlab.fel.cvut.cz/canbus/qemu-canbus
- (2) GitHub repository with can-pci and our other changes included
+ (1) CAN related projects at Czech Technical University, Faculty of Electrical Engineering
+     http://canbus.pages.fel.cvut.cz/
+ (2) Repository with development can-pci branch at Czech Technical University
      https://gitlab.fel.cvut.cz/canbus/qemu-canbus
  (3) RTEMS page describing project
      https://devel.rtems.org/wiki/Developer/Simulators/QEMU/CANEmulation
  (4) RTLWS 2015 article about the project and its use with CANopen emulation
-     http://rtime.felk.cvut.cz/publications/public/rtlws2015-qemu-can.pdf
-     Slides
-     http://rtime.felk.cvut.cz/publications/public/rtlws2015-qemu-can-slides.pdf
- (5) Linux SocketCAN utilities
+     http://cmp.felk.cvut.cz/~pisa/can/doc/rtlws-17-pisa-qemu-can.pdf
+ (5) GNU/Linux, CAN and CANopen in Real-time Control Applications
+     Slides from LinuxDays 2017 (include updated RTLWS 2015 content)
+     https://www.linuxdays.cz/2017/video/Pavel_Pisa-CAN_canopen.pdf
+ (6) Linux SocketCAN utilities
      https://github.com/linux-can/can-utils/
+ (7) CTU CAN FD project including core VHDL design, Linux driver,
+     test utilities etc.
+     https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core
+ (8) CTU CAN FD Core Datasheet Documentation
+     http://canbus.pages.fel.cvut.cz/ctucanfd_ip_core/Progdokum.pdf
+ (9) CTU CAN FD Core System Architecture Documentation
+     http://canbus.pages.fel.cvut.cz/ctucanfd_ip_core/ctu_can_fd_architecture.pdf
+ (10) CTU CAN FD Driver Documentation
+     http://canbus.pages.fel.cvut.cz/ctucanfd_ip_core/driver_doc/ctucanfd-driver.html
+ (11) Integration with PCIe interfacing for Intel/Altera Cyclone IV based board
+     https://gitlab.fel.cvut.cz/canbus/pcie-ctu_can_fd
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 0/6] CTU CAN FD core support
  2020-07-14 12:20 [PATCH v1 0/6] CTU CAN FD core support pisa
                   ` (5 preceding siblings ...)
  2020-07-14 12:20 ` [PATCH v1 6/6] hw/net/can: Documentation for " pisa
@ 2020-07-14 12:47 ` no-reply
  2020-07-14 13:45   ` [PATCH v1 0/6] CTU CAN FD core support - patchew report Pavel Pisa
  2020-07-14 12:48 ` [PATCH v1 0/6] CTU CAN FD core support no-reply
  2020-07-30 15:29 ` Markus Armbruster
  8 siblings, 1 reply; 20+ messages in thread
From: no-reply @ 2020-07-14 12:47 UTC (permalink / raw)
  To: pisa
  Cc: marex, jnovak, stefanha, deniz.eren, qemu-devel, armbru,
	o.rempel, frederic.konrad, jan.kiszka, charvj10, socketcan,
	pbonzini, ondrej.ille, pisa

Patchew URL: https://patchew.org/QEMU/cover.1594725647.git.pisa@cmp.felk.cvut.cz/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===

  CC      hw/scsi/mptendian.o
  CC      hw/scsi/megasas.o
/tmp/qemu-test/src/hw/net/can/ctucan_pci.c: In function 'ctucan_pci_id_cra_io_read':
/tmp/qemu-test/src/hw/net/can/ctucan_pci.c:105:20: error: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'hwaddr' {aka 'long long unsigned int'} [-Werror=format=]
  105 |     printf("addr=%lx,size=%x,tmp=%lx\n", addr, size, tmp);
      |                  ~~^                     ~~~~
      |                    |                     |
      |                    long unsigned int     hwaddr {aka long long unsigned int}
      |                  %llx
/tmp/qemu-test/src/hw/net/can/ctucan_pci.c:105:36: error: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Werror=format=]
  105 |     printf("addr=%lx,size=%x,tmp=%lx\n", addr, size, tmp);
      |                                  ~~^                 ~~~
      |                                    |                 |
---
      |                                  %llx
cc1: all warnings being treated as errors
  CC      hw/scsi/vmw_pvscsi.o
make: *** [/tmp/qemu-test/src/rules.mak:69: hw/net/can/ctucan_pci.o] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 702, in <module>
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=f5774491255c43439df676fa60e78942', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-8k8thxvd/src/docker-src.2020-07-14-08.43.41.4976:/var/tmp/qemu:z,ro', 'qemu/fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=f5774491255c43439df676fa60e78942
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-8k8thxvd/src'
make: *** [docker-run-test-mingw@fedora] Error 2

real    4m10.120s
user    0m8.126s


The full log is available at
http://patchew.org/logs/cover.1594725647.git.pisa@cmp.felk.cvut.cz/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 0/6] CTU CAN FD core support
  2020-07-14 12:20 [PATCH v1 0/6] CTU CAN FD core support pisa
                   ` (6 preceding siblings ...)
  2020-07-14 12:47 ` [PATCH v1 0/6] CTU CAN FD core support no-reply
@ 2020-07-14 12:48 ` no-reply
  2020-07-30 15:29 ` Markus Armbruster
  8 siblings, 0 replies; 20+ messages in thread
From: no-reply @ 2020-07-14 12:48 UTC (permalink / raw)
  To: pisa
  Cc: marex, jnovak, stefanha, deniz.eren, qemu-devel, armbru,
	o.rempel, frederic.konrad, jan.kiszka, charvj10, socketcan,
	pbonzini, ondrej.ille, pisa

Patchew URL: https://patchew.org/QEMU/cover.1594725647.git.pisa@cmp.felk.cvut.cz/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: cover.1594725647.git.pisa@cmp.felk.cvut.cz
Subject: [PATCH v1 0/6] CTU CAN FD core support

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
8e99737 hw/net/can: Documentation for CTU CAN FD IP open hardware core emulation.
9dde8a8 hw/net/can: CTU CAN FD IP open hardware core emulation.
dc95d77 hw/net/can/ctucafd: Add CTU CAN FD core register definitions.
733ab67 net/can: Add can_dlc2len and can_len2dlc for CAN FD.
d9207e1 hw/net/can: sja1000 ignore CAN FD frames
28bfb20 net/can: Initial host SocketCan support for CAN FD.

=== OUTPUT BEGIN ===
1/6 Checking commit 28bfb20d4aa8 (net/can: Initial host SocketCan support for CAN FD.)
2/6 Checking commit d9207e106794 (hw/net/can: sja1000 ignore CAN FD frames)
3/6 Checking commit 733ab67ddcc2 (net/can: Add can_dlc2len and can_len2dlc for CAN FD.)
4/6 Checking commit dc95d778bb88 (hw/net/can/ctucafd: Add CTU CAN FD core register definitions.)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#30: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#36: FILE: hw/net/can/ctu_can_fd_frame.h:2:
+/*******************************************************************************

WARNING: architecture specific defines should be avoided
#67: FILE: hw/net/can/ctu_can_fd_frame.h:33:
+#ifndef __CTU_CAN_FD_CAN_FD_FRAME_FORMAT__

ERROR: code indent should never use tabs
#72: FILE: hw/net/can/ctu_can_fd_frame.h:38:
+^ICTU_CAN_FD_FRAME_FORM_W        = 0x0,$

ERROR: code indent should never use tabs
#73: FILE: hw/net/can/ctu_can_fd_frame.h:39:
+^ICTU_CAN_FD_IDENTIFIER_W        = 0x4,$

ERROR: code indent should never use tabs
#74: FILE: hw/net/can/ctu_can_fd_frame.h:40:
+^ICTU_CAN_FD_TIMESTAMP_L_W       = 0x8,$

ERROR: code indent should never use tabs
#75: FILE: hw/net/can/ctu_can_fd_frame.h:41:
+^ICTU_CAN_FD_TIMESTAMP_U_W       = 0xc,$

ERROR: code indent should never use tabs
#76: FILE: hw/net/can/ctu_can_fd_frame.h:42:
+^ICTU_CAN_FD_DATA_1_4_W         = 0x10,$

ERROR: code indent should never use tabs
#77: FILE: hw/net/can/ctu_can_fd_frame.h:43:
+^ICTU_CAN_FD_DATA_5_8_W         = 0x14,$

ERROR: code indent should never use tabs
#78: FILE: hw/net/can/ctu_can_fd_frame.h:44:
+^ICTU_CAN_FD_DATA_61_64_W       = 0x4c,$

ERROR: code indent should never use tabs
#84: FILE: hw/net/can/ctu_can_fd_frame.h:50:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#85: FILE: hw/net/can/ctu_can_fd_frame.h:51:
+^Istruct ctu_can_fd_frame_form_w_s {$

WARNING: architecture specific defines should be avoided
#86: FILE: hw/net/can/ctu_can_fd_frame.h:52:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#88: FILE: hw/net/can/ctu_can_fd_frame.h:54:
+^I^Iuint32_t dlc                     : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#88: FILE: hw/net/can/ctu_can_fd_frame.h:54:
+               uint32_t dlc                     : 4;
                                                 ^

ERROR: code indent should never use tabs
#89: FILE: hw/net/can/ctu_can_fd_frame.h:55:
+^I^Iuint32_t reserved_4              : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#89: FILE: hw/net/can/ctu_can_fd_frame.h:55:
+               uint32_t reserved_4              : 1;
                                                 ^

ERROR: code indent should never use tabs
#90: FILE: hw/net/can/ctu_can_fd_frame.h:56:
+^I^Iuint32_t rtr                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#90: FILE: hw/net/can/ctu_can_fd_frame.h:56:
+               uint32_t rtr                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#91: FILE: hw/net/can/ctu_can_fd_frame.h:57:
+^I^Iuint32_t ide                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#91: FILE: hw/net/can/ctu_can_fd_frame.h:57:
+               uint32_t ide                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#92: FILE: hw/net/can/ctu_can_fd_frame.h:58:
+^I^Iuint32_t fdf                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#92: FILE: hw/net/can/ctu_can_fd_frame.h:58:
+               uint32_t fdf                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#93: FILE: hw/net/can/ctu_can_fd_frame.h:59:
+^I^Iuint32_t reserved_8              : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#93: FILE: hw/net/can/ctu_can_fd_frame.h:59:
+               uint32_t reserved_8              : 1;
                                                 ^

ERROR: code indent should never use tabs
#94: FILE: hw/net/can/ctu_can_fd_frame.h:60:
+^I^Iuint32_t brs                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#94: FILE: hw/net/can/ctu_can_fd_frame.h:60:
+               uint32_t brs                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#95: FILE: hw/net/can/ctu_can_fd_frame.h:61:
+^I^Iuint32_t esi_rsv                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#95: FILE: hw/net/can/ctu_can_fd_frame.h:61:
+               uint32_t esi_rsv                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#96: FILE: hw/net/can/ctu_can_fd_frame.h:62:
+^I^Iuint32_t rwcnt                   : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#96: FILE: hw/net/can/ctu_can_fd_frame.h:62:
+               uint32_t rwcnt                   : 5;
                                                 ^

ERROR: code indent should never use tabs
#97: FILE: hw/net/can/ctu_can_fd_frame.h:63:
+^I^Iuint32_t reserved_31_16         : 16;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#97: FILE: hw/net/can/ctu_can_fd_frame.h:63:
+               uint32_t reserved_31_16         : 16;
                                                ^

ERROR: code indent should never use tabs
#99: FILE: hw/net/can/ctu_can_fd_frame.h:65:
+^I^Iuint32_t reserved_31_16         : 16;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#99: FILE: hw/net/can/ctu_can_fd_frame.h:65:
+               uint32_t reserved_31_16         : 16;
                                                ^

ERROR: code indent should never use tabs
#100: FILE: hw/net/can/ctu_can_fd_frame.h:66:
+^I^Iuint32_t rwcnt                   : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#100: FILE: hw/net/can/ctu_can_fd_frame.h:66:
+               uint32_t rwcnt                   : 5;
                                                 ^

ERROR: code indent should never use tabs
#101: FILE: hw/net/can/ctu_can_fd_frame.h:67:
+^I^Iuint32_t esi_rsv                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#101: FILE: hw/net/can/ctu_can_fd_frame.h:67:
+               uint32_t esi_rsv                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#102: FILE: hw/net/can/ctu_can_fd_frame.h:68:
+^I^Iuint32_t brs                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#102: FILE: hw/net/can/ctu_can_fd_frame.h:68:
+               uint32_t brs                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#103: FILE: hw/net/can/ctu_can_fd_frame.h:69:
+^I^Iuint32_t reserved_8              : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#103: FILE: hw/net/can/ctu_can_fd_frame.h:69:
+               uint32_t reserved_8              : 1;
                                                 ^

ERROR: code indent should never use tabs
#104: FILE: hw/net/can/ctu_can_fd_frame.h:70:
+^I^Iuint32_t fdf                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#104: FILE: hw/net/can/ctu_can_fd_frame.h:70:
+               uint32_t fdf                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#105: FILE: hw/net/can/ctu_can_fd_frame.h:71:
+^I^Iuint32_t ide                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#105: FILE: hw/net/can/ctu_can_fd_frame.h:71:
+               uint32_t ide                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#106: FILE: hw/net/can/ctu_can_fd_frame.h:72:
+^I^Iuint32_t rtr                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#106: FILE: hw/net/can/ctu_can_fd_frame.h:72:
+               uint32_t rtr                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#107: FILE: hw/net/can/ctu_can_fd_frame.h:73:
+^I^Iuint32_t reserved_4              : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#107: FILE: hw/net/can/ctu_can_fd_frame.h:73:
+               uint32_t reserved_4              : 1;
                                                 ^

ERROR: code indent should never use tabs
#108: FILE: hw/net/can/ctu_can_fd_frame.h:74:
+^I^Iuint32_t dlc                     : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#108: FILE: hw/net/can/ctu_can_fd_frame.h:74:
+               uint32_t dlc                     : 4;
                                                 ^

ERROR: code indent should never use tabs
#110: FILE: hw/net/can/ctu_can_fd_frame.h:76:
+^I} s;$

ERROR: code indent should never use tabs
#114: FILE: hw/net/can/ctu_can_fd_frame.h:80:
+^INO_RTR_FRAME       = 0x0,$

ERROR: code indent should never use tabs
#115: FILE: hw/net/can/ctu_can_fd_frame.h:81:
+^IRTR_FRAME          = 0x1,$

ERROR: code indent should never use tabs
#119: FILE: hw/net/can/ctu_can_fd_frame.h:85:
+^IBASE           = 0x0,$

ERROR: code indent should never use tabs
#120: FILE: hw/net/can/ctu_can_fd_frame.h:86:
+^IEXTENDED       = 0x1,$

ERROR: code indent should never use tabs
#124: FILE: hw/net/can/ctu_can_fd_frame.h:90:
+^INORMAL_CAN       = 0x0,$

ERROR: code indent should never use tabs
#125: FILE: hw/net/can/ctu_can_fd_frame.h:91:
+^IFD_CAN           = 0x1,$

ERROR: code indent should never use tabs
#129: FILE: hw/net/can/ctu_can_fd_frame.h:95:
+^IBR_NO_SHIFT       = 0x0,$

ERROR: code indent should never use tabs
#130: FILE: hw/net/can/ctu_can_fd_frame.h:96:
+^IBR_SHIFT          = 0x1,$

ERROR: code indent should never use tabs
#134: FILE: hw/net/can/ctu_can_fd_frame.h:100:
+^IESI_ERR_ACTIVE       = 0x0,$

ERROR: code indent should never use tabs
#135: FILE: hw/net/can/ctu_can_fd_frame.h:101:
+^IESI_ERR_PASIVE       = 0x1,$

ERROR: code indent should never use tabs
#139: FILE: hw/net/can/ctu_can_fd_frame.h:105:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#140: FILE: hw/net/can/ctu_can_fd_frame.h:106:
+^Istruct ctu_can_fd_identifier_w_s {$

WARNING: architecture specific defines should be avoided
#141: FILE: hw/net/can/ctu_can_fd_frame.h:107:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#143: FILE: hw/net/can/ctu_can_fd_frame.h:109:
+^I^Iuint32_t identifier_ext         : 18;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#143: FILE: hw/net/can/ctu_can_fd_frame.h:109:
+               uint32_t identifier_ext         : 18;
                                                ^

ERROR: code indent should never use tabs
#144: FILE: hw/net/can/ctu_can_fd_frame.h:110:
+^I^Iuint32_t identifier_base        : 11;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#144: FILE: hw/net/can/ctu_can_fd_frame.h:110:
+               uint32_t identifier_base        : 11;
                                                ^

ERROR: code indent should never use tabs
#145: FILE: hw/net/can/ctu_can_fd_frame.h:111:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#145: FILE: hw/net/can/ctu_can_fd_frame.h:111:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#147: FILE: hw/net/can/ctu_can_fd_frame.h:113:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#147: FILE: hw/net/can/ctu_can_fd_frame.h:113:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#148: FILE: hw/net/can/ctu_can_fd_frame.h:114:
+^I^Iuint32_t identifier_base        : 11;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#148: FILE: hw/net/can/ctu_can_fd_frame.h:114:
+               uint32_t identifier_base        : 11;
                                                ^

ERROR: code indent should never use tabs
#149: FILE: hw/net/can/ctu_can_fd_frame.h:115:
+^I^Iuint32_t identifier_ext         : 18;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#149: FILE: hw/net/can/ctu_can_fd_frame.h:115:
+               uint32_t identifier_ext         : 18;
                                                ^

ERROR: code indent should never use tabs
#151: FILE: hw/net/can/ctu_can_fd_frame.h:117:
+^I} s;$

ERROR: code indent should never use tabs
#155: FILE: hw/net/can/ctu_can_fd_frame.h:121:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#156: FILE: hw/net/can/ctu_can_fd_frame.h:122:
+^Istruct ctu_can_fd_timestamp_l_w_s {$

ERROR: code indent should never use tabs
#158: FILE: hw/net/can/ctu_can_fd_frame.h:124:
+^I^Iuint32_t time_stamp_31_0        : 32;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#158: FILE: hw/net/can/ctu_can_fd_frame.h:124:
+               uint32_t time_stamp_31_0        : 32;
                                                ^

ERROR: code indent should never use tabs
#159: FILE: hw/net/can/ctu_can_fd_frame.h:125:
+^I} s;$

ERROR: code indent should never use tabs
#163: FILE: hw/net/can/ctu_can_fd_frame.h:129:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#164: FILE: hw/net/can/ctu_can_fd_frame.h:130:
+^Istruct ctu_can_fd_timestamp_u_w_s {$

ERROR: code indent should never use tabs
#166: FILE: hw/net/can/ctu_can_fd_frame.h:132:
+^I^Iuint32_t timestamp_l_w          : 32;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#166: FILE: hw/net/can/ctu_can_fd_frame.h:132:
+               uint32_t timestamp_l_w          : 32;
                                                ^

ERROR: code indent should never use tabs
#167: FILE: hw/net/can/ctu_can_fd_frame.h:133:
+^I} s;$

ERROR: code indent should never use tabs
#171: FILE: hw/net/can/ctu_can_fd_frame.h:137:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#172: FILE: hw/net/can/ctu_can_fd_frame.h:138:
+^Istruct ctu_can_fd_data_1_4_w_s {$

WARNING: architecture specific defines should be avoided
#173: FILE: hw/net/can/ctu_can_fd_frame.h:139:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#175: FILE: hw/net/can/ctu_can_fd_frame.h:141:
+^I^Iuint32_t data_1                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#175: FILE: hw/net/can/ctu_can_fd_frame.h:141:
+               uint32_t data_1                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#176: FILE: hw/net/can/ctu_can_fd_frame.h:142:
+^I^Iuint32_t data_2                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#176: FILE: hw/net/can/ctu_can_fd_frame.h:142:
+               uint32_t data_2                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#177: FILE: hw/net/can/ctu_can_fd_frame.h:143:
+^I^Iuint32_t data_3                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#177: FILE: hw/net/can/ctu_can_fd_frame.h:143:
+               uint32_t data_3                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#178: FILE: hw/net/can/ctu_can_fd_frame.h:144:
+^I^Iuint32_t data_4                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#178: FILE: hw/net/can/ctu_can_fd_frame.h:144:
+               uint32_t data_4                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#180: FILE: hw/net/can/ctu_can_fd_frame.h:146:
+^I^Iuint32_t data_4                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#180: FILE: hw/net/can/ctu_can_fd_frame.h:146:
+               uint32_t data_4                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#181: FILE: hw/net/can/ctu_can_fd_frame.h:147:
+^I^Iuint32_t data_3                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#181: FILE: hw/net/can/ctu_can_fd_frame.h:147:
+               uint32_t data_3                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#182: FILE: hw/net/can/ctu_can_fd_frame.h:148:
+^I^Iuint32_t data_2                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#182: FILE: hw/net/can/ctu_can_fd_frame.h:148:
+               uint32_t data_2                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#183: FILE: hw/net/can/ctu_can_fd_frame.h:149:
+^I^Iuint32_t data_1                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#183: FILE: hw/net/can/ctu_can_fd_frame.h:149:
+               uint32_t data_1                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#185: FILE: hw/net/can/ctu_can_fd_frame.h:151:
+^I} s;$

ERROR: code indent should never use tabs
#189: FILE: hw/net/can/ctu_can_fd_frame.h:155:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#190: FILE: hw/net/can/ctu_can_fd_frame.h:156:
+^Istruct ctu_can_fd_data_5_8_w_s {$

WARNING: architecture specific defines should be avoided
#191: FILE: hw/net/can/ctu_can_fd_frame.h:157:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#193: FILE: hw/net/can/ctu_can_fd_frame.h:159:
+^I^Iuint32_t data_5                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#193: FILE: hw/net/can/ctu_can_fd_frame.h:159:
+               uint32_t data_5                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#194: FILE: hw/net/can/ctu_can_fd_frame.h:160:
+^I^Iuint32_t data_6                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#194: FILE: hw/net/can/ctu_can_fd_frame.h:160:
+               uint32_t data_6                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#195: FILE: hw/net/can/ctu_can_fd_frame.h:161:
+^I^Iuint32_t data_7                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#195: FILE: hw/net/can/ctu_can_fd_frame.h:161:
+               uint32_t data_7                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#196: FILE: hw/net/can/ctu_can_fd_frame.h:162:
+^I^Iuint32_t data_8                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#196: FILE: hw/net/can/ctu_can_fd_frame.h:162:
+               uint32_t data_8                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#198: FILE: hw/net/can/ctu_can_fd_frame.h:164:
+^I^Iuint32_t data_8                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#198: FILE: hw/net/can/ctu_can_fd_frame.h:164:
+               uint32_t data_8                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#199: FILE: hw/net/can/ctu_can_fd_frame.h:165:
+^I^Iuint32_t data_7                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#199: FILE: hw/net/can/ctu_can_fd_frame.h:165:
+               uint32_t data_7                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#200: FILE: hw/net/can/ctu_can_fd_frame.h:166:
+^I^Iuint32_t data_6                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#200: FILE: hw/net/can/ctu_can_fd_frame.h:166:
+               uint32_t data_6                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#201: FILE: hw/net/can/ctu_can_fd_frame.h:167:
+^I^Iuint32_t data_5                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#201: FILE: hw/net/can/ctu_can_fd_frame.h:167:
+               uint32_t data_5                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#203: FILE: hw/net/can/ctu_can_fd_frame.h:169:
+^I} s;$

ERROR: code indent should never use tabs
#207: FILE: hw/net/can/ctu_can_fd_frame.h:173:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#208: FILE: hw/net/can/ctu_can_fd_frame.h:174:
+^Istruct ctu_can_fd_data_61_64_w_s {$

WARNING: architecture specific defines should be avoided
#209: FILE: hw/net/can/ctu_can_fd_frame.h:175:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#211: FILE: hw/net/can/ctu_can_fd_frame.h:177:
+^I^Iuint32_t data_61                 : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#211: FILE: hw/net/can/ctu_can_fd_frame.h:177:
+               uint32_t data_61                 : 8;
                                                 ^

ERROR: code indent should never use tabs
#212: FILE: hw/net/can/ctu_can_fd_frame.h:178:
+^I^Iuint32_t data_62                 : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#212: FILE: hw/net/can/ctu_can_fd_frame.h:178:
+               uint32_t data_62                 : 8;
                                                 ^

ERROR: code indent should never use tabs
#213: FILE: hw/net/can/ctu_can_fd_frame.h:179:
+^I^Iuint32_t data_63                 : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#213: FILE: hw/net/can/ctu_can_fd_frame.h:179:
+               uint32_t data_63                 : 8;
                                                 ^

ERROR: code indent should never use tabs
#214: FILE: hw/net/can/ctu_can_fd_frame.h:180:
+^I^Iuint32_t data_64                 : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#214: FILE: hw/net/can/ctu_can_fd_frame.h:180:
+               uint32_t data_64                 : 8;
                                                 ^

ERROR: code indent should never use tabs
#216: FILE: hw/net/can/ctu_can_fd_frame.h:182:
+^I^Iuint32_t data_64                 : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#216: FILE: hw/net/can/ctu_can_fd_frame.h:182:
+               uint32_t data_64                 : 8;
                                                 ^

ERROR: code indent should never use tabs
#217: FILE: hw/net/can/ctu_can_fd_frame.h:183:
+^I^Iuint32_t data_63                 : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#217: FILE: hw/net/can/ctu_can_fd_frame.h:183:
+               uint32_t data_63                 : 8;
                                                 ^

ERROR: code indent should never use tabs
#218: FILE: hw/net/can/ctu_can_fd_frame.h:184:
+^I^Iuint32_t data_62                 : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#218: FILE: hw/net/can/ctu_can_fd_frame.h:184:
+               uint32_t data_62                 : 8;
                                                 ^

ERROR: code indent should never use tabs
#219: FILE: hw/net/can/ctu_can_fd_frame.h:185:
+^I^Iuint32_t data_61                 : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#219: FILE: hw/net/can/ctu_can_fd_frame.h:185:
+               uint32_t data_61                 : 8;
                                                 ^

ERROR: code indent should never use tabs
#221: FILE: hw/net/can/ctu_can_fd_frame.h:187:
+^I} s;$

WARNING: Block comments use a leading /* on a separate line
#232: FILE: hw/net/can/ctu_can_fd_regs.h:2:
+/*******************************************************************************

WARNING: architecture specific defines should be avoided
#263: FILE: hw/net/can/ctu_can_fd_regs.h:33:
+#ifndef __CTU_CAN_FD_CAN_FD_REGISTER_MAP__

ERROR: code indent should never use tabs
#268: FILE: hw/net/can/ctu_can_fd_regs.h:38:
+^ICTU_CAN_FD_DEVICE_ID             = 0x0,$

ERROR: code indent should never use tabs
#269: FILE: hw/net/can/ctu_can_fd_regs.h:39:
+^ICTU_CAN_FD_VERSION               = 0x2,$

ERROR: code indent should never use tabs
#270: FILE: hw/net/can/ctu_can_fd_regs.h:40:
+^ICTU_CAN_FD_MODE                  = 0x4,$

ERROR: code indent should never use tabs
#271: FILE: hw/net/can/ctu_can_fd_regs.h:41:
+^ICTU_CAN_FD_SETTINGS              = 0x6,$

ERROR: code indent should never use tabs
#272: FILE: hw/net/can/ctu_can_fd_regs.h:42:
+^ICTU_CAN_FD_STATUS                = 0x8,$

ERROR: code indent should never use tabs
#273: FILE: hw/net/can/ctu_can_fd_regs.h:43:
+^ICTU_CAN_FD_COMMAND               = 0xc,$

ERROR: code indent should never use tabs
#274: FILE: hw/net/can/ctu_can_fd_regs.h:44:
+^ICTU_CAN_FD_INT_STAT             = 0x10,$

ERROR: code indent should never use tabs
#275: FILE: hw/net/can/ctu_can_fd_regs.h:45:
+^ICTU_CAN_FD_INT_ENA_SET          = 0x14,$

ERROR: code indent should never use tabs
#276: FILE: hw/net/can/ctu_can_fd_regs.h:46:
+^ICTU_CAN_FD_INT_ENA_CLR          = 0x18,$

ERROR: code indent should never use tabs
#277: FILE: hw/net/can/ctu_can_fd_regs.h:47:
+^ICTU_CAN_FD_INT_MASK_SET         = 0x1c,$

ERROR: code indent should never use tabs
#278: FILE: hw/net/can/ctu_can_fd_regs.h:48:
+^ICTU_CAN_FD_INT_MASK_CLR         = 0x20,$

ERROR: code indent should never use tabs
#279: FILE: hw/net/can/ctu_can_fd_regs.h:49:
+^ICTU_CAN_FD_BTR                  = 0x24,$

ERROR: code indent should never use tabs
#280: FILE: hw/net/can/ctu_can_fd_regs.h:50:
+^ICTU_CAN_FD_BTR_FD               = 0x28,$

ERROR: code indent should never use tabs
#281: FILE: hw/net/can/ctu_can_fd_regs.h:51:
+^ICTU_CAN_FD_EWL                  = 0x2c,$

ERROR: code indent should never use tabs
#282: FILE: hw/net/can/ctu_can_fd_regs.h:52:
+^ICTU_CAN_FD_ERP                  = 0x2d,$

ERROR: code indent should never use tabs
#283: FILE: hw/net/can/ctu_can_fd_regs.h:53:
+^ICTU_CAN_FD_FAULT_STATE          = 0x2e,$

ERROR: code indent should never use tabs
#284: FILE: hw/net/can/ctu_can_fd_regs.h:54:
+^ICTU_CAN_FD_REC                  = 0x30,$

ERROR: code indent should never use tabs
#285: FILE: hw/net/can/ctu_can_fd_regs.h:55:
+^ICTU_CAN_FD_TEC                  = 0x32,$

ERROR: code indent should never use tabs
#286: FILE: hw/net/can/ctu_can_fd_regs.h:56:
+^ICTU_CAN_FD_ERR_NORM             = 0x34,$

ERROR: code indent should never use tabs
#287: FILE: hw/net/can/ctu_can_fd_regs.h:57:
+^ICTU_CAN_FD_ERR_FD               = 0x36,$

ERROR: code indent should never use tabs
#288: FILE: hw/net/can/ctu_can_fd_regs.h:58:
+^ICTU_CAN_FD_CTR_PRES             = 0x38,$

ERROR: code indent should never use tabs
#289: FILE: hw/net/can/ctu_can_fd_regs.h:59:
+^ICTU_CAN_FD_FILTER_A_MASK        = 0x3c,$

ERROR: code indent should never use tabs
#290: FILE: hw/net/can/ctu_can_fd_regs.h:60:
+^ICTU_CAN_FD_FILTER_A_VAL         = 0x40,$

ERROR: code indent should never use tabs
#291: FILE: hw/net/can/ctu_can_fd_regs.h:61:
+^ICTU_CAN_FD_FILTER_B_MASK        = 0x44,$

ERROR: code indent should never use tabs
#292: FILE: hw/net/can/ctu_can_fd_regs.h:62:
+^ICTU_CAN_FD_FILTER_B_VAL         = 0x48,$

ERROR: code indent should never use tabs
#293: FILE: hw/net/can/ctu_can_fd_regs.h:63:
+^ICTU_CAN_FD_FILTER_C_MASK        = 0x4c,$

ERROR: code indent should never use tabs
#294: FILE: hw/net/can/ctu_can_fd_regs.h:64:
+^ICTU_CAN_FD_FILTER_C_VAL         = 0x50,$

ERROR: code indent should never use tabs
#295: FILE: hw/net/can/ctu_can_fd_regs.h:65:
+^ICTU_CAN_FD_FILTER_RAN_LOW       = 0x54,$

ERROR: code indent should never use tabs
#296: FILE: hw/net/can/ctu_can_fd_regs.h:66:
+^ICTU_CAN_FD_FILTER_RAN_HIGH      = 0x58,$

ERROR: code indent should never use tabs
#297: FILE: hw/net/can/ctu_can_fd_regs.h:67:
+^ICTU_CAN_FD_FILTER_CONTROL       = 0x5c,$

ERROR: code indent should never use tabs
#298: FILE: hw/net/can/ctu_can_fd_regs.h:68:
+^ICTU_CAN_FD_FILTER_STATUS        = 0x5e,$

ERROR: code indent should never use tabs
#299: FILE: hw/net/can/ctu_can_fd_regs.h:69:
+^ICTU_CAN_FD_RX_MEM_INFO          = 0x60,$

ERROR: code indent should never use tabs
#300: FILE: hw/net/can/ctu_can_fd_regs.h:70:
+^ICTU_CAN_FD_RX_POINTERS          = 0x64,$

ERROR: code indent should never use tabs
#301: FILE: hw/net/can/ctu_can_fd_regs.h:71:
+^ICTU_CAN_FD_RX_STATUS            = 0x68,$

ERROR: code indent should never use tabs
#302: FILE: hw/net/can/ctu_can_fd_regs.h:72:
+^ICTU_CAN_FD_RX_SETTINGS          = 0x6a,$

ERROR: code indent should never use tabs
#303: FILE: hw/net/can/ctu_can_fd_regs.h:73:
+^ICTU_CAN_FD_RX_DATA              = 0x6c,$

ERROR: code indent should never use tabs
#304: FILE: hw/net/can/ctu_can_fd_regs.h:74:
+^ICTU_CAN_FD_TX_STATUS            = 0x70,$

ERROR: code indent should never use tabs
#305: FILE: hw/net/can/ctu_can_fd_regs.h:75:
+^ICTU_CAN_FD_TX_COMMAND           = 0x74,$

ERROR: code indent should never use tabs
#306: FILE: hw/net/can/ctu_can_fd_regs.h:76:
+^ICTU_CAN_FD_TX_PRIORITY          = 0x78,$

ERROR: code indent should never use tabs
#307: FILE: hw/net/can/ctu_can_fd_regs.h:77:
+^ICTU_CAN_FD_ERR_CAPT             = 0x7c,$

ERROR: code indent should never use tabs
#308: FILE: hw/net/can/ctu_can_fd_regs.h:78:
+^ICTU_CAN_FD_ALC                  = 0x7e,$

ERROR: code indent should never use tabs
#309: FILE: hw/net/can/ctu_can_fd_regs.h:79:
+^ICTU_CAN_FD_TRV_DELAY            = 0x80,$

ERROR: code indent should never use tabs
#310: FILE: hw/net/can/ctu_can_fd_regs.h:80:
+^ICTU_CAN_FD_SSP_CFG              = 0x82,$

ERROR: code indent should never use tabs
#311: FILE: hw/net/can/ctu_can_fd_regs.h:81:
+^ICTU_CAN_FD_RX_FR_CTR            = 0x84,$

ERROR: code indent should never use tabs
#312: FILE: hw/net/can/ctu_can_fd_regs.h:82:
+^ICTU_CAN_FD_TX_FR_CTR            = 0x88,$

ERROR: code indent should never use tabs
#313: FILE: hw/net/can/ctu_can_fd_regs.h:83:
+^ICTU_CAN_FD_DEBUG_REGISTER       = 0x8c,$

ERROR: code indent should never use tabs
#314: FILE: hw/net/can/ctu_can_fd_regs.h:84:
+^ICTU_CAN_FD_YOLO_REG             = 0x90,$

ERROR: code indent should never use tabs
#315: FILE: hw/net/can/ctu_can_fd_regs.h:85:
+^ICTU_CAN_FD_TIMESTAMP_LOW        = 0x94,$

ERROR: code indent should never use tabs
#316: FILE: hw/net/can/ctu_can_fd_regs.h:86:
+^ICTU_CAN_FD_TIMESTAMP_HIGH       = 0x98,$

ERROR: code indent should never use tabs
#317: FILE: hw/net/can/ctu_can_fd_regs.h:87:
+^ICTU_CAN_FD_TXTB1_DATA_1        = 0x100,$

ERROR: code indent should never use tabs
#318: FILE: hw/net/can/ctu_can_fd_regs.h:88:
+^ICTU_CAN_FD_TXTB1_DATA_2        = 0x104,$

ERROR: code indent should never use tabs
#319: FILE: hw/net/can/ctu_can_fd_regs.h:89:
+^ICTU_CAN_FD_TXTB1_DATA_20       = 0x14c,$

ERROR: code indent should never use tabs
#320: FILE: hw/net/can/ctu_can_fd_regs.h:90:
+^ICTU_CAN_FD_TXTB2_DATA_1        = 0x200,$

ERROR: code indent should never use tabs
#321: FILE: hw/net/can/ctu_can_fd_regs.h:91:
+^ICTU_CAN_FD_TXTB2_DATA_2        = 0x204,$

ERROR: code indent should never use tabs
#322: FILE: hw/net/can/ctu_can_fd_regs.h:92:
+^ICTU_CAN_FD_TXTB2_DATA_20       = 0x24c,$

ERROR: code indent should never use tabs
#323: FILE: hw/net/can/ctu_can_fd_regs.h:93:
+^ICTU_CAN_FD_TXTB3_DATA_1        = 0x300,$

ERROR: code indent should never use tabs
#324: FILE: hw/net/can/ctu_can_fd_regs.h:94:
+^ICTU_CAN_FD_TXTB3_DATA_2        = 0x304,$

ERROR: code indent should never use tabs
#325: FILE: hw/net/can/ctu_can_fd_regs.h:95:
+^ICTU_CAN_FD_TXTB3_DATA_20       = 0x34c,$

ERROR: code indent should never use tabs
#326: FILE: hw/net/can/ctu_can_fd_regs.h:96:
+^ICTU_CAN_FD_TXTB4_DATA_1        = 0x400,$

ERROR: code indent should never use tabs
#327: FILE: hw/net/can/ctu_can_fd_regs.h:97:
+^ICTU_CAN_FD_TXTB4_DATA_2        = 0x404,$

ERROR: code indent should never use tabs
#328: FILE: hw/net/can/ctu_can_fd_regs.h:98:
+^ICTU_CAN_FD_TXTB4_DATA_20       = 0x44c,$

ERROR: code indent should never use tabs
#334: FILE: hw/net/can/ctu_can_fd_regs.h:104:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#335: FILE: hw/net/can/ctu_can_fd_regs.h:105:
+^Istruct ctu_can_fd_device_id_version_s {$

WARNING: architecture specific defines should be avoided
#336: FILE: hw/net/can/ctu_can_fd_regs.h:106:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#338: FILE: hw/net/can/ctu_can_fd_regs.h:108:
+^I^Iuint32_t device_id              : 16;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#338: FILE: hw/net/can/ctu_can_fd_regs.h:108:
+               uint32_t device_id              : 16;
                                                ^

ERROR: code indent should never use tabs
#340: FILE: hw/net/can/ctu_can_fd_regs.h:110:
+^I^Iuint32_t ver_minor               : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#340: FILE: hw/net/can/ctu_can_fd_regs.h:110:
+               uint32_t ver_minor               : 8;
                                                 ^

ERROR: code indent should never use tabs
#341: FILE: hw/net/can/ctu_can_fd_regs.h:111:
+^I^Iuint32_t ver_major               : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#341: FILE: hw/net/can/ctu_can_fd_regs.h:111:
+               uint32_t ver_major               : 8;
                                                 ^

ERROR: code indent should never use tabs
#343: FILE: hw/net/can/ctu_can_fd_regs.h:113:
+^I^Iuint32_t ver_major               : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#343: FILE: hw/net/can/ctu_can_fd_regs.h:113:
+               uint32_t ver_major               : 8;
                                                 ^

ERROR: code indent should never use tabs
#344: FILE: hw/net/can/ctu_can_fd_regs.h:114:
+^I^Iuint32_t ver_minor               : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#344: FILE: hw/net/can/ctu_can_fd_regs.h:114:
+               uint32_t ver_minor               : 8;
                                                 ^

ERROR: code indent should never use tabs
#345: FILE: hw/net/can/ctu_can_fd_regs.h:115:
+^I^Iuint32_t device_id              : 16;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#345: FILE: hw/net/can/ctu_can_fd_regs.h:115:
+               uint32_t device_id              : 16;
                                                ^

ERROR: code indent should never use tabs
#347: FILE: hw/net/can/ctu_can_fd_regs.h:117:
+^I} s;$

ERROR: code indent should never use tabs
#351: FILE: hw/net/can/ctu_can_fd_regs.h:121:
+^ICTU_CAN_FD_ID    = 0xcafd,$

ERROR: code indent should never use tabs
#355: FILE: hw/net/can/ctu_can_fd_regs.h:125:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#356: FILE: hw/net/can/ctu_can_fd_regs.h:126:
+^Istruct ctu_can_fd_mode_settings_s {$

WARNING: architecture specific defines should be avoided
#357: FILE: hw/net/can/ctu_can_fd_regs.h:127:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#359: FILE: hw/net/can/ctu_can_fd_regs.h:129:
+^I^Iuint32_t rst                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#359: FILE: hw/net/can/ctu_can_fd_regs.h:129:
+               uint32_t rst                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#360: FILE: hw/net/can/ctu_can_fd_regs.h:130:
+^I^Iuint32_t lom                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#360: FILE: hw/net/can/ctu_can_fd_regs.h:130:
+               uint32_t lom                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#361: FILE: hw/net/can/ctu_can_fd_regs.h:131:
+^I^Iuint32_t stm                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#361: FILE: hw/net/can/ctu_can_fd_regs.h:131:
+               uint32_t stm                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#362: FILE: hw/net/can/ctu_can_fd_regs.h:132:
+^I^Iuint32_t afm                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#362: FILE: hw/net/can/ctu_can_fd_regs.h:132:
+               uint32_t afm                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#363: FILE: hw/net/can/ctu_can_fd_regs.h:133:
+^I^Iuint32_t fde                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#363: FILE: hw/net/can/ctu_can_fd_regs.h:133:
+               uint32_t fde                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#364: FILE: hw/net/can/ctu_can_fd_regs.h:134:
+^I^Iuint32_t reserved_6_5            : 2;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#364: FILE: hw/net/can/ctu_can_fd_regs.h:134:
+               uint32_t reserved_6_5            : 2;
                                                 ^

ERROR: code indent should never use tabs
#365: FILE: hw/net/can/ctu_can_fd_regs.h:135:
+^I^Iuint32_t acf                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#365: FILE: hw/net/can/ctu_can_fd_regs.h:135:
+               uint32_t acf                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#366: FILE: hw/net/can/ctu_can_fd_regs.h:136:
+^I^Iuint32_t tstm                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#366: FILE: hw/net/can/ctu_can_fd_regs.h:136:
+               uint32_t tstm                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#367: FILE: hw/net/can/ctu_can_fd_regs.h:137:
+^I^Iuint32_t reserved_15_9           : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#367: FILE: hw/net/can/ctu_can_fd_regs.h:137:
+               uint32_t reserved_15_9           : 7;
                                                 ^

ERROR: code indent should never use tabs
#369: FILE: hw/net/can/ctu_can_fd_regs.h:139:
+^I^Iuint32_t rtrle                   : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#369: FILE: hw/net/can/ctu_can_fd_regs.h:139:
+               uint32_t rtrle                   : 1;
                                                 ^

ERROR: code indent should never use tabs
#370: FILE: hw/net/can/ctu_can_fd_regs.h:140:
+^I^Iuint32_t rtrth                   : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#370: FILE: hw/net/can/ctu_can_fd_regs.h:140:
+               uint32_t rtrth                   : 4;
                                                 ^

ERROR: code indent should never use tabs
#371: FILE: hw/net/can/ctu_can_fd_regs.h:141:
+^I^Iuint32_t ilbp                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#371: FILE: hw/net/can/ctu_can_fd_regs.h:141:
+               uint32_t ilbp                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#372: FILE: hw/net/can/ctu_can_fd_regs.h:142:
+^I^Iuint32_t ena                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#372: FILE: hw/net/can/ctu_can_fd_regs.h:142:
+               uint32_t ena                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#373: FILE: hw/net/can/ctu_can_fd_regs.h:143:
+^I^Iuint32_t nisofd                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#373: FILE: hw/net/can/ctu_can_fd_regs.h:143:
+               uint32_t nisofd                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#374: FILE: hw/net/can/ctu_can_fd_regs.h:144:
+^I^Iuint32_t pex                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#374: FILE: hw/net/can/ctu_can_fd_regs.h:144:
+               uint32_t pex                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#375: FILE: hw/net/can/ctu_can_fd_regs.h:145:
+^I^Iuint32_t reserved_31_25          : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#375: FILE: hw/net/can/ctu_can_fd_regs.h:145:
+               uint32_t reserved_31_25          : 7;
                                                 ^

ERROR: code indent should never use tabs
#377: FILE: hw/net/can/ctu_can_fd_regs.h:147:
+^I^Iuint32_t reserved_31_25          : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#377: FILE: hw/net/can/ctu_can_fd_regs.h:147:
+               uint32_t reserved_31_25          : 7;
                                                 ^

ERROR: code indent should never use tabs
#378: FILE: hw/net/can/ctu_can_fd_regs.h:148:
+^I^Iuint32_t pex                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#378: FILE: hw/net/can/ctu_can_fd_regs.h:148:
+               uint32_t pex                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#379: FILE: hw/net/can/ctu_can_fd_regs.h:149:
+^I^Iuint32_t nisofd                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#379: FILE: hw/net/can/ctu_can_fd_regs.h:149:
+               uint32_t nisofd                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#380: FILE: hw/net/can/ctu_can_fd_regs.h:150:
+^I^Iuint32_t ena                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#380: FILE: hw/net/can/ctu_can_fd_regs.h:150:
+               uint32_t ena                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#381: FILE: hw/net/can/ctu_can_fd_regs.h:151:
+^I^Iuint32_t ilbp                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#381: FILE: hw/net/can/ctu_can_fd_regs.h:151:
+               uint32_t ilbp                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#382: FILE: hw/net/can/ctu_can_fd_regs.h:152:
+^I^Iuint32_t rtrth                   : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#382: FILE: hw/net/can/ctu_can_fd_regs.h:152:
+               uint32_t rtrth                   : 4;
                                                 ^

ERROR: code indent should never use tabs
#383: FILE: hw/net/can/ctu_can_fd_regs.h:153:
+^I^Iuint32_t rtrle                   : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#383: FILE: hw/net/can/ctu_can_fd_regs.h:153:
+               uint32_t rtrle                   : 1;
                                                 ^

ERROR: code indent should never use tabs
#384: FILE: hw/net/can/ctu_can_fd_regs.h:154:
+^I^Iuint32_t reserved_15_9           : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#384: FILE: hw/net/can/ctu_can_fd_regs.h:154:
+               uint32_t reserved_15_9           : 7;
                                                 ^

ERROR: code indent should never use tabs
#385: FILE: hw/net/can/ctu_can_fd_regs.h:155:
+^I^Iuint32_t tstm                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#385: FILE: hw/net/can/ctu_can_fd_regs.h:155:
+               uint32_t tstm                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#386: FILE: hw/net/can/ctu_can_fd_regs.h:156:
+^I^Iuint32_t acf                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#386: FILE: hw/net/can/ctu_can_fd_regs.h:156:
+               uint32_t acf                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#387: FILE: hw/net/can/ctu_can_fd_regs.h:157:
+^I^Iuint32_t reserved_6_5            : 2;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#387: FILE: hw/net/can/ctu_can_fd_regs.h:157:
+               uint32_t reserved_6_5            : 2;
                                                 ^

ERROR: code indent should never use tabs
#388: FILE: hw/net/can/ctu_can_fd_regs.h:158:
+^I^Iuint32_t fde                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#388: FILE: hw/net/can/ctu_can_fd_regs.h:158:
+               uint32_t fde                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#389: FILE: hw/net/can/ctu_can_fd_regs.h:159:
+^I^Iuint32_t afm                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#389: FILE: hw/net/can/ctu_can_fd_regs.h:159:
+               uint32_t afm                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#390: FILE: hw/net/can/ctu_can_fd_regs.h:160:
+^I^Iuint32_t stm                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#390: FILE: hw/net/can/ctu_can_fd_regs.h:160:
+               uint32_t stm                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#391: FILE: hw/net/can/ctu_can_fd_regs.h:161:
+^I^Iuint32_t lom                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#391: FILE: hw/net/can/ctu_can_fd_regs.h:161:
+               uint32_t lom                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#392: FILE: hw/net/can/ctu_can_fd_regs.h:162:
+^I^Iuint32_t rst                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#392: FILE: hw/net/can/ctu_can_fd_regs.h:162:
+               uint32_t rst                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#394: FILE: hw/net/can/ctu_can_fd_regs.h:164:
+^I} s;$

ERROR: code indent should never use tabs
#398: FILE: hw/net/can/ctu_can_fd_regs.h:168:
+^ILOM_DISABLED       = 0x0,$

ERROR: code indent should never use tabs
#399: FILE: hw/net/can/ctu_can_fd_regs.h:169:
+^ILOM_ENABLED        = 0x1,$

ERROR: code indent should never use tabs
#403: FILE: hw/net/can/ctu_can_fd_regs.h:173:
+^ISTM_DISABLED       = 0x0,$

ERROR: code indent should never use tabs
#404: FILE: hw/net/can/ctu_can_fd_regs.h:174:
+^ISTM_ENABLED        = 0x1,$

ERROR: code indent should never use tabs
#408: FILE: hw/net/can/ctu_can_fd_regs.h:178:
+^IAFM_DISABLED       = 0x0,$

ERROR: code indent should never use tabs
#409: FILE: hw/net/can/ctu_can_fd_regs.h:179:
+^IAFM_ENABLED        = 0x1,$

ERROR: code indent should never use tabs
#413: FILE: hw/net/can/ctu_can_fd_regs.h:183:
+^IFDE_DISABLE       = 0x0,$

ERROR: code indent should never use tabs
#414: FILE: hw/net/can/ctu_can_fd_regs.h:184:
+^IFDE_ENABLE        = 0x1,$

ERROR: code indent should never use tabs
#418: FILE: hw/net/can/ctu_can_fd_regs.h:188:
+^IACF_DISABLED       = 0x0,$

ERROR: code indent should never use tabs
#419: FILE: hw/net/can/ctu_can_fd_regs.h:189:
+^IACF_ENABLED        = 0x1,$

ERROR: code indent should never use tabs
#423: FILE: hw/net/can/ctu_can_fd_regs.h:193:
+^IRTRLE_DISABLED       = 0x0,$

ERROR: code indent should never use tabs
#424: FILE: hw/net/can/ctu_can_fd_regs.h:194:
+^IRTRLE_ENABLED        = 0x1,$

ERROR: code indent should never use tabs
#428: FILE: hw/net/can/ctu_can_fd_regs.h:198:
+^IINT_LOOP_DISABLED       = 0x0,$

ERROR: code indent should never use tabs
#429: FILE: hw/net/can/ctu_can_fd_regs.h:199:
+^IINT_LOOP_ENABLED        = 0x1,$

ERROR: code indent should never use tabs
#433: FILE: hw/net/can/ctu_can_fd_regs.h:203:
+^ICTU_CAN_DISABLED       = 0x0,$

ERROR: code indent should never use tabs
#434: FILE: hw/net/can/ctu_can_fd_regs.h:204:
+^ICTU_CAN_ENABLED        = 0x1,$

ERROR: code indent should never use tabs
#438: FILE: hw/net/can/ctu_can_fd_regs.h:208:
+^IISO_FD           = 0x0,$

ERROR: code indent should never use tabs
#439: FILE: hw/net/can/ctu_can_fd_regs.h:209:
+^INON_ISO_FD       = 0x1,$

ERROR: code indent should never use tabs
#443: FILE: hw/net/can/ctu_can_fd_regs.h:213:
+^IPROTOCOL_EXCEPTION_DISABLED       = 0x0,$

ERROR: code indent should never use tabs
#444: FILE: hw/net/can/ctu_can_fd_regs.h:214:
+^IPROTOCOL_EXCEPTION_ENABLED        = 0x1,$

ERROR: code indent should never use tabs
#448: FILE: hw/net/can/ctu_can_fd_regs.h:218:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#449: FILE: hw/net/can/ctu_can_fd_regs.h:219:
+^Istruct ctu_can_fd_status_s {$

WARNING: architecture specific defines should be avoided
#450: FILE: hw/net/can/ctu_can_fd_regs.h:220:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#452: FILE: hw/net/can/ctu_can_fd_regs.h:222:
+^I^Iuint32_t rxne                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#452: FILE: hw/net/can/ctu_can_fd_regs.h:222:
+               uint32_t rxne                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#453: FILE: hw/net/can/ctu_can_fd_regs.h:223:
+^I^Iuint32_t dor                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#453: FILE: hw/net/can/ctu_can_fd_regs.h:223:
+               uint32_t dor                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#454: FILE: hw/net/can/ctu_can_fd_regs.h:224:
+^I^Iuint32_t txnf                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#454: FILE: hw/net/can/ctu_can_fd_regs.h:224:
+               uint32_t txnf                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#455: FILE: hw/net/can/ctu_can_fd_regs.h:225:
+^I^Iuint32_t eft                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#455: FILE: hw/net/can/ctu_can_fd_regs.h:225:
+               uint32_t eft                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#456: FILE: hw/net/can/ctu_can_fd_regs.h:226:
+^I^Iuint32_t rxs                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#456: FILE: hw/net/can/ctu_can_fd_regs.h:226:
+               uint32_t rxs                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#457: FILE: hw/net/can/ctu_can_fd_regs.h:227:
+^I^Iuint32_t txs                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#457: FILE: hw/net/can/ctu_can_fd_regs.h:227:
+               uint32_t txs                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#458: FILE: hw/net/can/ctu_can_fd_regs.h:228:
+^I^Iuint32_t ewl                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#458: FILE: hw/net/can/ctu_can_fd_regs.h:228:
+               uint32_t ewl                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#459: FILE: hw/net/can/ctu_can_fd_regs.h:229:
+^I^Iuint32_t idle                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#459: FILE: hw/net/can/ctu_can_fd_regs.h:229:
+               uint32_t idle                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#460: FILE: hw/net/can/ctu_can_fd_regs.h:230:
+^I^Iuint32_t reserved_31_8          : 24;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#460: FILE: hw/net/can/ctu_can_fd_regs.h:230:
+               uint32_t reserved_31_8          : 24;
                                                ^

ERROR: code indent should never use tabs
#462: FILE: hw/net/can/ctu_can_fd_regs.h:232:
+^I^Iuint32_t reserved_31_8          : 24;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#462: FILE: hw/net/can/ctu_can_fd_regs.h:232:
+               uint32_t reserved_31_8          : 24;
                                                ^

ERROR: code indent should never use tabs
#463: FILE: hw/net/can/ctu_can_fd_regs.h:233:
+^I^Iuint32_t idle                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#463: FILE: hw/net/can/ctu_can_fd_regs.h:233:
+               uint32_t idle                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#464: FILE: hw/net/can/ctu_can_fd_regs.h:234:
+^I^Iuint32_t ewl                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#464: FILE: hw/net/can/ctu_can_fd_regs.h:234:
+               uint32_t ewl                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#465: FILE: hw/net/can/ctu_can_fd_regs.h:235:
+^I^Iuint32_t txs                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#465: FILE: hw/net/can/ctu_can_fd_regs.h:235:
+               uint32_t txs                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#466: FILE: hw/net/can/ctu_can_fd_regs.h:236:
+^I^Iuint32_t rxs                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#466: FILE: hw/net/can/ctu_can_fd_regs.h:236:
+               uint32_t rxs                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#467: FILE: hw/net/can/ctu_can_fd_regs.h:237:
+^I^Iuint32_t eft                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#467: FILE: hw/net/can/ctu_can_fd_regs.h:237:
+               uint32_t eft                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#468: FILE: hw/net/can/ctu_can_fd_regs.h:238:
+^I^Iuint32_t txnf                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#468: FILE: hw/net/can/ctu_can_fd_regs.h:238:
+               uint32_t txnf                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#469: FILE: hw/net/can/ctu_can_fd_regs.h:239:
+^I^Iuint32_t dor                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#469: FILE: hw/net/can/ctu_can_fd_regs.h:239:
+               uint32_t dor                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#470: FILE: hw/net/can/ctu_can_fd_regs.h:240:
+^I^Iuint32_t rxne                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#470: FILE: hw/net/can/ctu_can_fd_regs.h:240:
+               uint32_t rxne                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#472: FILE: hw/net/can/ctu_can_fd_regs.h:242:
+^I} s;$

ERROR: code indent should never use tabs
#476: FILE: hw/net/can/ctu_can_fd_regs.h:246:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#477: FILE: hw/net/can/ctu_can_fd_regs.h:247:
+^Istruct ctu_can_fd_command_s {$

WARNING: architecture specific defines should be avoided
#478: FILE: hw/net/can/ctu_can_fd_regs.h:248:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#479: FILE: hw/net/can/ctu_can_fd_regs.h:249:
+^I^Iuint32_t reserved_1_0            : 2;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#479: FILE: hw/net/can/ctu_can_fd_regs.h:249:
+               uint32_t reserved_1_0            : 2;
                                                 ^

ERROR: code indent should never use tabs
#481: FILE: hw/net/can/ctu_can_fd_regs.h:251:
+^I^Iuint32_t rrb                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#481: FILE: hw/net/can/ctu_can_fd_regs.h:251:
+               uint32_t rrb                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#482: FILE: hw/net/can/ctu_can_fd_regs.h:252:
+^I^Iuint32_t cdo                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#482: FILE: hw/net/can/ctu_can_fd_regs.h:252:
+               uint32_t cdo                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#483: FILE: hw/net/can/ctu_can_fd_regs.h:253:
+^I^Iuint32_t ercrst                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#483: FILE: hw/net/can/ctu_can_fd_regs.h:253:
+               uint32_t ercrst                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#484: FILE: hw/net/can/ctu_can_fd_regs.h:254:
+^I^Iuint32_t rxfcrst                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#484: FILE: hw/net/can/ctu_can_fd_regs.h:254:
+               uint32_t rxfcrst                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#485: FILE: hw/net/can/ctu_can_fd_regs.h:255:
+^I^Iuint32_t txfcrst                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#485: FILE: hw/net/can/ctu_can_fd_regs.h:255:
+               uint32_t txfcrst                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#486: FILE: hw/net/can/ctu_can_fd_regs.h:256:
+^I^Iuint32_t reserved_31_7          : 25;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#486: FILE: hw/net/can/ctu_can_fd_regs.h:256:
+               uint32_t reserved_31_7          : 25;
                                                ^

ERROR: code indent should never use tabs
#488: FILE: hw/net/can/ctu_can_fd_regs.h:258:
+^I^Iuint32_t reserved_31_7          : 25;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#488: FILE: hw/net/can/ctu_can_fd_regs.h:258:
+               uint32_t reserved_31_7          : 25;
                                                ^

ERROR: code indent should never use tabs
#489: FILE: hw/net/can/ctu_can_fd_regs.h:259:
+^I^Iuint32_t txfcrst                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#489: FILE: hw/net/can/ctu_can_fd_regs.h:259:
+               uint32_t txfcrst                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#490: FILE: hw/net/can/ctu_can_fd_regs.h:260:
+^I^Iuint32_t rxfcrst                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#490: FILE: hw/net/can/ctu_can_fd_regs.h:260:
+               uint32_t rxfcrst                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#491: FILE: hw/net/can/ctu_can_fd_regs.h:261:
+^I^Iuint32_t ercrst                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#491: FILE: hw/net/can/ctu_can_fd_regs.h:261:
+               uint32_t ercrst                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#492: FILE: hw/net/can/ctu_can_fd_regs.h:262:
+^I^Iuint32_t cdo                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#492: FILE: hw/net/can/ctu_can_fd_regs.h:262:
+               uint32_t cdo                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#493: FILE: hw/net/can/ctu_can_fd_regs.h:263:
+^I^Iuint32_t rrb                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#493: FILE: hw/net/can/ctu_can_fd_regs.h:263:
+               uint32_t rrb                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#494: FILE: hw/net/can/ctu_can_fd_regs.h:264:
+^I^Iuint32_t reserved_1_0            : 2;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#494: FILE: hw/net/can/ctu_can_fd_regs.h:264:
+               uint32_t reserved_1_0            : 2;
                                                 ^

ERROR: code indent should never use tabs
#496: FILE: hw/net/can/ctu_can_fd_regs.h:266:
+^I} s;$

ERROR: code indent should never use tabs
#500: FILE: hw/net/can/ctu_can_fd_regs.h:270:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#501: FILE: hw/net/can/ctu_can_fd_regs.h:271:
+^Istruct ctu_can_fd_int_stat_s {$

WARNING: architecture specific defines should be avoided
#502: FILE: hw/net/can/ctu_can_fd_regs.h:272:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#504: FILE: hw/net/can/ctu_can_fd_regs.h:274:
+^I^Iuint32_t rxi                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#504: FILE: hw/net/can/ctu_can_fd_regs.h:274:
+               uint32_t rxi                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#505: FILE: hw/net/can/ctu_can_fd_regs.h:275:
+^I^Iuint32_t txi                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#505: FILE: hw/net/can/ctu_can_fd_regs.h:275:
+               uint32_t txi                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#506: FILE: hw/net/can/ctu_can_fd_regs.h:276:
+^I^Iuint32_t ewli                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#506: FILE: hw/net/can/ctu_can_fd_regs.h:276:
+               uint32_t ewli                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#507: FILE: hw/net/can/ctu_can_fd_regs.h:277:
+^I^Iuint32_t doi                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#507: FILE: hw/net/can/ctu_can_fd_regs.h:277:
+               uint32_t doi                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#508: FILE: hw/net/can/ctu_can_fd_regs.h:278:
+^I^Iuint32_t fcsi                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#508: FILE: hw/net/can/ctu_can_fd_regs.h:278:
+               uint32_t fcsi                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#509: FILE: hw/net/can/ctu_can_fd_regs.h:279:
+^I^Iuint32_t ali                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#509: FILE: hw/net/can/ctu_can_fd_regs.h:279:
+               uint32_t ali                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#510: FILE: hw/net/can/ctu_can_fd_regs.h:280:
+^I^Iuint32_t bei                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#510: FILE: hw/net/can/ctu_can_fd_regs.h:280:
+               uint32_t bei                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#511: FILE: hw/net/can/ctu_can_fd_regs.h:281:
+^I^Iuint32_t ofi                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#511: FILE: hw/net/can/ctu_can_fd_regs.h:281:
+               uint32_t ofi                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#512: FILE: hw/net/can/ctu_can_fd_regs.h:282:
+^I^Iuint32_t rxfi                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#512: FILE: hw/net/can/ctu_can_fd_regs.h:282:
+               uint32_t rxfi                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#513: FILE: hw/net/can/ctu_can_fd_regs.h:283:
+^I^Iuint32_t bsi                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#513: FILE: hw/net/can/ctu_can_fd_regs.h:283:
+               uint32_t bsi                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#514: FILE: hw/net/can/ctu_can_fd_regs.h:284:
+^I^Iuint32_t rbnei                   : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#514: FILE: hw/net/can/ctu_can_fd_regs.h:284:
+               uint32_t rbnei                   : 1;
                                                 ^

ERROR: code indent should never use tabs
#515: FILE: hw/net/can/ctu_can_fd_regs.h:285:
+^I^Iuint32_t txbhci                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#515: FILE: hw/net/can/ctu_can_fd_regs.h:285:
+               uint32_t txbhci                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#516: FILE: hw/net/can/ctu_can_fd_regs.h:286:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#516: FILE: hw/net/can/ctu_can_fd_regs.h:286:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#518: FILE: hw/net/can/ctu_can_fd_regs.h:288:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#518: FILE: hw/net/can/ctu_can_fd_regs.h:288:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#519: FILE: hw/net/can/ctu_can_fd_regs.h:289:
+^I^Iuint32_t txbhci                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#519: FILE: hw/net/can/ctu_can_fd_regs.h:289:
+               uint32_t txbhci                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#520: FILE: hw/net/can/ctu_can_fd_regs.h:290:
+^I^Iuint32_t rbnei                   : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#520: FILE: hw/net/can/ctu_can_fd_regs.h:290:
+               uint32_t rbnei                   : 1;
                                                 ^

ERROR: code indent should never use tabs
#521: FILE: hw/net/can/ctu_can_fd_regs.h:291:
+^I^Iuint32_t bsi                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#521: FILE: hw/net/can/ctu_can_fd_regs.h:291:
+               uint32_t bsi                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#522: FILE: hw/net/can/ctu_can_fd_regs.h:292:
+^I^Iuint32_t rxfi                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#522: FILE: hw/net/can/ctu_can_fd_regs.h:292:
+               uint32_t rxfi                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#523: FILE: hw/net/can/ctu_can_fd_regs.h:293:
+^I^Iuint32_t ofi                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#523: FILE: hw/net/can/ctu_can_fd_regs.h:293:
+               uint32_t ofi                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#524: FILE: hw/net/can/ctu_can_fd_regs.h:294:
+^I^Iuint32_t bei                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#524: FILE: hw/net/can/ctu_can_fd_regs.h:294:
+               uint32_t bei                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#525: FILE: hw/net/can/ctu_can_fd_regs.h:295:
+^I^Iuint32_t ali                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#525: FILE: hw/net/can/ctu_can_fd_regs.h:295:
+               uint32_t ali                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#526: FILE: hw/net/can/ctu_can_fd_regs.h:296:
+^I^Iuint32_t fcsi                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#526: FILE: hw/net/can/ctu_can_fd_regs.h:296:
+               uint32_t fcsi                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#527: FILE: hw/net/can/ctu_can_fd_regs.h:297:
+^I^Iuint32_t doi                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#527: FILE: hw/net/can/ctu_can_fd_regs.h:297:
+               uint32_t doi                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#528: FILE: hw/net/can/ctu_can_fd_regs.h:298:
+^I^Iuint32_t ewli                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#528: FILE: hw/net/can/ctu_can_fd_regs.h:298:
+               uint32_t ewli                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#529: FILE: hw/net/can/ctu_can_fd_regs.h:299:
+^I^Iuint32_t txi                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#529: FILE: hw/net/can/ctu_can_fd_regs.h:299:
+               uint32_t txi                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#530: FILE: hw/net/can/ctu_can_fd_regs.h:300:
+^I^Iuint32_t rxi                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#530: FILE: hw/net/can/ctu_can_fd_regs.h:300:
+               uint32_t rxi                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#532: FILE: hw/net/can/ctu_can_fd_regs.h:302:
+^I} s;$

ERROR: code indent should never use tabs
#536: FILE: hw/net/can/ctu_can_fd_regs.h:306:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#537: FILE: hw/net/can/ctu_can_fd_regs.h:307:
+^Istruct ctu_can_fd_int_ena_set_s {$

WARNING: architecture specific defines should be avoided
#538: FILE: hw/net/can/ctu_can_fd_regs.h:308:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#540: FILE: hw/net/can/ctu_can_fd_regs.h:310:
+^I^Iuint32_t int_ena_set            : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#540: FILE: hw/net/can/ctu_can_fd_regs.h:310:
+               uint32_t int_ena_set            : 12;
                                                ^

ERROR: code indent should never use tabs
#541: FILE: hw/net/can/ctu_can_fd_regs.h:311:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#541: FILE: hw/net/can/ctu_can_fd_regs.h:311:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#543: FILE: hw/net/can/ctu_can_fd_regs.h:313:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#543: FILE: hw/net/can/ctu_can_fd_regs.h:313:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#544: FILE: hw/net/can/ctu_can_fd_regs.h:314:
+^I^Iuint32_t int_ena_set            : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#544: FILE: hw/net/can/ctu_can_fd_regs.h:314:
+               uint32_t int_ena_set            : 12;
                                                ^

ERROR: code indent should never use tabs
#546: FILE: hw/net/can/ctu_can_fd_regs.h:316:
+^I} s;$

ERROR: code indent should never use tabs
#550: FILE: hw/net/can/ctu_can_fd_regs.h:320:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#551: FILE: hw/net/can/ctu_can_fd_regs.h:321:
+^Istruct ctu_can_fd_int_ena_clr_s {$

WARNING: architecture specific defines should be avoided
#552: FILE: hw/net/can/ctu_can_fd_regs.h:322:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#554: FILE: hw/net/can/ctu_can_fd_regs.h:324:
+^I^Iuint32_t int_ena_clr            : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#554: FILE: hw/net/can/ctu_can_fd_regs.h:324:
+               uint32_t int_ena_clr            : 12;
                                                ^

ERROR: code indent should never use tabs
#555: FILE: hw/net/can/ctu_can_fd_regs.h:325:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#555: FILE: hw/net/can/ctu_can_fd_regs.h:325:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#557: FILE: hw/net/can/ctu_can_fd_regs.h:327:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#557: FILE: hw/net/can/ctu_can_fd_regs.h:327:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#558: FILE: hw/net/can/ctu_can_fd_regs.h:328:
+^I^Iuint32_t int_ena_clr            : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#558: FILE: hw/net/can/ctu_can_fd_regs.h:328:
+               uint32_t int_ena_clr            : 12;
                                                ^

ERROR: code indent should never use tabs
#560: FILE: hw/net/can/ctu_can_fd_regs.h:330:
+^I} s;$

ERROR: code indent should never use tabs
#564: FILE: hw/net/can/ctu_can_fd_regs.h:334:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#565: FILE: hw/net/can/ctu_can_fd_regs.h:335:
+^Istruct ctu_can_fd_int_mask_set_s {$

WARNING: architecture specific defines should be avoided
#566: FILE: hw/net/can/ctu_can_fd_regs.h:336:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#568: FILE: hw/net/can/ctu_can_fd_regs.h:338:
+^I^Iuint32_t int_mask_set           : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#568: FILE: hw/net/can/ctu_can_fd_regs.h:338:
+               uint32_t int_mask_set           : 12;
                                                ^

ERROR: code indent should never use tabs
#569: FILE: hw/net/can/ctu_can_fd_regs.h:339:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#569: FILE: hw/net/can/ctu_can_fd_regs.h:339:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#571: FILE: hw/net/can/ctu_can_fd_regs.h:341:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#571: FILE: hw/net/can/ctu_can_fd_regs.h:341:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#572: FILE: hw/net/can/ctu_can_fd_regs.h:342:
+^I^Iuint32_t int_mask_set           : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#572: FILE: hw/net/can/ctu_can_fd_regs.h:342:
+               uint32_t int_mask_set           : 12;
                                                ^

ERROR: code indent should never use tabs
#574: FILE: hw/net/can/ctu_can_fd_regs.h:344:
+^I} s;$

ERROR: code indent should never use tabs
#578: FILE: hw/net/can/ctu_can_fd_regs.h:348:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#579: FILE: hw/net/can/ctu_can_fd_regs.h:349:
+^Istruct ctu_can_fd_int_mask_clr_s {$

WARNING: architecture specific defines should be avoided
#580: FILE: hw/net/can/ctu_can_fd_regs.h:350:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#582: FILE: hw/net/can/ctu_can_fd_regs.h:352:
+^I^Iuint32_t int_mask_clr           : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#582: FILE: hw/net/can/ctu_can_fd_regs.h:352:
+               uint32_t int_mask_clr           : 12;
                                                ^

ERROR: code indent should never use tabs
#583: FILE: hw/net/can/ctu_can_fd_regs.h:353:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#583: FILE: hw/net/can/ctu_can_fd_regs.h:353:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#585: FILE: hw/net/can/ctu_can_fd_regs.h:355:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#585: FILE: hw/net/can/ctu_can_fd_regs.h:355:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#586: FILE: hw/net/can/ctu_can_fd_regs.h:356:
+^I^Iuint32_t int_mask_clr           : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#586: FILE: hw/net/can/ctu_can_fd_regs.h:356:
+               uint32_t int_mask_clr           : 12;
                                                ^

ERROR: code indent should never use tabs
#588: FILE: hw/net/can/ctu_can_fd_regs.h:358:
+^I} s;$

ERROR: code indent should never use tabs
#592: FILE: hw/net/can/ctu_can_fd_regs.h:362:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#593: FILE: hw/net/can/ctu_can_fd_regs.h:363:
+^Istruct ctu_can_fd_btr_s {$

WARNING: architecture specific defines should be avoided
#594: FILE: hw/net/can/ctu_can_fd_regs.h:364:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#596: FILE: hw/net/can/ctu_can_fd_regs.h:366:
+^I^Iuint32_t prop                    : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#596: FILE: hw/net/can/ctu_can_fd_regs.h:366:
+               uint32_t prop                    : 7;
                                                 ^

ERROR: code indent should never use tabs
#597: FILE: hw/net/can/ctu_can_fd_regs.h:367:
+^I^Iuint32_t ph1                     : 6;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#597: FILE: hw/net/can/ctu_can_fd_regs.h:367:
+               uint32_t ph1                     : 6;
                                                 ^

ERROR: code indent should never use tabs
#598: FILE: hw/net/can/ctu_can_fd_regs.h:368:
+^I^Iuint32_t ph2                     : 6;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#598: FILE: hw/net/can/ctu_can_fd_regs.h:368:
+               uint32_t ph2                     : 6;
                                                 ^

ERROR: code indent should never use tabs
#599: FILE: hw/net/can/ctu_can_fd_regs.h:369:
+^I^Iuint32_t brp                     : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#599: FILE: hw/net/can/ctu_can_fd_regs.h:369:
+               uint32_t brp                     : 8;
                                                 ^

ERROR: code indent should never use tabs
#600: FILE: hw/net/can/ctu_can_fd_regs.h:370:
+^I^Iuint32_t sjw                     : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#600: FILE: hw/net/can/ctu_can_fd_regs.h:370:
+               uint32_t sjw                     : 5;
                                                 ^

ERROR: code indent should never use tabs
#602: FILE: hw/net/can/ctu_can_fd_regs.h:372:
+^I^Iuint32_t sjw                     : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#602: FILE: hw/net/can/ctu_can_fd_regs.h:372:
+               uint32_t sjw                     : 5;
                                                 ^

ERROR: code indent should never use tabs
#603: FILE: hw/net/can/ctu_can_fd_regs.h:373:
+^I^Iuint32_t brp                     : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#603: FILE: hw/net/can/ctu_can_fd_regs.h:373:
+               uint32_t brp                     : 8;
                                                 ^

ERROR: code indent should never use tabs
#604: FILE: hw/net/can/ctu_can_fd_regs.h:374:
+^I^Iuint32_t ph2                     : 6;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#604: FILE: hw/net/can/ctu_can_fd_regs.h:374:
+               uint32_t ph2                     : 6;
                                                 ^

ERROR: code indent should never use tabs
#605: FILE: hw/net/can/ctu_can_fd_regs.h:375:
+^I^Iuint32_t ph1                     : 6;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#605: FILE: hw/net/can/ctu_can_fd_regs.h:375:
+               uint32_t ph1                     : 6;
                                                 ^

ERROR: code indent should never use tabs
#606: FILE: hw/net/can/ctu_can_fd_regs.h:376:
+^I^Iuint32_t prop                    : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#606: FILE: hw/net/can/ctu_can_fd_regs.h:376:
+               uint32_t prop                    : 7;
                                                 ^

ERROR: code indent should never use tabs
#608: FILE: hw/net/can/ctu_can_fd_regs.h:378:
+^I} s;$

ERROR: code indent should never use tabs
#612: FILE: hw/net/can/ctu_can_fd_regs.h:382:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#613: FILE: hw/net/can/ctu_can_fd_regs.h:383:
+^Istruct ctu_can_fd_btr_fd_s {$

WARNING: architecture specific defines should be avoided
#614: FILE: hw/net/can/ctu_can_fd_regs.h:384:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#616: FILE: hw/net/can/ctu_can_fd_regs.h:386:
+^I^Iuint32_t prop_fd                 : 6;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#616: FILE: hw/net/can/ctu_can_fd_regs.h:386:
+               uint32_t prop_fd                 : 6;
                                                 ^

ERROR: code indent should never use tabs
#617: FILE: hw/net/can/ctu_can_fd_regs.h:387:
+^I^Iuint32_t reserved_6              : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#617: FILE: hw/net/can/ctu_can_fd_regs.h:387:
+               uint32_t reserved_6              : 1;
                                                 ^

ERROR: code indent should never use tabs
#618: FILE: hw/net/can/ctu_can_fd_regs.h:388:
+^I^Iuint32_t ph1_fd                  : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#618: FILE: hw/net/can/ctu_can_fd_regs.h:388:
+               uint32_t ph1_fd                  : 5;
                                                 ^

ERROR: code indent should never use tabs
#619: FILE: hw/net/can/ctu_can_fd_regs.h:389:
+^I^Iuint32_t reserved_12             : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#619: FILE: hw/net/can/ctu_can_fd_regs.h:389:
+               uint32_t reserved_12             : 1;
                                                 ^

ERROR: code indent should never use tabs
#620: FILE: hw/net/can/ctu_can_fd_regs.h:390:
+^I^Iuint32_t ph2_fd                  : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#620: FILE: hw/net/can/ctu_can_fd_regs.h:390:
+               uint32_t ph2_fd                  : 5;
                                                 ^

ERROR: code indent should never use tabs
#621: FILE: hw/net/can/ctu_can_fd_regs.h:391:
+^I^Iuint32_t reserved_18             : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#621: FILE: hw/net/can/ctu_can_fd_regs.h:391:
+               uint32_t reserved_18             : 1;
                                                 ^

ERROR: code indent should never use tabs
#622: FILE: hw/net/can/ctu_can_fd_regs.h:392:
+^I^Iuint32_t brp_fd                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#622: FILE: hw/net/can/ctu_can_fd_regs.h:392:
+               uint32_t brp_fd                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#623: FILE: hw/net/can/ctu_can_fd_regs.h:393:
+^I^Iuint32_t sjw_fd                  : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#623: FILE: hw/net/can/ctu_can_fd_regs.h:393:
+               uint32_t sjw_fd                  : 5;
                                                 ^

ERROR: code indent should never use tabs
#625: FILE: hw/net/can/ctu_can_fd_regs.h:395:
+^I^Iuint32_t sjw_fd                  : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#625: FILE: hw/net/can/ctu_can_fd_regs.h:395:
+               uint32_t sjw_fd                  : 5;
                                                 ^

ERROR: code indent should never use tabs
#626: FILE: hw/net/can/ctu_can_fd_regs.h:396:
+^I^Iuint32_t brp_fd                  : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#626: FILE: hw/net/can/ctu_can_fd_regs.h:396:
+               uint32_t brp_fd                  : 8;
                                                 ^

ERROR: code indent should never use tabs
#627: FILE: hw/net/can/ctu_can_fd_regs.h:397:
+^I^Iuint32_t reserved_18             : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#627: FILE: hw/net/can/ctu_can_fd_regs.h:397:
+               uint32_t reserved_18             : 1;
                                                 ^

ERROR: code indent should never use tabs
#628: FILE: hw/net/can/ctu_can_fd_regs.h:398:
+^I^Iuint32_t ph2_fd                  : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#628: FILE: hw/net/can/ctu_can_fd_regs.h:398:
+               uint32_t ph2_fd                  : 5;
                                                 ^

ERROR: code indent should never use tabs
#629: FILE: hw/net/can/ctu_can_fd_regs.h:399:
+^I^Iuint32_t reserved_12             : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#629: FILE: hw/net/can/ctu_can_fd_regs.h:399:
+               uint32_t reserved_12             : 1;
                                                 ^

ERROR: code indent should never use tabs
#630: FILE: hw/net/can/ctu_can_fd_regs.h:400:
+^I^Iuint32_t ph1_fd                  : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#630: FILE: hw/net/can/ctu_can_fd_regs.h:400:
+               uint32_t ph1_fd                  : 5;
                                                 ^

ERROR: code indent should never use tabs
#631: FILE: hw/net/can/ctu_can_fd_regs.h:401:
+^I^Iuint32_t reserved_6              : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#631: FILE: hw/net/can/ctu_can_fd_regs.h:401:
+               uint32_t reserved_6              : 1;
                                                 ^

ERROR: code indent should never use tabs
#632: FILE: hw/net/can/ctu_can_fd_regs.h:402:
+^I^Iuint32_t prop_fd                 : 6;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#632: FILE: hw/net/can/ctu_can_fd_regs.h:402:
+               uint32_t prop_fd                 : 6;
                                                 ^

ERROR: code indent should never use tabs
#634: FILE: hw/net/can/ctu_can_fd_regs.h:404:
+^I} s;$

ERROR: code indent should never use tabs
#638: FILE: hw/net/can/ctu_can_fd_regs.h:408:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#639: FILE: hw/net/can/ctu_can_fd_regs.h:409:
+^Istruct ctu_can_fd_ewl_erp_fault_state_s {$

WARNING: architecture specific defines should be avoided
#640: FILE: hw/net/can/ctu_can_fd_regs.h:410:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#642: FILE: hw/net/can/ctu_can_fd_regs.h:412:
+^I^Iuint32_t ew_limit                : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#642: FILE: hw/net/can/ctu_can_fd_regs.h:412:
+               uint32_t ew_limit                : 8;
                                                 ^

ERROR: code indent should never use tabs
#644: FILE: hw/net/can/ctu_can_fd_regs.h:414:
+^I^Iuint32_t erp_limit               : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#644: FILE: hw/net/can/ctu_can_fd_regs.h:414:
+               uint32_t erp_limit               : 8;
                                                 ^

ERROR: code indent should never use tabs
#646: FILE: hw/net/can/ctu_can_fd_regs.h:416:
+^I^Iuint32_t era                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#646: FILE: hw/net/can/ctu_can_fd_regs.h:416:
+               uint32_t era                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#647: FILE: hw/net/can/ctu_can_fd_regs.h:417:
+^I^Iuint32_t erp                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#647: FILE: hw/net/can/ctu_can_fd_regs.h:417:
+               uint32_t erp                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#648: FILE: hw/net/can/ctu_can_fd_regs.h:418:
+^I^Iuint32_t bof                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#648: FILE: hw/net/can/ctu_can_fd_regs.h:418:
+               uint32_t bof                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#649: FILE: hw/net/can/ctu_can_fd_regs.h:419:
+^I^Iuint32_t reserved_31_19         : 13;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#649: FILE: hw/net/can/ctu_can_fd_regs.h:419:
+               uint32_t reserved_31_19         : 13;
                                                ^

ERROR: code indent should never use tabs
#651: FILE: hw/net/can/ctu_can_fd_regs.h:421:
+^I^Iuint32_t reserved_31_19         : 13;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#651: FILE: hw/net/can/ctu_can_fd_regs.h:421:
+               uint32_t reserved_31_19         : 13;
                                                ^

ERROR: code indent should never use tabs
#652: FILE: hw/net/can/ctu_can_fd_regs.h:422:
+^I^Iuint32_t bof                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#652: FILE: hw/net/can/ctu_can_fd_regs.h:422:
+               uint32_t bof                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#653: FILE: hw/net/can/ctu_can_fd_regs.h:423:
+^I^Iuint32_t erp                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#653: FILE: hw/net/can/ctu_can_fd_regs.h:423:
+               uint32_t erp                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#654: FILE: hw/net/can/ctu_can_fd_regs.h:424:
+^I^Iuint32_t era                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#654: FILE: hw/net/can/ctu_can_fd_regs.h:424:
+               uint32_t era                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#655: FILE: hw/net/can/ctu_can_fd_regs.h:425:
+^I^Iuint32_t erp_limit               : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#655: FILE: hw/net/can/ctu_can_fd_regs.h:425:
+               uint32_t erp_limit               : 8;
                                                 ^

ERROR: code indent should never use tabs
#656: FILE: hw/net/can/ctu_can_fd_regs.h:426:
+^I^Iuint32_t ew_limit                : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#656: FILE: hw/net/can/ctu_can_fd_regs.h:426:
+               uint32_t ew_limit                : 8;
                                                 ^

ERROR: code indent should never use tabs
#658: FILE: hw/net/can/ctu_can_fd_regs.h:428:
+^I} s;$

ERROR: code indent should never use tabs
#662: FILE: hw/net/can/ctu_can_fd_regs.h:432:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#663: FILE: hw/net/can/ctu_can_fd_regs.h:433:
+^Istruct ctu_can_fd_rec_tec_s {$

WARNING: architecture specific defines should be avoided
#664: FILE: hw/net/can/ctu_can_fd_regs.h:434:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#666: FILE: hw/net/can/ctu_can_fd_regs.h:436:
+^I^Iuint32_t rec_val                 : 9;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#666: FILE: hw/net/can/ctu_can_fd_regs.h:436:
+               uint32_t rec_val                 : 9;
                                                 ^

ERROR: code indent should never use tabs
#667: FILE: hw/net/can/ctu_can_fd_regs.h:437:
+^I^Iuint32_t reserved_15_9           : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#667: FILE: hw/net/can/ctu_can_fd_regs.h:437:
+               uint32_t reserved_15_9           : 7;
                                                 ^

ERROR: code indent should never use tabs
#669: FILE: hw/net/can/ctu_can_fd_regs.h:439:
+^I^Iuint32_t tec_val                 : 9;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#669: FILE: hw/net/can/ctu_can_fd_regs.h:439:
+               uint32_t tec_val                 : 9;
                                                 ^

ERROR: code indent should never use tabs
#670: FILE: hw/net/can/ctu_can_fd_regs.h:440:
+^I^Iuint32_t reserved_31_25          : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#670: FILE: hw/net/can/ctu_can_fd_regs.h:440:
+               uint32_t reserved_31_25          : 7;
                                                 ^

ERROR: code indent should never use tabs
#672: FILE: hw/net/can/ctu_can_fd_regs.h:442:
+^I^Iuint32_t reserved_31_25          : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#672: FILE: hw/net/can/ctu_can_fd_regs.h:442:
+               uint32_t reserved_31_25          : 7;
                                                 ^

ERROR: code indent should never use tabs
#673: FILE: hw/net/can/ctu_can_fd_regs.h:443:
+^I^Iuint32_t tec_val                 : 9;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#673: FILE: hw/net/can/ctu_can_fd_regs.h:443:
+               uint32_t tec_val                 : 9;
                                                 ^

ERROR: code indent should never use tabs
#674: FILE: hw/net/can/ctu_can_fd_regs.h:444:
+^I^Iuint32_t reserved_15_9           : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#674: FILE: hw/net/can/ctu_can_fd_regs.h:444:
+               uint32_t reserved_15_9           : 7;
                                                 ^

ERROR: code indent should never use tabs
#675: FILE: hw/net/can/ctu_can_fd_regs.h:445:
+^I^Iuint32_t rec_val                 : 9;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#675: FILE: hw/net/can/ctu_can_fd_regs.h:445:
+               uint32_t rec_val                 : 9;
                                                 ^

ERROR: code indent should never use tabs
#677: FILE: hw/net/can/ctu_can_fd_regs.h:447:
+^I} s;$

ERROR: code indent should never use tabs
#681: FILE: hw/net/can/ctu_can_fd_regs.h:451:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#682: FILE: hw/net/can/ctu_can_fd_regs.h:452:
+^Istruct ctu_can_fd_err_norm_err_fd_s {$

WARNING: architecture specific defines should be avoided
#683: FILE: hw/net/can/ctu_can_fd_regs.h:453:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#685: FILE: hw/net/can/ctu_can_fd_regs.h:455:
+^I^Iuint32_t err_norm_val           : 16;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#685: FILE: hw/net/can/ctu_can_fd_regs.h:455:
+               uint32_t err_norm_val           : 16;
                                                ^

ERROR: code indent should never use tabs
#687: FILE: hw/net/can/ctu_can_fd_regs.h:457:
+^I^Iuint32_t err_fd_val             : 16;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#687: FILE: hw/net/can/ctu_can_fd_regs.h:457:
+               uint32_t err_fd_val             : 16;
                                                ^

ERROR: code indent should never use tabs
#689: FILE: hw/net/can/ctu_can_fd_regs.h:459:
+^I^Iuint32_t err_fd_val             : 16;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#689: FILE: hw/net/can/ctu_can_fd_regs.h:459:
+               uint32_t err_fd_val             : 16;
                                                ^

ERROR: code indent should never use tabs
#690: FILE: hw/net/can/ctu_can_fd_regs.h:460:
+^I^Iuint32_t err_norm_val           : 16;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#690: FILE: hw/net/can/ctu_can_fd_regs.h:460:
+               uint32_t err_norm_val           : 16;
                                                ^

ERROR: code indent should never use tabs
#692: FILE: hw/net/can/ctu_can_fd_regs.h:462:
+^I} s;$

ERROR: code indent should never use tabs
#696: FILE: hw/net/can/ctu_can_fd_regs.h:466:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#697: FILE: hw/net/can/ctu_can_fd_regs.h:467:
+^Istruct ctu_can_fd_ctr_pres_s {$

WARNING: architecture specific defines should be avoided
#698: FILE: hw/net/can/ctu_can_fd_regs.h:468:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#700: FILE: hw/net/can/ctu_can_fd_regs.h:470:
+^I^Iuint32_t ctpv                    : 9;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#700: FILE: hw/net/can/ctu_can_fd_regs.h:470:
+               uint32_t ctpv                    : 9;
                                                 ^

ERROR: code indent should never use tabs
#701: FILE: hw/net/can/ctu_can_fd_regs.h:471:
+^I^Iuint32_t ptx                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#701: FILE: hw/net/can/ctu_can_fd_regs.h:471:
+               uint32_t ptx                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#702: FILE: hw/net/can/ctu_can_fd_regs.h:472:
+^I^Iuint32_t prx                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#702: FILE: hw/net/can/ctu_can_fd_regs.h:472:
+               uint32_t prx                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#703: FILE: hw/net/can/ctu_can_fd_regs.h:473:
+^I^Iuint32_t enorm                   : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#703: FILE: hw/net/can/ctu_can_fd_regs.h:473:
+               uint32_t enorm                   : 1;
                                                 ^

ERROR: code indent should never use tabs
#704: FILE: hw/net/can/ctu_can_fd_regs.h:474:
+^I^Iuint32_t efd                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#704: FILE: hw/net/can/ctu_can_fd_regs.h:474:
+               uint32_t efd                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#705: FILE: hw/net/can/ctu_can_fd_regs.h:475:
+^I^Iuint32_t reserved_31_13         : 19;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#705: FILE: hw/net/can/ctu_can_fd_regs.h:475:
+               uint32_t reserved_31_13         : 19;
                                                ^

ERROR: code indent should never use tabs
#707: FILE: hw/net/can/ctu_can_fd_regs.h:477:
+^I^Iuint32_t reserved_31_13         : 19;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#707: FILE: hw/net/can/ctu_can_fd_regs.h:477:
+               uint32_t reserved_31_13         : 19;
                                                ^

ERROR: code indent should never use tabs
#708: FILE: hw/net/can/ctu_can_fd_regs.h:478:
+^I^Iuint32_t efd                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#708: FILE: hw/net/can/ctu_can_fd_regs.h:478:
+               uint32_t efd                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#709: FILE: hw/net/can/ctu_can_fd_regs.h:479:
+^I^Iuint32_t enorm                   : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#709: FILE: hw/net/can/ctu_can_fd_regs.h:479:
+               uint32_t enorm                   : 1;
                                                 ^

ERROR: code indent should never use tabs
#710: FILE: hw/net/can/ctu_can_fd_regs.h:480:
+^I^Iuint32_t prx                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#710: FILE: hw/net/can/ctu_can_fd_regs.h:480:
+               uint32_t prx                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#711: FILE: hw/net/can/ctu_can_fd_regs.h:481:
+^I^Iuint32_t ptx                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#711: FILE: hw/net/can/ctu_can_fd_regs.h:481:
+               uint32_t ptx                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#712: FILE: hw/net/can/ctu_can_fd_regs.h:482:
+^I^Iuint32_t ctpv                    : 9;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#712: FILE: hw/net/can/ctu_can_fd_regs.h:482:
+               uint32_t ctpv                    : 9;
                                                 ^

ERROR: code indent should never use tabs
#714: FILE: hw/net/can/ctu_can_fd_regs.h:484:
+^I} s;$

ERROR: code indent should never use tabs
#718: FILE: hw/net/can/ctu_can_fd_regs.h:488:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#719: FILE: hw/net/can/ctu_can_fd_regs.h:489:
+^Istruct ctu_can_fd_filter_a_mask_s {$

WARNING: architecture specific defines should be avoided
#720: FILE: hw/net/can/ctu_can_fd_regs.h:490:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#722: FILE: hw/net/can/ctu_can_fd_regs.h:492:
+^I^Iuint32_t bit_mask_a_val         : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#722: FILE: hw/net/can/ctu_can_fd_regs.h:492:
+               uint32_t bit_mask_a_val         : 29;
                                                ^

ERROR: code indent should never use tabs
#723: FILE: hw/net/can/ctu_can_fd_regs.h:493:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#723: FILE: hw/net/can/ctu_can_fd_regs.h:493:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#725: FILE: hw/net/can/ctu_can_fd_regs.h:495:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#725: FILE: hw/net/can/ctu_can_fd_regs.h:495:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#726: FILE: hw/net/can/ctu_can_fd_regs.h:496:
+^I^Iuint32_t bit_mask_a_val         : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#726: FILE: hw/net/can/ctu_can_fd_regs.h:496:
+               uint32_t bit_mask_a_val         : 29;
                                                ^

ERROR: code indent should never use tabs
#728: FILE: hw/net/can/ctu_can_fd_regs.h:498:
+^I} s;$

ERROR: code indent should never use tabs
#732: FILE: hw/net/can/ctu_can_fd_regs.h:502:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#733: FILE: hw/net/can/ctu_can_fd_regs.h:503:
+^Istruct ctu_can_fd_filter_a_val_s {$

WARNING: architecture specific defines should be avoided
#734: FILE: hw/net/can/ctu_can_fd_regs.h:504:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#736: FILE: hw/net/can/ctu_can_fd_regs.h:506:
+^I^Iuint32_t bit_val_a_val          : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#736: FILE: hw/net/can/ctu_can_fd_regs.h:506:
+               uint32_t bit_val_a_val          : 29;
                                                ^

ERROR: code indent should never use tabs
#737: FILE: hw/net/can/ctu_can_fd_regs.h:507:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#737: FILE: hw/net/can/ctu_can_fd_regs.h:507:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#739: FILE: hw/net/can/ctu_can_fd_regs.h:509:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#739: FILE: hw/net/can/ctu_can_fd_regs.h:509:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#740: FILE: hw/net/can/ctu_can_fd_regs.h:510:
+^I^Iuint32_t bit_val_a_val          : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#740: FILE: hw/net/can/ctu_can_fd_regs.h:510:
+               uint32_t bit_val_a_val          : 29;
                                                ^

ERROR: code indent should never use tabs
#742: FILE: hw/net/can/ctu_can_fd_regs.h:512:
+^I} s;$

ERROR: code indent should never use tabs
#746: FILE: hw/net/can/ctu_can_fd_regs.h:516:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#747: FILE: hw/net/can/ctu_can_fd_regs.h:517:
+^Istruct ctu_can_fd_filter_b_mask_s {$

WARNING: architecture specific defines should be avoided
#748: FILE: hw/net/can/ctu_can_fd_regs.h:518:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#750: FILE: hw/net/can/ctu_can_fd_regs.h:520:
+^I^Iuint32_t bit_mask_b_val         : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#750: FILE: hw/net/can/ctu_can_fd_regs.h:520:
+               uint32_t bit_mask_b_val         : 29;
                                                ^

ERROR: code indent should never use tabs
#751: FILE: hw/net/can/ctu_can_fd_regs.h:521:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#751: FILE: hw/net/can/ctu_can_fd_regs.h:521:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#753: FILE: hw/net/can/ctu_can_fd_regs.h:523:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#753: FILE: hw/net/can/ctu_can_fd_regs.h:523:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#754: FILE: hw/net/can/ctu_can_fd_regs.h:524:
+^I^Iuint32_t bit_mask_b_val         : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#754: FILE: hw/net/can/ctu_can_fd_regs.h:524:
+               uint32_t bit_mask_b_val         : 29;
                                                ^

ERROR: code indent should never use tabs
#756: FILE: hw/net/can/ctu_can_fd_regs.h:526:
+^I} s;$

ERROR: code indent should never use tabs
#760: FILE: hw/net/can/ctu_can_fd_regs.h:530:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#761: FILE: hw/net/can/ctu_can_fd_regs.h:531:
+^Istruct ctu_can_fd_filter_b_val_s {$

WARNING: architecture specific defines should be avoided
#762: FILE: hw/net/can/ctu_can_fd_regs.h:532:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#764: FILE: hw/net/can/ctu_can_fd_regs.h:534:
+^I^Iuint32_t bit_val_b_val          : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#764: FILE: hw/net/can/ctu_can_fd_regs.h:534:
+               uint32_t bit_val_b_val          : 29;
                                                ^

ERROR: code indent should never use tabs
#765: FILE: hw/net/can/ctu_can_fd_regs.h:535:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#765: FILE: hw/net/can/ctu_can_fd_regs.h:535:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#767: FILE: hw/net/can/ctu_can_fd_regs.h:537:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#767: FILE: hw/net/can/ctu_can_fd_regs.h:537:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#768: FILE: hw/net/can/ctu_can_fd_regs.h:538:
+^I^Iuint32_t bit_val_b_val          : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#768: FILE: hw/net/can/ctu_can_fd_regs.h:538:
+               uint32_t bit_val_b_val          : 29;
                                                ^

ERROR: code indent should never use tabs
#770: FILE: hw/net/can/ctu_can_fd_regs.h:540:
+^I} s;$

ERROR: code indent should never use tabs
#774: FILE: hw/net/can/ctu_can_fd_regs.h:544:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#775: FILE: hw/net/can/ctu_can_fd_regs.h:545:
+^Istruct ctu_can_fd_filter_c_mask_s {$

WARNING: architecture specific defines should be avoided
#776: FILE: hw/net/can/ctu_can_fd_regs.h:546:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#778: FILE: hw/net/can/ctu_can_fd_regs.h:548:
+^I^Iuint32_t bit_mask_c_val         : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#778: FILE: hw/net/can/ctu_can_fd_regs.h:548:
+               uint32_t bit_mask_c_val         : 29;
                                                ^

ERROR: code indent should never use tabs
#779: FILE: hw/net/can/ctu_can_fd_regs.h:549:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#779: FILE: hw/net/can/ctu_can_fd_regs.h:549:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#781: FILE: hw/net/can/ctu_can_fd_regs.h:551:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#781: FILE: hw/net/can/ctu_can_fd_regs.h:551:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#782: FILE: hw/net/can/ctu_can_fd_regs.h:552:
+^I^Iuint32_t bit_mask_c_val         : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#782: FILE: hw/net/can/ctu_can_fd_regs.h:552:
+               uint32_t bit_mask_c_val         : 29;
                                                ^

ERROR: code indent should never use tabs
#784: FILE: hw/net/can/ctu_can_fd_regs.h:554:
+^I} s;$

ERROR: code indent should never use tabs
#788: FILE: hw/net/can/ctu_can_fd_regs.h:558:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#789: FILE: hw/net/can/ctu_can_fd_regs.h:559:
+^Istruct ctu_can_fd_filter_c_val_s {$

WARNING: architecture specific defines should be avoided
#790: FILE: hw/net/can/ctu_can_fd_regs.h:560:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#792: FILE: hw/net/can/ctu_can_fd_regs.h:562:
+^I^Iuint32_t bit_val_c_val          : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#792: FILE: hw/net/can/ctu_can_fd_regs.h:562:
+               uint32_t bit_val_c_val          : 29;
                                                ^

ERROR: code indent should never use tabs
#793: FILE: hw/net/can/ctu_can_fd_regs.h:563:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#793: FILE: hw/net/can/ctu_can_fd_regs.h:563:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#795: FILE: hw/net/can/ctu_can_fd_regs.h:565:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#795: FILE: hw/net/can/ctu_can_fd_regs.h:565:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#796: FILE: hw/net/can/ctu_can_fd_regs.h:566:
+^I^Iuint32_t bit_val_c_val          : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#796: FILE: hw/net/can/ctu_can_fd_regs.h:566:
+               uint32_t bit_val_c_val          : 29;
                                                ^

ERROR: code indent should never use tabs
#798: FILE: hw/net/can/ctu_can_fd_regs.h:568:
+^I} s;$

ERROR: code indent should never use tabs
#802: FILE: hw/net/can/ctu_can_fd_regs.h:572:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#803: FILE: hw/net/can/ctu_can_fd_regs.h:573:
+^Istruct ctu_can_fd_filter_ran_low_s {$

WARNING: architecture specific defines should be avoided
#804: FILE: hw/net/can/ctu_can_fd_regs.h:574:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#806: FILE: hw/net/can/ctu_can_fd_regs.h:576:
+^I^Iuint32_t bit_ran_low_val        : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#806: FILE: hw/net/can/ctu_can_fd_regs.h:576:
+               uint32_t bit_ran_low_val        : 29;
                                                ^

ERROR: code indent should never use tabs
#807: FILE: hw/net/can/ctu_can_fd_regs.h:577:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#807: FILE: hw/net/can/ctu_can_fd_regs.h:577:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#809: FILE: hw/net/can/ctu_can_fd_regs.h:579:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#809: FILE: hw/net/can/ctu_can_fd_regs.h:579:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#810: FILE: hw/net/can/ctu_can_fd_regs.h:580:
+^I^Iuint32_t bit_ran_low_val        : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#810: FILE: hw/net/can/ctu_can_fd_regs.h:580:
+               uint32_t bit_ran_low_val        : 29;
                                                ^

ERROR: code indent should never use tabs
#812: FILE: hw/net/can/ctu_can_fd_regs.h:582:
+^I} s;$

ERROR: code indent should never use tabs
#816: FILE: hw/net/can/ctu_can_fd_regs.h:586:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#817: FILE: hw/net/can/ctu_can_fd_regs.h:587:
+^Istruct ctu_can_fd_filter_ran_high_s {$

WARNING: architecture specific defines should be avoided
#818: FILE: hw/net/can/ctu_can_fd_regs.h:588:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#820: FILE: hw/net/can/ctu_can_fd_regs.h:590:
+^I^Iuint32_t bit_ran_high_val       : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#820: FILE: hw/net/can/ctu_can_fd_regs.h:590:
+               uint32_t bit_ran_high_val       : 29;
                                                ^

ERROR: code indent should never use tabs
#821: FILE: hw/net/can/ctu_can_fd_regs.h:591:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#821: FILE: hw/net/can/ctu_can_fd_regs.h:591:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#823: FILE: hw/net/can/ctu_can_fd_regs.h:593:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#823: FILE: hw/net/can/ctu_can_fd_regs.h:593:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#824: FILE: hw/net/can/ctu_can_fd_regs.h:594:
+^I^Iuint32_t bit_ran_high_val       : 29;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#824: FILE: hw/net/can/ctu_can_fd_regs.h:594:
+               uint32_t bit_ran_high_val       : 29;
                                                ^

ERROR: code indent should never use tabs
#826: FILE: hw/net/can/ctu_can_fd_regs.h:596:
+^I} s;$

ERROR: code indent should never use tabs
#830: FILE: hw/net/can/ctu_can_fd_regs.h:600:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#831: FILE: hw/net/can/ctu_can_fd_regs.h:601:
+^Istruct ctu_can_fd_filter_control_filter_status_s {$

WARNING: architecture specific defines should be avoided
#832: FILE: hw/net/can/ctu_can_fd_regs.h:602:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#834: FILE: hw/net/can/ctu_can_fd_regs.h:604:
+^I^Iuint32_t fanb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#834: FILE: hw/net/can/ctu_can_fd_regs.h:604:
+               uint32_t fanb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#835: FILE: hw/net/can/ctu_can_fd_regs.h:605:
+^I^Iuint32_t fane                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#835: FILE: hw/net/can/ctu_can_fd_regs.h:605:
+               uint32_t fane                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#836: FILE: hw/net/can/ctu_can_fd_regs.h:606:
+^I^Iuint32_t fafb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#836: FILE: hw/net/can/ctu_can_fd_regs.h:606:
+               uint32_t fafb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#837: FILE: hw/net/can/ctu_can_fd_regs.h:607:
+^I^Iuint32_t fafe                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#837: FILE: hw/net/can/ctu_can_fd_regs.h:607:
+               uint32_t fafe                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#838: FILE: hw/net/can/ctu_can_fd_regs.h:608:
+^I^Iuint32_t fbnb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#838: FILE: hw/net/can/ctu_can_fd_regs.h:608:
+               uint32_t fbnb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#839: FILE: hw/net/can/ctu_can_fd_regs.h:609:
+^I^Iuint32_t fbne                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#839: FILE: hw/net/can/ctu_can_fd_regs.h:609:
+               uint32_t fbne                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#840: FILE: hw/net/can/ctu_can_fd_regs.h:610:
+^I^Iuint32_t fbfb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#840: FILE: hw/net/can/ctu_can_fd_regs.h:610:
+               uint32_t fbfb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#841: FILE: hw/net/can/ctu_can_fd_regs.h:611:
+^I^Iuint32_t fbfe                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#841: FILE: hw/net/can/ctu_can_fd_regs.h:611:
+               uint32_t fbfe                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#842: FILE: hw/net/can/ctu_can_fd_regs.h:612:
+^I^Iuint32_t fcnb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#842: FILE: hw/net/can/ctu_can_fd_regs.h:612:
+               uint32_t fcnb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#843: FILE: hw/net/can/ctu_can_fd_regs.h:613:
+^I^Iuint32_t fcne                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#843: FILE: hw/net/can/ctu_can_fd_regs.h:613:
+               uint32_t fcne                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#844: FILE: hw/net/can/ctu_can_fd_regs.h:614:
+^I^Iuint32_t fcfb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#844: FILE: hw/net/can/ctu_can_fd_regs.h:614:
+               uint32_t fcfb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#845: FILE: hw/net/can/ctu_can_fd_regs.h:615:
+^I^Iuint32_t fcfe                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#845: FILE: hw/net/can/ctu_can_fd_regs.h:615:
+               uint32_t fcfe                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#846: FILE: hw/net/can/ctu_can_fd_regs.h:616:
+^I^Iuint32_t frnb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#846: FILE: hw/net/can/ctu_can_fd_regs.h:616:
+               uint32_t frnb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#847: FILE: hw/net/can/ctu_can_fd_regs.h:617:
+^I^Iuint32_t frne                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#847: FILE: hw/net/can/ctu_can_fd_regs.h:617:
+               uint32_t frne                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#848: FILE: hw/net/can/ctu_can_fd_regs.h:618:
+^I^Iuint32_t frfb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#848: FILE: hw/net/can/ctu_can_fd_regs.h:618:
+               uint32_t frfb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#849: FILE: hw/net/can/ctu_can_fd_regs.h:619:
+^I^Iuint32_t frfe                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#849: FILE: hw/net/can/ctu_can_fd_regs.h:619:
+               uint32_t frfe                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#851: FILE: hw/net/can/ctu_can_fd_regs.h:621:
+^I^Iuint32_t sfa                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#851: FILE: hw/net/can/ctu_can_fd_regs.h:621:
+               uint32_t sfa                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#852: FILE: hw/net/can/ctu_can_fd_regs.h:622:
+^I^Iuint32_t sfb                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#852: FILE: hw/net/can/ctu_can_fd_regs.h:622:
+               uint32_t sfb                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#853: FILE: hw/net/can/ctu_can_fd_regs.h:623:
+^I^Iuint32_t sfc                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#853: FILE: hw/net/can/ctu_can_fd_regs.h:623:
+               uint32_t sfc                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#854: FILE: hw/net/can/ctu_can_fd_regs.h:624:
+^I^Iuint32_t sfr                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#854: FILE: hw/net/can/ctu_can_fd_regs.h:624:
+               uint32_t sfr                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#855: FILE: hw/net/can/ctu_can_fd_regs.h:625:
+^I^Iuint32_t reserved_31_20         : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#855: FILE: hw/net/can/ctu_can_fd_regs.h:625:
+               uint32_t reserved_31_20         : 12;
                                                ^

ERROR: code indent should never use tabs
#857: FILE: hw/net/can/ctu_can_fd_regs.h:627:
+^I^Iuint32_t reserved_31_20         : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#857: FILE: hw/net/can/ctu_can_fd_regs.h:627:
+               uint32_t reserved_31_20         : 12;
                                                ^

ERROR: code indent should never use tabs
#858: FILE: hw/net/can/ctu_can_fd_regs.h:628:
+^I^Iuint32_t sfr                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#858: FILE: hw/net/can/ctu_can_fd_regs.h:628:
+               uint32_t sfr                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#859: FILE: hw/net/can/ctu_can_fd_regs.h:629:
+^I^Iuint32_t sfc                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#859: FILE: hw/net/can/ctu_can_fd_regs.h:629:
+               uint32_t sfc                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#860: FILE: hw/net/can/ctu_can_fd_regs.h:630:
+^I^Iuint32_t sfb                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#860: FILE: hw/net/can/ctu_can_fd_regs.h:630:
+               uint32_t sfb                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#861: FILE: hw/net/can/ctu_can_fd_regs.h:631:
+^I^Iuint32_t sfa                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#861: FILE: hw/net/can/ctu_can_fd_regs.h:631:
+               uint32_t sfa                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#862: FILE: hw/net/can/ctu_can_fd_regs.h:632:
+^I^Iuint32_t frfe                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#862: FILE: hw/net/can/ctu_can_fd_regs.h:632:
+               uint32_t frfe                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#863: FILE: hw/net/can/ctu_can_fd_regs.h:633:
+^I^Iuint32_t frfb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#863: FILE: hw/net/can/ctu_can_fd_regs.h:633:
+               uint32_t frfb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#864: FILE: hw/net/can/ctu_can_fd_regs.h:634:
+^I^Iuint32_t frne                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#864: FILE: hw/net/can/ctu_can_fd_regs.h:634:
+               uint32_t frne                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#865: FILE: hw/net/can/ctu_can_fd_regs.h:635:
+^I^Iuint32_t frnb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#865: FILE: hw/net/can/ctu_can_fd_regs.h:635:
+               uint32_t frnb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#866: FILE: hw/net/can/ctu_can_fd_regs.h:636:
+^I^Iuint32_t fcfe                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#866: FILE: hw/net/can/ctu_can_fd_regs.h:636:
+               uint32_t fcfe                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#867: FILE: hw/net/can/ctu_can_fd_regs.h:637:
+^I^Iuint32_t fcfb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#867: FILE: hw/net/can/ctu_can_fd_regs.h:637:
+               uint32_t fcfb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#868: FILE: hw/net/can/ctu_can_fd_regs.h:638:
+^I^Iuint32_t fcne                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#868: FILE: hw/net/can/ctu_can_fd_regs.h:638:
+               uint32_t fcne                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#869: FILE: hw/net/can/ctu_can_fd_regs.h:639:
+^I^Iuint32_t fcnb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#869: FILE: hw/net/can/ctu_can_fd_regs.h:639:
+               uint32_t fcnb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#870: FILE: hw/net/can/ctu_can_fd_regs.h:640:
+^I^Iuint32_t fbfe                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#870: FILE: hw/net/can/ctu_can_fd_regs.h:640:
+               uint32_t fbfe                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#871: FILE: hw/net/can/ctu_can_fd_regs.h:641:
+^I^Iuint32_t fbfb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#871: FILE: hw/net/can/ctu_can_fd_regs.h:641:
+               uint32_t fbfb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#872: FILE: hw/net/can/ctu_can_fd_regs.h:642:
+^I^Iuint32_t fbne                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#872: FILE: hw/net/can/ctu_can_fd_regs.h:642:
+               uint32_t fbne                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#873: FILE: hw/net/can/ctu_can_fd_regs.h:643:
+^I^Iuint32_t fbnb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#873: FILE: hw/net/can/ctu_can_fd_regs.h:643:
+               uint32_t fbnb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#874: FILE: hw/net/can/ctu_can_fd_regs.h:644:
+^I^Iuint32_t fafe                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#874: FILE: hw/net/can/ctu_can_fd_regs.h:644:
+               uint32_t fafe                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#875: FILE: hw/net/can/ctu_can_fd_regs.h:645:
+^I^Iuint32_t fafb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#875: FILE: hw/net/can/ctu_can_fd_regs.h:645:
+               uint32_t fafb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#876: FILE: hw/net/can/ctu_can_fd_regs.h:646:
+^I^Iuint32_t fane                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#876: FILE: hw/net/can/ctu_can_fd_regs.h:646:
+               uint32_t fane                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#877: FILE: hw/net/can/ctu_can_fd_regs.h:647:
+^I^Iuint32_t fanb                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#877: FILE: hw/net/can/ctu_can_fd_regs.h:647:
+               uint32_t fanb                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#879: FILE: hw/net/can/ctu_can_fd_regs.h:649:
+^I} s;$

ERROR: code indent should never use tabs
#883: FILE: hw/net/can/ctu_can_fd_regs.h:653:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#884: FILE: hw/net/can/ctu_can_fd_regs.h:654:
+^Istruct ctu_can_fd_rx_mem_info_s {$

WARNING: architecture specific defines should be avoided
#885: FILE: hw/net/can/ctu_can_fd_regs.h:655:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#887: FILE: hw/net/can/ctu_can_fd_regs.h:657:
+^I^Iuint32_t rx_buff_size           : 13;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#887: FILE: hw/net/can/ctu_can_fd_regs.h:657:
+               uint32_t rx_buff_size           : 13;
                                                ^

ERROR: code indent should never use tabs
#888: FILE: hw/net/can/ctu_can_fd_regs.h:658:
+^I^Iuint32_t reserved_15_13          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#888: FILE: hw/net/can/ctu_can_fd_regs.h:658:
+               uint32_t reserved_15_13          : 3;
                                                 ^

ERROR: code indent should never use tabs
#889: FILE: hw/net/can/ctu_can_fd_regs.h:659:
+^I^Iuint32_t rx_mem_free            : 13;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#889: FILE: hw/net/can/ctu_can_fd_regs.h:659:
+               uint32_t rx_mem_free            : 13;
                                                ^

ERROR: code indent should never use tabs
#890: FILE: hw/net/can/ctu_can_fd_regs.h:660:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#890: FILE: hw/net/can/ctu_can_fd_regs.h:660:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#892: FILE: hw/net/can/ctu_can_fd_regs.h:662:
+^I^Iuint32_t reserved_31_29          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#892: FILE: hw/net/can/ctu_can_fd_regs.h:662:
+               uint32_t reserved_31_29          : 3;
                                                 ^

ERROR: code indent should never use tabs
#893: FILE: hw/net/can/ctu_can_fd_regs.h:663:
+^I^Iuint32_t rx_mem_free            : 13;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#893: FILE: hw/net/can/ctu_can_fd_regs.h:663:
+               uint32_t rx_mem_free            : 13;
                                                ^

ERROR: code indent should never use tabs
#894: FILE: hw/net/can/ctu_can_fd_regs.h:664:
+^I^Iuint32_t reserved_15_13          : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#894: FILE: hw/net/can/ctu_can_fd_regs.h:664:
+               uint32_t reserved_15_13          : 3;
                                                 ^

ERROR: code indent should never use tabs
#895: FILE: hw/net/can/ctu_can_fd_regs.h:665:
+^I^Iuint32_t rx_buff_size           : 13;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#895: FILE: hw/net/can/ctu_can_fd_regs.h:665:
+               uint32_t rx_buff_size           : 13;
                                                ^

ERROR: code indent should never use tabs
#897: FILE: hw/net/can/ctu_can_fd_regs.h:667:
+^I} s;$

ERROR: code indent should never use tabs
#901: FILE: hw/net/can/ctu_can_fd_regs.h:671:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#902: FILE: hw/net/can/ctu_can_fd_regs.h:672:
+^Istruct ctu_can_fd_rx_pointers_s {$

WARNING: architecture specific defines should be avoided
#903: FILE: hw/net/can/ctu_can_fd_regs.h:673:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#905: FILE: hw/net/can/ctu_can_fd_regs.h:675:
+^I^Iuint32_t rx_wpp                 : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#905: FILE: hw/net/can/ctu_can_fd_regs.h:675:
+               uint32_t rx_wpp                 : 12;
                                                ^

ERROR: code indent should never use tabs
#906: FILE: hw/net/can/ctu_can_fd_regs.h:676:
+^I^Iuint32_t reserved_15_12          : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#906: FILE: hw/net/can/ctu_can_fd_regs.h:676:
+               uint32_t reserved_15_12          : 4;
                                                 ^

ERROR: code indent should never use tabs
#907: FILE: hw/net/can/ctu_can_fd_regs.h:677:
+^I^Iuint32_t rx_rpp                 : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#907: FILE: hw/net/can/ctu_can_fd_regs.h:677:
+               uint32_t rx_rpp                 : 12;
                                                ^

ERROR: code indent should never use tabs
#908: FILE: hw/net/can/ctu_can_fd_regs.h:678:
+^I^Iuint32_t reserved_31_28          : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#908: FILE: hw/net/can/ctu_can_fd_regs.h:678:
+               uint32_t reserved_31_28          : 4;
                                                 ^

ERROR: code indent should never use tabs
#910: FILE: hw/net/can/ctu_can_fd_regs.h:680:
+^I^Iuint32_t reserved_31_28          : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#910: FILE: hw/net/can/ctu_can_fd_regs.h:680:
+               uint32_t reserved_31_28          : 4;
                                                 ^

ERROR: code indent should never use tabs
#911: FILE: hw/net/can/ctu_can_fd_regs.h:681:
+^I^Iuint32_t rx_rpp                 : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#911: FILE: hw/net/can/ctu_can_fd_regs.h:681:
+               uint32_t rx_rpp                 : 12;
                                                ^

ERROR: code indent should never use tabs
#912: FILE: hw/net/can/ctu_can_fd_regs.h:682:
+^I^Iuint32_t reserved_15_12          : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#912: FILE: hw/net/can/ctu_can_fd_regs.h:682:
+               uint32_t reserved_15_12          : 4;
                                                 ^

ERROR: code indent should never use tabs
#913: FILE: hw/net/can/ctu_can_fd_regs.h:683:
+^I^Iuint32_t rx_wpp                 : 12;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#913: FILE: hw/net/can/ctu_can_fd_regs.h:683:
+               uint32_t rx_wpp                 : 12;
                                                ^

ERROR: code indent should never use tabs
#915: FILE: hw/net/can/ctu_can_fd_regs.h:685:
+^I} s;$

ERROR: code indent should never use tabs
#919: FILE: hw/net/can/ctu_can_fd_regs.h:689:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#920: FILE: hw/net/can/ctu_can_fd_regs.h:690:
+^Istruct ctu_can_fd_rx_status_rx_settings_s {$

WARNING: architecture specific defines should be avoided
#921: FILE: hw/net/can/ctu_can_fd_regs.h:691:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#923: FILE: hw/net/can/ctu_can_fd_regs.h:693:
+^I^Iuint32_t rxe                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#923: FILE: hw/net/can/ctu_can_fd_regs.h:693:
+               uint32_t rxe                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#924: FILE: hw/net/can/ctu_can_fd_regs.h:694:
+^I^Iuint32_t rxf                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#924: FILE: hw/net/can/ctu_can_fd_regs.h:694:
+               uint32_t rxf                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#925: FILE: hw/net/can/ctu_can_fd_regs.h:695:
+^I^Iuint32_t reserved_3_2            : 2;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#925: FILE: hw/net/can/ctu_can_fd_regs.h:695:
+               uint32_t reserved_3_2            : 2;
                                                 ^

ERROR: code indent should never use tabs
#926: FILE: hw/net/can/ctu_can_fd_regs.h:696:
+^I^Iuint32_t rxfrc                  : 11;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#926: FILE: hw/net/can/ctu_can_fd_regs.h:696:
+               uint32_t rxfrc                  : 11;
                                                ^

ERROR: code indent should never use tabs
#927: FILE: hw/net/can/ctu_can_fd_regs.h:697:
+^I^Iuint32_t reserved_15             : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#927: FILE: hw/net/can/ctu_can_fd_regs.h:697:
+               uint32_t reserved_15             : 1;
                                                 ^

ERROR: code indent should never use tabs
#929: FILE: hw/net/can/ctu_can_fd_regs.h:699:
+^I^Iuint32_t rtsop                   : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#929: FILE: hw/net/can/ctu_can_fd_regs.h:699:
+               uint32_t rtsop                   : 1;
                                                 ^

ERROR: code indent should never use tabs
#930: FILE: hw/net/can/ctu_can_fd_regs.h:700:
+^I^Iuint32_t reserved_31_17         : 15;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#930: FILE: hw/net/can/ctu_can_fd_regs.h:700:
+               uint32_t reserved_31_17         : 15;
                                                ^

ERROR: code indent should never use tabs
#932: FILE: hw/net/can/ctu_can_fd_regs.h:702:
+^I^Iuint32_t reserved_31_17         : 15;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#932: FILE: hw/net/can/ctu_can_fd_regs.h:702:
+               uint32_t reserved_31_17         : 15;
                                                ^

ERROR: code indent should never use tabs
#933: FILE: hw/net/can/ctu_can_fd_regs.h:703:
+^I^Iuint32_t rtsop                   : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#933: FILE: hw/net/can/ctu_can_fd_regs.h:703:
+               uint32_t rtsop                   : 1;
                                                 ^

ERROR: code indent should never use tabs
#934: FILE: hw/net/can/ctu_can_fd_regs.h:704:
+^I^Iuint32_t reserved_15             : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#934: FILE: hw/net/can/ctu_can_fd_regs.h:704:
+               uint32_t reserved_15             : 1;
                                                 ^

ERROR: code indent should never use tabs
#935: FILE: hw/net/can/ctu_can_fd_regs.h:705:
+^I^Iuint32_t rxfrc                  : 11;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#935: FILE: hw/net/can/ctu_can_fd_regs.h:705:
+               uint32_t rxfrc                  : 11;
                                                ^

ERROR: code indent should never use tabs
#936: FILE: hw/net/can/ctu_can_fd_regs.h:706:
+^I^Iuint32_t reserved_3_2            : 2;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#936: FILE: hw/net/can/ctu_can_fd_regs.h:706:
+               uint32_t reserved_3_2            : 2;
                                                 ^

ERROR: code indent should never use tabs
#937: FILE: hw/net/can/ctu_can_fd_regs.h:707:
+^I^Iuint32_t rxf                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#937: FILE: hw/net/can/ctu_can_fd_regs.h:707:
+               uint32_t rxf                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#938: FILE: hw/net/can/ctu_can_fd_regs.h:708:
+^I^Iuint32_t rxe                     : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#938: FILE: hw/net/can/ctu_can_fd_regs.h:708:
+               uint32_t rxe                     : 1;
                                                 ^

ERROR: code indent should never use tabs
#940: FILE: hw/net/can/ctu_can_fd_regs.h:710:
+^I} s;$

ERROR: code indent should never use tabs
#944: FILE: hw/net/can/ctu_can_fd_regs.h:714:
+^IRTS_END       = 0x0,$

ERROR: code indent should never use tabs
#945: FILE: hw/net/can/ctu_can_fd_regs.h:715:
+^IRTS_BEG       = 0x1,$

ERROR: code indent should never use tabs
#949: FILE: hw/net/can/ctu_can_fd_regs.h:719:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#950: FILE: hw/net/can/ctu_can_fd_regs.h:720:
+^Istruct ctu_can_fd_rx_data_s {$

ERROR: code indent should never use tabs
#952: FILE: hw/net/can/ctu_can_fd_regs.h:722:
+^I^Iuint32_t rx_data                : 32;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#952: FILE: hw/net/can/ctu_can_fd_regs.h:722:
+               uint32_t rx_data                : 32;
                                                ^

ERROR: code indent should never use tabs
#953: FILE: hw/net/can/ctu_can_fd_regs.h:723:
+^I} s;$

ERROR: code indent should never use tabs
#957: FILE: hw/net/can/ctu_can_fd_regs.h:727:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#958: FILE: hw/net/can/ctu_can_fd_regs.h:728:
+^Istruct ctu_can_fd_tx_status_s {$

WARNING: architecture specific defines should be avoided
#959: FILE: hw/net/can/ctu_can_fd_regs.h:729:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#961: FILE: hw/net/can/ctu_can_fd_regs.h:731:
+^I^Iuint32_t tx1s                    : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#961: FILE: hw/net/can/ctu_can_fd_regs.h:731:
+               uint32_t tx1s                    : 4;
                                                 ^

ERROR: code indent should never use tabs
#962: FILE: hw/net/can/ctu_can_fd_regs.h:732:
+^I^Iuint32_t tx2s                    : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#962: FILE: hw/net/can/ctu_can_fd_regs.h:732:
+               uint32_t tx2s                    : 4;
                                                 ^

ERROR: code indent should never use tabs
#963: FILE: hw/net/can/ctu_can_fd_regs.h:733:
+^I^Iuint32_t tx3s                    : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#963: FILE: hw/net/can/ctu_can_fd_regs.h:733:
+               uint32_t tx3s                    : 4;
                                                 ^

ERROR: code indent should never use tabs
#964: FILE: hw/net/can/ctu_can_fd_regs.h:734:
+^I^Iuint32_t tx4s                    : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#964: FILE: hw/net/can/ctu_can_fd_regs.h:734:
+               uint32_t tx4s                    : 4;
                                                 ^

ERROR: code indent should never use tabs
#965: FILE: hw/net/can/ctu_can_fd_regs.h:735:
+^I^Iuint32_t reserved_31_16         : 16;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#965: FILE: hw/net/can/ctu_can_fd_regs.h:735:
+               uint32_t reserved_31_16         : 16;
                                                ^

ERROR: code indent should never use tabs
#967: FILE: hw/net/can/ctu_can_fd_regs.h:737:
+^I^Iuint32_t reserved_31_16         : 16;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#967: FILE: hw/net/can/ctu_can_fd_regs.h:737:
+               uint32_t reserved_31_16         : 16;
                                                ^

ERROR: code indent should never use tabs
#968: FILE: hw/net/can/ctu_can_fd_regs.h:738:
+^I^Iuint32_t tx4s                    : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#968: FILE: hw/net/can/ctu_can_fd_regs.h:738:
+               uint32_t tx4s                    : 4;
                                                 ^

ERROR: code indent should never use tabs
#969: FILE: hw/net/can/ctu_can_fd_regs.h:739:
+^I^Iuint32_t tx3s                    : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#969: FILE: hw/net/can/ctu_can_fd_regs.h:739:
+               uint32_t tx3s                    : 4;
                                                 ^

ERROR: code indent should never use tabs
#970: FILE: hw/net/can/ctu_can_fd_regs.h:740:
+^I^Iuint32_t tx2s                    : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#970: FILE: hw/net/can/ctu_can_fd_regs.h:740:
+               uint32_t tx2s                    : 4;
                                                 ^

ERROR: code indent should never use tabs
#971: FILE: hw/net/can/ctu_can_fd_regs.h:741:
+^I^Iuint32_t tx1s                    : 4;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#971: FILE: hw/net/can/ctu_can_fd_regs.h:741:
+               uint32_t tx1s                    : 4;
                                                 ^

ERROR: code indent should never use tabs
#973: FILE: hw/net/can/ctu_can_fd_regs.h:743:
+^I} s;$

ERROR: code indent should never use tabs
#977: FILE: hw/net/can/ctu_can_fd_regs.h:747:
+^ITXT_RDY        = 0x1,$

ERROR: code indent should never use tabs
#978: FILE: hw/net/can/ctu_can_fd_regs.h:748:
+^ITXT_TRAN       = 0x2,$

ERROR: code indent should never use tabs
#979: FILE: hw/net/can/ctu_can_fd_regs.h:749:
+^ITXT_ABTP       = 0x3,$

ERROR: code indent should never use tabs
#980: FILE: hw/net/can/ctu_can_fd_regs.h:750:
+^ITXT_TOK        = 0x4,$

ERROR: code indent should never use tabs
#981: FILE: hw/net/can/ctu_can_fd_regs.h:751:
+^ITXT_ERR        = 0x6,$

ERROR: code indent should never use tabs
#982: FILE: hw/net/can/ctu_can_fd_regs.h:752:
+^ITXT_ABT        = 0x7,$

ERROR: code indent should never use tabs
#983: FILE: hw/net/can/ctu_can_fd_regs.h:753:
+^ITXT_ETY        = 0x8,$

ERROR: code indent should never use tabs
#987: FILE: hw/net/can/ctu_can_fd_regs.h:757:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#988: FILE: hw/net/can/ctu_can_fd_regs.h:758:
+^Istruct ctu_can_fd_tx_command_s {$

WARNING: architecture specific defines should be avoided
#989: FILE: hw/net/can/ctu_can_fd_regs.h:759:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#991: FILE: hw/net/can/ctu_can_fd_regs.h:761:
+^I^Iuint32_t txce                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#991: FILE: hw/net/can/ctu_can_fd_regs.h:761:
+               uint32_t txce                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#992: FILE: hw/net/can/ctu_can_fd_regs.h:762:
+^I^Iuint32_t txcr                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#992: FILE: hw/net/can/ctu_can_fd_regs.h:762:
+               uint32_t txcr                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#993: FILE: hw/net/can/ctu_can_fd_regs.h:763:
+^I^Iuint32_t txca                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#993: FILE: hw/net/can/ctu_can_fd_regs.h:763:
+               uint32_t txca                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#994: FILE: hw/net/can/ctu_can_fd_regs.h:764:
+^I^Iuint32_t reserved_7_3            : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#994: FILE: hw/net/can/ctu_can_fd_regs.h:764:
+               uint32_t reserved_7_3            : 5;
                                                 ^

ERROR: code indent should never use tabs
#995: FILE: hw/net/can/ctu_can_fd_regs.h:765:
+^I^Iuint32_t txb1                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#995: FILE: hw/net/can/ctu_can_fd_regs.h:765:
+               uint32_t txb1                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#996: FILE: hw/net/can/ctu_can_fd_regs.h:766:
+^I^Iuint32_t txb2                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#996: FILE: hw/net/can/ctu_can_fd_regs.h:766:
+               uint32_t txb2                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#997: FILE: hw/net/can/ctu_can_fd_regs.h:767:
+^I^Iuint32_t txb3                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#997: FILE: hw/net/can/ctu_can_fd_regs.h:767:
+               uint32_t txb3                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#998: FILE: hw/net/can/ctu_can_fd_regs.h:768:
+^I^Iuint32_t txb4                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#998: FILE: hw/net/can/ctu_can_fd_regs.h:768:
+               uint32_t txb4                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#999: FILE: hw/net/can/ctu_can_fd_regs.h:769:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#999: FILE: hw/net/can/ctu_can_fd_regs.h:769:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#1001: FILE: hw/net/can/ctu_can_fd_regs.h:771:
+^I^Iuint32_t reserved_31_12         : 20;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1001: FILE: hw/net/can/ctu_can_fd_regs.h:771:
+               uint32_t reserved_31_12         : 20;
                                                ^

ERROR: code indent should never use tabs
#1002: FILE: hw/net/can/ctu_can_fd_regs.h:772:
+^I^Iuint32_t txb4                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1002: FILE: hw/net/can/ctu_can_fd_regs.h:772:
+               uint32_t txb4                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#1003: FILE: hw/net/can/ctu_can_fd_regs.h:773:
+^I^Iuint32_t txb3                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1003: FILE: hw/net/can/ctu_can_fd_regs.h:773:
+               uint32_t txb3                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#1004: FILE: hw/net/can/ctu_can_fd_regs.h:774:
+^I^Iuint32_t txb2                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1004: FILE: hw/net/can/ctu_can_fd_regs.h:774:
+               uint32_t txb2                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#1005: FILE: hw/net/can/ctu_can_fd_regs.h:775:
+^I^Iuint32_t txb1                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1005: FILE: hw/net/can/ctu_can_fd_regs.h:775:
+               uint32_t txb1                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#1006: FILE: hw/net/can/ctu_can_fd_regs.h:776:
+^I^Iuint32_t reserved_7_3            : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1006: FILE: hw/net/can/ctu_can_fd_regs.h:776:
+               uint32_t reserved_7_3            : 5;
                                                 ^

ERROR: code indent should never use tabs
#1007: FILE: hw/net/can/ctu_can_fd_regs.h:777:
+^I^Iuint32_t txca                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1007: FILE: hw/net/can/ctu_can_fd_regs.h:777:
+               uint32_t txca                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#1008: FILE: hw/net/can/ctu_can_fd_regs.h:778:
+^I^Iuint32_t txcr                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1008: FILE: hw/net/can/ctu_can_fd_regs.h:778:
+               uint32_t txcr                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#1009: FILE: hw/net/can/ctu_can_fd_regs.h:779:
+^I^Iuint32_t txce                    : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1009: FILE: hw/net/can/ctu_can_fd_regs.h:779:
+               uint32_t txce                    : 1;
                                                 ^

ERROR: code indent should never use tabs
#1011: FILE: hw/net/can/ctu_can_fd_regs.h:781:
+^I} s;$

ERROR: code indent should never use tabs
#1015: FILE: hw/net/can/ctu_can_fd_regs.h:785:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#1016: FILE: hw/net/can/ctu_can_fd_regs.h:786:
+^Istruct ctu_can_fd_tx_priority_s {$

WARNING: architecture specific defines should be avoided
#1017: FILE: hw/net/can/ctu_can_fd_regs.h:787:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#1019: FILE: hw/net/can/ctu_can_fd_regs.h:789:
+^I^Iuint32_t txt1p                   : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1019: FILE: hw/net/can/ctu_can_fd_regs.h:789:
+               uint32_t txt1p                   : 3;
                                                 ^

ERROR: code indent should never use tabs
#1020: FILE: hw/net/can/ctu_can_fd_regs.h:790:
+^I^Iuint32_t reserved_3              : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1020: FILE: hw/net/can/ctu_can_fd_regs.h:790:
+               uint32_t reserved_3              : 1;
                                                 ^

ERROR: code indent should never use tabs
#1021: FILE: hw/net/can/ctu_can_fd_regs.h:791:
+^I^Iuint32_t txt2p                   : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1021: FILE: hw/net/can/ctu_can_fd_regs.h:791:
+               uint32_t txt2p                   : 3;
                                                 ^

ERROR: code indent should never use tabs
#1022: FILE: hw/net/can/ctu_can_fd_regs.h:792:
+^I^Iuint32_t reserved_7              : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1022: FILE: hw/net/can/ctu_can_fd_regs.h:792:
+               uint32_t reserved_7              : 1;
                                                 ^

ERROR: code indent should never use tabs
#1023: FILE: hw/net/can/ctu_can_fd_regs.h:793:
+^I^Iuint32_t txt3p                   : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1023: FILE: hw/net/can/ctu_can_fd_regs.h:793:
+               uint32_t txt3p                   : 3;
                                                 ^

ERROR: code indent should never use tabs
#1024: FILE: hw/net/can/ctu_can_fd_regs.h:794:
+^I^Iuint32_t reserved_11             : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1024: FILE: hw/net/can/ctu_can_fd_regs.h:794:
+               uint32_t reserved_11             : 1;
                                                 ^

ERROR: code indent should never use tabs
#1025: FILE: hw/net/can/ctu_can_fd_regs.h:795:
+^I^Iuint32_t txt4p                   : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1025: FILE: hw/net/can/ctu_can_fd_regs.h:795:
+               uint32_t txt4p                   : 3;
                                                 ^

ERROR: code indent should never use tabs
#1026: FILE: hw/net/can/ctu_can_fd_regs.h:796:
+^I^Iuint32_t reserved_31_15         : 17;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1026: FILE: hw/net/can/ctu_can_fd_regs.h:796:
+               uint32_t reserved_31_15         : 17;
                                                ^

ERROR: code indent should never use tabs
#1028: FILE: hw/net/can/ctu_can_fd_regs.h:798:
+^I^Iuint32_t reserved_31_15         : 17;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1028: FILE: hw/net/can/ctu_can_fd_regs.h:798:
+               uint32_t reserved_31_15         : 17;
                                                ^

ERROR: code indent should never use tabs
#1029: FILE: hw/net/can/ctu_can_fd_regs.h:799:
+^I^Iuint32_t txt4p                   : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1029: FILE: hw/net/can/ctu_can_fd_regs.h:799:
+               uint32_t txt4p                   : 3;
                                                 ^

ERROR: code indent should never use tabs
#1030: FILE: hw/net/can/ctu_can_fd_regs.h:800:
+^I^Iuint32_t reserved_11             : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1030: FILE: hw/net/can/ctu_can_fd_regs.h:800:
+               uint32_t reserved_11             : 1;
                                                 ^

ERROR: code indent should never use tabs
#1031: FILE: hw/net/can/ctu_can_fd_regs.h:801:
+^I^Iuint32_t txt3p                   : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1031: FILE: hw/net/can/ctu_can_fd_regs.h:801:
+               uint32_t txt3p                   : 3;
                                                 ^

ERROR: code indent should never use tabs
#1032: FILE: hw/net/can/ctu_can_fd_regs.h:802:
+^I^Iuint32_t reserved_7              : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1032: FILE: hw/net/can/ctu_can_fd_regs.h:802:
+               uint32_t reserved_7              : 1;
                                                 ^

ERROR: code indent should never use tabs
#1033: FILE: hw/net/can/ctu_can_fd_regs.h:803:
+^I^Iuint32_t txt2p                   : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1033: FILE: hw/net/can/ctu_can_fd_regs.h:803:
+               uint32_t txt2p                   : 3;
                                                 ^

ERROR: code indent should never use tabs
#1034: FILE: hw/net/can/ctu_can_fd_regs.h:804:
+^I^Iuint32_t reserved_3              : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1034: FILE: hw/net/can/ctu_can_fd_regs.h:804:
+               uint32_t reserved_3              : 1;
                                                 ^

ERROR: code indent should never use tabs
#1035: FILE: hw/net/can/ctu_can_fd_regs.h:805:
+^I^Iuint32_t txt1p                   : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1035: FILE: hw/net/can/ctu_can_fd_regs.h:805:
+               uint32_t txt1p                   : 3;
                                                 ^

ERROR: code indent should never use tabs
#1037: FILE: hw/net/can/ctu_can_fd_regs.h:807:
+^I} s;$

ERROR: code indent should never use tabs
#1041: FILE: hw/net/can/ctu_can_fd_regs.h:811:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#1042: FILE: hw/net/can/ctu_can_fd_regs.h:812:
+^Istruct ctu_can_fd_err_capt_alc_s {$

WARNING: architecture specific defines should be avoided
#1043: FILE: hw/net/can/ctu_can_fd_regs.h:813:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#1045: FILE: hw/net/can/ctu_can_fd_regs.h:815:
+^I^Iuint32_t err_pos                 : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1045: FILE: hw/net/can/ctu_can_fd_regs.h:815:
+               uint32_t err_pos                 : 5;
                                                 ^

ERROR: code indent should never use tabs
#1046: FILE: hw/net/can/ctu_can_fd_regs.h:816:
+^I^Iuint32_t err_type                : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1046: FILE: hw/net/can/ctu_can_fd_regs.h:816:
+               uint32_t err_type                : 3;
                                                 ^

ERROR: code indent should never use tabs
#1047: FILE: hw/net/can/ctu_can_fd_regs.h:817:
+^I^Iuint32_t reserved_15_8           : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1047: FILE: hw/net/can/ctu_can_fd_regs.h:817:
+               uint32_t reserved_15_8           : 8;
                                                 ^

ERROR: code indent should never use tabs
#1049: FILE: hw/net/can/ctu_can_fd_regs.h:819:
+^I^Iuint32_t alc_bit                 : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1049: FILE: hw/net/can/ctu_can_fd_regs.h:819:
+               uint32_t alc_bit                 : 5;
                                                 ^

ERROR: code indent should never use tabs
#1050: FILE: hw/net/can/ctu_can_fd_regs.h:820:
+^I^Iuint32_t alc_id_field            : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1050: FILE: hw/net/can/ctu_can_fd_regs.h:820:
+               uint32_t alc_id_field            : 3;
                                                 ^

ERROR: code indent should never use tabs
#1051: FILE: hw/net/can/ctu_can_fd_regs.h:821:
+^I^Iuint32_t reserved_31_24          : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1051: FILE: hw/net/can/ctu_can_fd_regs.h:821:
+               uint32_t reserved_31_24          : 8;
                                                 ^

ERROR: code indent should never use tabs
#1053: FILE: hw/net/can/ctu_can_fd_regs.h:823:
+^I^Iuint32_t reserved_31_24          : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1053: FILE: hw/net/can/ctu_can_fd_regs.h:823:
+               uint32_t reserved_31_24          : 8;
                                                 ^

ERROR: code indent should never use tabs
#1054: FILE: hw/net/can/ctu_can_fd_regs.h:824:
+^I^Iuint32_t alc_id_field            : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1054: FILE: hw/net/can/ctu_can_fd_regs.h:824:
+               uint32_t alc_id_field            : 3;
                                                 ^

ERROR: code indent should never use tabs
#1055: FILE: hw/net/can/ctu_can_fd_regs.h:825:
+^I^Iuint32_t alc_bit                 : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1055: FILE: hw/net/can/ctu_can_fd_regs.h:825:
+               uint32_t alc_bit                 : 5;
                                                 ^

ERROR: code indent should never use tabs
#1056: FILE: hw/net/can/ctu_can_fd_regs.h:826:
+^I^Iuint32_t reserved_15_8           : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1056: FILE: hw/net/can/ctu_can_fd_regs.h:826:
+               uint32_t reserved_15_8           : 8;
                                                 ^

ERROR: code indent should never use tabs
#1057: FILE: hw/net/can/ctu_can_fd_regs.h:827:
+^I^Iuint32_t err_type                : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1057: FILE: hw/net/can/ctu_can_fd_regs.h:827:
+               uint32_t err_type                : 3;
                                                 ^

ERROR: code indent should never use tabs
#1058: FILE: hw/net/can/ctu_can_fd_regs.h:828:
+^I^Iuint32_t err_pos                 : 5;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1058: FILE: hw/net/can/ctu_can_fd_regs.h:828:
+               uint32_t err_pos                 : 5;
                                                 ^

ERROR: code indent should never use tabs
#1060: FILE: hw/net/can/ctu_can_fd_regs.h:830:
+^I} s;$

ERROR: code indent should never use tabs
#1064: FILE: hw/net/can/ctu_can_fd_regs.h:834:
+^IERC_POS_SOF         = 0x0,$

ERROR: code indent should never use tabs
#1065: FILE: hw/net/can/ctu_can_fd_regs.h:835:
+^IERC_POS_ARB         = 0x1,$

ERROR: code indent should never use tabs
#1066: FILE: hw/net/can/ctu_can_fd_regs.h:836:
+^IERC_POS_CTRL        = 0x2,$

ERROR: code indent should never use tabs
#1067: FILE: hw/net/can/ctu_can_fd_regs.h:837:
+^IERC_POS_DATA        = 0x3,$

ERROR: code indent should never use tabs
#1068: FILE: hw/net/can/ctu_can_fd_regs.h:838:
+^IERC_POS_CRC         = 0x4,$

ERROR: code indent should never use tabs
#1069: FILE: hw/net/can/ctu_can_fd_regs.h:839:
+^IERC_POS_ACK         = 0x5,$

ERROR: code indent should never use tabs
#1070: FILE: hw/net/can/ctu_can_fd_regs.h:840:
+^IERC_POS_EOF         = 0x6,$

ERROR: code indent should never use tabs
#1071: FILE: hw/net/can/ctu_can_fd_regs.h:841:
+^IERC_POS_ERR         = 0x7,$

ERROR: code indent should never use tabs
#1072: FILE: hw/net/can/ctu_can_fd_regs.h:842:
+^IERC_POS_OVRL        = 0x8,$

ERROR: code indent should never use tabs
#1073: FILE: hw/net/can/ctu_can_fd_regs.h:843:
+^IERC_POS_OTHER      = 0x1f,$

ERROR: code indent should never use tabs
#1077: FILE: hw/net/can/ctu_can_fd_regs.h:847:
+^IERC_BIT_ERR        = 0x0,$

ERROR: code indent should never use tabs
#1078: FILE: hw/net/can/ctu_can_fd_regs.h:848:
+^IERC_CRC_ERR        = 0x1,$

ERROR: code indent should never use tabs
#1079: FILE: hw/net/can/ctu_can_fd_regs.h:849:
+^IERC_FRM_ERR        = 0x2,$

ERROR: code indent should never use tabs
#1080: FILE: hw/net/can/ctu_can_fd_regs.h:850:
+^IERC_ACK_ERR        = 0x3,$

ERROR: code indent should never use tabs
#1081: FILE: hw/net/can/ctu_can_fd_regs.h:851:
+^IERC_STUF_ERR       = 0x4,$

ERROR: code indent should never use tabs
#1085: FILE: hw/net/can/ctu_can_fd_regs.h:855:
+^IALC_RSVD            = 0x0,$

ERROR: code indent should never use tabs
#1086: FILE: hw/net/can/ctu_can_fd_regs.h:856:
+^IALC_BASE_ID         = 0x1,$

ERROR: code indent should never use tabs
#1087: FILE: hw/net/can/ctu_can_fd_regs.h:857:
+^IALC_SRR_RTR         = 0x2,$

ERROR: code indent should never use tabs
#1088: FILE: hw/net/can/ctu_can_fd_regs.h:858:
+^IALC_IDE             = 0x3,$

ERROR: code indent should never use tabs
#1089: FILE: hw/net/can/ctu_can_fd_regs.h:859:
+^IALC_EXTENSION       = 0x4,$

ERROR: code indent should never use tabs
#1090: FILE: hw/net/can/ctu_can_fd_regs.h:860:
+^IALC_RTR             = 0x5,$

ERROR: code indent should never use tabs
#1094: FILE: hw/net/can/ctu_can_fd_regs.h:864:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#1095: FILE: hw/net/can/ctu_can_fd_regs.h:865:
+^Istruct ctu_can_fd_trv_delay_ssp_cfg_s {$

WARNING: architecture specific defines should be avoided
#1096: FILE: hw/net/can/ctu_can_fd_regs.h:866:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#1098: FILE: hw/net/can/ctu_can_fd_regs.h:868:
+^I^Iuint32_t trv_delay_value         : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1098: FILE: hw/net/can/ctu_can_fd_regs.h:868:
+               uint32_t trv_delay_value         : 7;
                                                 ^

ERROR: code indent should never use tabs
#1099: FILE: hw/net/can/ctu_can_fd_regs.h:869:
+^I^Iuint32_t reserved_15_7           : 9;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1099: FILE: hw/net/can/ctu_can_fd_regs.h:869:
+               uint32_t reserved_15_7           : 9;
                                                 ^

ERROR: code indent should never use tabs
#1101: FILE: hw/net/can/ctu_can_fd_regs.h:871:
+^I^Iuint32_t ssp_offset              : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1101: FILE: hw/net/can/ctu_can_fd_regs.h:871:
+               uint32_t ssp_offset              : 8;
                                                 ^

ERROR: code indent should never use tabs
#1102: FILE: hw/net/can/ctu_can_fd_regs.h:872:
+^I^Iuint32_t ssp_src                 : 2;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1102: FILE: hw/net/can/ctu_can_fd_regs.h:872:
+               uint32_t ssp_src                 : 2;
                                                 ^

ERROR: code indent should never use tabs
#1103: FILE: hw/net/can/ctu_can_fd_regs.h:873:
+^I^Iuint32_t reserved_31_26          : 6;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1103: FILE: hw/net/can/ctu_can_fd_regs.h:873:
+               uint32_t reserved_31_26          : 6;
                                                 ^

ERROR: code indent should never use tabs
#1105: FILE: hw/net/can/ctu_can_fd_regs.h:875:
+^I^Iuint32_t reserved_31_26          : 6;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1105: FILE: hw/net/can/ctu_can_fd_regs.h:875:
+               uint32_t reserved_31_26          : 6;
                                                 ^

ERROR: code indent should never use tabs
#1106: FILE: hw/net/can/ctu_can_fd_regs.h:876:
+^I^Iuint32_t ssp_src                 : 2;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1106: FILE: hw/net/can/ctu_can_fd_regs.h:876:
+               uint32_t ssp_src                 : 2;
                                                 ^

ERROR: code indent should never use tabs
#1107: FILE: hw/net/can/ctu_can_fd_regs.h:877:
+^I^Iuint32_t ssp_offset              : 8;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1107: FILE: hw/net/can/ctu_can_fd_regs.h:877:
+               uint32_t ssp_offset              : 8;
                                                 ^

ERROR: code indent should never use tabs
#1108: FILE: hw/net/can/ctu_can_fd_regs.h:878:
+^I^Iuint32_t reserved_15_7           : 9;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1108: FILE: hw/net/can/ctu_can_fd_regs.h:878:
+               uint32_t reserved_15_7           : 9;
                                                 ^

ERROR: code indent should never use tabs
#1109: FILE: hw/net/can/ctu_can_fd_regs.h:879:
+^I^Iuint32_t trv_delay_value         : 7;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1109: FILE: hw/net/can/ctu_can_fd_regs.h:879:
+               uint32_t trv_delay_value         : 7;
                                                 ^

ERROR: code indent should never use tabs
#1111: FILE: hw/net/can/ctu_can_fd_regs.h:881:
+^I} s;$

ERROR: code indent should never use tabs
#1115: FILE: hw/net/can/ctu_can_fd_regs.h:885:
+^ISSP_SRC_MEAS_N_OFFSET       = 0x0,$

ERROR: code indent should never use tabs
#1116: FILE: hw/net/can/ctu_can_fd_regs.h:886:
+^ISSP_SRC_NO_SSP              = 0x1,$

ERROR: code indent should never use tabs
#1117: FILE: hw/net/can/ctu_can_fd_regs.h:887:
+^ISSP_SRC_OFFSET              = 0x2,$

ERROR: code indent should never use tabs
#1121: FILE: hw/net/can/ctu_can_fd_regs.h:891:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#1122: FILE: hw/net/can/ctu_can_fd_regs.h:892:
+^Istruct ctu_can_fd_rx_fr_ctr_s {$

ERROR: code indent should never use tabs
#1124: FILE: hw/net/can/ctu_can_fd_regs.h:894:
+^I^Iuint32_t rx_fr_ctr_val          : 32;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1124: FILE: hw/net/can/ctu_can_fd_regs.h:894:
+               uint32_t rx_fr_ctr_val          : 32;
                                                ^

ERROR: code indent should never use tabs
#1125: FILE: hw/net/can/ctu_can_fd_regs.h:895:
+^I} s;$

ERROR: code indent should never use tabs
#1129: FILE: hw/net/can/ctu_can_fd_regs.h:899:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#1130: FILE: hw/net/can/ctu_can_fd_regs.h:900:
+^Istruct ctu_can_fd_tx_fr_ctr_s {$

ERROR: code indent should never use tabs
#1132: FILE: hw/net/can/ctu_can_fd_regs.h:902:
+^I^Iuint32_t tx_fr_ctr_val          : 32;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1132: FILE: hw/net/can/ctu_can_fd_regs.h:902:
+               uint32_t tx_fr_ctr_val          : 32;
                                                ^

ERROR: code indent should never use tabs
#1133: FILE: hw/net/can/ctu_can_fd_regs.h:903:
+^I} s;$

ERROR: code indent should never use tabs
#1137: FILE: hw/net/can/ctu_can_fd_regs.h:907:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#1138: FILE: hw/net/can/ctu_can_fd_regs.h:908:
+^Istruct ctu_can_fd_debug_register_s {$

WARNING: architecture specific defines should be avoided
#1139: FILE: hw/net/can/ctu_can_fd_regs.h:909:
+#ifdef __LITTLE_ENDIAN_BITFIELD

ERROR: code indent should never use tabs
#1141: FILE: hw/net/can/ctu_can_fd_regs.h:911:
+^I^Iuint32_t stuff_count             : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1141: FILE: hw/net/can/ctu_can_fd_regs.h:911:
+               uint32_t stuff_count             : 3;
                                                 ^

ERROR: code indent should never use tabs
#1142: FILE: hw/net/can/ctu_can_fd_regs.h:912:
+^I^Iuint32_t destuff_count           : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1142: FILE: hw/net/can/ctu_can_fd_regs.h:912:
+               uint32_t destuff_count           : 3;
                                                 ^

ERROR: code indent should never use tabs
#1143: FILE: hw/net/can/ctu_can_fd_regs.h:913:
+^I^Iuint32_t pc_arb                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1143: FILE: hw/net/can/ctu_can_fd_regs.h:913:
+               uint32_t pc_arb                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1144: FILE: hw/net/can/ctu_can_fd_regs.h:914:
+^I^Iuint32_t pc_con                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1144: FILE: hw/net/can/ctu_can_fd_regs.h:914:
+               uint32_t pc_con                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1145: FILE: hw/net/can/ctu_can_fd_regs.h:915:
+^I^Iuint32_t pc_dat                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1145: FILE: hw/net/can/ctu_can_fd_regs.h:915:
+               uint32_t pc_dat                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1146: FILE: hw/net/can/ctu_can_fd_regs.h:916:
+^I^Iuint32_t pc_stc                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1146: FILE: hw/net/can/ctu_can_fd_regs.h:916:
+               uint32_t pc_stc                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1147: FILE: hw/net/can/ctu_can_fd_regs.h:917:
+^I^Iuint32_t pc_crc                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1147: FILE: hw/net/can/ctu_can_fd_regs.h:917:
+               uint32_t pc_crc                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1148: FILE: hw/net/can/ctu_can_fd_regs.h:918:
+^I^Iuint32_t pc_crcd                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1148: FILE: hw/net/can/ctu_can_fd_regs.h:918:
+               uint32_t pc_crcd                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#1149: FILE: hw/net/can/ctu_can_fd_regs.h:919:
+^I^Iuint32_t pc_ack                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1149: FILE: hw/net/can/ctu_can_fd_regs.h:919:
+               uint32_t pc_ack                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1150: FILE: hw/net/can/ctu_can_fd_regs.h:920:
+^I^Iuint32_t pc_ackd                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1150: FILE: hw/net/can/ctu_can_fd_regs.h:920:
+               uint32_t pc_ackd                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#1151: FILE: hw/net/can/ctu_can_fd_regs.h:921:
+^I^Iuint32_t pc_eof                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1151: FILE: hw/net/can/ctu_can_fd_regs.h:921:
+               uint32_t pc_eof                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1152: FILE: hw/net/can/ctu_can_fd_regs.h:922:
+^I^Iuint32_t pc_int                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1152: FILE: hw/net/can/ctu_can_fd_regs.h:922:
+               uint32_t pc_int                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1153: FILE: hw/net/can/ctu_can_fd_regs.h:923:
+^I^Iuint32_t pc_susp                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1153: FILE: hw/net/can/ctu_can_fd_regs.h:923:
+               uint32_t pc_susp                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#1154: FILE: hw/net/can/ctu_can_fd_regs.h:924:
+^I^Iuint32_t pc_ovr                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1154: FILE: hw/net/can/ctu_can_fd_regs.h:924:
+               uint32_t pc_ovr                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1155: FILE: hw/net/can/ctu_can_fd_regs.h:925:
+^I^Iuint32_t pc_sof                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1155: FILE: hw/net/can/ctu_can_fd_regs.h:925:
+               uint32_t pc_sof                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1156: FILE: hw/net/can/ctu_can_fd_regs.h:926:
+^I^Iuint32_t reserved_31_19         : 13;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1156: FILE: hw/net/can/ctu_can_fd_regs.h:926:
+               uint32_t reserved_31_19         : 13;
                                                ^

ERROR: code indent should never use tabs
#1158: FILE: hw/net/can/ctu_can_fd_regs.h:928:
+^I^Iuint32_t reserved_31_19         : 13;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1158: FILE: hw/net/can/ctu_can_fd_regs.h:928:
+               uint32_t reserved_31_19         : 13;
                                                ^

ERROR: code indent should never use tabs
#1159: FILE: hw/net/can/ctu_can_fd_regs.h:929:
+^I^Iuint32_t pc_sof                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1159: FILE: hw/net/can/ctu_can_fd_regs.h:929:
+               uint32_t pc_sof                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1160: FILE: hw/net/can/ctu_can_fd_regs.h:930:
+^I^Iuint32_t pc_ovr                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1160: FILE: hw/net/can/ctu_can_fd_regs.h:930:
+               uint32_t pc_ovr                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1161: FILE: hw/net/can/ctu_can_fd_regs.h:931:
+^I^Iuint32_t pc_susp                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1161: FILE: hw/net/can/ctu_can_fd_regs.h:931:
+               uint32_t pc_susp                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#1162: FILE: hw/net/can/ctu_can_fd_regs.h:932:
+^I^Iuint32_t pc_int                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1162: FILE: hw/net/can/ctu_can_fd_regs.h:932:
+               uint32_t pc_int                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1163: FILE: hw/net/can/ctu_can_fd_regs.h:933:
+^I^Iuint32_t pc_eof                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1163: FILE: hw/net/can/ctu_can_fd_regs.h:933:
+               uint32_t pc_eof                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1164: FILE: hw/net/can/ctu_can_fd_regs.h:934:
+^I^Iuint32_t pc_ackd                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1164: FILE: hw/net/can/ctu_can_fd_regs.h:934:
+               uint32_t pc_ackd                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#1165: FILE: hw/net/can/ctu_can_fd_regs.h:935:
+^I^Iuint32_t pc_ack                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1165: FILE: hw/net/can/ctu_can_fd_regs.h:935:
+               uint32_t pc_ack                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1166: FILE: hw/net/can/ctu_can_fd_regs.h:936:
+^I^Iuint32_t pc_crcd                 : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1166: FILE: hw/net/can/ctu_can_fd_regs.h:936:
+               uint32_t pc_crcd                 : 1;
                                                 ^

ERROR: code indent should never use tabs
#1167: FILE: hw/net/can/ctu_can_fd_regs.h:937:
+^I^Iuint32_t pc_crc                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1167: FILE: hw/net/can/ctu_can_fd_regs.h:937:
+               uint32_t pc_crc                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1168: FILE: hw/net/can/ctu_can_fd_regs.h:938:
+^I^Iuint32_t pc_stc                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1168: FILE: hw/net/can/ctu_can_fd_regs.h:938:
+               uint32_t pc_stc                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1169: FILE: hw/net/can/ctu_can_fd_regs.h:939:
+^I^Iuint32_t pc_dat                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1169: FILE: hw/net/can/ctu_can_fd_regs.h:939:
+               uint32_t pc_dat                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1170: FILE: hw/net/can/ctu_can_fd_regs.h:940:
+^I^Iuint32_t pc_con                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1170: FILE: hw/net/can/ctu_can_fd_regs.h:940:
+               uint32_t pc_con                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1171: FILE: hw/net/can/ctu_can_fd_regs.h:941:
+^I^Iuint32_t pc_arb                  : 1;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1171: FILE: hw/net/can/ctu_can_fd_regs.h:941:
+               uint32_t pc_arb                  : 1;
                                                 ^

ERROR: code indent should never use tabs
#1172: FILE: hw/net/can/ctu_can_fd_regs.h:942:
+^I^Iuint32_t destuff_count           : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1172: FILE: hw/net/can/ctu_can_fd_regs.h:942:
+               uint32_t destuff_count           : 3;
                                                 ^

ERROR: code indent should never use tabs
#1173: FILE: hw/net/can/ctu_can_fd_regs.h:943:
+^I^Iuint32_t stuff_count             : 3;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1173: FILE: hw/net/can/ctu_can_fd_regs.h:943:
+               uint32_t stuff_count             : 3;
                                                 ^

ERROR: code indent should never use tabs
#1175: FILE: hw/net/can/ctu_can_fd_regs.h:945:
+^I} s;$

ERROR: code indent should never use tabs
#1179: FILE: hw/net/can/ctu_can_fd_regs.h:949:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#1180: FILE: hw/net/can/ctu_can_fd_regs.h:950:
+^Istruct ctu_can_fd_yolo_reg_s {$

ERROR: code indent should never use tabs
#1182: FILE: hw/net/can/ctu_can_fd_regs.h:952:
+^I^Iuint32_t yolo_val               : 32;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1182: FILE: hw/net/can/ctu_can_fd_regs.h:952:
+               uint32_t yolo_val               : 32;
                                                ^

ERROR: code indent should never use tabs
#1183: FILE: hw/net/can/ctu_can_fd_regs.h:953:
+^I} s;$

ERROR: code indent should never use tabs
#1187: FILE: hw/net/can/ctu_can_fd_regs.h:957:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#1188: FILE: hw/net/can/ctu_can_fd_regs.h:958:
+^Istruct ctu_can_fd_timestamp_low_s {$

ERROR: code indent should never use tabs
#1190: FILE: hw/net/can/ctu_can_fd_regs.h:960:
+^I^Iuint32_t timestamp_low          : 32;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1190: FILE: hw/net/can/ctu_can_fd_regs.h:960:
+               uint32_t timestamp_low          : 32;
                                                ^

ERROR: code indent should never use tabs
#1191: FILE: hw/net/can/ctu_can_fd_regs.h:961:
+^I} s;$

ERROR: code indent should never use tabs
#1195: FILE: hw/net/can/ctu_can_fd_regs.h:965:
+^Iuint32_t u32;$

ERROR: code indent should never use tabs
#1196: FILE: hw/net/can/ctu_can_fd_regs.h:966:
+^Istruct ctu_can_fd_timestamp_high_s {$

ERROR: code indent should never use tabs
#1198: FILE: hw/net/can/ctu_can_fd_regs.h:968:
+^I^Iuint32_t timestamp_high         : 32;$

ERROR: spaces prohibited around that ':' (ctx:WxW)
#1198: FILE: hw/net/can/ctu_can_fd_regs.h:968:
+               uint32_t timestamp_high         : 32;
                                                ^

ERROR: code indent should never use tabs
#1199: FILE: hw/net/can/ctu_can_fd_regs.h:969:
+^I} s;$

total: 1138 errors, 43 warnings, 1162 lines checked

Patch 4/6 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

5/6 Checking commit 9dde8a878f0c (hw/net/can: CTU CAN FD IP open hardware core emulation.)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#43: 
new file mode 100644

WARNING: architecture specific defines should be avoided
#779: FILE: hw/net/can/ctucan_core.h:35:
+#ifndef __LITTLE_ENDIAN_BITFIELD

WARNING: line over 80 characters
#825: FILE: hw/net/can/ctucan_core.h:81:
+    union ctu_can_fd_filter_control_filter_status   filter_control_filter_status;

total: 0 errors, 3 warnings, 1105 lines checked

Patch 5/6 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/6 Checking commit 8e9973743175 (hw/net/can: Documentation for CTU CAN FD IP open hardware core emulation.)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/cover.1594725647.git.pisa@cmp.felk.cvut.cz/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 0/6] CTU CAN FD core support - patchew report
  2020-07-14 12:47 ` [PATCH v1 0/6] CTU CAN FD core support no-reply
@ 2020-07-14 13:45   ` Pavel Pisa
  0 siblings, 0 replies; 20+ messages in thread
From: Pavel Pisa @ 2020-07-14 13:45 UTC (permalink / raw)
  To: qemu-devel
  Cc: marex, jnovak, stefanha, deniz.eren, armbru, o.rempel,
	frederic.konrad, jan.kiszka, charvj10, socketcan, pbonzini,
	ondrej.ille

Hello everybody,

On Tuesday 14 of July 2020 14:47:53 no-reply@patchew.org wrote:
> /tmp/qemu-test/src/hw/net/can/ctucan_pci.c: In function
> 'ctucan_pci_id_cra_io_read':
> /tmp/qemu-test/src/hw/net/can/ctucan_pci.c:105:20: error: format '%lx'
> expects argument of type 'long unsigned int', but argument 2 has type
> 'hwaddr' {aka 'long long unsigned int'} [-Werror=format=] 105 |    
> printf("addr=%lx,size=%x,tmp=%lx\n", addr, size, tmp);

excuse me, I have overlooked this printf used during debugging.
We fix that.

As for the following reported problem with formating, I am not sure
what to do. The hardware registers layout header files files are generated 
from CACTUS/IP-XACT XML fromat sources same as VHDL implementation
of registers accesses and fields.

The top level tool (pyXact_generator) is under our control (Ondrej Ille
is an author). Problem is, that tool output has been tuned to match
Linux kernel requirements, but QEMU has incompatible requirements
for indentation. Manual style correction in files is not a right
way to go. Adding switch for QEMU style to pyXact_generator
is possible but then header files intended for the Linux kernel
cannot be compared with corresponding QEMU ones and generally,
configurable setup and multiple options to generate files
would lead to mess. We take directly header files from main
CTU CAN FD IP core repository where match between sources and generated
files is checked as continuous integration step.


On Tuesday 14 of July 2020 14:48:50 no-reply@patchew.org wrote:
> Patchew URL:
> https://patchew.org/QEMU/cover.1594725647.git.pisa@cmp.felk.cvut.cz/
...
> === OUTPUT BEGIN ===
> 1/6 Checking commit 28bfb20d4aa8 (net/can: Initial host SocketCan support
> for CAN FD.) 2/6 Checking commit d9207e106794 (hw/net/can: sja1000 ignore
> CAN FD frames) 3/6 Checking commit 733ab67ddcc2 (net/can: Add can_dlc2len
> and can_len2dlc for CAN FD.) 4/6 Checking commit dc95d778bb88
> (hw/net/can/ctucafd: Add CTU CAN FD core register definitions.) WARNING:
> added, moved or deleted file(s), does MAINTAINERS need updating? #30:
> new file mode 100644
>
> WARNING: Block comments use a leading /* on a separate line
> #36: FILE: hw/net/can/ctu_can_fd_frame.h:2:
> +/*************************************************************************
>******
>
> WARNING: architecture specific defines should be avoided
> #67: FILE: hw/net/can/ctu_can_fd_frame.h:33:
> +#ifndef __CTU_CAN_FD_CAN_FD_FRAME_FORMAT__
>
> ERROR: code indent should never use tabs
> #72: FILE: hw/net/can/ctu_can_fd_frame.h:38:
> +^ICTU_CAN_FD_FRAME_FORM_W        = 0x0,$
>
> ERROR: code indent should never use tabs
> #73: FILE: hw/net/can/ctu_can_fd_frame.h:39:
> +^ICTU_CAN_FD_IDENTIFIER_W        = 0x4,$

> ERROR: code indent should never use tabs
> #221: FILE: hw/net/can/ctu_can_fd_frame.h:187:
> +^I} s;$
>
> WARNING: Block comments use a leading /* on a separate line
> #232: FILE: hw/net/can/ctu_can_fd_regs.h:2:
> +/*************************************************************************
>******
>
> WARNING: architecture specific defines should be avoided
> #263: FILE: hw/net/can/ctu_can_fd_regs.h:33:
> +#ifndef __CTU_CAN_FD_CAN_FD_REGISTER_MAP__
>
> ERROR: code indent should never use tabs
> #268: FILE: hw/net/can/ctu_can_fd_regs.h:38:
> +^ICTU_CAN_FD_DEVICE_ID             = 0x0,$
>
> ERROR: code indent should never use tabs
> #269: FILE: hw/net/can/ctu_can_fd_regs.h:39:
> +^ICTU_CAN_FD_VERSION               = 0x2,$
>
> ERROR: code indent should never use tabs
> #270: FILE: hw/net/can/ctu_can_fd_regs.h:40:
> +^ICTU_CAN_FD_MODE                  = 0x4,$

As for the functionality, the solution has been tested only for little-endian
guests and host systems for now. I am not fully sure how things map on 
different variants of big-endian systems and how well they would match
reality. Generally, the Linux driver is written such way that it detects
switched byte order and should adapt for it automatically.

I can try some MIPS based system, if the check result is important.
But it would worth to have even real HW to compare real programmed
PCIe card behavior and I do not pose Linux capable big endian systems.
I have some safety based Cortex-R big endian ARMS there, but they do not
have PCIe and QEMU support.

Thanks for review and suggestions in advance,

                Pavel
-- 
                Pavel Pisa
    phone:      +420 603531357
    e-mail:     pisa@cmp.felk.cvut.cz
    Department of Control Engineering FEE CVUT
    Karlovo namesti 13, 121 35, Prague 2
    university: http://dce.fel.cvut.cz/
    personal:   http://cmp.felk.cvut.cz/~pisa
    projects:   https://www.openhub.net/accounts/ppisa
    CAN related:http://canbus.pages.fel.cvut.cz/



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 5/6] hw/net/can: CTU CAN FD IP open hardware core emulation.
  2020-07-14 12:20 ` [PATCH v1 5/6] hw/net/can: CTU CAN FD IP open hardware core emulation pisa
@ 2020-07-24  9:46   ` Pavel Pisa
  0 siblings, 0 replies; 20+ messages in thread
From: Pavel Pisa @ 2020-07-24  9:46 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Stefan Hajnoczi, Konrad Frederic,
	Deniz Eren, Jan Kiszka, Markus Armbruster
  Cc: Marek Vasut, Jiri Novak, Oliver Hartkopp, Oleksij Rempel,
	Ondrej Ille, Jan Charvat

Hello everybody,

I have tested Linux kernel and driver build on big-endian system
(MIPS MALTA) emulated on x86_64 host.

qemu-system-mips  -m 256 -M malta \
      -kernel vmlinuz-malta \
      -initrd ramdisk.cpio \
      -append "root=/dev/ram console=ttyS0 nokaslr" \
      -object can-bus,id=canbus0-bus \
      -object can-host-socketcan,if=can0,canbus=canbus0-bus,id=canbus0-socketcan \
      -device kvaser_pci,canbus=canbus0-bus \
      -device ctucan_pci,canbus0=canbus0-bus,canbus1=canbus0-bus \
      -virtfs local,path=shareddir,security_model=none,mount_tag=shareddir \
      -nographic \

The emulation seems to be correct but driver has predicted issue
on big-endian system.

Next patch solves driver issue

https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core/-/blob/master/driver/ctu_can_fd_hw.c#L581

diff --git a/driver/ctu_can_fd_hw.c b/driver/ctu_can_fd_hw.c
index 95c98bf5..de7f89c7 100644
--- a/driver/ctu_can_fd_hw.c
+++ b/driver/ctu_can_fd_hw.c
@@ -580,7 +580,7 @@ void ctucan_hw_read_rx_frame_ffw(struct ctucan_hw_priv *priv,
        /* Data */
        for (i = 0; i < cf->len; i += 4) {
                u32 data = priv->read_reg(priv, CTU_CAN_FD_RX_DATA);
-               *(u32 *)(cf->data + i) = data;
+               *(__le32 *)(cf->data + i) = cpu_to_le32(data);
        }
 }

@@ -733,7 +733,7 @@ bool ctucan_hw_insert_frame(struct ctucan_hw_priv *priv,

        if (!(cf->can_id & CAN_RTR_FLAG)) {
                for (i = 0; i < cf->len; i += 4) {
-                       u32 data = *(u32 *)(cf->data + i);
+                       u32 data = le32_to_cpu(*(__le32 *)(cf->data + i));

                        ctucan_hw_write_txt_buf(priv, buf_base,
                                        CTU_CAN_FD_DATA_1_4_W + i, data);

If there is not some stronger argument to use __cpu_to_le32p or __le32_to_cpup
for the kernel I plan to adapt userspace debug and test build of the driver
to accept __le32 and le32_to_cpu in the sources. QEMU helped to confirm need
of the endiannes swap on big-endian systems.

As for QEMU, I expect that when run on big-endian host there would be the same
problem in the emulation part.

So we need to decide where to swap endianness. If at the time to memory write into
Tx buffer reflecting workds on the PCIe card or when data from the CTU CAN FD IP core
buffers are copyed to the CAN frame send into QEMU virtual CAN bus. The location
in the source is higlighted inline in a patch

On Tuesday 14 of July 2020 14:20:18 pisa@cmp.felk.cvut.cz wrote:
> From: Jan Charvat <charvj10@fel.cvut.cz>
>
> The implementation of the model of complete open-source/design/hardware
> CAN FD controller. The IP core project has been started and is maintained
> by Ondrej Ille at Czech Technical University in Prague.
>
> CTU CAN FD project pages:
> 	https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core
>
> CAN bus CTU FEE Projects Listing page:
> 	http://canbus.pages.fel.cvut.cz/
>
> The core is mapped to PCIe card same as on one of its real hardware
> adaptations. The device implementing two CTU CAN FD ip cores
> is instantiated after CAN bus definition
>
> 	-object can-bus,id=canbus0-bus
>
> by QEMU parameters
>
> 	-device ctucan_pci,canbus0=canbus0-bus,canbus1=canbus0-bus
>
> Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
> Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>

...

> +static void ctucan_buff2frame(const uint8_t *buff, qemu_can_frame *frame)
> +{
> +    frame->can_id = 0;
> +    frame->can_dlc = 0;
> +    frame->flags = 0;
> +
> +    if (buff == NULL) {
> +        return;
> +    }
> +    {
> +        union ctu_can_fd_frame_form_w frame_form_w;
> +        union ctu_can_fd_identifier_w identifier_w;
> +        unsigned int ide;
> +
> +        frame_form_w = *(union ctu_can_fd_frame_form_w *) buff;
> +        frame->can_dlc = can_dlc2len(frame_form_w.s.dlc);
> +
> +        identifier_w = *(union ctu_can_fd_identifier_w *) (buff + 4);
> +
> +        ide = frame_form_w.s.ide;
> +        if (ide) {
> +            frame->can_id = (identifier_w.s.identifier_base << 18) |
> +                            identifier_w.s.identifier_ext;
> +            frame->can_id |= QEMU_CAN_EFF_FLAG;
> +        } else {
> +            frame->can_id = identifier_w.s.identifier_base;
> +        }
> +
> +        if (frame_form_w.s.esi_rsv) {
> +            frame->flags |= QEMU_CAN_FRMF_ESI;
> +        }
> +
> +        if (frame_form_w.s.rtr) {
> +            frame->can_id |= QEMU_CAN_RTR_FLAG;
> +        }
> +
> +        if (frame_form_w.s.fdf) {   /*CAN FD*/
> +            frame->flags |= QEMU_CAN_FRMF_TYPE_FD;
> +            if (frame_form_w.s.brs) {
> +                frame->flags |= QEMU_CAN_FRMF_BRS;
> +            }
> +        }
> +    }
> +
> +    memcpy(frame->data, buff + 0x10, 0x40);

The place where content of sequence of 32-bit card registers region
is transformed into SocketCAN like QEMU CAN frame.

> +}
> +
> +
> +static int ctucan_frame2buff(const qemu_can_frame *frame, uint8_t *buff)
> +{
> +    unsigned int bytes_cnt = -1;
> +    memset(buff, 0, CTUCAN_MSG_MAX_LEN * sizeof(*buff));
> +
> +    if (frame == NULL) {
> +        return bytes_cnt;
> +    }
> +    {
> +        union ctu_can_fd_frame_form_w *frame_form_w;
> +        union ctu_can_fd_identifier_w *identifier_w;
> +        frame_form_w = (union ctu_can_fd_frame_form_w *) buff;
> +        identifier_w = (union ctu_can_fd_identifier_w *) (buff + 4);
> +
> +        frame_form_w->u32 = 0;
> +        identifier_w->u32 = 0;
> +
> +        bytes_cnt = frame->can_dlc;
> +        bytes_cnt = (bytes_cnt + 3) & ~3;
> +        bytes_cnt += 16;
> +        frame_form_w->s.rwcnt = (bytes_cnt >> 2) - 1;
> +
> +        frame_form_w->s.dlc = can_len2dlc(frame->can_dlc);
> +
> +        if (frame->can_id & QEMU_CAN_EFF_FLAG) {
> +            frame_form_w->s.ide = 1;
> +            identifier_w->s.identifier_base =
> +                                    (frame->can_id & 0x1FFC0000) >> 18;
> +            identifier_w->s.identifier_ext = frame->can_id & 0x3FFFF;
> +        } else {
> +            identifier_w->s.identifier_base = frame->can_id & 0x7FF;
> +        }
> +
> +        if (frame->flags & QEMU_CAN_FRMF_ESI) {
> +            frame_form_w->s.esi_rsv = 1;
> +        }
> +
> +        if (frame->can_id & QEMU_CAN_RTR_FLAG) {
> +            frame_form_w->s.rtr = 1;
> +        }
> +
> +        if (frame->flags & QEMU_CAN_FRMF_TYPE_FD) {  /*CAN FD*/
> +           frame_form_w->s.fdf = 1;
> +            if (frame->flags & QEMU_CAN_FRMF_BRS) {
> +                frame_form_w->s.brs = 1;
> +            }
> +        }
> +    }
> +
> +    memcpy(buff + 0x10, frame->data, 0x40);

The place where QEMU CAN frame data are used to fill sequence of 32-bit card registers
region.

> +
> +    return bytes_cnt;
> +}

...

> +void ctucan_mem_write(CtuCanCoreState *s, hwaddr addr, uint64_t val,
> +                       unsigned size)
> +{
> +    int              i;
> +
> +    DPRINTF("write 0x%02llx addr 0x%02x\n",
> +            (unsigned long long)val, (unsigned int)addr);
> +
> +    if (addr > CTUCAN_CORE_MEM_SIZE) {
> +        return;
> +    }
> +
> +    if (addr >= CTU_CAN_FD_TXTB1_DATA_1) {
> +        int buff_num;
> +        addr -= CTU_CAN_FD_TXTB1_DATA_1;
> +        buff_num = addr / CTUCAN_CORE_TXBUFF_SPAN;
> +        addr %= CTUCAN_CORE_TXBUFF_SPAN;
> +        if (buff_num < CTUCAN_CORE_TXBUF_NUM) {
> +            *(uint32_t *)(s->tx_buffer[buff_num].data + addr) = val;

Location where CPU write is transformed into IP CORE state changes, transmit
buffer write


...
> +uint64_t ctucan_mem_read(CtuCanCoreState *s, hwaddr addr, unsigned size)
> +{
...
> +    case CTU_CAN_FD_RX_DATA:
> +        if (s->rx_cnt) {
> +            memcpy(&val, s->rx_buff + s->rx_tail_pos, 4);

Read of Rx FIFO buffer data as response of CPU read request. The FIFO holds
sequence of frame control data, frame identifier and actual data in consecutive
32-bit words

> +            if (!s->rx_frame_rem) {
> +                union ctu_can_fd_frame_form_w frame_form_w;
> +                frame_form_w.u32 = val;
> +                s->rx_frame_rem = frame_form_w.s.rwcnt * 4 + 4;
> +            }
> +            s->rx_cnt -= 4;
> +            s->rx_frame_rem -= 4;
> +            if (!s->rx_frame_rem) {
> +                s->rx_status_rx_settings.s.rxfrc--;
> +                if (!s->rx_status_rx_settings.s.rxfrc) {
> +                    s->status.s.rxne = 0;
> +                    s->status.s.idle = 1;
> +                    s->status.s.rxs = 0;
> +                }
> +            }
> +            s->rx_tail_pos = (s->rx_tail_pos + 4) % CTUCAN_RCV_BUF_LEN;
> +        } else {
> +            val = 0;
> +        }
> +        break;

...

The next problem is forgot printf in the PCIe integartion

> diff --git a/hw/net/can/ctucan_pci.c b/hw/net/can/ctucan_pci.c
> new file mode 100644
> index 0000000000..accc7f0fd9
> --- /dev/null
> +++ b/hw/net/can/ctucan_pci.c
...
> +static uint64_t ctucan_pci_id_cra_io_read(void *opaque, hwaddr addr,
> +                                          unsigned size)
> +{
...
> +    printf("addr=%lx,size=%x,tmp=%lx\n", addr, size, tmp);
> +    return tmp;
> +}

Please send me hint how to move project forward. What is preferred
endianness solution for QEMU a if I should resend whole series
or the first three patches extending QEMU CAN bus support
to CAN FD support can be accepted as they are (there has been no issue
or even formating problem reported) can be accepted as they are
and  resent of patch 5/6 and 6/6 is enough.

Best wishes,

                Pavel Pisa
    e-mail:     pisa@cmp.felk.cvut.cz
    Department of Control Engineering FEE CVUT
    Karlovo namesti 13, 121 35, Prague 2
    university: http://dce.fel.cvut.cz/
    personal:   http://cmp.felk.cvut.cz/~pisa
    projects:   https://www.openhub.net/accounts/ppisa
    CAN related:http://canbus.pages.fel.cvut.cz/


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 0/6] CTU CAN FD core support
  2020-07-14 12:20 [PATCH v1 0/6] CTU CAN FD core support pisa
                   ` (7 preceding siblings ...)
  2020-07-14 12:48 ` [PATCH v1 0/6] CTU CAN FD core support no-reply
@ 2020-07-30 15:29 ` Markus Armbruster
  8 siblings, 0 replies; 20+ messages in thread
From: Markus Armbruster @ 2020-07-30 15:29 UTC (permalink / raw)
  To: pisa
  Cc: Marek Vasut, Jiri Novak, Stefan Hajnoczi, Deniz Eren, qemu-devel,
	Oleksij Rempel, Konrad Frederic, Jan Kiszka, Jan Charvat,
	Oliver Hartkopp, Paolo Bonzini, Ondrej Ille

This series needs review.  Any takers?



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 2/6] hw/net/can: sja1000 ignore CAN FD frames
  2020-07-14 12:20 ` [PATCH v1 2/6] hw/net/can: sja1000 ignore CAN FD frames pisa
@ 2020-09-01 17:07   ` Vikram Garhwal
  0 siblings, 0 replies; 20+ messages in thread
From: Vikram Garhwal @ 2020-09-01 17:07 UTC (permalink / raw)
  To: pisa
  Cc: Marek Vasut, Jiri Novak, Stefan Hajnoczi, Deniz Eren, qemu-devel,
	Markus Armbruster, Oleksij Rempel, Konrad Frederic, Jan Kiszka,
	Jan Charvat, Oliver Hartkopp, Paolo Bonzini, Ondrej Ille

On Tue, Jul 14, 2020 at 02:20:15PM +0200, pisa@cmp.felk.cvut.cz wrote:
> From: Jan Charvat <charvj10@fel.cvut.cz>
>
> Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
> Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>

Reviewed-by: Vikram Garhwal <fnu.vikram@xilinx.com>

> ---
>  hw/net/can/can_sja1000.c | 29 +++++++++++++++++++++++------
>  1 file changed, 23 insertions(+), 6 deletions(-)
>
> diff --git a/hw/net/can/can_sja1000.c b/hw/net/can/can_sja1000.c
> index d83c550edc..382911560c 100644
> --- a/hw/net/can/can_sja1000.c
> +++ b/hw/net/can/can_sja1000.c
> @@ -323,11 +323,16 @@ static void buff2frame_bas(const uint8_t *buff, qemu_can_frame *frame)
>  static int frame2buff_pel(const qemu_can_frame *frame, uint8_t *buff)
>  {
>      int i;
> +    int dlen = frame->can_dlc;
>
>      if (frame->can_id & QEMU_CAN_ERR_FLAG) { /* error frame, NOT support now. */
>          return -1;
>      }
>
> +    if (dlen > 8) {
> +        return -1;
> +    }
> +
>      buff[0] = 0x0f & frame->can_dlc; /* DLC */
>      if (frame->can_id & QEMU_CAN_RTR_FLAG) { /* RTR */
>          buff[0] |= (1 << 6);
> @@ -338,18 +343,18 @@ static int frame2buff_pel(const qemu_can_frame *frame, uint8_t *buff)
>          buff[2] = extract32(frame->can_id, 13, 8); /* ID.20~ID.13 */
>          buff[3] = extract32(frame->can_id, 5, 8);  /* ID.12~ID.05 */
>          buff[4] = extract32(frame->can_id, 0, 5) << 3; /* ID.04~ID.00,xxx */
> -        for (i = 0; i < frame->can_dlc; i++) {
> +        for (i = 0; i < dlen; i++) {
>              buff[5 + i] = frame->data[i];
>          }
> -        return frame->can_dlc + 5;
> +        return dlen + 5;
>      } else { /* SFF */
>          buff[1] = extract32(frame->can_id, 3, 8); /* ID.10~ID.03 */
>          buff[2] = extract32(frame->can_id, 0, 3) << 5; /* ID.02~ID.00,xxxxx */
> -        for (i = 0; i < frame->can_dlc; i++) {
> +        for (i = 0; i < dlen; i++) {
>              buff[3 + i] = frame->data[i];
>          }
>
> -        return frame->can_dlc + 3;
> +        return dlen + 3;
>      }
>
>      return -1;
> @@ -358,6 +363,7 @@ static int frame2buff_pel(const qemu_can_frame *frame, uint8_t *buff)
>  static int frame2buff_bas(const qemu_can_frame *frame, uint8_t *buff)
>  {
>      int i;
> +    int dlen = frame->can_dlc;
>
>       /*
>        * EFF, no support for BasicMode
> @@ -369,17 +375,21 @@ static int frame2buff_bas(const qemu_can_frame *frame, uint8_t *buff)
>          return -1;
>      }
>
> +    if (dlen > 8) {
> +        return -1;
> +    }
> +
>      buff[0] = extract32(frame->can_id, 3, 8); /* ID.10~ID.03 */
>      buff[1] = extract32(frame->can_id, 0, 3) << 5; /* ID.02~ID.00,xxxxx */
>      if (frame->can_id & QEMU_CAN_RTR_FLAG) { /* RTR */
>          buff[1] |= (1 << 4);
>      }
>      buff[1] |= frame->can_dlc & 0x0f;
> -    for (i = 0; i < frame->can_dlc; i++) {
> +    for (i = 0; i < dlen; i++) {
>          buff[2 + i] = frame->data[i];
>      }
>
> -    return frame->can_dlc + 2;
> +    return dlen + 2;
>  }
>
>  static void can_sja_update_pel_irq(CanSJA1000State *s)
> @@ -764,6 +774,13 @@ ssize_t can_sja_receive(CanBusClientState *client, const qemu_can_frame *frames,
>      if (frames_cnt <= 0) {
>          return 0;
>      }
> +    if (frame->flags && QEMU_CAN_FRMF_TYPE_FD) {
> +        if (DEBUG_FILTER) {
> +            can_display_msg("[cansja]: ignor fd frame ", frame);
> +        }
> +        return 1;
> +    }
> +
>      if (DEBUG_FILTER) {
>          can_display_msg("[cansja]: receive ", frame);
>      }


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 1/6] net/can: Initial host SocketCan support for CAN FD.
  2020-07-14 12:20 ` [PATCH v1 1/6] net/can: Initial host SocketCan support for CAN FD pisa
@ 2020-09-01 20:01   ` Vikram Garhwal
  2020-09-02  7:51     ` Pavel Pisa
  0 siblings, 1 reply; 20+ messages in thread
From: Vikram Garhwal @ 2020-09-01 20:01 UTC (permalink / raw)
  To: pisa
  Cc: Marek Vasut, Jiri Novak, Oliver Hartkopp, Deniz Eren, qemu-devel,
	Markus Armbruster, Oleksij Rempel, Konrad Frederic, Jan Kiszka,
	Jan Charvat, Stefan Hajnoczi, Paolo Bonzini, Ondrej Ille

Hi Jan,
A couple of comments on this patch.
On Tue, Jul 14, 2020 at 02:20:14PM +0200, pisa@cmp.felk.cvut.cz wrote:
> From: Jan Charvat <charvj10@fel.cvut.cz>
>
> Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
> Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
> ---
>  hw/net/can/can_sja1000.c |  2 ++
>  include/net/can_emu.h    |  8 ++++++-
>  net/can/can_socketcan.c  | 47 +++++++++++++++++++++++++++++++++++++---
>  3 files changed, 53 insertions(+), 4 deletions(-)
>
> diff --git a/hw/net/can/can_sja1000.c b/hw/net/can/can_sja1000.c
> index ea915a023a..d83c550edc 100644
> --- a/hw/net/can/can_sja1000.c
> +++ b/hw/net/can/can_sja1000.c
> @@ -268,6 +268,7 @@ static void buff2frame_pel(const uint8_t *buff, qemu_can_frame *frame)
>  {
>      uint8_t i;
>
> +    frame->flags = 0;
>      frame->can_id = 0;
>      if (buff[0] & 0x40) { /* RTR */
>          frame->can_id = QEMU_CAN_RTR_FLAG;
> @@ -303,6 +304,7 @@ static void buff2frame_bas(const uint8_t *buff, qemu_can_frame *frame)
>  {
>      uint8_t i;
>
> +    frame->flags = 0;
>      frame->can_id = ((buff[0] << 3) & (0xff << 3)) + ((buff[1] >> 5) & 0x07);
>      if (buff[1] & 0x10) { /* RTR */
>          frame->can_id = QEMU_CAN_RTR_FLAG;
> diff --git a/include/net/can_emu.h b/include/net/can_emu.h
> index fce9770928..c6164dcfb4 100644
> --- a/include/net/can_emu.h
> +++ b/include/net/can_emu.h
> @@ -46,7 +46,8 @@ typedef uint32_t qemu_canid_t;
>  typedef struct qemu_can_frame {
>      qemu_canid_t    can_id;  /* 32 bit CAN_ID + EFF/RTR/ERR flags */
>      uint8_t         can_dlc; /* data length code: 0 .. 8 */
> -    uint8_t         data[8] QEMU_ALIGNED(8);
> +    uint8_t         flags;
> +    uint8_t         data[64] QEMU_ALIGNED(8);
>  } qemu_can_frame;
>
>  /* Keep defines for QEMU separate from Linux ones for now */
> @@ -58,6 +59,10 @@ typedef struct qemu_can_frame {
>  #define QEMU_CAN_SFF_MASK 0x000007FFU /* standard frame format (SFF) */
>  #define QEMU_CAN_EFF_MASK 0x1FFFFFFFU /* extended frame format (EFF) */
>
> +#define QEMU_CAN_FRMF_BRS     0x01 /* bit rate switch (2nd bitrate for data) */
> +#define QEMU_CAN_FRMF_ESI     0x02 /* error state ind. of transmitting node */
> +#define QEMU_CAN_FRMF_TYPE_FD 0x10 /* internal bit ind. of CAN FD frame */
> +
>  /**
>   * struct qemu_can_filter - CAN ID based filter in can_register().
>   * @can_id:   relevant bits of CAN ID which are not masked out.
> @@ -97,6 +102,7 @@ struct CanBusClientState {
>      char *model;
>      char *name;
>      void (*destructor)(CanBusClientState *);
> +    bool fd_mode;
>  };
>
>  #define TYPE_CAN_BUS "can-bus"
> diff --git a/net/can/can_socketcan.c b/net/can/can_socketcan.c
> index b7ef63ec0e..fbc0b62ea4 100644
> --- a/net/can/can_socketcan.c
> +++ b/net/can/can_socketcan.c
> @@ -103,6 +103,14 @@ static void can_host_socketcan_read(void *opaque)
>          return;
>      }
>
> +    if (!ch->bus_client.fd_mode) {
> +        c->buf[0].flags = 0;
> +    } else {
> +        if (c->bufcnt > CAN_MTU) {
> +            c->buf[0].flags |= QEMU_CAN_FRMF_TYPE_FD;
> +        }
> +    }
> +
>      can_bus_client_send(&ch->bus_client, c->buf, 1);
>
>      if (DEBUG_CAN) {
> @@ -121,12 +129,21 @@ static ssize_t can_host_socketcan_receive(CanBusClientState *client,
>      CanHostState *ch = container_of(client, CanHostState, bus_client);
>      CanHostSocketCAN *c = CAN_HOST_SOCKETCAN(ch);
>
> -    size_t len = sizeof(qemu_can_frame);
> +    size_t len;
>      int res;
>
>      if (c->fd < 0) {
>          return -1;
>      }
> +    if (frames->flags & QEMU_CAN_FRMF_TYPE_FD) {
> +        if (!ch->bus_client.fd_mode) {
> +            return 0;
> +        }
> +        len = CANFD_MTU;
> +    } else {
> +        len = CAN_MTU;
> +
> +    }
>
>      res = write(c->fd, frames, len);
>
> @@ -172,6 +189,8 @@ static void can_host_socketcan_connect(CanHostState *ch, Error **errp)
>  {
>      CanHostSocketCAN *c = CAN_HOST_SOCKETCAN(ch);
>      int s; /* can raw socket */
> +    int mtu;
> +    int enable_canfd = 1;
>      struct sockaddr_can addr;
>      struct ifreq ifr;
>
> @@ -185,13 +204,34 @@ static void can_host_socketcan_connect(CanHostState *ch, Error **errp)
>      addr.can_family = AF_CAN;
>      memset(&ifr.ifr_name, 0, sizeof(ifr.ifr_name));
>      strcpy(ifr.ifr_name, c->ifname);
> +    /* check if the frame fits into the CAN netdevice */
>      if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
>          error_setg_errno(errp, errno,
> -                         "SocketCAN host interface %s not available", c->ifname);
> +                         "SocketCAN host interface %s not available",
> +                         c->ifname);
May be this formatting change in a different patch? As this is not related to
CANFD.
>          goto fail;
>      }
>      addr.can_ifindex = ifr.ifr_ifindex;
>
> +    if (ioctl(s, SIOCGIFMTU, &ifr) < 0) {
> +        error_setg_errno(errp, errno,
> +                         "SocketCAN host interface %s SIOCGIFMTU failed",
> +                         c->ifname);
> +        goto fail;
> +    }
> +    mtu = ifr.ifr_mtu;
> +
> +    if (mtu >= CANFD_MTU) {
> +        /* interface is ok - try to switch the socket into CAN FD mode */
> +        if (setsockopt(s, SOL_CAN_RAW, CAN_RAW_FD_FRAMES,
> +                        &enable_canfd, sizeof(enable_canfd))) {
> +            warn_report("SocketCAN host interface %s enabling CAN FD failed",
> +                        c->ifname);
> +        } else {
> +            c->parent.bus_client.fd_mode = true;
> +        }
> +    }
> +
>      c->err_mask = 0xffffffff; /* Receive error frame. */
>      setsockopt(s, SOL_CAN_RAW, CAN_RAW_ERR_FILTER,
>                     &c->err_mask, sizeof(c->err_mask));
> @@ -232,7 +272,8 @@ static char *can_host_socketcan_get_if(Object *obj, Error **errp)
>      return g_strdup(c->ifname);
>  }
>
> -static void can_host_socketcan_set_if(Object *obj, const char *value, Error **errp)
> +static void can_host_socketcan_set_if(Object *obj, const char *value,
> +                                      Error **errp)
This one also not relevant change for CANFD. Rest of the patch looks good.
>  {
>      CanHostSocketCAN *c = CAN_HOST_SOCKETCAN(obj);
>      struct ifreq ifr;
> --
> 2.20.1
>
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 1/6] net/can: Initial host SocketCan support for CAN FD.
  2020-09-01 20:01   ` Vikram Garhwal
@ 2020-09-02  7:51     ` Pavel Pisa
  2020-09-03  5:20       ` Vikram Garhwal
  0 siblings, 1 reply; 20+ messages in thread
From: Pavel Pisa @ 2020-09-02  7:51 UTC (permalink / raw)
  To: Vikram Garhwal
  Cc: Marek Vasut, Jiri Novak, Oliver Hartkopp, Deniz Eren, qemu-devel,
	Markus Armbruster, Oleksij Rempel, Konrad Frederic, Jan Kiszka,
	Jan Charvat, Stefan Hajnoczi, Paolo Bonzini, Ondrej Ille

Hello Vikram,

thanks much for the patches review.

On Tuesday 01 of September 2020 22:01:26 Vikram Garhwal wrote:
> Hi Jan,
> A couple of comments on this patch.
>
> On Tue, Jul 14, 2020 at 02:20:14PM +0200, pisa@cmp.felk.cvut.cz wrote:
> > From: Jan Charvat <charvj10@fel.cvut.cz>
> > @@ -185,13 +204,34 @@ static void can_host_socketcan_connect(CanHostState
> > *ch, Error **errp) addr.can_family = AF_CAN;
> >      memset(&ifr.ifr_name, 0, sizeof(ifr.ifr_name));
> >      strcpy(ifr.ifr_name, c->ifname);
> > +    /* check if the frame fits into the CAN netdevice */
> >      if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
> >          error_setg_errno(errp, errno,
> > -                         "SocketCAN host interface %s not available",
> > c->ifname); +                         "SocketCAN host interface %s not
> > available", +                         c->ifname);
>
> May be this formatting change in a different patch? As this is not related
> to CANFD.
> > @@ -232,7 +272,8 @@ static char *can_host_socketcan_get_if(Object *obj,
> > Error **errp) return g_strdup(c->ifname);
> >  }
> >
> > -static void can_host_socketcan_set_if(Object *obj, const char *value,
> > Error **errp) +static void can_host_socketcan_set_if(Object *obj, const
> > char *value,
> > +                                      Error **errp) 
>
> This one also not relevant change for CANFD. Rest of the patch looks good.


I am responsible for mentioned lines change in net/can/can_socketcan.c.
When I have reviewed patches after Jan Charvat theses submittion,
I have done another bunch of rounds to check that the patches as well
as the whole net/can and hw/net/can are checkpatch clean. I am not sure
if the incorrect formatting sneaked in in my 2018 submission or patcheck
became more strict last years.

I can separate these changes changes into separate patch if required.

By the way, if you or other of your colleagues is willing to participate
in net/can and or  hw/net/can patches reviews, I would be happy if you
join my attempt and we can record that we are available to take care
abut these in MAINTAINERS file.

Best wishes,

Pavel
 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 1/6] net/can: Initial host SocketCan support for CAN FD.
  2020-09-02  7:51     ` Pavel Pisa
@ 2020-09-03  5:20       ` Vikram Garhwal
  2020-09-03  5:29         ` Vikram Garhwal
  0 siblings, 1 reply; 20+ messages in thread
From: Vikram Garhwal @ 2020-09-03  5:20 UTC (permalink / raw)
  To: Pavel Pisa
  Cc: Marek Vasut, Jiri Novak, Oliver Hartkopp, Deniz Eren, qemu-devel,
	Markus Armbruster, Oleksij Rempel, Konrad Frederic, Jan Kiszka,
	Jan Charvat, Stefan Hajnoczi, Paolo Bonzini, Ondrej Ille

On Wed, Sep 02, 2020 at 09:51:44AM +0200, Pavel Pisa wrote:
Hi Pavel,
> Hello Vikram,
>
> thanks much for the patches review.
>
> On Tuesday 01 of September 2020 22:01:26 Vikram Garhwal wrote:
> > Hi Jan,
> > A couple of comments on this patch.
> >
> > On Tue, Jul 14, 2020 at 02:20:14PM +0200, pisa@cmp.felk.cvut.cz wrote:
> > > From: Jan Charvat <charvj10@fel.cvut.cz>
> > > @@ -185,13 +204,34 @@ static void can_host_socketcan_connect(CanHostState
> > > *ch, Error **errp) addr.can_family = AF_CAN;
> > >      memset(&ifr.ifr_name, 0, sizeof(ifr.ifr_name));
> > >      strcpy(ifr.ifr_name, c->ifname);
> > > +    /* check if the frame fits into the CAN netdevice */
> > >      if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
> > >          error_setg_errno(errp, errno,
> > > -                         "SocketCAN host interface %s not available",
> > > c->ifname); +                         "SocketCAN host interface %s not
> > > available", +                         c->ifname);
> >
> > May be this formatting change in a different patch? As this is not related
> > to CANFD.
> > > @@ -232,7 +272,8 @@ static char *can_host_socketcan_get_if(Object *obj,
> > > Error **errp) return g_strdup(c->ifname);
> > >  }
> > >
> > > -static void can_host_socketcan_set_if(Object *obj, const char *value,
> > > Error **errp) +static void can_host_socketcan_set_if(Object *obj, const
> > > char *value,
> > > +                                      Error **errp)
> >
> > This one also not relevant change for CANFD. Rest of the patch looks good.
>
>
> I am responsible for mentioned lines change in net/can/can_socketcan.c.
> When I have reviewed patches after Jan Charvat theses submittion,
> I have done another bunch of rounds to check that the patches as well
> as the whole net/can and hw/net/can are checkpatch clean. I am not sure
> if the incorrect formatting sneaked in in my 2018 submission or patcheck
> became more strict last years.
>
> I can separate these changes changes into separate patch if required.
May be we can keep them in same patch. I was just referring to "Don't include irrelevant changes" section on this page about patches: https://wiki.qemu.org/Contribute/SubmitAPatch.
>
> By the way, if you or other of your colleagues is willing to participate
> in net/can and or  hw/net/can patches reviews, I would be happy if you
> join my attempt and we can record that we are available to take care
> abut these in MAINTAINERS file.
Given that I spent good amount of time working with net/can, I am willing to review the patches. Thanks!
>
> Best wishes,
>
> Pavel
>
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: [PATCH v1 1/6] net/can: Initial host SocketCan support for CAN FD.
  2020-09-03  5:20       ` Vikram Garhwal
@ 2020-09-03  5:29         ` Vikram Garhwal
  0 siblings, 0 replies; 20+ messages in thread
From: Vikram Garhwal @ 2020-09-03  5:29 UTC (permalink / raw)
  To: Vikram Garhwal, Pavel Pisa
  Cc: Marek Vasut, Francisco Eduardo Iglesias, Jiri Novak,
	Oliver Hartkopp, Deniz Eren, qemu-devel, Markus Armbruster,
	Oleksij Rempel, Konrad Frederic, Jan Kiszka, Jan Charvat,
	Stefan Hajnoczi, Paolo Bonzini, Ondrej Ille

Hi Pavel,
Forgot to add this in last reply: Francisco Iglesias(in cc) was also involved a lot in net/can QEMU devices and willing to help in the review if needed. 

Regards
Vikram

> -----Original Message-----
> From: Vikram Garhwal <fnu.vikram@xilinx.com>
> Sent: Wednesday, September 2, 2020 10:20 PM
> To: Pavel Pisa <pisa@cmp.felk.cvut.cz>
> Cc: qemu-devel@nongnu.org; Paolo Bonzini <pbonzini@redhat.com>;
> Stefan Hajnoczi <stefanha@gmail.com>; Konrad Frederic
> <frederic.konrad@adacore.com>; Deniz Eren <deniz.eren@icloud.com>;
> Oliver Hartkopp <socketcan@hartkopp.net>; Marek Vasut
> <marex@denx.de>; Jan Kiszka <jan.kiszka@siemens.com>; Oleksij Rempel
> <o.rempel@pengutronix.de>; Markus Armbruster <armbru@redhat.com>;
> Ondrej Ille <ondrej.ille@gmail.com>; Jan Charvat <charvj10@fel.cvut.cz>;
> Jiri Novak <jnovak@fel.cvut.cz>
> Subject: Re: [PATCH v1 1/6] net/can: Initial host SocketCan support for CAN
> FD.
> 
> On Wed, Sep 02, 2020 at 09:51:44AM +0200, Pavel Pisa wrote:
> Hi Pavel,
> > Hello Vikram,
> >
> > thanks much for the patches review.
> >
> > On Tuesday 01 of September 2020 22:01:26 Vikram Garhwal wrote:
> > > Hi Jan,
> > > A couple of comments on this patch.
> > >
> > > On Tue, Jul 14, 2020 at 02:20:14PM +0200, pisa@cmp.felk.cvut.cz
> wrote:
> > > > From: Jan Charvat <charvj10@fel.cvut.cz> @@ -185,13 +204,34 @@
> > > > static void can_host_socketcan_connect(CanHostState
> > > > *ch, Error **errp) addr.can_family = AF_CAN;
> > > >      memset(&ifr.ifr_name, 0, sizeof(ifr.ifr_name));
> > > >      strcpy(ifr.ifr_name, c->ifname);
> > > > +    /* check if the frame fits into the CAN netdevice */
> > > >      if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
> > > >          error_setg_errno(errp, errno,
> > > > -                         "SocketCAN host interface %s not available",
> > > > c->ifname); +                         "SocketCAN host interface %s not
> > > > available", +                         c->ifname);
> > >
> > > May be this formatting change in a different patch? As this is not
> > > related to CANFD.
> > > > @@ -232,7 +272,8 @@ static char
> *can_host_socketcan_get_if(Object
> > > > *obj, Error **errp) return g_strdup(c->ifname);  }
> > > >
> > > > -static void can_host_socketcan_set_if(Object *obj, const char
> > > > *value, Error **errp) +static void
> > > > can_host_socketcan_set_if(Object *obj, const char *value,
> > > > +                                      Error **errp)
> > >
> > > This one also not relevant change for CANFD. Rest of the patch looks
> good.
> >
> >
> > I am responsible for mentioned lines change in net/can/can_socketcan.c.
> > When I have reviewed patches after Jan Charvat theses submittion, I
> > have done another bunch of rounds to check that the patches as well as
> > the whole net/can and hw/net/can are checkpatch clean. I am not sure
> > if the incorrect formatting sneaked in in my 2018 submission or
> > patcheck became more strict last years.
> >
> > I can separate these changes changes into separate patch if required.
> May be we can keep them in same patch. I was just referring to "Don't
> include irrelevant changes" section on this page about patches:
> https://wiki.qemu.org/Contribute/SubmitAPatch.
> >
> > By the way, if you or other of your colleagues is willing to
> > participate in net/can and or  hw/net/can patches reviews, I would be
> > happy if you join my attempt and we can record that we are available
> > to take care abut these in MAINTAINERS file.
> Given that I spent good amount of time working with net/can, I am willing
> to review the patches. Thanks!
> >
> > Best wishes,
> >
> > Pavel
> >
> >

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 3/6] net/can: Add can_dlc2len and can_len2dlc for CAN FD.
  2020-07-14 12:20 ` [PATCH v1 3/6] net/can: Add can_dlc2len and can_len2dlc for CAN FD pisa
@ 2020-09-03  5:43   ` Vikram Garhwal
  2020-09-03  6:12     ` Pavel Pisa
  0 siblings, 1 reply; 20+ messages in thread
From: Vikram Garhwal @ 2020-09-03  5:43 UTC (permalink / raw)
  To: pisa
  Cc: Marek Vasut, Jiri Novak, Oliver Hartkopp, Deniz Eren, qemu-devel,
	Markus Armbruster, Oleksij Rempel, Konrad Frederic, Jan Kiszka,
	Jan Charvat, Stefan Hajnoczi, Paolo Bonzini, Ondrej Ille

On Tue, Jul 14, 2020 at 02:20:16PM +0200, pisa@cmp.felk.cvut.cz wrote:
Hi Pavel,
> From: Jan Charvat <charvj10@fel.cvut.cz>
>
> Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
> Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
> ---
>  include/net/can_emu.h |  4 ++++
>  net/can/can_core.c    | 36 ++++++++++++++++++++++++++++++++++++
>  2 files changed, 40 insertions(+)
>
> diff --git a/include/net/can_emu.h b/include/net/can_emu.h
> index c6164dcfb4..7d395fbb9b 100644
> --- a/include/net/can_emu.h
> +++ b/include/net/can_emu.h
> @@ -127,4 +127,8 @@ int can_bus_client_set_filters(CanBusClientState *,
>                                 const struct qemu_can_filter *filters,
>                                 size_t filters_cnt);
>
> +uint8_t can_dlc2len(uint8_t can_dlc);
> +
> +uint8_t can_len2dlc(uint8_t len);
> +
These function are aimed for canfd. Perhaps rename these to canfd_dlc2len and
canfd_len2dlc for better distinction?
Rest of the patch looks good to me.
>  #endif
> diff --git a/net/can/can_core.c b/net/can/can_core.c
> index 90f4d8576a..0115d78794 100644
> --- a/net/can/can_core.c
> +++ b/net/can/can_core.c
> @@ -33,6 +33,42 @@
>  #include "net/can_emu.h"
>  #include "qom/object_interfaces.h"
>
> +/* CAN DLC to real data length conversion helpers */
> +
> +static const uint8_t dlc2len[] = {
> +    0, 1, 2, 3, 4, 5, 6, 7,
> +    8, 12, 16, 20, 24, 32, 48, 64
> +};
> +
> +/* get data length from can_dlc with sanitized can_dlc */
> +uint8_t can_dlc2len(uint8_t can_dlc)
> +{
> +    return dlc2len[can_dlc & 0x0F];
> +}
> +
> +static const uint8_t len2dlc[] = {
> +    0, 1, 2, 3, 4, 5, 6, 7, 8,                              /* 0 - 8 */
> +    9, 9, 9, 9,                                             /* 9 - 12 */
> +    10, 10, 10, 10,                                         /* 13 - 16 */
> +    11, 11, 11, 11,                                         /* 17 - 20 */
> +    12, 12, 12, 12,                                         /* 21 - 24 */
> +    13, 13, 13, 13, 13, 13, 13, 13,                         /* 25 - 32 */
> +    14, 14, 14, 14, 14, 14, 14, 14,                         /* 33 - 40 */
> +    14, 14, 14, 14, 14, 14, 14, 14,                         /* 41 - 48 */
> +    15, 15, 15, 15, 15, 15, 15, 15,                         /* 49 - 56 */
> +    15, 15, 15, 15, 15, 15, 15, 15                          /* 57 - 64 */
> +};
> +
> +/* map the sanitized data length to an appropriate data length code */
> +uint8_t can_len2dlc(uint8_t len)
> +{
> +    if (unlikely(len > 64)) {
> +        return 0xF;
> +    }
> +
> +    return len2dlc[len];
> +}
> +
>  struct CanBusState {
>      Object object;
>
> --
> 2.20.1
>
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 3/6] net/can: Add can_dlc2len and can_len2dlc for CAN FD.
  2020-09-03  5:43   ` Vikram Garhwal
@ 2020-09-03  6:12     ` Pavel Pisa
  2020-09-03  6:38       ` Vikram Garhwal
  0 siblings, 1 reply; 20+ messages in thread
From: Pavel Pisa @ 2020-09-03  6:12 UTC (permalink / raw)
  To: Vikram Garhwal
  Cc: Marek Vasut, Jiri Novak, Oliver Hartkopp, Deniz Eren, qemu-devel,
	Markus Armbruster, Oleksij Rempel, Konrad Frederic, Jan Kiszka,
	Jan Charvat, Stefan Hajnoczi, Paolo Bonzini, Ondrej Ille

Hello Vikram,

On Thursday 03 of September 2020 07:43:34 Vikram Garhwal wrote:
> On Tue, Jul 14, 2020 at 02:20:16PM +0200, pisa@cmp.felk.cvut.cz wrote:
> Hi Pavel,
>
> > From: Jan Charvat <charvj10@fel.cvut.cz>
> >
> > Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
> > Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
> > ---
> >  include/net/can_emu.h |  4 ++++
> >  net/can/can_core.c    | 36 ++++++++++++++++++++++++++++++++++++
> >  2 files changed, 40 insertions(+)
> >
> > diff --git a/include/net/can_emu.h b/include/net/can_emu.h
> > index c6164dcfb4..7d395fbb9b 100644
> > --- a/include/net/can_emu.h
> > +++ b/include/net/can_emu.h
> > @@ -127,4 +127,8 @@ int can_bus_client_set_filters(CanBusClientState *,
> >                                 const struct qemu_can_filter *filters,
> >                                 size_t filters_cnt);
> >
> > +uint8_t can_dlc2len(uint8_t can_dlc);
> > +
> > +uint8_t can_len2dlc(uint8_t len);
> > +
>
> These function are aimed for canfd. Perhaps rename these to canfd_dlc2len
> and canfd_len2dlc for better distinction?
> Rest of the patch looks good to me.

I do not insits on name. But function correspond 1:1 to the Linux
kernel ones

https://elixir.bootlin.com/linux/latest/source/drivers/net/can/dev.c#L34

These functions/tables are very short, but may it be, we should add comment
about their origin. This part of original file is Oliver Hartkopp
contribution

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/can/dev.c?h=v5.9-rc3&id=1e0625facab2e871472472b7df87d8fbe6caf75a

some other helpers are from Wolfgang Grandegger and me.

Best wishes,

Pavel


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v1 3/6] net/can: Add can_dlc2len and can_len2dlc for CAN FD.
  2020-09-03  6:12     ` Pavel Pisa
@ 2020-09-03  6:38       ` Vikram Garhwal
  0 siblings, 0 replies; 20+ messages in thread
From: Vikram Garhwal @ 2020-09-03  6:38 UTC (permalink / raw)
  To: Pavel Pisa
  Cc: Marek Vasut, Jiri Novak, Oliver Hartkopp, Deniz Eren, qemu-devel,
	Markus Armbruster, Oleksij Rempel, Konrad Frederic, Jan Kiszka,
	Jan Charvat, Stefan Hajnoczi, Paolo Bonzini, Ondrej Ille

On Thu, Sep 03, 2020 at 08:12:42AM +0200, Pavel Pisa wrote:
Hey Pavel,
Thanks for clarifying this and sharing the relevant links.

Regards,
Vikram
> Hello Vikram,
>
> On Thursday 03 of September 2020 07:43:34 Vikram Garhwal wrote:
> > On Tue, Jul 14, 2020 at 02:20:16PM +0200, pisa@cmp.felk.cvut.cz wrote:
> > Hi Pavel,
> >
> > > From: Jan Charvat <charvj10@fel.cvut.cz>
> > >
> > > Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
> > > Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Reviewed-by: Vikram Garhwal <fnu.vikram@xilinx.com>
> > > ---
> > >  include/net/can_emu.h |  4 ++++
> > >  net/can/can_core.c    | 36 ++++++++++++++++++++++++++++++++++++
> > >  2 files changed, 40 insertions(+)
> > >
> > > diff --git a/include/net/can_emu.h b/include/net/can_emu.h
> > > index c6164dcfb4..7d395fbb9b 100644
> > > --- a/include/net/can_emu.h
> > > +++ b/include/net/can_emu.h
> > > @@ -127,4 +127,8 @@ int can_bus_client_set_filters(CanBusClientState *,
> > >                                 const struct qemu_can_filter *filters,
> > >                                 size_t filters_cnt);
> > >
> > > +uint8_t can_dlc2len(uint8_t can_dlc);
> > > +
> > > +uint8_t can_len2dlc(uint8_t len);
> > > +
> >
> > These function are aimed for canfd. Perhaps rename these to canfd_dlc2len
> > and canfd_len2dlc for better distinction?
> > Rest of the patch looks good to me.
>
> I do not insits on name. But function correspond 1:1 to the Linux
> kernel ones
>
> https://elixir.bootlin.com/linux/latest/source/drivers/net/can/dev.c#L34
>
> These functions/tables are very short, but may it be, we should add comment
> about their origin. This part of original file is Oliver Hartkopp
> contribution
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/can/dev.c?h=v5.9-rc3&id=1e0625facab2e871472472b7df87d8fbe6caf75a
>
> some other helpers are from Wolfgang Grandegger and me.
>
> Best wishes,
>
> Pavel


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2020-09-03  6:39 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 12:20 [PATCH v1 0/6] CTU CAN FD core support pisa
2020-07-14 12:20 ` [PATCH v1 1/6] net/can: Initial host SocketCan support for CAN FD pisa
2020-09-01 20:01   ` Vikram Garhwal
2020-09-02  7:51     ` Pavel Pisa
2020-09-03  5:20       ` Vikram Garhwal
2020-09-03  5:29         ` Vikram Garhwal
2020-07-14 12:20 ` [PATCH v1 2/6] hw/net/can: sja1000 ignore CAN FD frames pisa
2020-09-01 17:07   ` Vikram Garhwal
2020-07-14 12:20 ` [PATCH v1 3/6] net/can: Add can_dlc2len and can_len2dlc for CAN FD pisa
2020-09-03  5:43   ` Vikram Garhwal
2020-09-03  6:12     ` Pavel Pisa
2020-09-03  6:38       ` Vikram Garhwal
2020-07-14 12:20 ` [PATCH v1 4/6] hw/net/can/ctucafd: Add CTU CAN FD core register definitions pisa
2020-07-14 12:20 ` [PATCH v1 5/6] hw/net/can: CTU CAN FD IP open hardware core emulation pisa
2020-07-24  9:46   ` Pavel Pisa
2020-07-14 12:20 ` [PATCH v1 6/6] hw/net/can: Documentation for " pisa
2020-07-14 12:47 ` [PATCH v1 0/6] CTU CAN FD core support no-reply
2020-07-14 13:45   ` [PATCH v1 0/6] CTU CAN FD core support - patchew report Pavel Pisa
2020-07-14 12:48 ` [PATCH v1 0/6] CTU CAN FD core support no-reply
2020-07-30 15:29 ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).