All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: Bernhard Beschow <shentey@gmail.com>, qemu-devel@nongnu.org
Cc: Gaurav Sharma <gaurav.sharma_7@nxp.com>,
	Pavel Pisa <pisa@cmp.felk.cvut.cz>,
	Jason Wang <jasowang@redhat.com>,
	Francisco Iglesias <francisco.iglesias@amd.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, Matyas Bobek <matyas.bobek@gmail.com>,
	Jean-Christophe Dubois <jcd@tribudubois.net>,
	Vikram Garhwal <vikram.garhwal@bytedance.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Subject: Re: [PATCH 4/4] hw/arm: Add basic FlexCAN3 support to TYPE_FSL_IMX8MP and imx8mp-evk
Date: Thu, 2 Jul 2026 14:41:38 +0200	[thread overview]
Message-ID: <01f8f321-bf1d-4cd2-989a-17ff8e2bb998@oss.qualcomm.com> (raw)
In-Reply-To: <20260701224612.48342-5-shentey@gmail.com>

On 2/7/26 00:46, Bernhard Beschow wrote:
> Real hardware supports CAN FD which is missing in the emulation and is
> considered future work. Still, CAN communication already works under Linux.
> 
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
>   docs/system/arm/imx8m.rst   |  1 +
>   include/hw/arm/fsl-imx8mp.h |  8 ++++++++
>   hw/arm/fsl-imx8mp.c         | 37 +++++++++++++++++++++++++++++++++++++
>   hw/arm/imx8mp-evk.c         | 21 +++++++++++++++++++++
>   hw/misc/imx8mp_ccm.c        |  3 +++
>   hw/arm/Kconfig              |  1 +
>   6 files changed, 71 insertions(+)


> +    /* FLEXCANs */
> +    for (i = 0; i < FSL_IMX8MP_NUM_CANS; i++) {
> +        static const struct {
> +            hwaddr addr;
> +            unsigned int irq;
> +        } flexcan_table[FSL_IMX8MP_NUM_CANS] = {
> +            {
> +                fsl_imx8mp_memmap[FSL_IMX8MP_FLEXCAN1].addr,
> +                FSL_IMX8MP_FLEXCAN1_IRQ
> +            }, {
> +                fsl_imx8mp_memmap[FSL_IMX8MP_FLEXCAN2].addr,
> +                FSL_IMX8MP_FLEXCAN2_IRQ
> +            },
> +        };
> +
> +        s->flexcan[i].ccm = IMX_CCM(&s->ccm);

Conditional to setting this using object_property_set_link(), see
https://lore.kernel.org/qemu-devel/77d5891c-de12-467e-8746-02fe43121e3e@oss.qualcomm.com/, 
then:

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>

> +        object_property_set_link(OBJECT(&s->flexcan[i]), "canbus",
> +                                 OBJECT(s->canbus[i]), &error_abort);
> +
> +        sysbus_realize(SYS_BUS_DEVICE(&s->flexcan[i]), &error_abort);
> +
> +        sysbus_mmio_map(SYS_BUS_DEVICE(&s->flexcan[i]), 0,
> +                        flexcan_table[i].addr);
> +        sysbus_connect_irq(SYS_BUS_DEVICE(&s->flexcan[i]), 0,
> +                           qdev_get_gpio_in(gicdev, flexcan_table[i].irq));
> +    }


      reply	other threads:[~2026-07-02 12:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 22:46 [PATCH 0/4] hw/arm/fsl-imx8mp: Add inital FlexCAN support Bernhard Beschow
2026-07-01 22:46 ` [PATCH 1/4] hw/net/can/flexcan: Subclass TYPE_CAN_FLEXCAN Bernhard Beschow
2026-07-02 12:45   ` Philippe Mathieu-Daudé
2026-07-02 16:58     ` Bernhard Beschow
2026-07-01 22:46 ` [PATCH 2/4] hw/arm/imx8mp-evk: Open code DEFINE_MACHINE_AARCH64 Bernhard Beschow
2026-07-02 12:23   ` Philippe Mathieu-Daudé
2026-07-01 22:46 ` [PATCH 3/4] hw/arm/imx8mp-evk: Introduce FslImx8mpEvkState Bernhard Beschow
2026-07-02 12:23   ` Philippe Mathieu-Daudé
2026-07-01 22:46 ` [PATCH 4/4] hw/arm: Add basic FlexCAN3 support to TYPE_FSL_IMX8MP and imx8mp-evk Bernhard Beschow
2026-07-02 12:41   ` Philippe Mathieu-Daudé [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=01f8f321-bf1d-4cd2-989a-17ff8e2bb998@oss.qualcomm.com \
    --to=philmd@oss.qualcomm.com \
    --cc=francisco.iglesias@amd.com \
    --cc=gaurav.sharma_7@nxp.com \
    --cc=jasowang@redhat.com \
    --cc=jcd@tribudubois.net \
    --cc=matyas.bobek@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=pisa@cmp.felk.cvut.cz \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shentey@gmail.com \
    --cc=vikram.garhwal@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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.