diff options
| -rw-r--r-- | drivers/spi/spi-sirf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index 39e2c0a55a28..bf3c6bc77530 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c | |||
| @@ -134,6 +134,7 @@ | |||
| 134 | ALIGNED(x->len) && (x->len < 2 * PAGE_SIZE)) | 134 | ALIGNED(x->len) && (x->len < 2 * PAGE_SIZE)) |
| 135 | 135 | ||
| 136 | #define SIRFSOC_MAX_CMD_BYTES 4 | 136 | #define SIRFSOC_MAX_CMD_BYTES 4 |
| 137 | #define SIRFSOC_SPI_DEFAULT_FRQ 1000000 | ||
| 137 | 138 | ||
| 138 | struct sirfsoc_spi { | 139 | struct sirfsoc_spi { |
| 139 | struct spi_bitbang bitbang; | 140 | struct spi_bitbang bitbang; |
| @@ -629,9 +630,6 @@ static int spi_sirfsoc_setup(struct spi_device *spi) | |||
| 629 | { | 630 | { |
| 630 | struct sirfsoc_spi *sspi; | 631 | struct sirfsoc_spi *sspi; |
| 631 | 632 | ||
| 632 | if (!spi->max_speed_hz) | ||
| 633 | return -EINVAL; | ||
| 634 | |||
| 635 | sspi = spi_master_get_devdata(spi->master); | 633 | sspi = spi_master_get_devdata(spi->master); |
| 636 | 634 | ||
| 637 | if (spi->cs_gpio == -ENOENT) | 635 | if (spi->cs_gpio == -ENOENT) |
| @@ -683,6 +681,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev) | |||
| 683 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST | SPI_CS_HIGH; | 681 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST | SPI_CS_HIGH; |
| 684 | master->bits_per_word_mask = SPI_BPW_MASK(8) | SPI_BPW_MASK(12) | | 682 | master->bits_per_word_mask = SPI_BPW_MASK(8) | SPI_BPW_MASK(12) | |
| 685 | SPI_BPW_MASK(16) | SPI_BPW_MASK(32); | 683 | SPI_BPW_MASK(16) | SPI_BPW_MASK(32); |
| 684 | master->max_speed_hz = SIRFSOC_SPI_DEFAULT_FRQ; | ||
| 686 | sspi->bitbang.master->dev.of_node = pdev->dev.of_node; | 685 | sspi->bitbang.master->dev.of_node = pdev->dev.of_node; |
| 687 | 686 | ||
| 688 | /* request DMA channels */ | 687 | /* request DMA channels */ |
