From patchwork Fri Jun 28 08:38:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1124044 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="EsGBoHfE"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="V7YkI4VJ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45Zqsx70dLz9s3C for ; Fri, 28 Jun 2019 18:38:29 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 88F56C21DD3; Fri, 28 Jun 2019 08:38:27 +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 1A974C21C2F; Fri, 28 Jun 2019 08:38:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 842B2C21C29; Fri, 28 Jun 2019 08:38:23 +0000 (UTC) Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by lists.denx.de (Postfix) with ESMTPS id C143AC21C27 for ; Fri, 28 Jun 2019 08:38:22 +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=1561711103; x=1593247103; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=qxMLr14Gy/D0RRGDWM3liLftJlawyXn3RyoOEkLCoe8=; b=EsGBoHfEnElLKuLdZKXty+jof7yCLJR895yD0r0h0bNrwierCvoHvPpH 6PTg8blX7+7w8w3vYHTr3raEHK2WQqTw2yEqha++Ru2fUU44v2Mm8Svrw 6ll5msyHIxqBNXe4FJP97IJH1RPnhmilcoa7SrsqBOpHK1pc7xWuANZQW XB7dHfoQdRUPxKnYHjGa66zMGgjnqI7MTJlhgDPqPtgkWwLk9yoDpAM1P X95t735Ap5wGH/SgyAXP6CGNz6Bgyxajs5xRyB6aF/xcc+LMbUTwrVHwP OGE9dOiiKDufmeEYfwVo56wSClxUrTl7XhWQH11FvoMp4Qn/XWBnDFMS1 w==; X-IronPort-AV: E=Sophos;i="5.63,427,1557158400"; d="scan'208";a="113402069" Received: from mail-by2nam05lp2051.outbound.protection.outlook.com (HELO NAM05-BY2-obe.outbound.protection.outlook.com) ([104.47.50.51]) by ob1.hgst.iphmx.com with ESMTP; 28 Jun 2019 16:38:19 +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=qxMLr14Gy/D0RRGDWM3liLftJlawyXn3RyoOEkLCoe8=; b=V7YkI4VJSG8nfouAenrtt6E0sVD7fr6r0xFuREHKBMiAM0dLh3dZulEYX6O5FQ1hhnt/T/Ock0qpMu6CFiW1hiPW6+Tp5X5exW6CV2uO88hcxiWeeYu5zh834sYtReUM6OpXU4MmFDjHb+WSXRiZorqB/55QFft5UyCNlrKVEsA= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB6205.namprd04.prod.outlook.com (20.178.245.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.18; Fri, 28 Jun 2019 08:38:18 +0000 Received: from MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::84da:b4e7:4612:48b]) by MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::84da:b4e7:4612:48b%7]) with mapi id 15.20.2032.018; Fri, 28 Jun 2019 08:38:18 +0000 From: Anup Patel To: Rick Chen , Bin Meng , Lukas Auer , Peng Fan , Jagan Teki Thread-Topic: [PATCH 0/4] SiFive SPI MMC Support Thread-Index: AQHVLYzVJrk3Jp+pdEKsvx6/vYijMA== Date: Fri, 28 Jun 2019 08:38:17 +0000 Message-ID: <20190628083752.64346-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PN1PR01CA0073.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::13) 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: [49.207.53.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ff3ae628-4a32-41db-0ec5-08d6fba3f7bf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:MN2PR04MB6205; x-ms-traffictypediagnostic: MN2PR04MB6205: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 00826B6158 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6029001)(4636009)(346002)(376002)(39860400002)(396003)(366004)(136003)(189003)(199004)(476003)(2616005)(7416002)(8676002)(44832011)(52116002)(68736007)(486006)(1076003)(81156014)(81166006)(7736002)(6512007)(71190400001)(6436002)(71200400001)(73956011)(66556008)(64756008)(66446008)(66476007)(305945005)(66946007)(8936002)(3846002)(6116002)(53936002)(5660300002)(6486002)(256004)(2906002)(54906003)(110136005)(316002)(478600001)(72206003)(14454004)(86362001)(25786009)(66066001)(99286004)(4326008)(26005)(55236004)(386003)(6506007)(102836004)(186003)(36756003)(50226002); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR04MB6205; 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: d5Gu5kz58EJ7EJVurc417y+nUcngOkked8iLDbAh9/J9gyDuJz/dT/ZS235cgPZ0cgDgRxsg6X7l/H8VzQa6l4f9rbzoLvOBYvMOx8JeNL/O3ow9xJ5je+FgoESgyPOQ2Ya3CEyKuiSmvKQpHXS22vFmZJBT7vFU9UyiEqsbzQ7GNezSDJpWYxCWxM9jTRL5eHGzICQRnfyiRqSsGKkt0UOc19jBWKLfRvboUHQVqVWhMlAXpqUQHzdhmk9h9ZDR3kzHBMfaIA826i/d5ZZy0iUEfl1x/P4eARhNTGjbBfBjndPOCEtVrZT0RfQ1KaH2TPEeuhJaANh0wIEzeF1Wehyyl8tODqDTR3nYLOFslxny7icCUFsCANtQVjb5fRehVAHOWZDAwDqN6MoMO8RRtPi+HKeyFdjXXYK9G4Vh3eA= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff3ae628-4a32-41db-0ec5-08d6fba3f7bf X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2019 08:38:17.9705 (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: MN2PR04MB6205 Cc: Palmer Dabbelt , U-Boot Mailing List , Bhargav Shah Subject: [U-Boot] [PATCH 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_v1 branch of: https//github.com/avpatel/u-boot.git Anup Patel (1): mmc: skip select_mode_and_width for MMC SPI host 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 | 8 + drivers/mmc/Kconfig | 18 ++ drivers/mmc/mmc.c | 14 ++ drivers/mmc/mmc_spi.c | 455 +++++++++++++++++++++++-------------- drivers/spi/Kconfig | 8 + drivers/spi/Makefile | 1 + drivers/spi/spi-sifive.c | 405 +++++++++++++++++++++++++++++++++ 7 files changed, 742 insertions(+), 167 deletions(-) create mode 100644 drivers/spi/spi-sifive.c --- 2.17.1