fix SPI clock frequency selection

SVN-Revision: 32512
This commit is contained in:
Florian Fainelli 2012-06-27 22:14:50 +00:00
parent 0615bde13a
commit 1d7878a38b

View file

@ -167,7 +167,7 @@ Acked-by: Grant Likely <grant.likely@secretlab.ca>
+ +
+ /* Find the closest clock configuration */ + /* Find the closest clock configuration */
+ for (i = 0; i < SPI_CLK_MASK; i++) { + for (i = 0; i < SPI_CLK_MASK; i++) {
+ if (hz <= bcm63xx_spi_freq_table[i][0]) { + if (hz >= bcm63xx_spi_freq_table[i][0]) {
+ clk_cfg = bcm63xx_spi_freq_table[i][1]; + clk_cfg = bcm63xx_spi_freq_table[i][1];
+ break; + break;
+ } + }