Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966580AbbBCRom (ORCPT ); Tue, 3 Feb 2015 12:44:42 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:7964 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966521AbbBCRoj (ORCPT ); Tue, 3 Feb 2015 12:44:39 -0500 From: Sifan Naeem To: , CC: , , Sifan Naeem Subject: [PATCH] spi: img-spfi: same edge bit set to double spfi speeds Date: Tue, 3 Feb 2015 17:46:05 +0000 Message-ID: <1422985565-14163-1-git-send-email-sifan.naeem@imgtec.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.167.63] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1509 Lines: 41 Setting the same edge bit is required for operating at full bitrate programmed into the SPFI control register. Without this bit set the max operating bitrate supported would be half the maximum bitrate supported by the img-spfi block. It's safe to set this bit for all transactions. Signed-off-by: Sifan Naeem --- drivers/spi/spi-img-spfi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c index c01567d..e6f77b8 100644 --- a/drivers/spi/spi-img-spfi.c +++ b/drivers/spi/spi-img-spfi.c @@ -39,6 +39,7 @@ #define SPFI_CONTROL_SOFT_RESET BIT(11) #define SPFI_CONTROL_SEND_DMA BIT(10) #define SPFI_CONTROL_GET_DMA BIT(9) +#define SPFI_CONTROL_SE BIT(8) #define SPFI_CONTROL_TMODE_SHIFT 5 #define SPFI_CONTROL_TMODE_MASK 0x7 #define SPFI_CONTROL_TMODE_SINGLE 0 @@ -435,6 +436,9 @@ static void img_spfi_config(struct spi_master *master, struct spi_device *spi, val |= SPFI_CONTROL_CONTINUE; spfi_writel(spfi, val, SPFI_CONTROL); + /* Double the transfer speed by setting Same Edge. */ + val |= SPFI_CONTROL_SE; + val = spfi_readl(spfi, SPFI_PORT_STATE); if (spi->mode & SPI_CPHA) val |= SPFI_PORT_STATE_CK_PHASE(spi->chip_select); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/