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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bryan Wu
Date: Wednesday, October 31, 2007 - 1: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 w ..., Bryan Wu, (Wed Oct 31, 1:52 am)
Re: [PATCH 13/14] Blackfin SPI driver: Move cs_chg_udelay ..., Cameron Barfield, (Wed Oct 31, 12:04 pm)