All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Pisa <pisa@cmp.felk.cvut.cz>
To: KONRAD Frederic <frederic.konrad@adacore.com>
Cc: Marek Vasut <marex@denx.de>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@gmail.com>,
	Deniz Eren <deniz.eren@icloud.com>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	Oliver Hartkopp <socketcan@hartkopp.net>
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	[thread overview]
Message-ID: <201710301327.12315.pisa@cmp.felk.cvut.cz> (raw)
In-Reply-To: <f453335b-6a6b-ae22-eecd-cec048db14e3@adacore.com>

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	other threads:[~2017-10-30 12:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 23:12 [Qemu-devel] [PATCH 0/6] CAN bus support for QEMU (SJA1000 PCI so far) pisa
2017-10-24 23:12 ` [Qemu-devel] [PATCH 1/6] CAN bus simple SJA1000 PCI card emulation for QEMU pisa
2017-10-27 14:18   ` KONRAD Frederic
2017-10-29 22:43     ` Pavel Pisa
2017-10-30  9:19       ` KONRAD Frederic
2017-10-30 10:51         ` Marek Vasut
2017-10-30 11:38           ` KONRAD Frederic
2017-10-30 12:27             ` Pavel Pisa [this message]
2017-10-24 23:29 ` [Qemu-devel] [PATCH 2/6] CAN bus Kvaser PCI CAN-S (single SJA1000 channel) emulation added pisa
2017-10-24 23:29 ` [Qemu-devel] [PATCH 3/6] CAN bus PCM-3680I PCI (dual " pisa
2017-10-24 23:29 ` [Qemu-devel] [PATCH 4/6] Fixed IRQ problem for CAN device can_pcm3680_pci pisa
2017-10-25  6:53   ` KONRAD Frederic
2017-10-25  7:40     ` Pavel Pisa
2017-10-25  7:46       ` KONRAD Frederic
2017-10-24 23:29 ` [Qemu-devel] [PATCH 5/6] Minor clean-up of can_pcm3680_pci pisa
2017-10-25  7:46   ` KONRAD Frederic
2017-10-24 23:29 ` [Qemu-devel] [PATCH 6/6] CAN bus MIOe-3680 PCI (dual SJA1000 channel) emulation added pisa
  -- strict thread matches above, loose matches on Subject: below --
2017-01-05 23:11 [Qemu-devel] [PATCH 0/6] CAN bus support for QEMU (SJA1000 PCI so far) pisa
2017-01-05 23:11 ` [Qemu-devel] [PATCH 1/6] CAN bus simple SJA1000 PCI card emulation for QEMU pisa

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=201710301327.12315.pisa@cmp.felk.cvut.cz \
    --to=pisa@cmp.felk.cvut.cz \
    --cc=deniz.eren@icloud.com \
    --cc=frederic.konrad@adacore.com \
    --cc=jan.kiszka@siemens.com \
    --cc=marex@denx.de \
    --cc=qemu-devel@nongnu.org \
    --cc=socketcan@hartkopp.net \
    --cc=stefanha@gmail.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.