From patchwork Fri Dec 30 12:47:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 89349 Delivered-To: patches@linaro.org Received: by 10.140.20.101 with SMTP id 92csp6424775qgi; Fri, 30 Dec 2016 04:48:29 -0800 (PST) X-Received: by 10.46.71.211 with SMTP id u202mr13358507lja.69.1483102109873; Fri, 30 Dec 2016 04:48:29 -0800 (PST) Return-Path: Received: from mail-lf0-x229.google.com (mail-lf0-x229.google.com. [2a00:1450:4010:c07::229]) by mx.google.com with ESMTPS id z80si15870372lfd.99.2016.12.30.04.48.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Dec 2016 04:48:29 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::229 as permitted sender) client-ip=2a00:1450:4010:c07::229; 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::229 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x229.google.com with SMTP id b14so236441530lfg.2 for ; Fri, 30 Dec 2016 04:48:29 -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=qo6V6mQMGskVWJGHpm27yT9vig+0/LgcbA4kpHPa5oU=; b=dPe9GPZaRK7jhyJcnEizK/6wfr0sfXKJhAz37Xv1j7htrpIR1JlN9PTzVXNhsLg9Zq lO32/jMv6e+dMR00rREkxLEUlWTn7YItdh4aXbnOT8VMeIqxq9cYfFppgMtJPNPwWzx9 MTcEc9Db6c2fOTnu24Su7tueK8jpYMD0enQVo= 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=qo6V6mQMGskVWJGHpm27yT9vig+0/LgcbA4kpHPa5oU=; b=eEseB4S22WEiUVwVGyRLLpd7Hz0xrEQ4PIvCEYR4x1XcZCtuY8/fJvrr0a+y4sSx+4 ammBbvLqVx/fTp7V20aHV47V5620PlMiul1fBWuCX42j2/84yNjjWZQQO7I4DRXIXjP6 08ob/mX8l/KHMg8kRx8isdPY13g2fxBX2e5CB24ckCkmEyOXLwfeTS3ECmYbahbnteLO qz36mVqBO0lFc6K6NNHNZxOaEXXMZmRA2NpzcNTwMFSZt78sbsXH3JlJ8hZgV4nYmj/5 iia0fS6HDgUDJF+h6rKqjS2l4qrhO2AdTjv2opm9DIEM7Ftryn7k1d72mo0pS5J2zRVa GJoA== X-Gm-Message-State: AIkVDXLnXty/d2rP6B1+CNE5YCpeKbJRI5hLsyf11If90u+F8T9bQ37ZfbI1ZpkzoOOMcbATGZY= X-Received: by 10.46.21.68 with SMTP id 4mr16202760ljv.11.1483102109477; Fri, 30 Dec 2016 04:48:29 -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 a79sm7450069ljb.46.2016.12.30.04.48.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Dec 2016 04:48:28 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Linus Walleij Subject: [PATCH 15/21] mmc: core: Move erase/trim/discard defines from public core.h to mmc.h Date: Fri, 30 Dec 2016 13:47:28 +0100 Message-Id: <1483102054-1752-16-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org> References: <1483102054-1752-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 --- include/linux/mmc/core.h | 10 ---------- include/linux/mmc/mmc.h | 13 ++++++++++++- 2 files changed, 12 insertions(+), 11 deletions(-) -- 1.9.1 Reviewed-by: Linus Walleij 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 */