From patchwork Mon Jul 8 04:10:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1128861 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="odwJQ5nn"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="vZd1THoW"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45hsSM0Fcbz9s3l for ; Mon, 8 Jul 2019 14:10:42 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9EBF5C21DED; Mon, 8 Jul 2019 04:10:39 +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 E8CE1C21C50; Mon, 8 Jul 2019 04:10:37 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DD68FC21C50; Mon, 8 Jul 2019 04:10:36 +0000 (UTC) Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by lists.denx.de (Postfix) with ESMTPS id 19F3AC21BE5 for ; Mon, 8 Jul 2019 04:10:35 +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=1562559037; x=1594095037; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=tDmmpWuGpXevolairAmC0OfplsJpyQ3TWVgxfPOYOak=; b=odwJQ5nn315iL629U0L7Nvodb0EZDmbpqzi5xtxKbVOBIfcGDpUKrkUL pKKue9GWsBXEWVP5kwQoMDtAEhGNoiRitHQTjTbN2zllOC+FCTqm6qO18 /jnvXUKcXgFlcP03kHovIxfPudvGRxLnVXsKB8R/Ws9OjEJa2g9GVXLGR dmolEb0WUdrJYZ4tSAxiIpeXz5ewOqvrX1e2nlnHFyU+CeAQ3Pqu6JrU5 bfcul1MrLCfppiLO5up1whYFL33lT/fY3LcDAy0MbGVmosYkUsvumKdZQ E0OHsVCcWGqj7WSQ9VPd1j8D/uKXAqqo7az0j+aorMbE6LJnUYnRrGeUq g==; IronPort-SDR: I0TTYLjah2Vs8T9WgirOYkvo6/c0BkaSterGHM51CBMY65sMOAbtVJ9+ChU304//DPe0VurGyd wgEbqG9tPoQP2/jud5WC60LA0jnBUerGbuHpg1EFMrQMykH4BWKOpnfFCu1WTJhjcvM4ELlBeV QQ9PYZtPQIwVnef8WgF8SsIJNV6SFL4hoVXlXtgqf2uXVwkYfnpkPt/0HZx43HNC+8qcysSpT2 5MIIxkxxkOlN04gXvFxSCh6IddAVdFY0Hx08bD/z1SBd5rpwXK1ufMFPlUxEMOiFQRndOXlBEM 7F4= X-IronPort-AV: E=Sophos;i="5.63,465,1557158400"; d="scan'208";a="112409368" Received: from mail-by2nam01lp2058.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) ([104.47.34.58]) by ob1.hgst.iphmx.com with ESMTP; 08 Jul 2019 12:10:34 +0800 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=kVX1GwQ0kFFdvxrRKU2rnOeFEwm7iIgapf2DMlOkGyQ=; b=vZd1THoW/1ezAB9W/6tbmZgOgYAlNm8CgVGLjW2Feo219+1Gv3KUooXti4kUIc/+Q2BwAIEu23yrfBZ5dCgL2PYpZydWamemImLVCuINc+WEPHz1ssYx66n2PyQPeVLGEf5OWACYY11YLwEQ7lMaDgC3N7b0M5rvZCGgUkXxJ6U= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB6720.namprd04.prod.outlook.com (10.186.145.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18; Mon, 8 Jul 2019 04:10:32 +0000 Received: from MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::1d4a:f9e2:5761:dcb9]) by MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::1d4a:f9e2:5761:dcb9%3]) with mapi id 15.20.2052.020; Mon, 8 Jul 2019 04:10:32 +0000 From: Anup Patel To: Rick Chen , Bin Meng , Lukas Auer , Peng Fan , Jagan Teki , Oleksandr Zhadan and Michael Durrant Thread-Topic: [PATCH v3 0/6] SiFive SPI MMC Support Thread-Index: AQHVNUMVfmpOqPuN3UyFuBK0+1M+ZQ== Date: Mon, 8 Jul 2019 04:10:32 +0000 Message-ID: <20190708041004.6252-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MA1PR01CA0076.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00::16) 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: 7e0ee29c-4c0b-49da-46c1-08d7035a380f 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:MN2PR04MB6720; x-ms-traffictypediagnostic: MN2PR04MB6720: x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 00922518D8 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6029001)(4636009)(366004)(376002)(346002)(136003)(396003)(39860400002)(189003)(199004)(6506007)(386003)(14444005)(256004)(110136005)(478600001)(52116002)(81166006)(81156014)(8936002)(54906003)(26005)(6486002)(72206003)(6436002)(6512007)(316002)(53936002)(102836004)(4326008)(36756003)(5660300002)(66476007)(7736002)(1076003)(66556008)(3846002)(64756008)(66446008)(6116002)(305945005)(73956011)(66946007)(7416002)(486006)(68736007)(14454004)(44832011)(99286004)(66066001)(2906002)(186003)(86362001)(71190400001)(71200400001)(2616005)(25786009)(50226002)(8676002)(476003); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR04MB6720; 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: KcQK8MYe7+9fvnuSblZuR76KywbkXtof2tkmS9Lxm2960PE6/TQkx2JjuIqx/4iiHqxzU+ja+f54MeHoT5Na51fwKtLz/wrT2ZaBAKvPZbiIRHwIAVRetlM26RSdJcwP0uXMpzQLW4sFfusAnRVTp+IjAcjuAf0nEeRyu/3olJ4bAiKuXGurbrJla2zgOkzDUh8jBjDjh67mxw+4WeF3e9KIsc71b8pX8tn6uoKJz1CbNjatt+VhwFgzfO+1g0vKAiFKg5X06xRldMATY4ZfSiiOhZhBKDATRhYWuISXJ4kRru5mi3qd35k0pC+MrUD/yyRpzotTl8mFWU6gJIk5Q62EhRHTdDw3zQdrcqzdo1RQ5LI6jAkfSZ5Ap8uh0xJlktBYUNxiCYDNlQUu+wjxS5y2WSnFmfEMz5hiZOZoeyw= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e0ee29c-4c0b-49da-46c1-08d7035a380f X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jul 2019 04:10:32.1787 (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: MN2PR04MB6720 Cc: Palmer Dabbelt , U-Boot Mailing List Subject: [U-Boot] [PATCH v3 0/6] 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_v3 branch of: https//github.com/avpatel/u-boot.git 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 (3): mmc: skip select_mode_and_width for MMC SPI host cmd: Remove mmc_spi command doc: sifive-fu540: Update README for SiFive SPI and MMC SPI drivers Bhargav Shah (3): spi: Add SiFive SPI driver mmc: mmc_spi: Re-write driver using DM framework riscv: sifive: fu540: Enable SiFive SPI and MMC SPI drivers board/sifive/fu540/Kconfig | 6 + cmd/Kconfig | 9 - cmd/Makefile | 1 - cmd/mmc_spi.c | 88 ------ configs/UCP1020_SPIFLASH_defconfig | 1 - configs/UCP1020_defconfig | 1 - doc/README.sifive-fu540 | 4 +- drivers/mmc/Kconfig | 18 ++ drivers/mmc/mmc.c | 14 + drivers/mmc/mmc_spi.c | 469 +++++++++++++++++++---------- drivers/spi/Kconfig | 8 + drivers/spi/Makefile | 1 + drivers/spi/spi-sifive.c | 403 +++++++++++++++++++++++++ include/configs/UCP1020.h | 1 - include/mmc.h | 1 - scripts/config_whitelist.txt | 6 - 16 files changed, 753 insertions(+), 278 deletions(-) delete mode 100644 cmd/mmc_spi.c create mode 100644 drivers/spi/spi-sifive.c --- 2.17.1