Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to work with SPI flash ST25P16 on bf548

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Brownell <david-b@...>
Cc: <bryan.wu@...>, <spi-devel-general@...>, <linux-kernel@...>, Sonic Zhang <sonic.zhang@...>
Date: Wednesday, October 31, 2007 - 4:52 am

On Wed, 2007-10-31 at 01:02 -0700, David Brownell wrote:
My opinion is based on the name of max_speed_hz.
Actually, I know it is for the controller to compute the baud rate from
system bus clock or something similar.


Thanks for this clarification.
max_speed_hz acts as a default clock rate ceiling in the spi_setup(spi)
At the beginning of each real spi transfer, we should check the
spi_transfer.speed_hz like this:

---
		/* Speed setup (surely valid because already checked) */
		tmp = transfer->speed_hz;
		if (tmp == 0)
			tmp = chip->max_speed_hz;
		spi_set_baud_rate(tmp);
---

-Bryan
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 09/14] Blackfin SPI driver: Fix SPI driver to wor..., Bryan Wu, (Wed Oct 31, 4:52 am)