From: alex lemberg <alex.lemberg@sandisk.com>
To: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org
Cc: avi.shchislowski@sandisk.com, alex lemberg <alex.lemberg@sandisk.com>
Subject: [PATCH 2/3] mmc: Adding AUTO_BKOPS_EN bit set for Auto BKOPS support
Date: Thu, 1 Sep 2016 17:24:49 +0300 [thread overview]
Message-ID: <1472739890-3384-3-git-send-email-alex.lemberg@sandisk.com> (raw)
In-Reply-To: <1472739890-3384-1-git-send-email-alex.lemberg@sandisk.com>
Signed-off-by: alex lemberg <alex.lemberg@sandisk.com>
---
drivers/mmc/core/mmc.c | 6 ++++++
include/linux/mmc/card.h | 1 +
include/linux/mmc/mmc.h | 1 +
3 files changed, 8 insertions(+)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index f2d185c..e2e987f 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -531,6 +531,12 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
if (!card->ext_csd.man_bkops_en)
pr_debug("%s: MAN_BKOPS_EN bit is not set\n",
mmc_hostname(card->host));
+ card->ext_csd.auto_bkops_en =
+ (ext_csd[EXT_CSD_BKOPS_EN] &
+ EXT_CSD_AUTO_BKOPS_MASK);
+ if (!card->ext_csd.auto_bkops_en)
+ pr_debug("%s: AUTO_BKOPS_EN bit is not set\n",
+ mmc_hostname(card->host));
}
/* check whether the eMMC card supports HPI */
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 73fad83..aaedb68 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -84,6 +84,7 @@ struct mmc_ext_csd {
unsigned int hpi_cmd; /* cmd used as HPI */
bool bkops; /* background support bit */
bool man_bkops_en; /* manual bkops enable bit */
+ bool auto_bkops_en; /* auto bkops enable bit */
unsigned int data_sector_size; /* 512 bytes or 4KB */
unsigned int data_tag_unit_size; /* DATA TAG UNIT size */
unsigned int boot_ro_lock; /* ro lock support */
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index c376209..0fe3908 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -436,6 +436,7 @@ struct _mmc_csd {
* BKOPS modes
*/
#define EXT_CSD_MANUAL_BKOPS_MASK 0x01
+#define EXT_CSD_AUTO_BKOPS_MASK 0x02
/*
* MMC_SWITCH access modes
--
1.9.1
next prev parent reply other threads:[~2016-09-01 14:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 14:24 [PATCH 0/3] mmc: Check BKOPS Level On Runtime Suspend alex lemberg
2016-09-01 14:24 ` [PATCH 1/3] mmc: replacing hardcoded value for runtime PM suspend alex lemberg
2016-09-02 7:39 ` Shawn Lin
2016-09-04 13:30 ` Alex Lemberg
2016-10-13 7:36 ` Ulf Hansson
2016-10-13 8:30 ` Shawn Lin
2016-10-31 9:53 ` Alex Lemberg
2016-09-01 14:24 ` alex lemberg [this message]
2016-09-02 7:50 ` [PATCH 2/3] mmc: Adding AUTO_BKOPS_EN bit set for Auto BKOPS support Shawn Lin
2016-09-04 13:22 ` Alex Lemberg
2016-10-13 7:36 ` Ulf Hansson
2016-10-31 9:53 ` Alex Lemberg
2016-09-01 14:24 ` [PATCH 3/3] mmc: Checking BKOPS status prior to Suspend alex lemberg
2016-10-13 7:36 ` Ulf Hansson
2016-10-31 9:53 ` Alex Lemberg
2016-09-26 15:10 ` [PATCH 0/3] mmc: Check BKOPS Level On Runtime Suspend Alex Lemberg
-- strict thread matches above, loose matches on Subject: below --
2017-01-17 12:15 [PATCH 0/3] Auto BKOPS PM suspend Uri Yanai
2017-01-17 12:15 ` [PATCH 2/3] mmc: Adding AUTO_BKOPS_EN bit set for Auto BKOPS support Uri Yanai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472739890-3384-3-git-send-email-alex.lemberg@sandisk.com \
--to=alex.lemberg@sandisk.com \
--cc=avi.shchislowski@sandisk.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox