Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: John Crispin <blogic@openwrt.org>
Cc: Gabor Juhos <juhosg@openwrt.org>,
	linux-spi@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH 2/2] SPI: ralink: add Ralink SoC spi driver
Date: Tue, 13 Aug 2013 19:58:02 +0100	[thread overview]
Message-ID: <20130813185802.GE6427@sirena.org.uk> (raw)
In-Reply-To: <520A7E67.1060604@openwrt.org>

[-- Attachment #1: Type: text/plain, Size: 999 bytes --]

On Tue, Aug 13, 2013 at 08:43:51PM +0200, John Crispin wrote:

> >There is presumably a maximum transfer size here from the FIFO that is
> >holding the data?

> The hardware is not running in DMA/IRQ mode and hence it can only
> read/write 1 byte at a time.

OK, then the code looks buggy since it does all the Tx then all the Rx
so a bidirectional transfer should fail.  I'd expect Tx and Rx to be
part of the same loop in this case.

> >Set min_speed_hz in the spi_master and the core will check this for you.

> it seems that min_speed is not handled by the core yet. I saw
> several drivers do minimum speed testing. I am leaving this code in
> the driver until there is a generic minimum speed check

Or add the check to the core...

> >clk_prepare_enable(), and it'd be nice to use runtime PM and enable the
> >clock only when doing transfers though that's not essential.

> The clock is free running and always running.

It's still nice to turn it off for power, and very cheap to implement.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-08-13 18:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-09 18:51 [PATCH 1/2] DT: Add documentation for spi-rt2880 John Crispin
2013-08-09 18:51 ` [PATCH 2/2] SPI: ralink: add Ralink SoC spi driver John Crispin
2013-08-11 13:26   ` Mark Brown
2013-08-13 18:43     ` John Crispin
2013-08-13 18:58       ` Mark Brown [this message]
2013-08-12 16:10   ` James Hogan
2013-08-12 16:10     ` James Hogan
2013-08-12 16:11     ` James Hogan
2013-08-12 16:11       ` James Hogan
2013-08-09 20:44 ` [PATCH 1/2] DT: Add documentation for spi-rt2880 Sergei Shtylyov
2013-08-09 23:35 ` Kumar Gala

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=20130813185802.GE6427@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=blogic@openwrt.org \
    --cc=juhosg@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-spi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox