From: Paul Brook <paul@codesourcery.com>
To: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, john.williams@petalogix.com,
edgar.iglesias@gmail.com
Subject: Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support
Date: Wed, 4 Apr 2012 17:52:56 +0100 [thread overview]
Message-ID: <201204041752.56850.paul@codesourcery.com> (raw)
In-Reply-To: <CAEgOgz7paY-LxAeaC25tvvzp9Ot0FKL2PsYQxhdjzZOrSVLaoA@mail.gmail.com>
> Hi Paul,
>
> Regarding using ssi, theres a few things that come to mind:
>
> Theres no sense of it being a multi-slave bus, its just a point to
> point link. SPI devices universally have the notion of the CS pin that
> tristates the device of the bus. Masters connect to a number of slaves
> and one-hot-decode the active slave. It would be tedious if all SPI
> controllers (of which i have two (only pushed one in this series),
> omap have theirs, Nokia may have something out of tree too), had to
> implement the\is common CS decoding behaviour. To that end, my SPI bus
> implementation has some infra-structure for managing this -
> spi_set_cs(). The spi_bus in this series is single master,
> multi-slave, where as ssi is point-to-point.
>
> Also as mentioned in earlier discussions with Peter, that api has no
> way of emulating the CS (sometimes called SS) pin. The m25p80 in this
> series (and potenitally other devices) has side effect associated with
> wiggling the cs pin, which can not be encapsulated by that ssi slave
> interface.
>
> It may be a case though that ssi is a superclass of spi - all SPI
> devices are SSI devices but not all SSI devices are SPI? To that end
> can we make SPI a child object of SSI with the desired extra behaviors
> mentioned in this thread? This kind of stuff is the whole reason for
> QOM.
I don't believe there is any difference between SSI and SPI. It's the exact
same thing - the same way that many devices support a "two-wire interface"
that is actually just I2C with a different name.
The behavior of the CS pin varies between devices. It sounds like you need a
bit of extra logic not present in the current ssi code. You should fix that,
not invent a whole new bus.
Paul
next prev parent reply other threads:[~2012-04-04 16:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 6:37 [Qemu-devel] [RFC PATCH v1 0/4] SPI bus support + Xilinx SPI controller Peter A. G. Crosthwaite
2012-03-30 6:37 ` [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support Peter A. G. Crosthwaite
2012-03-30 7:37 ` Peter Maydell
2012-03-30 7:50 ` Peter Crosthwaite
2012-04-02 17:39 ` Peter Maydell
2012-04-02 23:51 ` Peter Crosthwaite
2012-04-03 0:48 ` Peter Crosthwaite
2012-04-03 17:45 ` Paul Brook
2012-04-03 18:08 ` Peter Maydell
2012-04-03 21:22 ` Paul Brook
2012-04-04 0:48 ` Peter Crosthwaite
2012-04-04 16:52 ` Paul Brook [this message]
2012-04-05 0:32 ` Peter Crosthwaite
2012-04-05 7:18 ` Peter Maydell
2012-04-02 23:57 ` Peter Crosthwaite
2012-04-03 0:27 ` Andreas Färber
2012-03-30 6:37 ` [Qemu-devel] [RFC PATCH v1 2/4] m25p80: initial verion Peter A. G. Crosthwaite
2012-04-03 7:03 ` Stefan Hajnoczi
2012-04-04 12:53 ` Andreas Färber
2012-06-05 0:47 ` Peter Crosthwaite
2012-06-05 12:38 ` Andreas Färber
2012-03-30 6:37 ` [Qemu-devel] [RFC PATCH v1 3/4] xilinx_spi: initial version Peter A. G. Crosthwaite
2012-03-30 6:37 ` [Qemu-devel] [RFC PATCH v1 4/4] petalogix-ml605: added spi controller with m25p80 Peter A. G. Crosthwaite
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=201204041752.56850.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=edgar.iglesias@gmail.com \
--cc=john.williams@petalogix.com \
--cc=peter.crosthwaite@petalogix.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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.