CAN driver implementation for Xilinx Zynq

Prashanth S fishesprashanth at
Wed Mar 1 10:53:21 UTC 2023

Hello @Carlo Brokering,

> As part of an internship at the German Aerospace Center, I am currently
working on the implementation of a CAN driver for a Xilinx
> Zynq SoC. For this I used the existing CAN framework /dev/can/can.h. A
merge request will follow soon.

All the best for your Internship.

> Here's what I'd like to add to the framework if it hasn't already been
> * RxFIFO. Currently can_bus_read only stores the latest CAN message in
> There is a FIXME note on this in can.c, line 188, but I couldn't find an
implementation of it.

Currently, the CAN framework has minimal rx support. The design of the rx
data path in the CAN Framework is ready (You could use that design if
approved or you can have your own design).

Note: The tx data path has been implemented, it supports multiple open
among different tasks, configurable buffers.

> * ioctl functionality. can_bus_ioctl does not forward the commands and
arguments to can_dev_ops->dev_ioctl.
> Is there a reason for that? I propose a command enum that would provide

The bsp CAN driver should register the ioctl api with the CAN Framework for
device specific commands (To add commands for hardware independent
functionality the commands can be added before "if (bus == NULL ||
bus->can_dev_ops->dev_ioctl == NULL)" statement.

struct can_dev_ops dev_ops (.dev_ioctl member should be registered).

> @Prashanth S (fishesprashanth at have you already worked on these

For the overview of the CAN framework, tx, rx, data paths you can refer the
docs files in the gitlab link (.puml version of the docs are also available
if you needed (

You can use the gitlab
link for the design documents.

Prashanth S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the devel mailing list