From patchwork Mon May 30 09:47:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naga Sureshkumar Relli X-Patchwork-Id: 9140817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 937B960757 for ; Mon, 30 May 2016 09:47:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8685A28212 for ; Mon, 30 May 2016 09:47:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B58828220; Mon, 30 May 2016 09:47:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06FE628212 for ; Mon, 30 May 2016 09:47:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754519AbcE3JrU (ORCPT ); Mon, 30 May 2016 05:47:20 -0400 Received: from mail-cys01nam02on0056.outbound.protection.outlook.com ([104.47.37.56]:41951 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754468AbcE3JrT (ORCPT ); Mon, 30 May 2016 05:47:19 -0400 Received: from CY1NAM02FT056.eop-nam02.prod.protection.outlook.com (10.152.74.59) by CY1NAM02HT086.eop-nam02.prod.protection.outlook.com (10.152.74.197) with Microsoft SMTP Server (TLS) id 15.1.497.8; Mon, 30 May 2016 09:47:17 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT056.mail.protection.outlook.com (10.152.74.160) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Mon, 30 May 2016 09:47:15 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:38038 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1b7Jmz-000432-4g; Mon, 30 May 2016 02:47:13 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1b7Jn0-0000Hz-IV; Mon, 30 May 2016 02:47:14 -0700 Received: from xsj-pvapsmtp01 (mailhost.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id u4U9l3eW019967; Mon, 30 May 2016 02:47:03 -0700 Received: from [172.23.64.208] (helo=xhdrdevl6.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1b7Jmo-0000E9-PL; Mon, 30 May 2016 02:47:03 -0700 Received: by xhdrdevl6.xilinx.com (Postfix, from userid 25026) id E7CC4F2000C; Mon, 30 May 2016 15:17:01 +0530 (IST) From: Naga Sureshkumar Relli To: , , , CC: , , "Naga Sureshkumar Relli" Subject: [PATCH v2 2/3] spi: xilinx: Add QUAD support Date: Mon, 30 May 2016 15:17:01 +0530 Message-ID: <1464601621-5157-1-git-send-email-nagasure@xilinx.com> X-Mailer: git-send-email 2.1.1 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22358.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(2980300002)(438002)(189002)(199003)(9170700003)(4326007)(8936002)(586003)(92566002)(86362001)(1220700001)(42186005)(11100500001)(4001450100002)(36386004)(103686003)(50226002)(107886002)(5008740100001)(48376002)(5003940100001)(189998001)(81166006)(33646002)(5001770100001)(2906002)(47776003)(45336002)(8676002)(46386002)(63266004)(106466001)(19580395003)(36756003)(50986999)(52956003)(4001430100002)(2201001)(50466002)(229853001)(87936001)(6806005)(19580405001)(90966002)(107986001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1NAM02HT086; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; MLV:ovrnspm; MX:1; A:1; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 4db58273-4406-4e00-b610-08d3886f628c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:CY1NAM02HT086; X-Microsoft-Antispam-PRVS: <9fda8b29f2564307a80cb4494291a165@CY1NAM02HT086.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13017025)(8121501046)(13018025)(5005006)(13024025)(13015025)(13023025)(10201501046)(3002001)(6055026); SRVR:CY1NAM02HT086; BCL:0; PCL:0; RULEID:; SRVR:CY1NAM02HT086; X-Forefront-PRVS: 09583628E0 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2016 09:47:15.4107 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1NAM02HT086 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds QUAD mode support to axi spi controller. updated supported mode bits to SPI_TX_QUAD and SPI_RX_QUAD. Signed-off-by: Naga Sureshkumar Relli --- changes for v2 - none --- drivers/spi/spi-xilinx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c index d903857..4467590 100644 --- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c @@ -74,6 +74,7 @@ /* Number of data lines used to receive */ #define XSPI_RX_ONE_WIRE 1 +#define XSPI_RX_FOUR_WIRE 4 /** * struct xilinx_spi - This definition define spi driver instance @@ -558,8 +559,10 @@ static int xilinx_spi_probe(struct platform_device *pdev) xspi->tx_fifo = xspi_fill_tx_fifo_32; xspi->rx_fifo = xspi_read_rx_fifo_32; } + } else if (xspi->rx_bus_width == XSPI_RX_FOUR_WIRE) { + master->mode_bits |= SPI_TX_QUAD | SPI_RX_QUAD; } else { - dev_err(&pdev->dev, "Dual/Quad Modes are not supported\n"); + dev_err(&pdev->dev, "Dual Mode not supported\n"); goto put_master; } xspi->cs_inactive = 0xffffffff;