Re: [spi-devel-general] [PATCH v2] spi: Add support for theOpenCores SPI controller.

From: Thierry Reding
Date: Tue Apr 28 2009 - 08:20:30 EST


* David Brownell wrote:
> On Tuesday 28 April 2009, Thierry Reding wrote:
> > This second version is pretty much a rewrite.
>
> That happens sometimes...
>
>
> > Some notes about the most
> > important changes:
> >
> > Â * uses per-chip states to allow more slaves to use the controller
> > Â Â concurrently
> > Â * rejects invalid device configurations during setup
> > Â * rejects invalid per-message and per-transfer options
> > Â * queues messages so that they can be processed one after another
> > Â Â Â - this also provides for a way to handle power-management
> > Â * omits the spioc.h (and with it the platform data structure):
> > Â Â Â - uses the platform_device.id for the bus number
> > Â Â Â - always uses 8 chipselects because that's the maximum that the core
> > Â Â Â Â supports
>
> All that sounds good.
>
>
> > I couldn't really find a way to implement per-transfer overrides for the
> > word size because the controller simply has no concept of word sizes. Is it
> > in such cases still necessary to hardwire the word size to 8 bits?
>
> Is this the http://www.opencores.org/?do=project&who=spi core?

Yes, it is.

> Its summary says "Variable length of transfer word up to 32 bits";
> does that mean "configurable when core is synthesized" instead of
> truly "variable"?

That summary seems out-dated. The variable length of transfer word is
actually the maximum length of a single transfer and is 128 bits in the
latest version. So you get 4 registers, each 32 bits wide into which you
program the data you want to transfer. Then you set the number of bits of
that transfer so the core knows which registers and what bits of those
registers to shift out serially.

I'm not sure whether this is supposed to be the same as the word size. If it
is it would mean that a single transfer can always only transfer one word.
Which is kind of inefficient, I would think.

Thierry

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/