diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-02-20 14:37:56 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-03 05:35:27 +0100 |
commit | 765ee709eb40abf0c43c6d864ac6f01677b7fd5a (patch) | |
tree | 7e13278d3a0fbd55588ecf064c146140ff553433 /drivers | |
parent | spi: dw-mmio: remove HAVE_CLK build dependecy (diff) | |
download | linux-765ee709eb40abf0c43c6d864ac6f01677b7fd5a.tar.xz linux-765ee709eb40abf0c43c6d864ac6f01677b7fd5a.zip |
spi: dw: Convert to let spi core validate transfer speed
Set master->max_speed_hz then spi core will handle checking transfer speed.
So we can remove the same checking in this driver.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi-dw.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index bf98d63d92b3..9e4a0aa7d341 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -439,12 +439,6 @@ static void pump_transfers(unsigned long data) if (transfer->speed_hz != speed) { speed = transfer->speed_hz; - if (speed > dws->max_freq) { - printk(KERN_ERR "MRST SPI0: unsupported" - "freq: %dHz\n", speed); - message->status = -EIO; - goto early_exit; - } /* clk_div doesn't support odd number */ clk_div = dws->max_freq / speed; @@ -809,6 +803,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) master->cleanup = dw_spi_cleanup; master->setup = dw_spi_setup; master->transfer = dw_spi_transfer; + master->max_speed_hz = dws->max_freq; /* Basic HW init */ spi_hw_init(dws); |