From patchwork Wed Jan 11 11:51:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 90855 Delivered-To: patches@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1081679qgi; Wed, 11 Jan 2017 03:51:48 -0800 (PST) X-Received: by 10.25.35.194 with SMTP id j185mr2787603lfj.21.1484135508572; Wed, 11 Jan 2017 03:51:48 -0800 (PST) Return-Path: Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com. [2a00:1450:4010:c07::22a]) by mx.google.com with ESMTPS id x10si3353562lfd.263.2017.01.11.03.51.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 03:51:48 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22a as permitted sender) client-ip=2a00:1450:4010:c07::22a; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22a as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22a.google.com with SMTP id o140so80121010lff.3 for ; Wed, 11 Jan 2017 03:51:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=v6q4zRL3bRt/3qCeA8/anKSZJ/wG1C2wRelnaZLBrdo=; b=R/ejuLdeX2YeCuOAm1AUsILFkkUhLAk8D7wU5jPQnzt8MmR7R/jyJWmgdVJciZLv6Z oZAcQT5Cm/nmfpbjntLWrRFtue7Cl2ko6VBeMAjbPuft9ylY4xyVblzEeA+zGfsrKKKI XSui1GJWI3g3gw1Vn5oc5WZj1ACpQKe2mZCeg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=v6q4zRL3bRt/3qCeA8/anKSZJ/wG1C2wRelnaZLBrdo=; b=pm2vVGO5pCR6Cwl/JNYDl/RfAW6F7KP87r/SyBpgwclf7GjT/f0UzzP6B4vGa/Je1e LihNUlGPLmsyq1R2+i5qVA8n6XsE/xqv1ku1w/9Iz3HY79jkiv4feY3HgjqA+AoDkjsA EjBgVHgwbS0AQ74gM2mABt+mGXngVVvybW6ITIxk7OvKeo5nSS3tqOk+a6plTDD9HNVI ZBFrnurX+HMSFUNvFdlE+SmcF/M89MGsMeBWmjCFnID3vjqd9UkJriya1J42VMz85Gv9 0xdcRBn2Z51bwDpTtJG4jZJL6dMa54op2khoquaWaP1BLkAtkxA6cuEu6Ver+lFbcFSZ BZ0Q== X-Gm-Message-State: AIkVDXKPG16zNXXd+NMAThduJUYG3Ya2SJEMD6pTrYbAKQ7K+TliN0ifTU7nHAL+GSCud43B0dk= X-Received: by 10.46.22.15 with SMTP id w15mr2000356ljd.35.1484135508125; Wed, 11 Jan 2017 03:51:48 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id 87sm958768lft.27.2017.01.11.03.51.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Jan 2017 03:51:46 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Linus Walleij Subject: [PATCH v2 06/12] mmc: core: Move erase/trim/discard defines from public core.h to mmc.h Date: Wed, 11 Jan 2017 12:51:12 +0100 Message-Id: <1484135478-2077-7-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484135478-2077-1-git-send-email-ulf.hansson@linaro.org> References: <1484135478-2077-1-git-send-email-ulf.hansson@linaro.org> As the public mmc.h header already contains similar defines for other mmc commands and arguments, let's move those for erase/trim/discard into here as well. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij --- include/linux/mmc/core.h | 10 ---------- include/linux/mmc/mmc.h | 13 ++++++++++++- 2 files changed, 12 insertions(+), 11 deletions(-) -- 1.9.1 diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index faacc90..6440e10 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -164,16 +164,6 @@ extern struct mmc_async_req *mmc_start_req(struct mmc_host *, extern void mmc_wait_for_req(struct mmc_host *, struct mmc_request *); extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); -#define MMC_ERASE_ARG 0x00000000 -#define MMC_SECURE_ERASE_ARG 0x80000000 -#define MMC_TRIM_ARG 0x00000001 -#define MMC_DISCARD_ARG 0x00000003 -#define MMC_SECURE_TRIM1_ARG 0x80000001 -#define MMC_SECURE_TRIM2_ARG 0x80008000 - -#define MMC_SECURE_ARGS 0x80000000 -#define MMC_TRIM_ARGS 0x00008001 - extern int mmc_hw_reset(struct mmc_host *host); extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 261772e..8f78543 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h @@ -462,12 +462,23 @@ struct _mmc_csd { /* * MMC_SWITCH access modes */ - #define MMC_SWITCH_MODE_CMD_SET 0x00 /* Change the command set */ #define MMC_SWITCH_MODE_SET_BITS 0x01 /* Set bits which are 1 in value */ #define MMC_SWITCH_MODE_CLEAR_BITS 0x02 /* Clear bits which are 1 in value */ #define MMC_SWITCH_MODE_WRITE_BYTE 0x03 /* Set target to value */ +/* + * Erase/trim/discard + */ +#define MMC_ERASE_ARG 0x00000000 +#define MMC_SECURE_ERASE_ARG 0x80000000 +#define MMC_TRIM_ARG 0x00000001 +#define MMC_DISCARD_ARG 0x00000003 +#define MMC_SECURE_TRIM1_ARG 0x80000001 +#define MMC_SECURE_TRIM2_ARG 0x80008000 +#define MMC_SECURE_ARGS 0x80000000 +#define MMC_TRIM_ARGS 0x00008001 + #define mmc_driver_type_mask(n) (1 << (n)) #endif /* LINUX_MMC_MMC_H */