Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932622AbbHZG1N (ORCPT ); Wed, 26 Aug 2015 02:27:13 -0400 Received: from mail-bn1on0074.outbound.protection.outlook.com ([157.56.110.74]:40524 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753974AbbHZG1G (ORCPT ); Wed, 26 Aug 2015 02:27:06 -0400 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; From: Ranjit Waghmode To: , , , , , , , , , , , CC: , , , , , , Ranjit Waghmode Subject: [LINUX RFC v2 0/4] spi: add dual parallel mode support in Zynq MPSoC GQSPI controller Date: Wed, 26 Aug 2015 11:56:03 +0530 Message-ID: <1440570367-22569-1-git-send-email-ranjit.waghmode@xilinx.com> X-Mailer: git-send-email 2.1.2 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21768.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD033;1:0AuA02OeJU8WVmMaEvOhrkXL6mk9CpDMKJEbvo3KQw/0/SB3eb8I1RXFH95hMTEbaEatMGMMZpwsUjw7UxlJS13RzGLTL8gGk3Xv07nTWrcMWgU9u+6opk/Wi4OvflZJsJcXpZtqNlkOe8jGjgvE/qoAKHBk/n2R9rIotuKZEqr1+/IIFr8ke7q9RWqs8+vhX4ea7NyOVbM/Rhyu1KGM/iNsg9YFRCI7n9iK4R0M1rj6VfQw/xe+VOlwI9M2Bwpwojb4f398eWsvZTKP5N8O122baC5SYdDXS9/omXBdbiTiU4MsMbc2JDkqabyG4tjMl1AcPFOxjJxRbzxN4I7Yl93OwMdVzIqiZbvpEXJNqlKEPIe7tV0efixByGA7M6Aibt45EtD2+w/1v19cvbkb3A== X-Forefront-Antispam-Report: CIP:149.199.60.100;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(3050300001)(189002)(199003)(36386004)(86362001)(47776003)(5007970100001)(229853001)(63266004)(92566002)(77156002)(5003940100001)(50466002)(6806004)(81156007)(5001830100001)(106466001)(4001540100001)(2201001)(45336002)(107886002)(62966003)(42186005)(48376002)(87936001)(5001960100002)(189998001)(33646002)(5001860100001)(46386002)(52956003)(50986999)(46102003)(50226001)(36756003)(64706001)(103686003)(5001770100001)(7059030)(921003)(107986001)(217873001)(90966001)(4001430100001)(5001870100001)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1BFFO11HUB020;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11HUB020;2:Y67IxVTy+d7NLTKvgPrrRID/9/eZ4uYOSlWecUiGeMXWNVVeBCTRBnKcwafPBi855lJATm0O43AUFqBZ5217iggJfwyklwrTbRyOX2P0WdLQSTDgfK6WIbta36nglmq6s1QhD+JhYQgBlzSsniNahasZ+2vkdDGP1OM0nBg/Ato=;3:gGUUrWuoyWBJfjvdPnpW8G2nbBxzngwE2JlAHu/yVuJjXZMR9G4UlOvi5V4wYBRWadvkeNBZgq2Ufn4TDJ7kdsY8s8AjuaFoEhAu/Gh3Tho+rRvyDS0wfbwwht3i6rBMQ2ddkqzs3nfav6t/pc0FMBZLEoiQu2xsskExjn7N4Opa7Q3o9+mzEbAJO1A5uWTVXzii+w3Y6+yzEbj6HqPd3M+nuuhKdSxbnng6kTEPQp8mLr8UL0ujVXx4KNA1NP0V;25:y/qs96nibO2PhV+uIq3jAzNau6VOS7h8rH/aW+gtmy6jCVakDthiHp6j5c9hKQPvnIKUeHYjRBg1plYA375iE7h/susKjSs22JBXJQQc1sz0jdAekr1ntdrGmakdG32NPuxmSgu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-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(8121501046)(5005006)(3002001);SRVR:BN1BFFO11HUB020;BCL:0;PCL:0;RULEID:;SRVR:BN1BFFO11HUB020; X-Forefront-PRVS: 0680FADD48 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1BFFO11HUB020;23:SRIP6ml6O1BuOd7u8BPi8gY4JNjx8GKjthxLCF4?= =?us-ascii?Q?ERfMGfZRo4/pcJP0Bcz3u5QBDLuRVk3Nr2mo++J/1gyJPoR5BVUUaENxxc3G?= =?us-ascii?Q?ZpT+ABhaJoXM3/ImAuZzQx4x2OBtpGbyy09YPzNBslaBeb+JQ6RiKN+D1xTQ?= =?us-ascii?Q?r9NziA9Xt5LNV06HyUGA5Kf8XbWbDLwQ/y49CH/sG7paVnQwxhBNsgGys9MG?= =?us-ascii?Q?xDvNFjaPOXwJBhtL/uvJ1p1L5PAFiiFKw9JM+G/hJ6cd4inw3Exo7oP4Kj+b?= =?us-ascii?Q?yLffLvmEgD+ebVztF1D4o2n3kj+Yg6jMenY0MIr/15SqxezzgHhv1OslDeXq?= =?us-ascii?Q?JDpiMFpfJE/g5xFdSrPXD9OZTM+Gg9soKm1ObL9I3UKLf//GQ3pWhOsrtNLo?= =?us-ascii?Q?k0lNYQr8PvZRWUBwQsnwA6hqxm4W4SsaJ/9FWkzBhScuaN7H5xPSs6nmcAAP?= =?us-ascii?Q?yDzxJgeIqIRHjz89nmKztlVPWpDv9J1S7ru5mvrc7Jp3ICE3agVwOv15WR1R?= =?us-ascii?Q?vPNimxO4hfxV29ScKZD5pmPkr8Oxffer9KG+ogh03n7XccV1CYq1+a4nmIPx?= =?us-ascii?Q?zbIZN3CbEiCMCB3F6JlZ+xfRZXpltQd6xNcd5glIz7pn3Fw3m8RTTQ0TPYRZ?= =?us-ascii?Q?1NsWbbHnABaMDU6aGlZ49uY/QhiYWFKKPYiapXVJLBxHgL3n+1V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amDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2015 06:27:03.0621 (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: BN1BFFO11HUB020 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2494 Lines: 61 This series adds dual parallel mode support for Zynq Ultrascale+ MPSoC GQSPI controller driver. What is dual parallel mode? --------------------------- ZynqMP GQSPI controller supports Dual Parallel mode with following functionalities: 1) Supporting two SPI flash memories operating in parallel. 8 I/O lines. 2) Chip selects and clock are shared to both the flash devices 3) This mode is targeted for faster read/write speed and also doubles the size 4) Commands/data can be transmitted/received from both the devices(mirror), or only upper or only lower flash memory devices. 5) Data arrangement: With stripe enabled, Even bytes i.e. 0, 2, 4,... are transmitted on Lower Data Bus Odd bytes i.e. 1, 3, 5,.. are transmitted on Upper Data Bus. This series also updated MTD layer files for adding parallel mode support. 1) Added Support for two flashes 2) Support to enable/disable data stripe as and when required. 3) Added required parameters to spi_nor structure. Initialized all added parameters in spi_nor_scan() 4) Added support for dual parallel in spi_nor_read/write/erase functions by: a) Increasing page_size, sector_size, erase_size and toatal flash size as and when required. b) Dividing address by 2 c) Updating spi->master->flags for qspi driver to change CS 5) Updated read_sr() to get status of both flashes 6) Also updated read_fsr() to get status of both flashes These all are very high level changes and expected to make an idea clear. Comments and suggestions are always welcomed --- V2 Changes: a) Splitted patches based on logical changes b) Added error handling for newly added APIs in SPI core --- Ranjit Waghmode (4): spi: add support of two chip selects & data stripe mtd: add spi_device instance to spi_nor struct spi-nor: add dual parallel mode support spi: zynqmp: gqspi: add support for dual parallel mode configuration drivers/mtd/devices/m25p80.c | 1 + drivers/mtd/spi-nor/spi-nor.c | 91 +++++++++++++++++++++++++++++++++--------- drivers/spi/spi-zynqmp-gqspi.c | 24 ++++++++++- drivers/spi/spi.c | 8 ++++ include/linux/mtd/spi-nor.h | 3 ++ include/linux/spi/spi.h | 11 +++++ 6 files changed, 118 insertions(+), 20 deletions(-) -- 2.1.2 -- 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/