From patchwork Fri Jan 13 13:14:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 91412 Delivered-To: patches@linaro.org Received: by 10.182.3.34 with SMTP id 2csp131187obz; Fri, 13 Jan 2017 05:15:03 -0800 (PST) X-Received: by 10.25.16.193 with SMTP id 62mr6574554lfq.75.1484313302904; Fri, 13 Jan 2017 05:15:02 -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 j21si7883283lfg.61.2017.01.13.05.15.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 05:15:02 -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 z134so33624117lff.3 for ; Fri, 13 Jan 2017 05:15:02 -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=XC9prz+oAHHqCfjvPmgrm4fBL1jpHfPYo+pwlYoe8ezN5zZZrEz7rklyqBkro6ok5F X69bQDGnqv85tMA5T6zltv4MOI5uyzok0CY2UnFLnZuCVoASlGu6490qysBcwquo3H0A WjqcwAeziz4BvmbSD3DQymiYo+TzNWkPYcK6c= 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=c5BrnL1imHwzMe/nYSkjDtGu7RL58P6gioJkF6QNSCNb18ZFO53aK2tTgukCJoYH0A yYVdoKj+djhrflUYg/NJ6Ac3F2v7Ebm7Mbor+8KzEoc2VlfixZU4GSTRsL+j6lr4QIKL EzgGsPjpXtNLzY/leWTa+iolbn2XjZUkBkyhkUhtRA89Ct9s9utl9O/xFxBa6uEgZ3CO n7X/SQn4aZvsjojDNuE18ySszyk+6Bos9mgii7vE03tuJs0A2suDP0q4xxF2wPArlTXH rK6IgWiumohc5xU5doqunimYy9gWt4gTP2Fu3mmNt6iSG3d901nSFlo08JcSVvyIGoai DVfw== X-Gm-Message-State: AIkVDXJr66BTMAR4rHkKi85NLcBAiD0nXkKRFkWMxkn8DVb/NkF1H9DeFEzQnYmLGD9OnIvX/Zw= X-Received: by 10.25.195.151 with SMTP id t145mr7783672lff.149.1484313302493; Fri, 13 Jan 2017 05:15:02 -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 l67sm2931452lfb.15.2017.01.13.05.14.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 05:15:01 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Linus Walleij Subject: [PATCH v3 09/15] mmc: core: Move erase/trim/discard defines from public core.h to mmc.h Date: Fri, 13 Jan 2017 14:14:10 +0100 Message-Id: <1484313256-25993-10-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484313256-25993-1-git-send-email-ulf.hansson@linaro.org> References: <1484313256-25993-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 Reviewed-by: Shawn Lin 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 */