From: Jaehoon Chung <jh80.chung@samsung.com>
To: Avi Shchislowski <avi.shchislowski@sandisk.com>, ulf.hansson@linaro.org
Cc: "'Chris Ball'" <chris@printf.net>,
linux-mmc@vger.kernel.org, Alex.Lemberg@sandisk.com,
gwendal@google.com, open list <linux-kernel@vger.kernel.org>,
CPGS <cpgs@samsung.com>
Subject: Re: [PATCH 1/3] mmc: Support FFU for eMMC v5.0
Date: Tue, 11 Nov 2014 12:07:59 +0900 [thread overview]
Message-ID: <54617D8F.8060506@samsung.com> (raw)
In-Reply-To: <1415639632-878-1-git-send-email-avi.shchislowski@sandisk.com>
Hi,
how did you make the patch?
This patch didn't apply at Ulf's repository.
On 11/11/2014 02:13 AM, Avi Shchislowski wrote:
>
> Add eMMC5.0 ffu ext_csd fields
>
> Signed-off-by: Avi Shchislowski <avi.shchislowski@sandisk.com>
> Signed-off-by: Alex Lemberg <alex.lemberg@sandisk.com>
>
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 1eda8dd..3b86ed3 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -603,6 +603,15 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
> card->ext_csd.data_sector_size = 512;
> }
>
> + /* eMMC v5 or later */
> + if (card->ext_csd.rev >= 7) {
> + card->ext_csd.ffu_capable =
> + ((ext_csd[EXT_CSD_SUPPORTED_MODE] & 0x1) == 0x1) &&
> + ((ext_csd[EXT_CSD_FW_CONFIG] & 0x1) == 0x0);
if (ext_csd[EXT_CSD_SUPPORTED_MODE] & 0x1) && !(ext_csd[EXT_CSD_FW_CONFIG] & 0x1))
card->ext_csd.ffu_capable = true;
> + card->ext_csd.ffu_mode_op = ext_csd[EXT_CSD_FFU_FEATURES];
> + } else {
> + card->ext_csd.ffu_capable = false;
Can be set to false by default before checking whether card is eMMC v5.0 or not.
card->ext_csd.ffu_capable = false;
if (card->ext_csd.rev >= 7) {
...
}
Best Regards,
Jaehoon Chung
> + }
> out:
> return err;
> }
> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
> index d424b9d..dd01efe 100644
> --- a/include/linux/mmc/card.h
> +++ b/include/linux/mmc/card.h
> @@ -81,6 +81,8 @@ struct mmc_ext_csd {
> bool hpi_en; /* HPI enablebit */
> bool hpi; /* HPI support bit */
> unsigned int hpi_cmd; /* cmd used as HPI */
> + bool ffu_capable; /* FFU support */
> + bool ffu_mode_op; /* FFU mode operation */
> bool bkops; /* background support bit */
> bool bkops_en; /* background enable bit */
> unsigned int data_sector_size; /* 512 bytes or 4KB */
> diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
> index 64ec963..787787b 100644
> --- a/include/linux/mmc/mmc.h
> +++ b/include/linux/mmc/mmc.h
> @@ -272,6 +272,9 @@ struct _mmc_csd {
> * EXT_CSD fields
> */
>
> +#define EXT_CSD_FFU_STATUS 26 /* R */
> +#define EXT_CSD_MODE_OPERATION_CODES 29 /* W */
> +#define EXT_CSD_MODE_CONFIG 30 /* R/W */
> #define EXT_CSD_FLUSH_CACHE 32 /* W */
> #define EXT_CSD_CACHE_CTRL 33 /* R/W */
> #define EXT_CSD_POWER_OFF_NOTIFICATION 34 /* R/W */
> @@ -290,6 +293,7 @@ struct _mmc_csd {
> #define EXT_CSD_SANITIZE_START 165 /* W */
> #define EXT_CSD_WR_REL_PARAM 166 /* RO */
> #define EXT_CSD_RPMB_MULT 168 /* RO */
> +#define EXT_CSD_FW_CONFIG 169 /* R/W */
> #define EXT_CSD_BOOT_WP 173 /* R/W */
> #define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */
> #define EXT_CSD_PART_CONFIG 179 /* R/W */
> @@ -326,6 +330,11 @@ struct _mmc_csd {
> #define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */
> #define EXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */
> #define EXT_CSD_PWR_CL_DDR_200_360 253 /* RO */
> +#define EXT_CSD_NUM_OF_FW_SEC_PROG 302 /* RO, 4 bytes */
> +#define EXT_CSD_FFU_ARG 487 /* RO, 4 bytes */
> +#define EXT_CSD_OPERATION_CODE_TIMEOUT 491 /* RO */
> +#define EXT_CSD_FFU_FEATURES 492 /* RO */
> +#define EXT_CSD_SUPPORTED_MODE 493 /* RO */
> #define EXT_CSD_TAG_UNIT_SIZE 498 /* RO */
> #define EXT_CSD_DATA_TAG_SUPPORT 499 /* RO */
> #define EXT_CSD_MAX_PACKED_WRITES 500 /* RO */
>
next prev parent reply other threads:[~2014-11-11 3:08 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <n@samsung.com>
2012-08-05 13:08 ` [RFC/PATCH] mmc: core: Add support for idle time BKOPs Maya Erez
2012-08-30 7:36 ` Jaehoon Chung
2012-09-04 5:42 ` merez
2012-10-04 22:28 ` [PATCH v2] mmc: core: Add support for idle time BKOPS Maya Erez
2012-10-09 3:52 ` merez
2012-10-16 7:53 ` Jaehoon Chung
2012-11-07 4:28 ` merez
2012-11-08 5:26 ` Jaehoon Chung
2012-11-11 9:25 ` Subhash Jadavani
2012-10-18 16:31 ` [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Sangho Yi
2012-10-18 16:31 ` [PATCH 2/6] mmc: core: sdio_bus.c: Removed trailing whitespace error Sangho Yi
2012-10-18 16:31 ` [PATCH 3/6] mmc: core: sdio_bus.c: Fixed lines > 80 chars Sangho Yi
2012-10-18 23:54 ` Jaehoon Chung
2012-10-18 16:31 ` [PATCH 4/6] mmc: core: sdio_bus.c: Removed space between func name and () Sangho Yi
2012-10-18 16:31 ` [PATCH 5/6] mmc: core: sdio_bus.c: Fixed a warning for the pr_warning( Sangho Yi
2012-10-18 16:31 ` [PATCH 6/6] mmc: core: sdio_bus.c: Removed unnecessary NULL check routine Sangho Yi
2012-10-18 16:47 ` [PATCH 1/6] mmc: core: sdio_io.c: Fixed lines with > 80 chars Joe Perches
2012-11-25 11:56 ` [PATCH v3] mmc: core: Add support for idle time BKOPS Maya Erez
2012-11-25 12:46 ` merez
2012-11-28 14:22 ` Chris Ball
2012-11-29 12:40 ` Jaehoon Chung
2012-12-03 9:49 ` merez
2012-12-04 9:52 ` Ulf Hansson
2012-12-04 21:17 ` merez
2012-12-06 10:18 ` Ulf Hansson
2012-12-12 12:32 ` merez
2012-12-13 10:17 ` Ulf Hansson
2012-12-21 8:35 ` Maya Erez
2012-12-21 9:56 ` Ulf Hansson
2012-12-21 10:24 ` Jaehoon Chung
2014-11-10 17:13 ` [PATCH 1/3] mmc: Support FFU for eMMC v5.0 Avi Shchislowski
2014-11-11 3:07 ` Jaehoon Chung [this message]
2014-11-11 8:44 ` Avi Shchislowski
2014-11-10 17:18 ` [PATCH 2/3] " Avi Shchislowski
2014-11-11 3:30 ` Jaehoon Chung
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=54617D8F.8060506@samsung.com \
--to=jh80.chung@samsung.com \
--cc=Alex.Lemberg@sandisk.com \
--cc=avi.shchislowski@sandisk.com \
--cc=chris@printf.net \
--cc=cpgs@samsung.com \
--cc=gwendal@google.com \
--cc=linux-kernel@vger.kernel.org \
--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
Powered by JetHome