[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1294272313-15899-5-git-send-email-russ.gorby@intel.com>
Date: Wed, 5 Jan 2011 16:05:10 -0800
From: Russ Gorby <russ.gorby@...el.com>
To: Greg@...r.kernel.org, Kroah-Hartman@...r.kernel.org,
<gregkh@...e.de>, Vasiliy@...r.kernel.org, Kulikov@...r.kernel.org,
<segoon@...nwall.com>, Alan@...r.kernel.org, Cox@...r.kernel.org,
<alan@...ux.intel.com>, Russ@...r.kernel.org,
Gorby@...r.kernel.org, <richardx.r.gorby@...el.com>,
linux-kernel@...r.kernel.org
Cc: suhail.ahmed@...el.com
Subject: [PATCH 4/7] serial: ifx6x60: set SPI max_speed_hz based on platform type
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@...el.com>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists