From patchwork Tue Jan 26 07:23:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yao yuan X-Patchwork-Id: 8118271 Return-Path: X-Original-To: patchwork-linux-arm@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 A40BBBEEE5 for ; Tue, 26 Jan 2016 07:34:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D0E8E202FF for ; Tue, 26 Jan 2016 07:34:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 05197202BE for ; Tue, 26 Jan 2016 07:34:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aNy7X-0001rz-Qi; Tue, 26 Jan 2016 07:32:59 +0000 Received: from mail-bn1on0146.outbound.protection.outlook.com ([157.56.110.146] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aNy7H-0001mH-PQ; Tue, 26 Jan 2016 07:32:44 +0000 Received: from BLUPR0301CA0037.namprd03.prod.outlook.com (10.162.113.175) by SN2PR03MB079.namprd03.prod.outlook.com (10.255.175.155) with Microsoft SMTP Server (TLS) id 15.1.365.19; Tue, 26 Jan 2016 07:32:20 +0000 Received: from BN1AFFO11FD007.protection.gbl (2a01:111:f400:7c10::111) by BLUPR0301CA0037.outlook.office365.com (2a01:111:e400:5259::47) with Microsoft SMTP Server (TLS) id 15.1.390.13 via Frontend Transport; Tue, 26 Jan 2016 07:32:20 +0000 Authentication-Results: spf=permerror (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=none action=none header.from=freescale.com; Received-SPF: PermError (protection.outlook.com: domain of freescale.com used an invalid SPF mechanism) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD007.mail.protection.outlook.com (10.58.52.67) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Tue, 26 Jan 2016 07:32:19 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u0Q7WBbX009330; Tue, 26 Jan 2016 00:32:16 -0700 From: Yuan Yao To: , , Subject: [PATCH v4 2/7] mtd: spi-nor: fsl-quadspi: add support for ls1021a Date: Tue, 26 Jan 2016 15:23:56 +0800 Message-ID: <1453793041-35868-2-git-send-email-yao.yuan@freescale.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1453793041-35868-1-git-send-email-yao.yuan@freescale.com> References: <1453793041-35868-1-git-send-email-yao.yuan@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD007; 1:RG/KZi8r6KEr1E6TOWAff3h4GUcWxeELQKpIOjXlmilwdQiRCH/0QOdlKISVkmDN6yPPQnnE8AR/lVIbPkp1DieG81IS1d8KIakt67vROKBfJ/oHiZ/bMCTv1lk24eIvheO2zY1gcnhwZgvSeHOcrNZjkUS/nriKSPOnYKEfi9NGU6WB3roieeNOfgxpN+7Vb/xKXEmqQVVdXInZc/m307lHu/1LlsTz8mUFU6G81yR1QEQayKf+KiprIdf0g84Ze9NMxz0eDfrJ2otmWOsYgAKVARCmmB9lrOxshaSvPmI+iFcCqBnF/YS34hDjZKb7oIcLLgf4vv+HIQz5kkNx4lkCwV6NZ9zxbPKV5WkEp86+phY21hp7sYHW7BWonEZGfWt9rMxI1Ra6zovSGYLAFB0TjbeJ16Fczs4AqF1wum/fa99zDnMI5lIVmQ32NByO X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(448002)(189002)(199003)(4326007)(2201001)(2906002)(50466002)(87936001)(4001450100002)(19580405001)(86362001)(92566002)(33646002)(36756003)(5003940100001)(85326001)(50226001)(1220700001)(104016004)(77096005)(1096002)(11100500001)(229853001)(5001960100002)(2950100001)(106466001)(48376002)(81156007)(19580395003)(5001770100001)(76176999)(97736004)(47776003)(6806005)(5008740100001)(50986999)(586003)(189998001)(7059030); DIR:OUT; SFP:1102; SCL:1; SRVR:SN2PR03MB079; H:tx30smr01.am.freescale.net; FPR:; SPF:PermError; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: ca482965-e279-4911-b198-08d32622d2f1 X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB079; 2:OqKg/xNzIU+MUragBaQUqVM1P0nUYAbOSFids/xQGGAaCkCIvmm+jPilbvTjjCKMaZCb7y2tLLyG+b4M3NqJk9EBuZkfpSXiwfDjJL/0Z0E+9b9A8Osq31R6BfjM9svpVfV+xRY9nCl3pa4EUJmZUkcd8EHtVKGAslOthRfqYSNKiVmhIGsaEEBlYnwWfzEi; 3:PdWe9fdkjDtjSHk7/W9ZjcAQ36O4gdbhHT8Dup6UfiQEDI8TXuQsvtQcbPd371GogsfBullb+xz96thkDBk/LL6vbpCHcXOP7oNzc6hKD8vFrAJ/5oPfMEtEwp1kCOq7SLi8Ct28Lx6dtWBk2ar/OKAckpLagjezgBNIcrb9Q8+3g42Vtv5xZlJ/q7PXLn4VpX42k2ujU8Z5P7IryW4FDjwJ8HOfkf+KPLfysyfZ8pk=; 25:b+H2LHVvGtPsofqwxkNFdeQl/LCzyNWL88d+PoM3pmNMbY7BP6ZVbS95ozip2kgkhgs4s+0QgBZYruQCPMO4k7puBY80b1o5hgTGoPFhoFJQHpS2b6lmqERAQEhcSJBsKADiEZOpOhvEFwJ/Y17WgfCfJEtmjwRkpYkOFgFl17swjsTHPuR0iufrkxo2AzuCBmbzozsnVUXvQoD9qUzDxuqjx/vFEoqqS4s8wm0qxKier7tXAsI15zvi/aWrfnm5 X-Exchange-Antispam-Report-Test: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:SN2PR03MB079; UriScan:(185117386973197)(101931422205132); X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB079; 20:0S8MadadS1fckYUNfN2IGYnAekPE+M/S839Xj8bakcbAyx5Q9WU+5Ox5XDUl41dO80ar6Cb/aMq/PO9FRdUPxM8cVPnQ4PyWbxeXAFv/BLOEMpKqB1LLo+D1EPXru/CDcxCbDPoUQFIYlCBLDl4jmdg52LTwgVgaMZ4gLCL1NYBDp/5BZqV/CVYWJC32B9H+sBIBcbpQFPZbZH4ivFUy26xfQmULSSCmayYWZFYGIRiiN3JltnY4ciK0ZmsZkvmG3e2FG0lhZ7povXonKci3QfM0c/z8V352f/wK/FvT7VRsHC4dD4UdEiSeahVBFsmbxkUTa/yXeBj5NTWZI5BNQr/jmmniZX/3q2UQ8wl+AqqPx4Us61RdGbzaXqSFPe0EO1/naxeXSKu1LVA3Y5dr9I5qq7/K+486LGisgiEOOh3MYmelDOpXqnX9VYI/y2mQ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13024025)(8121501046)(520078)(13018025)(13015025)(13017025)(13023025)(5005006)(3002001)(10201501046); SRVR:SN2PR03MB079; BCL:0; PCL:0; RULEID:; SRVR:SN2PR03MB079; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB079; 4:vTS3Wha3gk7k6JvQD4DJco8PHW6BWpuP2wY+sn09aBeXda2sTPMoGGxRhL+rlwr8kWolN4F5vNK5m5dcWdZhVJ8tK9Xus2He97GVVwmHa+9OFYjW8hREkbB5Voo4ED7SPzXJSqdWYC0ImHdKn+XLlkyE0HtjmDXW5kdr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g: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2016 07:32:19.7142 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB079 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160125_233244_070952_78335547 X-CRM114-Status: GOOD ( 14.98 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, yao.yuan@nxp.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 LS1021a also support Freescale Quad SPI controller. Add fsl-quadspi support for ls1021a chip and make SPI_FSL_QUADSPI selectable for LS1021A SOC hardwares. Signed-off-by: Yuan Yao Acked-by: Han xu Acked-by: Han xu --- Changed in v4: No changes. Changed in v3: No changes. Changed in v2: Update my email to --- drivers/mtd/spi-nor/Kconfig | 2 +- drivers/mtd/spi-nor/fsl-quadspi.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig index 0dc9275..a28c278 100644 --- a/drivers/mtd/spi-nor/Kconfig +++ b/drivers/mtd/spi-nor/Kconfig @@ -30,7 +30,7 @@ config MTD_SPI_NOR_USE_4K_SECTORS config SPI_FSL_QUADSPI tristate "Freescale Quad SPI controller" - depends on ARCH_MXC || COMPILE_TEST + depends on ARCH_MXC || SOC_LS1021A || COMPILE_TEST depends on HAS_IOMEM help This enables support for the Quad SPI controller in master mode. diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c index 04e8a93..9ab2b51 100644 --- a/drivers/mtd/spi-nor/fsl-quadspi.c +++ b/drivers/mtd/spi-nor/fsl-quadspi.c @@ -213,6 +213,7 @@ enum fsl_qspi_devtype { FSL_QUADSPI_IMX6SX, FSL_QUADSPI_IMX7D, FSL_QUADSPI_IMX6UL, + FSL_QUADSPI_LS1021A, }; struct fsl_qspi_devtype_data { @@ -258,6 +259,14 @@ static struct fsl_qspi_devtype_data imx6ul_data = { | QUADSPI_QUIRK_4X_INT_CLK, }; +static struct fsl_qspi_devtype_data ls1021a_data = { + .devtype = FSL_QUADSPI_LS1021A, + .rxfifo = 128, + .txfifo = 64, + .ahb_buf_size = 1024, + .driver_data = 0, +}; + #define FSL_QSPI_MAX_CHIP 4 struct fsl_qspi { struct spi_nor nor[FSL_QSPI_MAX_CHIP]; @@ -812,6 +821,7 @@ static const struct of_device_id fsl_qspi_dt_ids[] = { { .compatible = "fsl,imx6sx-qspi", .data = (void *)&imx6sx_data, }, { .compatible = "fsl,imx7d-qspi", .data = (void *)&imx7d_data, }, { .compatible = "fsl,imx6ul-qspi", .data = (void *)&imx6ul_data, }, + { .compatible = "fsl,ls1021a-qspi", .data = (void *)&ls1021a_data, }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, fsl_qspi_dt_ids);