From patchwork Mon Jul 8 04:10:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1128866 X-Patchwork-Delegate: van.freenix@gmail.com 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="rIKrQ4ub"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="iLHyiEPv"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45hsW03F28z9s3l for ; Mon, 8 Jul 2019 14:13:00 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 176AAC21DF3; Mon, 8 Jul 2019 04:11:59 +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 60E5FC21DA6; Mon, 8 Jul 2019 04:11:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8F948C21E0F; Mon, 8 Jul 2019 04:11:05 +0000 (UTC) Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by lists.denx.de (Postfix) with ESMTPS id EC4FFC21E07 for ; Mon, 8 Jul 2019 04:10:58 +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=1562559059; x=1594095059; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=F8SxBOGDrcQFtPWK6uBKMOCPtOjA8BZUcc2SGWBGAdo=; b=rIKrQ4ubVE7K7GBdLCTDyNqNKBnYnV5mM/9Qd63/kC/W50vZ8awy0Qw+ ddpE501wYgf6nX3dqQfbp0iEFQGqhgjIa0c0D20LfwRyB09dfeili85og AAXSR3AM9l/sgck7zoSmX+D+jp4GVOG04vUN7j0eu7KJwoj3BNIJgHR5G sWjtE6HzrszUiZbMAVmIHRtLafZfXFaGwS063TUHoReggVKQRPRMB/0Hg 26W8jrjiy84chRdkKpDnWjoq1X+50CqxOYDoozGZwvx1tYPTEnG+Ammlt QzV7dKqE51qeih/vfsfWZCL4biH8Ar4TIzXYbPZc/cxubNJQNrXUTD3ko w==; IronPort-SDR: PkTRSl8Y60pdn4nio7oYTcBdsitfQAUFRRJSXsheOd1rAZt9mx/+/DUsgL/JQKAkC6VnAf1DVB +GSCYbpBUPJE4HuWIAcltXp23+3R7RrYQ1nesWS+rGi/jkx+LbmLKwBEdkqAmkkLLe0KboH+JZ xXUuq+rLdILw+gGkkZXehSyuax/W7os3t8mO281KBzY1gSzF/L+2eOgFE9t7LQo0Aj1GsI9DSb tsnqhBhpFxHIJqAelwqcui+wL+tjGO/bZg2M6JA9xFI2u2ayCQXUGCKueaAywSDaP9KkcaO3/c Gsg= X-IronPort-AV: E=Sophos;i="5.63,465,1557158400"; d="scan'208";a="112409378" Received: from mail-sn1nam04lp2050.outbound.protection.outlook.com (HELO NAM04-SN1-obe.outbound.protection.outlook.com) ([104.47.44.50]) by ob1.hgst.iphmx.com with ESMTP; 08 Jul 2019 12:10:57 +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=Kfzmd3j5CtWJNGxB5cDU64RSb7e3AO4NdfOJTLMFqvo=; b=iLHyiEPvV/jVv1DCvYRd2xH+TnI66bRvkpMHEmRmN+NoanpiiLlaIWDSLPbgt9065XtGx193mkuRcHYhFSR/ZGNJuDC4VxarjUhiYkZJ5qKPFhDg6+susd39ptEBSKa3lq0DzjUfRFEDaQfk/stqaImv4XI1VK+BeoME/bunBRg= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB6864.namprd04.prod.outlook.com (10.186.145.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.19; Mon, 8 Jul 2019 04:10:55 +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:55 +0000 From: Anup Patel To: Rick Chen , Bin Meng , Lukas Auer , Peng Fan , Jagan Teki , Oleksandr Zhadan and Michael Durrant Thread-Topic: [PATCH v3 4/6] cmd: Remove mmc_spi command Thread-Index: AQHVNUMjq6Vwr/GhQUC2uuxBEEpONA== Date: Mon, 8 Jul 2019 04:10:55 +0000 Message-ID: <20190708041004.6252-5-anup.patel@wdc.com> References: <20190708041004.6252-1-anup.patel@wdc.com> In-Reply-To: <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: e0958754-98d6-44d3-7c04-08d7035a45eb 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:MN2PR04MB6864; x-ms-traffictypediagnostic: MN2PR04MB6864: 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)(4636009)(346002)(366004)(396003)(39860400002)(376002)(136003)(199004)(189003)(110136005)(54906003)(6116002)(3846002)(6512007)(53936002)(4326008)(72206003)(25786009)(6486002)(478600001)(6436002)(36756003)(68736007)(66066001)(316002)(6506007)(386003)(52116002)(102836004)(76176011)(50226002)(99286004)(186003)(26005)(476003)(2616005)(11346002)(71200400001)(446003)(71190400001)(5660300002)(81156014)(486006)(8676002)(7416002)(14444005)(81166006)(66556008)(86362001)(8936002)(73956011)(66946007)(2906002)(1076003)(66476007)(64756008)(66446008)(7736002)(256004)(305945005)(14454004)(44832011); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR04MB6864; 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: MBwip6C6jHOE74pVitVJMBA+GCeW9/U0GBYjLnbDJzh1QSqf7VWFeOZ4PI+cmVeWps4mVFeWd5iGmFRGte8JTMFGoV2vELXP2YB5K9AcevLrMzZ1S+k+PH2StjPnVsbOfkpO0fKPoFE8HPDwHdmezKXd9bBux5/A+74ndTQ/K0GZvfEKwK9tZ9qIE99eJNQRl8KSkGTJSP+P7OPHk8UpaDUohRK4ObvQA7Dyn0GEpUouEsBCLFTOW/SXFps5A9mC9CiqCoTjHCaqG72tWaN853pi5KS2efacKsed2YC7uaWHMvvS7M1Ql4kfwnGqTVqKerWbSouDmYCZ/mFEgbSiUExBUbEnbqmu0L55PuH/XyScR47btWv7oIub8/ngDNFAB5+0DKG2LE8SYaNsBNurHzW2nlxDKBwBGd+kpSLb3zA= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: e0958754-98d6-44d3-7c04-08d7035a45eb X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jul 2019 04:10:55.3553 (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: MN2PR04MB6864 Cc: Palmer Dabbelt , U-Boot Mailing List Subject: [U-Boot] [PATCH v3 4/6] cmd: Remove mmc_spi command 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" The mmc_spi command was added to manually setup MMC over SPI bus using command. This was required by the legacy non-DM MMC_SPI driver. With DM based MMC_SPI driver in-place, we can now use all general storge commands and mmc command for MMC over SPI bus hence we remove the mmc_spi command all it's references. Suggested-by: Bin Meng Signed-off-by: Anup Patel Reviewed-by: Bin Meng --- cmd/Kconfig | 9 --- cmd/Makefile | 1 - cmd/mmc_spi.c | 88 ------------------------------ configs/UCP1020_SPIFLASH_defconfig | 1 - configs/UCP1020_defconfig | 1 - include/configs/UCP1020.h | 1 - include/mmc.h | 1 - 7 files changed, 102 deletions(-) delete mode 100644 cmd/mmc_spi.c diff --git a/cmd/Kconfig b/cmd/Kconfig index 0badcb3fe0..2cdde28cbe 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -925,15 +925,6 @@ config CMD_NVME help NVM Express device support -config CMD_MMC_SPI - bool "mmc_spi - Set up MMC SPI device" - help - Provides a way to set up an MMC (Multimedia Card) SPI (Serial - Peripheral Interface) device. The device provides a means of - accessing an MMC device via SPI using a single data line, limited - to 20MHz. It is useful since it reduces the amount of protocol code - required. - config CMD_ONENAND bool "onenand - access to onenand device" help diff --git a/cmd/Makefile b/cmd/Makefile index f982564ab9..9fc8df9004 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -92,7 +92,6 @@ obj-$(CONFIG_CMD_MII) += mdio.o endif obj-$(CONFIG_CMD_MISC) += misc.o obj-$(CONFIG_CMD_MMC) += mmc.o -obj-$(CONFIG_CMD_MMC_SPI) += mmc_spi.o obj-$(CONFIG_MP) += mp.o obj-$(CONFIG_CMD_MTD) += mtd.o obj-$(CONFIG_CMD_MTDPARTS) += mtdparts.o diff --git a/cmd/mmc_spi.c b/cmd/mmc_spi.c deleted file mode 100644 index 0c44d06817..0000000000 --- a/cmd/mmc_spi.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Command for mmc_spi setup. - * - * Copyright (C) 2010 Thomas Chou - * Licensed under the GPL-2 or later. - */ - -#include -#include -#include - -#ifndef CONFIG_MMC_SPI_BUS -# define CONFIG_MMC_SPI_BUS 0 -#endif -#ifndef CONFIG_MMC_SPI_CS -# define CONFIG_MMC_SPI_CS 1 -#endif -/* in SPI mode, MMC speed limit is 20MHz, while SD speed limit is 25MHz */ -#ifndef CONFIG_MMC_SPI_SPEED -# define CONFIG_MMC_SPI_SPEED 25000000 -#endif -/* MMC and SD specs only seem to care that sampling is on the - * rising edge ... meaning SPI modes 0 or 3. So either SPI mode - * should be legit. We'll use mode 0 since the steady state is 0, - * which is appropriate for hotplugging, unless the platform data - * specify mode 3 (if hardware is not compatible to mode 0). - */ -#ifndef CONFIG_MMC_SPI_MODE -# define CONFIG_MMC_SPI_MODE SPI_MODE_0 -#endif - -static int do_mmc_spi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ - uint bus = CONFIG_MMC_SPI_BUS; - uint cs = CONFIG_MMC_SPI_CS; - uint speed = CONFIG_MMC_SPI_SPEED; - uint mode = CONFIG_MMC_SPI_MODE; - char *endp; - struct mmc *mmc; - - if (argc < 2) - goto usage; - - cs = simple_strtoul(argv[1], &endp, 0); - if (*argv[1] == 0 || (*endp != 0 && *endp != ':')) - goto usage; - if (*endp == ':') { - if (endp[1] == 0) - goto usage; - bus = cs; - cs = simple_strtoul(endp + 1, &endp, 0); - if (*endp != 0) - goto usage; - } - if (argc >= 3) { - speed = simple_strtoul(argv[2], &endp, 0); - if (*argv[2] == 0 || *endp != 0) - goto usage; - } - if (argc >= 4) { - mode = simple_strtoul(argv[3], &endp, 16); - if (*argv[3] == 0 || *endp != 0) - goto usage; - } - if (!spi_cs_is_valid(bus, cs)) { - printf("Invalid SPI bus %u cs %u\n", bus, cs); - return 1; - } - - mmc = mmc_spi_init(bus, cs, speed, mode); - if (!mmc) { - printf("Failed to create MMC Device\n"); - return 1; - } - printf("%s: %d at %u:%u hz %u mode %u\n", mmc->cfg->name, - mmc->block_dev.devnum, bus, cs, speed, mode); - mmc_init(mmc); - return 0; - -usage: - return CMD_RET_USAGE; -} - -U_BOOT_CMD( - mmc_spi, 4, 0, do_mmc_spi, - "mmc_spi setup", - "[bus:]cs [hz] [mode] - setup mmc_spi device" -); diff --git a/configs/UCP1020_SPIFLASH_defconfig b/configs/UCP1020_SPIFLASH_defconfig index a2d7e6622a..cb8ed47f5b 100644 --- a/configs/UCP1020_SPIFLASH_defconfig +++ b/configs/UCP1020_SPIFLASH_defconfig @@ -21,7 +21,6 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y # CONFIG_CMD_NAND is not set -CONFIG_CMD_MMC_SPI=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y diff --git a/configs/UCP1020_defconfig b/configs/UCP1020_defconfig index 0a676d48c9..a0ffd35c3a 100644 --- a/configs/UCP1020_defconfig +++ b/configs/UCP1020_defconfig @@ -21,7 +21,6 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y # CONFIG_CMD_NAND is not set -CONFIG_CMD_MMC_SPI=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h index b518c222d4..6e0a6a11b3 100644 --- a/include/configs/UCP1020.h +++ b/include/configs/UCP1020.h @@ -386,7 +386,6 @@ #ifdef CONFIG_MMC #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR -#define CONFIG_MMC_SPI #endif /* Misc Extra Settings */ diff --git a/include/mmc.h b/include/mmc.h index 1f30f71d25..b854e9f33a 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -828,7 +828,6 @@ void mmc_set_preinit(struct mmc *mmc, int preinit); #else #define mmc_host_is_spi(mmc) 0 #endif -struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode); void board_mmc_power_init(void); int board_mmc_init(bd_t *bis);