public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Steven A. Falco" <sfalco@harris.com>
To: linux-mtd@lists.infradead.org
Subject: [Question] m25p80 driver versus spi clock rate
Date: Mon, 22 Jun 2009 16:50:32 -0400	[thread overview]
Message-ID: <4A3FEE98.60700@harris.com> (raw)

I am trying to figure out how the mtd/devices/m25p80.c driver is supposed
to set the spi clock speed.  (Perhaps I'm making a bad assuption even to
think that it _should_ set the clock speed.  If so, please say so.)

I have three spi devices on a ppc400epx: two m25p16 chips and one Atmel
AVR uP.  The Atmel is handled from user-space, via spidev.  I am setting
the spi_ioc_transfer "speed_hz" parameter, and I see spidev change the
clock rate as I would expect.

However, m25p80.c doesn't seem to touch the clock rate.  Perhaps this is
because the PPC440epx uses "open firmware" device trees to specify the
speed and the m25p80 driver is not an OF driver.  Or as I said above,
perhaps the m25p80 driver isn't even supposed to set the clock rate.

The Atmel we are using cannot have its spi bus run faster than 250 KHz,
while the m25p16 devices can run up to 75 MHz (although the PPC440epx
tops out at 16.6 MHz).  So it is essential that I flip the clock rate
back and forth to maximize performance of the m25p16's while allowing
the Atmel to work.

So, if someone could comment on how the clock speed should be set, I
would appreciate it.  Clearly, I can put in a hack, but I'd rather
follow the existing intent.

	Thanks,
	Steve

             reply	other threads:[~2009-06-22 20:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-22 20:50 Steven A. Falco [this message]
2009-06-22 21:04 ` [Question] m25p80 driver versus spi clock rate Mike Frysinger
2009-06-23 18:41   ` Steven A. Falco
2009-06-23 18:46     ` Mike Frysinger
2009-06-23 19:56       ` David Brownell
2009-06-23 20:31         ` Steven A. Falco
2009-06-23 21:08           ` David Brownell
2009-06-23 21:49             ` Steven A. Falco
2009-06-23 22:38               ` David Brownell
2009-06-24 14:25                 ` Steven A. Falco
2009-06-24 14:33                   ` Stefan Roese
2009-06-24 14:36                     ` Steven A. Falco
2009-06-24 14:50                       ` Stefan Roese
2009-06-24 15:13                   ` David Brownell
2009-06-24 16:14                     ` Steven A. Falco

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=4A3FEE98.60700@harris.com \
    --to=sfalco@harris.com \
    --cc=linux-mtd@lists.infradead.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