From patchwork Tue Jul 16 04:21:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1132429 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="JV7FJDxv"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="FKLCIgmR"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45nnKk5Vxtz9sDQ for ; Tue, 16 Jul 2019 14:22:02 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4507AC21C6A; Tue, 16 Jul 2019 04:21:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5FA29C21C4A; Tue, 16 Jul 2019 04:21:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 76927C21BE5; Tue, 16 Jul 2019 04:21:54 +0000 (UTC) Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by lists.denx.de (Postfix) with ESMTPS id B549CC21C29 for ; Tue, 16 Jul 2019 04:21:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1563250951; x=1594786951; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=AZlNmkH4Qo4okKKeT5xiVGWU+uSL+c0VFxaYRRGsDPY=; b=JV7FJDxvyJK1zhStVaesX+rEVfh+fFo/PsB++aB8Tc0QjtwUJwclxj70 Y570rcW1HxA6+Jjux4DTFzZ8dLzmtQCvHbQgSoLh8MnR2zy0iRW/zop8F oyESubFrEkqjnEnV1tOC+YqdzvJB0iwZExTTEkfsM2Zj6ZhwOeJo5ZFrS u7dMCyjT9KFgzyr58WbnUgUb7sYM5R6+H2S7jLJarcNd1Szfnz6ZS+v2n p1gBwnEUlWMVCZSZoyXwVYpk2DLduyyQ++BfkDd4I09hdPXiMM+47h3T7 AqpruYDajPnBFNj4aeYsobqe5e5+NW+t79X6QF65RREYK+Dq6xHOOA7n+ g==; IronPort-SDR: /I8gsA4Y+7bv12ShX7nExVQx7AyDm9lY4GgvbOwn+/Bth0PYfjFR7gx4USvIH/zGDPwCjLDPfo izMXGQRKg9Yc/9x3Nk9HUo4yzXwWdp6LGWXGEtYVcraJOH2xeqyLeaSXYOVzo8oqkxDnwu0AFX LOGmhOCqxg+zFh9h4BVjtbpqcNyYuT5HPgI2KvbIBJg8C8QKZLPhNSnV2MtpMH97/4aa11iIXL fgLUSHWCcbZv7RRbihE9LtitDnfOt7TBUrCnZab04NeyqcvOqH2laLmNIrKzKsGDRB0KQUPOUI mMg= X-IronPort-AV: E=Sophos;i="5.63,496,1557158400"; d="scan'208";a="213114073" Received: from mail-co1nam03lp2053.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) ([104.47.40.53]) by ob1.hgst.iphmx.com with ESMTP; 16 Jul 2019 12:22:26 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ev1OswtDUJ/G5BeIDeE+KWv6vDBJ0cZG3Aywog9c4gjEJ75ZDqlRF9JfZenX4f1YcTdXU/s6hMVBy790HRHzdifGarFpC0xZr/KO8V7sclTFJvMm25IqYIWH9XvF0IRQXXArW711kz1qBqAVcurpMA2KhJa180CfKgePiQKWME+bFHFImzXVnPJnJpqhWZB5HIgkrPwIBYLjKWRtcGeJnJLsS049MAHZ9yX/GAHcLCdQ3KTX4QUXmclnkZmCAxKCwcdHmZ06yD6GMXsNwkEWcQK10Cg+jYzzvnLmrwhwALSFeH6q5kPDpFQXw6WiBgp++5+Kakn1x3uqYqHQ03ZbtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dufGPiTLM+XSXjCLbQfoTWyjBMv4ImJjr7YlhkwJ+zA=; b=kt0Klvb1OepC5aq2I6r+fnnpGgPDcjL6UZaVSCUGfls2j9UH9QbVOXcpVtc10ImJV81XffkBD9KKfBBtUzHQLfU/+6gtD+L/PhpPDJ573iGTVtSZDqQ9UfnH16NDWsfQRYI7hyBDOUAl6KXMLlxKZEclWFkkSLTq6j0anXXNxYNTr84GjqKcnGb2fQU/4fKTYidYEv2ObSNRH2VbStD9atara5VjeUSsbh5u4QSGB+k8SkAkCOS3ZX7JsIiNSQttXBMcBOoFQa/atn8QQylutlJD+yRp2ry34gziFDZjPLYYo8Up8FwD3jlbV0Hr6EN4O8HwZfbGurfr/qLjChe8Pw== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dufGPiTLM+XSXjCLbQfoTWyjBMv4ImJjr7YlhkwJ+zA=; b=FKLCIgmRDZ8AMgBoN8Vyszn6yVsaYQ2FnoOksWsipfCCO4kdW5TF76EouJsCTu6kGxbuvOxfCanuPyVT+AiRb9ZF/984RpkY28EI11yVU4vI/eIoa0RgBwYIj08c1uSs3n9amzdGYliTMhrxF8yvTFB6NTeCphOHQB5p8M6Y3KY= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB6015.namprd04.prod.outlook.com (20.178.246.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.10; Tue, 16 Jul 2019 04:21:49 +0000 Received: from MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::8814:b9b0:47f5:2633]) by MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::8814:b9b0:47f5:2633%7]) with mapi id 15.20.2073.012; Tue, 16 Jul 2019 04:21:49 +0000 From: Anup Patel To: Rick Chen , Bin Meng , Lukas Auer , Peng Fan , Jagan Teki , Oleksandr Zhadan and Michael Durrant Thread-Topic: [PATCH v4 0/4] SiFive SPI MMC Support Thread-Index: AQHVO438C6zyhkcRvE2roYL0iHolLw== Date: Tue, 16 Jul 2019 04:21:49 +0000 Message-ID: <20190716042120.32548-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MA1PR01CA0082.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00::22) To MN2PR04MB6061.namprd04.prod.outlook.com (2603:10b6:208:d8::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Anup.Patel@wdc.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [129.253.179.161] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bcbf14f3-12d3-4319-d49e-08d709a51f4b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:MN2PR04MB6015; x-ms-traffictypediagnostic: MN2PR04MB6015: x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 0100732B76 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6029001)(4636009)(136003)(39860400002)(376002)(396003)(366004)(346002)(199004)(189003)(14444005)(386003)(52116002)(6506007)(66946007)(26005)(186003)(66066001)(6486002)(86362001)(66556008)(66446008)(3846002)(6116002)(64756008)(2616005)(68736007)(66476007)(478600001)(486006)(256004)(44832011)(476003)(8676002)(2906002)(99286004)(6436002)(7416002)(53936002)(5660300002)(6512007)(305945005)(71190400001)(316002)(14454004)(50226002)(54906003)(36756003)(4326008)(1076003)(71200400001)(7736002)(110136005)(81156014)(102836004)(25786009)(81166006)(8936002); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR04MB6015; H:MN2PR04MB6061.namprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 8fDFmfk/U52W8DsQkQDnbkKH5R4tFq17/kAQ0x+hYGQEL0IBoeuFcrdhs5QkmG0ULn3hPU10/P1tzg5jnnKua4/HGHAXgS5tr2MSNO7IhSQEAVbVUPAScEDk20RWU7pIHI5lF1QamSGdcVdBBqvoobuqGVx/sqhS844Y4vEJhFrY4uNMNe+cXcFLST/SvQoQ/z/Uj4qhYnRt3xHMSJs2bYPnZq++wFCRU2xBmWWRXaUpIqZ9BpULktpeo53FNiuoSQqW3ZnUR/39IQeJXg5gwfUCisLaB++KHKNK91KRWRxiDx1fdhURIE8OkJPqkb+CS3PL9IJRfavIRtxWbKv2z+BaNjZVJN8tYg7f8lUQHMP+6AMFPmQnJ8VHUzp/WHZw8GH2exq5kzKh6FckJ/+SVs0vJ/A0R8ds41WIc9zcM5w= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: bcbf14f3-12d3-4319-d49e-08d709a51f4b X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2019 04:21:49.7870 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Anup.Patel@wdc.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB6015 Cc: Palmer Dabbelt , U-Boot Mailing List Subject: [U-Boot] [PATCH v4 0/4] SiFive SPI MMC Support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patchset adds: 1. SiFive SPI driver 2. New MMC SPI driver based on DM_MMC and DM_SPI 3. Enables SiFive SPI driver and MMC SPI driver for SiFive Unleashed board With this patch series, we can now load files from SD card on SiFive Unleashed board. Many thanks to Bhargav for porting SiFive SPI driver and updating MMC SPI driver for us. These patches can be also found in riscv_unleashed_mmc_spi_v4 branch of: https//github.com/avpatel/u-boot.git Changes since v3: - Removed PATCH2, PATCH3, and PATCH4 because these are already merged - Added separate patch to use SPI_XFER_xyz flags in MMC_SPI driver - Use readl/writel directly instead of sifive_spi_read/sifi_spi_write - Use SPI_XFER_xyz flags to enable/disable chipselect - Remove unused callback sifive_spi_cs_info() Changes since v2: - Minor fixes in PATCH1 which adds SiFive SPI driver - Removed CONFIG_MMC_SPI_xyz from scripts/config_whitelist.txt - Removed cmd/mmc_spi and all its refrences as separate patch - Removed DM_SPI and DM_MMC from SiFive FU540 Kconfig Changes since v1: - Make response matching part belongs to mmc_spi_sendcmd() - Match response to zero for SEND_STATUS (CMD13) - Add separate patch for updating SiFive FU540 Documentation Anup Patel (2): mmc: mmc_spi: Use SPI_XFER_BEGIN and SPI_XFER_END flags doc: sifive-fu540: Update README for SiFive SPI and MMC SPI drivers Bhargav Shah (2): spi: Add SiFive SPI driver riscv: sifive: fu540: Enable SiFive SPI and MMC SPI drivers board/sifive/fu540/Kconfig | 6 + doc/README.sifive-fu540 | 4 +- drivers/mmc/mmc_spi.c | 4 +- drivers/spi/Kconfig | 8 + drivers/spi/Makefile | 1 + drivers/spi/spi-sifive.c | 361 +++++++++++++++++++++++++++++++++++++ 6 files changed, 380 insertions(+), 4 deletions(-) create mode 100644 drivers/spi/spi-sifive.c --- 2.17.1