From patchwork Tue Feb 3 17:46:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sifan Naeem X-Patchwork-Id: 5770421 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 36DEFBF440 for ; Tue, 3 Feb 2015 17:44:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6337320256 for ; Tue, 3 Feb 2015 17:44:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 75DB420295 for ; Tue, 3 Feb 2015 17:44:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966566AbbBCRol (ORCPT ); Tue, 3 Feb 2015 12:44:41 -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 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 1464A123549AB; Tue, 3 Feb 2015 17:44:34 +0000 (GMT) Received: from hhmail02.hh.imgtec.org (10.100.10.20) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 3 Feb 2015 17:44:37 +0000 Received: from iw-build-3.kl.imgtec.org (192.168.167.63) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 3 Feb 2015 17:44:36 +0000 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 X-Originating-IP: [192.168.167.63] Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);