Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188433
b: refs/heads/master
c: 9bd4517
h: refs/heads/master
i:
  188431: c295aa3
v: v3
  • Loading branch information
Scott Ellis authored and Grant Likely committed Mar 10, 2010
1 parent 1c091e5 commit d7f2ef7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e7749436d576a525d7b2a4bcffb17b3364b9e00
refs/heads/master: 9bd4517ddc51c803784778ab52e6f0bc03b77a52
8 changes: 6 additions & 2 deletions trunk/drivers/spi/omap2_mcspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ static int omap2_mcspi_setup_transfer(struct spi_device *spi,
struct spi_master *spi_cntrl;
u32 l = 0, div = 0;
u8 word_len = spi->bits_per_word;
u32 speed_hz = spi->max_speed_hz;

mcspi = spi_master_get_devdata(spi->master);
spi_cntrl = mcspi->master;
Expand All @@ -587,9 +588,12 @@ static int omap2_mcspi_setup_transfer(struct spi_device *spi,

cs->word_len = word_len;

if (spi->max_speed_hz) {
if (t && t->speed_hz)
speed_hz = t->speed_hz;

if (speed_hz) {
while (div <= 15 && (OMAP2_MCSPI_MAX_FREQ / (1 << div))
> spi->max_speed_hz)
> speed_hz)
div++;
} else
div = 15;
Expand Down

0 comments on commit d7f2ef7

Please sign in to comment.