From patchwork Wed Jul 17 03:50:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1133069 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="K5vEWIyI"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="eFyz34vn"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45pNb36708z9sBF for ; Wed, 17 Jul 2019 13:50:39 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2B865C21DF8; Wed, 17 Jul 2019 03:50:38 +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 0C201C21C3F; Wed, 17 Jul 2019 03:50:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F195AC21C3F; Wed, 17 Jul 2019 03:50:34 +0000 (UTC) Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by lists.denx.de (Postfix) with ESMTPS id 3429DC21C27 for ; Wed, 17 Jul 2019 03:50:34 +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=1563335434; x=1594871434; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=272szKmYQKWkGhYJv843uPVl/YLoVni0DhUzIPqYoWw=; b=K5vEWIyILcr8yo6u7CE+yg6bSqVGxpL6ozMN4Iqj3KvQaSycZ8LEpfnz QNgQzbYd1vPtyZmUupm1A+ciFqvKDU5OQw6Hi3rHnkiRVyJacvWZeso2U pECNbn43hzE3fDbMyDN55Ck5U/PsO8MVsM92piNUJ08VkNFfEVxKDmHw7 VQG7urOLZLPW6RbHgu6Q2EwaMQvp/C/y9b5GqjFAfJu9m8OyNqBeQ7sWH 6ATFeyTWwiqv8QMO091+WJtSTagDxNi3B7y6ZskP1SK+sK/U/N4xyUVr2 b71hhCm+iXy/MD9L+rEcXJaCbhVl7YT71NTyOK2Zw7b2mWMrX5C2pdx/E A==; IronPort-SDR: Z7AMwc2I67YfCgBGLia12FC6uatoNac/dg+TatU+ZuU4NuLb0WsIMQL7qv0yUCeDyfKUpH6lNg sXIaa03YvEDBBvJQF41URD6H6Xql3ivC66Aq2xF8xvmoqUyzukcf9/vRS1lNgGuvyXu0AqiErE t2UBY/W0zZG8I3BhQdpv75Ulf2O5bdft3ZKlPRAHlzWq/UgG8fXP73PB4CENnKrSu5RvcNgcNp p6z4EWEhIAqrRfKX3SqAGCj3YG3s6t1OXdfUxMh3BaWjTpbkDXPVDd2S9S7SaJncuXCsrclAr9 up0= X-IronPort-AV: E=Sophos;i="5.64,272,1559491200"; d="scan'208";a="114369338" Received: from mail-dm3nam03lp2057.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([104.47.41.57]) by ob1.hgst.iphmx.com with ESMTP; 17 Jul 2019 11:50:30 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cita4jAnKCc1zvRnnFJmIarDFF89ZPKGQOoy08DCSngmuTOtZYzIH7CW+aknedSlK8p2xqzQTyWYgGYgXHXZVus7A3vjVk+zlInmr04F1le/4DDOvj/bjAovWlKcUF7pKuYg8WtXe0JxU1gufG0S+jbLqvnifo/vzLjr1yIdlcLG/lbkpAYKeXMCDR0sSYjXm7GHGBzLMZhvlvsiFkeB9iebrvtT3NXcdeO4mrXv9K2/Z8laX+pkVXSfWgylqXUOqnkPMtG7dBd3Pr9DTZ1RJlxG32hOhw6RchXWPsETfybVvd6yTPapOg9Y8+acRPCxdZQUEZZTlfS1NmfXo8kTbg== 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=6lHuEV/GFmuAMrSCz5HWfL1pMIxior/Dw8rcV9g7wsA=; b=SOlhLmNJMLiTa1iiX1oKshcj/OdGRlPzoTzWn3usTSzawc202Gccgd4XIkWI9bvviCzjDsCY+pHJaPLkHsCcd1Q/fFDax6VVPm6Xu7eJMJw/ndXasWB1HfW1/ar1KcykP5l5EKSD4grEiETyp1/7bcHRSkgyaI7UTaZB3UoFB1l4diJ6/JWz/TxPlGqD7i2eimWYj39aGSjIDkNievOIVDvBk20Tz0PtzQdiX9TY6NQRIOoYIHaY7SUBexdD4YjyFfGw8tIAffJKl4gYJiGIgZHMn1syfLJ9jID/QtytPRWsVqF7QHvMr0T3HaDo41QZZJPxsBYan+U/xTzQcheyaA== 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=6lHuEV/GFmuAMrSCz5HWfL1pMIxior/Dw8rcV9g7wsA=; b=eFyz34vnFD5QLAJgoaOhQwSFUvYyJWX8e0ypLw7mEaSCJBa9EbUJtSKImA+xzGTTjtCNiNYl6ac/D8aQ6mG7Wr28tNQmfzA646JX0ditd6/uUBuaziL+NSjBUdy3HhGagixGH/r+NcyJ54COWDQ2hrSWIlzcanViW3sP6rRoens= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB5630.namprd04.prod.outlook.com (20.178.255.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.14; Wed, 17 Jul 2019 03:50:28 +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; Wed, 17 Jul 2019 03:50:28 +0000 From: Anup Patel To: Rick Chen , Bin Meng , Lukas Auer , Peng Fan , Jagan Teki , Oleksandr Zhadan and Michael Durrant Thread-Topic: [PATCH v5 0/4] SiFive SPI MMC Support Thread-Index: AQHVPFLGItgwOn+YEEeVMId0HnXJag== Date: Wed, 17 Jul 2019 03:50:28 +0000 Message-ID: <20190717035006.16634-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MA1PR0101CA0071.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::33) 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: 5e18bc92-9dfb-4ec2-ec33-08d70a69e86f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:MN2PR04MB5630; x-ms-traffictypediagnostic: MN2PR04MB5630: x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 01018CB5B3 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6029001)(4636009)(39860400002)(136003)(366004)(396003)(376002)(346002)(189003)(199004)(52116002)(4326008)(2906002)(14444005)(6486002)(305945005)(7736002)(7416002)(256004)(316002)(14454004)(6436002)(476003)(2616005)(54906003)(110136005)(44832011)(26005)(68736007)(186003)(6506007)(386003)(102836004)(486006)(53936002)(1076003)(66066001)(64756008)(66556008)(66446008)(66476007)(66946007)(36756003)(25786009)(478600001)(6116002)(8676002)(71200400001)(71190400001)(6512007)(81166006)(81156014)(99286004)(86362001)(50226002)(5660300002)(3846002)(8936002); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR04MB5630; H:MN2PR04MB6061.namprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: hosIhoy40P3zgGMvuJW0/s/98RYCMFu17JvWriAPtMjwyPr5anE0Fp+vs886qhd93ahxhlXENoK40xaHfWawApU77My50XylG5d4OQbFt6Xfv4ZLoiX4uVIj9NfD6n1SlRElch6tiBv4BvDiPqvM2EIh/PTS9b/HonX8qhRtyIfDaZfxJc7/htZmRgdx1LTaBFc9Jf8524wXIfv50mT6fa2Xk5m9wCyLrJCNX3n4OBAdpP7eej90NtBGghJJatmUBfLyMywdipE4a44AH63Up2Qt0cKUZdbJ7VLnj5qHrHYlEMqRCErFxcp8gA1+55trXP3+8IwrNIAITFTS5IoxqPXkC9UXRhHL1k6yKvf5zd8RHuQ29OumeYzaMkiSpzrxgra4MpKI+/tSEbsdzceRmOPw973lqxrtQHlVqzj9duo= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e18bc92-9dfb-4ec2-ec33-08d70a69e86f X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2019 03:50:28.5196 (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: MN2PR04MB5630 Cc: Palmer Dabbelt , U-Boot Mailing List Subject: [U-Boot] [PATCH v5 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_v5 branch of: https//github.com/avpatel/u-boot.git Changes since v4: - Renamed kconfig option from SIFIVE_SPI to SPI_SIFIVE for consistency - Added dummy claim_bus() and release_bus() callbacks 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 | 375 +++++++++++++++++++++++++++++++++++++ 6 files changed, 394 insertions(+), 4 deletions(-) create mode 100644 drivers/spi/spi-sifive.c --- 2.17.1