qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/6] CAN bus simple SJA1000 PCI card emulation f


From: Pavel Pisa
Subject: Re: [Qemu-devel] [PATCH 1/6] CAN bus simple SJA1000 PCI card emulation for QEMU
Date: Mon, 30 Oct 2017 13:27:12 +0100
User-agent: KMail/1.9.10 (enterprise35 0.20100827.1168748)

Hello Marek and Konrad,

On Monday 30 of October 2017 12:38:12 KONRAD Frederic wrote:
> On 10/30/2017 11:51 AM, Marek Vasut wrote:
> > On 10/30/2017 10:19 AM, KONRAD Frederic wrote:
> >
> > [...]
> >
> >>> CAN bus MIOe-3680 PCI (dual SJA1000 channel) emulation added.
> >>>     hw/can/can_mioe3680_pci.c
> >>>
> >>> If you think that this is more logical even that the first
> >>> commits introduce something which cannot be tested/compiles
> >>> only into library, then I rearrange patchyes this way.
> >>
> >> I don't know all those PCI cards. But if the simple SJA1000
> >> doesn't exist in real life maybe better dropping it?
> >
> > SJA1000 is the only sensible card to emulate IMO, at least initially,
> > it's the de-facto standard for CAN devices.
> >
> > [...]
>
> I was talking of "CAN bus simple SJA1000 memory mapped PCI card
> example" which according to Pavel is an example device with
> custom vendor/device ids?

That is right, SJA1000 chip was and is the goal for now.
But on PCI addnon cards, it is usually accessed through some
PCI<->local bridge chip. Sometimes a little obscure intended
for ISDN communication for example etc. And bridges needs
to be emulated for real hardware to gate interrupts, provide
identifications etc. To make simple start for a student during
original GSoC, I have defined as the first target the "board"
where SJA1000 is connected directly to one and only one PCI BAR
and IRQ is routed directly to INTA. As a VID is used RedHat or similar
VID used for virtual QEMU devices and device ID is some arbitrarily
chosen number. So if this card should stay then we should try to
really reserve the Device ID.

But we have three QEMU device models implementing real boards
using SJA1000 chips now. I have contributed Kvaser which we
use in many application at university and another two boards
are contributed by Deniz Eren

CAN bus Kvaser PCI CAN-S (single SJA1000 channel) emulation added.
CAN bus PCM-3680I PCI (dual SJA1000 channel) emulation added.
CAN bus MIOe-3680 PCI (dual SJA1000 channel) emulation added.

The simple SJA1000 PCI board is friendly for initial diver
implementation for some other OS, because you deal only with
single memory mapped BAR. But it is necessary to adapt such
driver for some real hardware anyway, because I am not aware
of any so straightforward board model. So drop of this example is not
big lost and MIOe-3680 is memory mapped as well so it is enough
for mamory-mapped SJA1000 driver testing. Kvaser an PCM-3680I
are IO mapped.

Best wishes,

Pavel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]