[PATCH 4/7] serial: ifx6x60: set SPI max_speed_hz based on platform type

From: Russ Gorby
Date: Wed Jan 05 2011 - 19:04:53 EST


Platforms containing the 6260 can run up to 25Mhz.

For these platforms set max_speed_hz to 25Mhz.

Signed-off-by: Russ Gorby <russ.gorby@xxxxxxxxx>
---
drivers/serial/ifx6x60.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/ifx6x60.c b/drivers/serial/ifx6x60.c
index fd10103..b54a990 100644
--- a/drivers/serial/ifx6x60.c
+++ b/drivers/serial/ifx6x60.c
@@ -722,7 +722,7 @@ static void ifx_spi_io(unsigned long data)
/* note len is BYTES, not transfers */
ifx_dev->spi_xfer.len = IFX_SPI_TRANSFER_SIZE;
ifx_dev->spi_xfer.cs_change = 0;
- ifx_dev->spi_xfer.speed_hz = 12500000;
+ ifx_dev->spi_xfer.speed_hz = ifx_dev->spi_dev->max_speed_hz;
/* ifx_dev->spi_xfer.speed_hz = 390625; */
ifx_dev->spi_xfer.bits_per_word = spi_bpw;

@@ -984,6 +984,10 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
ifx_dev->spi_timer.function = ifx_spi_timeout;
ifx_dev->spi_timer.data = (unsigned long)ifx_dev;
ifx_dev->is_6160 = pl_data->is_6160;
+ if (ifx_dev->is_6160)
+ spi->max_speed_hz = 12500000;
+ else
+ spi->max_speed_hz = 25000000;

/* ensure SPI protocol flags are initialized to enable transfer */
ifx_dev->spi_more = 0;
--
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/