From: Bernhard Beschow <shentey@gmail.com>
To: "Matyáš Bobek" <matyas.bobek@gmail.com>,
qemu-devel@nongnu.org, "Matyas Bobek" <bobekmat@fel.cvut.cz>,
"Pavel Pisa" <pisa@fel.cvut.cz>
Cc: qemu-arm@nongnu.org, Marc Kleine-Budde <mkl@pengutronix.de>,
Oliver Hartkopp <socketcan@hartkopp.net>,
Nikita Ostrenkov <n.ostrenkov@gmail.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH v2 0/7] hw/arm/sabrelite: Add FlexCAN support
Date: Mon, 13 Apr 2026 13:22:19 +0000 [thread overview]
Message-ID: <3AC8F245-DFEF-4F59-AA27-B4160F5EE02D@gmail.com> (raw)
In-Reply-To: <D2D2A915-D9EB-40A9-921C-0DB50D4CA810@gmail.com>
Am 2. April 2026 10:02:56 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>
>
>Am 19. März 2026 19:13:07 UTC schrieb "Matyáš Bobek" <matyas.bobek@gmail.com>:
>
>Hi Matyáš,
>
>>This series adds emulation of the FlexCAN CAN controller, version 2,
>>found in NXP i.MX6 series SoCs. The controller is integrated into
>>fsl-imx6 and the Sabrelite ARM board.
>>
>>The chip has two FlexCAN controllers, but the Linux Sabrelite
>>device tree enables only one by default. Linux kernel with both
>>controllers enabled has been tested to work properly (using a custom
>>device tree).
>>See docs/system/devices/can.rst for an example of QEMU command line
>>invocation.
>>
>>More information about the implementation can be found in my bachelor
>>thesis [1].
>>
>>The headers (struct FlexcanRegs and flexcan_regs.h macros) were copied
>>from the Linux kernel. Marc Kleine-Budde is the copyright holder. He
>>has been kindly asked to provide consent, to confirm his approval for
>>the inclusion of said header fragments into QEMU.
>>
>>Changes from v1:
>>- removed DPRINTF (turned into traces or guest errors)
>>- removed gotos and unnecessary continues
>>- register memory region shortened to actual length w/o padding
>>- make flexcan_* fns private
>>- used DEVICE(s)->canonical_path instead of allocating new strings
>>- changed DEVICE_NATIVE_ENDIAN to DEVICE_LITTLE_ENDIAN
>>- removed ugly USE macro
>>- used enums instead of define sequences in flexcan.c
>>- fixed FlexCAN KConfig conf (fixes build on non-arm-softmmu)
>>- fixed style and other issues from Bernhard's review
>>- better wording in docs
>>- rebased onto latest master
>>- Link to v1: https://lore.kernel.org/qemu-devel/cover.1765826753.git.matyas.bobek@gmail.com
>
>Nice!
>
>>
>>Thanks Bernhard Beschow for the review and his patience.
>>I borrowed some fixes from his flexcan branch at [2].
>
>You're welcome to do that!
>
>I'm on reviewing v2. Since I'm currently rather busy this will take me more time. And I want to mention that I'm very much looking forward to having CAN support in i.MX devices!
I believe I've now given each patch a (conditional) R-b tag -- please let me know if I missed something. So there is a realistic chance that this series could be merged in the next iteration!
Best regards,
Bernhard
>
>Best regards,
>Bernhard
>
>>
>>[1] http://dspace.cvut.cz/bitstream/handle/10467/122654/F3-BP-2025-Bobek-Matyas-BP_Bobek_FlexCAN_final_4.pdf
>>[2] https://github.com/shentok/qemu/tree/flexcan
>>
>>Matyáš Bobek (7):
>> hw/arm/sabrelite: Open code DEFINE_MACHINE_ARM
>> hw/arm/sabrelite: Introduce class SabreliteMachineState
>> hw/misc/imx6_ccm: Add PLL3 and CAN clock
>> hw/net/can/flexcan: NXP FlexCAN core emulation
>> hw/arm: Plug FlexCAN into FSL_IMX6 and Sabrelite
>> tests: Add qtests for FlexCAN
>> docs/arm/sabrelite: Mention FlexCAN support
>>
>> MAINTAINERS | 9 +
>> docs/system/arm/sabrelite.rst | 1 +
>> docs/system/devices/can.rst | 24 +
>> hw/arm/Kconfig | 1 +
>> hw/arm/fsl-imx6.c | 29 +
>> hw/arm/sabrelite.c | 68 +-
>> hw/misc/imx6_ccm.c | 24 +
>> hw/misc/trace-events | 2 +
>> hw/net/Kconfig | 5 +
>> hw/net/can/flexcan.c | 1407 +++++++++++++++++++++++++++++++++
>> hw/net/can/flexcan_regs.h | 193 +++++
>> hw/net/can/meson.build | 1 +
>> hw/net/can/trace-events | 18 +
>> include/hw/arm/fsl-imx6.h | 6 +
>> include/hw/misc/imx6_ccm.h | 4 +
>> include/hw/misc/imx_ccm.h | 1 +
>> include/hw/net/flexcan.h | 142 ++++
>> tests/qtest/flexcan-test.c | 424 ++++++++++
>> tests/qtest/meson.build | 1 +
>> 19 files changed, 2350 insertions(+), 10 deletions(-)
>> create mode 100644 hw/net/can/flexcan.c
>> create mode 100644 hw/net/can/flexcan_regs.h
>> create mode 100644 include/hw/net/flexcan.h
>> create mode 100644 tests/qtest/flexcan-test.c
>>
prev parent reply other threads:[~2026-04-13 13:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 19:13 [PATCH v2 0/7] hw/arm/sabrelite: Add FlexCAN support Matyáš Bobek
2026-03-19 19:13 ` [PATCH v2 1/7] hw/arm/sabrelite: Open code DEFINE_MACHINE_ARM Matyáš Bobek
2026-03-24 20:58 ` Bernhard Beschow
2026-03-19 19:13 ` [PATCH v2 2/7] hw/arm/sabrelite: Introduce class SabreliteMachineState Matyáš Bobek
2026-03-24 11:11 ` Bernhard Beschow
2026-03-19 19:13 ` [PATCH v2 3/7] hw/misc/imx6_ccm: Add PLL3 and CAN clock Matyáš Bobek
2026-03-19 19:13 ` [PATCH v2 4/7] hw/net/can/flexcan: NXP FlexCAN core emulation Matyáš Bobek
2026-03-21 12:16 ` Pavel Pisa
2026-04-13 10:56 ` Bernhard Beschow
2026-04-13 22:30 ` Pavel Pisa
2026-04-14 12:09 ` Bernhard Beschow
2026-03-19 19:13 ` [PATCH v2 5/7] hw/arm: Plug FlexCAN into FSL_IMX6 and Sabrelite Matyáš Bobek
2026-03-19 19:13 ` [PATCH v2 6/7] tests: Add qtests for FlexCAN Matyáš Bobek
2026-04-13 13:16 ` Bernhard Beschow
2026-04-13 13:23 ` Daniel P. Berrangé
2026-04-14 12:11 ` Bernhard Beschow
2026-04-14 12:23 ` Daniel P. Berrangé
2026-04-14 13:57 ` Bernhard Beschow
2026-03-19 19:13 ` [PATCH v2 7/7] docs/arm/sabrelite: Mention FlexCAN support Matyáš Bobek
2026-03-19 19:37 ` [PATCH v2 0/7] hw/arm/sabrelite: Add " Pavel Pisa
2026-04-02 10:02 ` Bernhard Beschow
2026-04-13 13:22 ` Bernhard Beschow [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3AC8F245-DFEF-4F59-AA27-B4160F5EE02D@gmail.com \
--to=shentey@gmail.com \
--cc=bobekmat@fel.cvut.cz \
--cc=matyas.bobek@gmail.com \
--cc=mkl@pengutronix.de \
--cc=n.ostrenkov@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=pisa@fel.cvut.cz \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=socketcan@hartkopp.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.